|
上完1Z0-063多租户部分(不讲1Z0-063备份恢复部分)第1/2章
1Z0-052共19章(上完19章),1Z0-053共21章(上完21章)和1Z0-063多租户部分共9章(上完2章)
总共上完全部49章中的42章
- --. oraenv
- --cdb1
- --conn / as sysdba
- select d.CON_ID,d.NAME,d.OPEN_MODE,d.CDB
- from v$database d;
-
- select i.INSTANCE_MODE, i.INSTANCE_NAME,i.CON_ID
- from v$instance i;
-
- select s.CON_ID,s.NAME,s.PDB
- from v$services s;
-
- select p.CON_ID,p.NAME,p.OPEN_MODE
- from v$pdbs p;
-
- alter pluggable database pdb1_1 open;
-
- select sys_context('userenv','con_id') from dual;
-
- select sys_context('userenv','con_name') from dual;
-
- select c.CON_ID,c.DBID,c.PDB_ID, c.GUID , c.PDB_NAME,c.STATUS
- from cdb_pdbs c;
-
- select * from v$logfile;
-
- select * from v$controlfile;
-
- select c.CON_ID,c.FILE_NAME,c.STATUS from
- cdb_data_files c;
-
- select d.CON_ID,d.NAME,d.STATUS
- from v$datafile d;
-
- select t.NAME,t.STATUS,t.CON_ID
- from v$tempfile t;
-
- select * from dba_data_files;
-
- select t.CON_ID,t.NAME,d.NAME,d.STATUS
- from v$tablespace t, v$datafile d
- where t.TS#=d.TS# and t.CON_ID=d.CON_ID
- order by 1,2;
-
- select c.CON_ID,c.FILE_NAME,c.TABLESPACE_NAME,c.STATUS
- from cdb_temp_files c;
-
- select t.CON_ID,t.NAME,d.NAME,d.STATUS
- from v$tablespace t, v$tempfile d
- where t.TS#=d.TS# and t.CON_ID=d.CON_ID
- order by 1,2;
-
-
- select c.COMMON,c.CON_ID,c.DEFAULT_TABLESPACE,
- c.TEMPORARY_TABLESPACE,c.INITIAL_RSRC_CONSUMER_GROUP,c.USERNAME
- from cdb_users c
- where c.USERNAME='SYSTEM';
-
- select c.COMMON,c.CON_ID,c.DEFAULT_TABLESPACE,
- c.TEMPORARY_TABLESPACE,c.INITIAL_RSRC_CONSUMER_GROUP,c.USERNAME
- from cdb_users c
- where c.COMMON='NO';
- select u.USERNAME
- from dba_users u
- where u.COMMON='NO';
-
- select r.ROLE
- from dba_roles r
- where r.COMMON='NO';
-
- select u.USERNAME ,u.CON_ID
- from cdb_users u
- where u.COMMON='NO';
-
- select r.ROLE,r.CON_ID
- from cdb_roles r
- where r.COMMON='NO';
-
- select *
- from cdb_roles r
- order by r.CON_ID, r.ROLE;
-
- desc sys.system_privilege_map;
-
- select count(*) from system_privilege_map;
- select * from system_privilege_map;
- select distinct p.name from system_privilege_map p;
- desc sys.table_privilege_map;
- select count(*) from table_privilege_map;
- select * from table_privilege_map;
- select distinct tp.NAME from table_privilege_map tp;
- select * from cdb_sys_privs sp
- where sp.CON_ID=1 and sp.COMMON='YES';
-
- select * from cdb_sys_privs sp
- where sp.CON_ID=1 and sp.COMMON='NO';
-
- select tp.GRANTEE,tp.GRANTOR,tp.CON_ID,tp.TABLE_NAME
- from cdb_tab_privs tp
- where tp.CON_ID=1 and tp.COMMON='YES';
-
-
- select tp.GRANTEE,tp.GRANTOR,tp.CON_ID,tp.TABLE_NAME
- from cdb_tab_privs tp
- where tp.CON_ID=1 and tp.COMMON='NO';
-
- select rp.GRANTEE, rp.GRANTED_ROLE, rp.COMMON,rp.CON_ID
- from cdb_role_privs rp
- where rp.CON_ID=1 and rp.COMMON='YES';
-
- select rp.GRANTEE, rp.GRANTED_ROLE, rp.COMMON,rp.CON_ID
- from cdb_role_privs rp
- where rp.CON_ID=1 and rp.COMMON='NO';
-
-
- select * from cdb_sys_privs sp
- where sp.CON_ID=3 and sp.COMMON='YES';
-
- select * from cdb_sys_privs sp
- where sp.CON_ID=3 and sp.COMMON='NO';
-
- select tp.GRANTEE,tp.GRANTOR,tp.CON_ID,tp.TABLE_NAME
- from cdb_tab_privs tp
- where tp.CON_ID=3 and tp.COMMON='YES';
-
-
- select tp.GRANTEE,tp.GRANTOR,tp.CON_ID,tp.TABLE_NAME
- from cdb_tab_privs tp
- where tp.CON_ID=3 and tp.COMMON='NO';
-
- select rp.GRANTEE, rp.GRANTED_ROLE, rp.COMMON,rp.CON_ID
- from cdb_role_privs rp
- where rp.CON_ID=3 and rp.COMMON='YES';
-
- select rp.GRANTEE, rp.GRANTED_ROLE, rp.COMMON,rp.CON_ID
- from cdb_role_privs rp
- where rp.CON_ID=3 and rp.COMMON='NO';
复制代码
|
|