oracle sqlplus基本操作
2012-09-04 15:39
489 查看
说明:以下操作均在windows cmd下进行 进入sqlplus: sqlplus /nolog 登录Oracle数据库管理员 conn username/password as sysdba; 查看数据库中的用户 select username,account_status from dba_users; 给scott用户解锁 alter user scott account unlock; 给scott用户修改密码 alter user scott identified by aa123; 登录scott用户 conn scott/aa123 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- /*创建用户及其表空间分为四步 */ /*第1步:创建临时表空间 */ create temporary tablespace user_temp tempfile 'D:\oracle\oradata\Oracle9i\user_temp.dbf' size 50m autoextend on next 50m maxsize 20480m extent management local; /*第2步:创建数据表空间 */ create tablespace test_data logging datafile 'D:\oracle\oradata\Oracle9i\user_data.dbf' size 50m autoextend on next 50m maxsize 20480m extent management local; /*第3步:创建用户并指定表空间 */ create user username identified by password default tablespace user_data temporary tablespace user_temp; /*第4步:给用户授予权限 */ grant connect,resource,dba to username; 删除表空间,临时表空间 DROP TABLESPACE user_temp INCLUDING CONTENTS AND DATAFILES; ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 向scott用户导入表结构和数据 sql>@E:\report_data.sql; 查看用户下得所有表 Select table_name from user_tables; 查看表中字段 Select column_name from user_tab_columns where table_name=’*****’;
相关文章推荐
- ORACLE SQL*PLUS 基本连接与退出操作
- ORACLE SQL*PLUS 基本操作(一)
- Oracle SQL Plus 的基本操作 - Oracle 学习笔记 1
- 常用的SQL*PLUS命令 ,SQL缓冲区操作和最基本的脚本操作(从实践中学习Oracle SQL-第三章)
- oracle学习笔记--sqlplus基本命令
- vnc配合oracle sqldeveloper 本地基本连接操作 centos
- Oracle基本操作SQL 《转》
- oracle-sql基本操作1
- Oracle下SQL基本操作(一)
- 【Orcale】sqlplus 基本指令操作之权限管理
- Oracle基本操作SQL
- Oracle下SQL基本操作(二)
- Oracle命令行工具基本操作及SQL 命令
- Oracle基础 -- SQL *Plus基本用法
- Oracle下SQL基本操作(三)
- Oracle命令行工具基本操作及SQL 命令
- Oracle 10g的使用【SQLPLUS操作大全】
- oracle sqlplus操作
- oracle-pl/sql基本操作1
- Oracle篇章系列一:sqlplus概念认知及其启动关闭数据库和用户操作