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 ;