1 如何查看数据库中都有什么表?
select * from sys.user_tables;
2 如何链接数据库
sqlplus /nolog;conn sys/oracle as sysdba;
3 如何启动数据库
startup;
4 查看ORACLE实例结构
desc V$instance;
5 查看用户默认表空间、临时表空间信息
select distinct username,DEFAULT_TABLESPACE,TEMPORARY_TABLESPACE from dba_users where username in(‘SYSTEM‘,‘PRODUCTDB‘,‘PROCESS_USER‘,‘DICTIONARY‘,‘OBSERVE‘,‘FORECAST‘)
6 创建用户
create user OBSERVE identified by 123456;(默认表空间USERS,临时表空间 TEMP)
7 查看当前用户角色权限
desc role_sys_privs;
8 查看ORACLE所有角色
select ROLE from dba_roles order by ROLE;
9 查看所有用户具有的角色
select distinct GRANTEE,GRANTED_ROLE from dba_role_privs order by GRANTEE;
10 用户绑定角色
grant DBA to KFSYS ;
原文地址:http://blog.csdn.net/hi_1234567/article/details/17207677