|
1Z0-063第2章
1Z0-052共19章(上完19章),1Z0-053共21章(上完21章)和1Z0-063多租户部分共9章(上完2章)
总共上完全部49章中的42章
在多租户的根容器上查v$视图:
- select d.CON_ID,d.NAME,d.OPEN_MODE,d.CDB
- from v$database d;
- 显示成容器0,不是容器1。容器0代表公共的。
复制代码- select i.INSTANCE_MODE, i.INSTANCE_NAME,i.CON_ID
- from v$instance i;
- 显示成容器0,不是容器1。容器0代表公共的。
复制代码- 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;
-
-
- select sys_context('userenv','con_id') from dual;
-
- select sys_context('userenv','con_name') from dual;
复制代码- select * from v$logfile;
- 显示成容器0,不是容器1。容器0代表公共的。
复制代码- select * from v$controlfile;
- 显示成容器0,不是容器1。容器0代表公共的。
复制代码- select c.CON_ID,c.FILE_NAME,c.STATUS from
- cdb_data_files c;
- 所有CDB视图,都可以在插件数据库中查。如果在根容器上查,都不会显示成容器0,而是显示成容器1。
复制代码- 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;
- 以上语句在插件库中查,能显示包括UNDO表空间在类的插件数据库所有文件,UNDO表空间的文件显示成容器0(公共)。
复制代码- 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';
- 除了cdb_pdbs以外,其他cdb_视图都不显示种子。
复制代码- 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 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 distinct b.STATUS, b.CON_ID
- from v$bh b
- order by 2;
- 内存是各个容器共享的。
复制代码 ASM上和文件系统上的容器数据库文件夹位置的对比:
- oracle@station26 oradata]$ ls
- cdb2 orcl
- [oracle@station26 oradata]$ cd cdb2/
- [oracle@station26 cdb2]$ pwd
- /u01/app/oracle/oradata/cdb2
- [oracle@station26 cdb2]$ ls
- control01.ctl pdbseed redo01.log redo02.log redo03.log sysaux01.dbf system01.dbf temp01.dbf undotbs01.dbf users01.dbf
- [oracle@station26 cdb2]$ cd ..
- [oracle@station26 oradata]$ ls
- cdb2 orcl
- [oracle@station26 oradata]$ cd ..
- [oracle@station26 oracle]$ ls
- admin audit cfgtoollogs checkpoints crsdata diag fast_recovery_area log oradata product station26
- [oracle@station26 oracle]$ cd fast_recovery_area
- [oracle@station26 fast_recovery_area]$ ls
- cdb2 CDB2 orcl ORCL
- [oracle@station26 fast_recovery_area]$ cd cdb2
- [oracle@station26 cdb2]$ ls
- control02.ctl
- [oracle@station26 cdb2]$ cd ..
- [oracle@station26 fast_recovery_area]$ ls
- cdb2 CDB2 orcl ORCL
- [oracle@station26 fast_recovery_area]$ cd ..
- [oracle@station26 oracle]$ ls
- admin audit cfgtoollogs checkpoints crsdata diag fast_recovery_area log oradata product station26
- [oracle@station26 oracle]$ cd oradata
- [oracle@station26 oradata]$ ls
- cdb2 orcl
- [oracle@station26 oradata]$ cd cdb2
- [oracle@station26 cdb2]$ ls
- control01.ctl pdbseed redo01.log redo02.log redo03.log sysaux01.dbf system01.dbf temp01.dbf undotbs01.dbf users01.dbf
- [oracle@station26 cdb2]$ cd pdbseed
- [oracle@station26 pdbseed]$ ls
- pdbseed_temp012017-12-22_06-04-39-PM.dbf sysaux01.dbf system01.dbf
- [oracle@station26 pdbseed]$ cd
- [oracle@station26 ~]$ . oraenv
- ORACLE_SID = [cdb1] ?
- The Oracle base remains unchanged with value /u01/app/oracle
- [oracle@station26 ~]$ . oraenv
- ORACLE_SID = [cdb1] ? +ASM
- The Oracle base remains unchanged with value /u01/app/oracle
- [oracle@station26 ~]$ asmcmd
- ASMCMD> ls
- DATA/
- FRA/
- ASMCMD> cd data
- ASMCMD> ls
- ASM/
- CDB1/
- ORCL2/
- orapwasm
- ASMCMD> cd CDB1/
- ASMCMD> ls
- 47847425558B6E0FE0531A00A8C0F7C0/
- 4784B01598A17301E0531A00A8C082AB/
- CONTROLFILE/
- DATAFILE/
- FD9AC20F64D244D7E043B6A9E80A2F2F/
- FD9BD2B44413096FE043B6A9E80ABC28/
- ONLINELOG/
- PARAMETERFILE/
- TEMPFILE/
- ASMCMD> cd FD9AC20F64D244D7E043B6A9E80A2F2F/
- ASMCMD> ls
- DATAFILE/
- ASMCMD> cd DATAFILE/
- ASMCMD> ls
- SYSAUX.266.934887937
- SYSTEM.267.934887939
- pdbseed_temp012017-02-02_11-06-38-AM.dbf
- ASMCMD> ls -l
- Type Redund Striped Time Sys Name
- DATAFILE MIRROR COARSE DEC 22 15:00:00 Y SYSAUX.266.934887937
- DATAFILE MIRROR COARSE DEC 22 15:00:00 Y SYSTEM.267.934887939
- TEMPFILE MIRROR COARSE DEC 22 15:00:00 N pdbseed_temp012017-02-02_11-06-38-AM.dbf => +DATA/CDB1/47847425558B6E0FE0531A00A8C0F7C0/TEMPFILE/TEMP.268.934887999
- ASMCMD> exit
- [oracle@station26 ~]$ cd /u01/app/oracle/
- [oracle@station26 oracle]$ ls
- admin audit cfgtoollogs checkpoints crsdata diag fast_recovery_area log oradata product station26
- [oracle@station26 oracle]$ cd oradata/
- [oracle@station26 oradata]$ ls
- cdb2 orcl
- [oracle@station26 oradata]$ pwd
- /u01/app/oracle/oradata
- [oracle@station26 oradata]$ ls
- cdb2 orcl
- [oracle@station26 oradata]$ cd cdb2/
- [oracle@station26 cdb2]$ ls
- control01.ctl pdbseed redo01.log redo02.log redo03.log sysaux01.dbf system01.dbf temp01.dbf undotbs01.dbf users01.dbf
- [oracle@station26 cdb2]$ mkdir pdb2_1
- [oracle@station26 cdb2]$ cd pdb2_1/
- [oracle@station26 pdb2_1]$ ls
- [oracle@station26 pdb2_1]$ pwd
- /u01/app/oracle/oradata/cdb2/pdb2_1
- [oracle@station26 pdb2_1]$
复制代码 SQLPLUS创建插件数据库的语句:
- create pluggable database pdb2_1
- admin user pdb2_1_admin
- identified by oracle_4U roles=(connect)
- file_name_convert=('/u01/app/oracle/oradata/cdb2/pdbseed',
- '/u01/app/oracle/oradata/cdb2/pdb2_1');
- select con_id, open_mode , name
- from v$pdbs;
-
- alter pluggable database pdb2_1 open ;
-
- select con_id, open_mode , name
- from v$pdbs;
复制代码 观察创建完成后的pdb2_1和种子:
- [oracle@station26 admin]$ vim tnsnames.ora
- [oracle@station26 admin]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Mon Dec 25 20:13:44 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn sys/oracle_4U@pdb2_1 as sysdba
- ERROR:
- ORA-12154: TNS:could not resolve the connect identifier specified
- SQL> exit
- [oracle@station26 admin]$ lsnrctl services
- LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 25-DEC-2017 20:13:58
- Copyright (c) 1991, 2014, Oracle. All rights reserved.
- Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=station26.example.com)(PORT=1521)))
- Services Summary...
- Service "+ASM" has 1 instance(s).
- Instance "+ASM", status READY, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:3678 refused:0 state:ready
- LOCAL SERVER
- Service "cdb1" has 1 instance(s).
- Instance "cdb1", status READY, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:5810 refused:0 state:ready
- LOCAL SERVER
- Service "cdb1XDB" has 1 instance(s).
- Instance "cdb1", status READY, has 1 handler(s) for this service...
- Handler(s):
- "D000" established:0 refused:0 current:0 max:1022 state:ready
- DISPATCHER <machine: station26.example.com, pid: 30310>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station26.example.com)(PORT=65185))
- Service "cdb2" has 1 instance(s).
- Instance "cdb2", status READY, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:0 refused:0 state:ready
- LOCAL SERVER
- Service "cdb2XDB" has 1 instance(s).
- Instance "cdb2", status READY, has 1 handler(s) for this service...
- Handler(s):
- "D000" established:0 refused:0 current:0 max:1022 state:ready
- DISPATCHER <machine: station26.example.com, pid: 10749>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station26.example.com)(PORT=31101))
- Service "orcl" has 1 instance(s).
- Instance "orcl", status READY, has 4 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:20 refused:0 state:ready
- LOCAL SERVER
- "D002" established:2269 refused:0 current:2 max:1022 state:ready
- DISPATCHER <machine: station26.example.com, pid: 24484>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station26.example.com)(PORT=23886))
- "D001" established:3430 refused:0 current:6 max:1022 state:ready
- DISPATCHER <machine: station26.example.com, pid: 24482>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station26.example.com)(PORT=12364))
- "D000" established:3150 refused:0 current:2 max:1022 state:ready
- DISPATCHER <machine: station26.example.com, pid: 24480>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station26.example.com)(PORT=23964))
- Service "orcl2" has 1 instance(s).
- Instance "orcl2", status READY, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:33994 refused:0 state:ready
- LOCAL SERVER
- Service "orcl2XDB" has 1 instance(s).
- Instance "orcl2", status READY, has 1 handler(s) for this service...
- Handler(s):
- "D000" established:0 refused:0 current:0 max:1022 state:ready
- DISPATCHER <machine: station26.example.com, pid: 29165>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station26.example.com)(PORT=41815))
- Service "pdb1_1" has 1 instance(s).
- Instance "cdb1", status READY, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:5810 refused:0 state:ready
- LOCAL SERVER
- Service "pdb2_1" has 1 instance(s).
- Instance "cdb2", status READY, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:0 refused:0 state:ready
- LOCAL SERVER
- Service "serv1" has 1 instance(s).
- Instance "orcl", status READY, has 4 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:20 refused:0 state:ready
- LOCAL SERVER
- "D002" established:2269 refused:0 current:2 max:1022 state:ready
- DISPATCHER <machine: station26.example.com, pid: 24484>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station26.example.com)(PORT=23886))
- "D001" established:3430 refused:0 current:6 max:1022 state:ready
- DISPATCHER <machine: station26.example.com, pid: 24482>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station26.example.com)(PORT=12364))
- "D000" established:3150 refused:0 current:2 max:1022 state:ready
- DISPATCHER <machine: station26.example.com, pid: 24480>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station26.example.com)(PORT=23964))
- The command completed successfully
- [oracle@station26 admin]$ ls
- samples shrept.lst tnsnames.ora
- [oracle@station26 admin]$ echo $TNS_ADMIN
- [oracle@station26 admin]$ ls
- samples shrept.lst tnsnames.ora
- [oracle@station26 admin]$ vim tnsnames.ora
- [oracle@station26 admin]$ tnsping pdb2_1
- TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 25-DEC-2017 20:14:38
- Copyright (c) 1997, 2014, Oracle. All rights reserved.
- Used parameter files:
- /u01/app/oracle/product/12.1.0/grid/network/admin/sqlnet.ora
- TNS-03505: Failed to resolve name
- [oracle@station26 admin]$ cp tnsnames.ora /u01/app/oracle/product/12.1.0/grid/network/admin/
- [oracle@station26 admin]$ tnsping pdb2_1
- TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 25-DEC-2017 20:14:57
- Copyright (c) 1997, 2014, Oracle. All rights reserved.
- Used parameter files:
- /u01/app/oracle/product/12.1.0/grid/network/admin/sqlnet.ora
- Used TNSNAMES adapter to resolve the alias
- Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = station26.example.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdb2_1)))
- OK (10 msec)
- [oracle@station26 admin]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Mon Dec 25 20:15:00 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn sys/oracle_4U@pdb2_1 as sysdba
- Connected.
- SQL> select t.con_id, t.name , d.name , d.status , t.status
- 2 from v$tablespace t , v$datafile d
- 3 where t.ts#=d.ts# and t.con_id=d.con_id
- 4 order by 1,2 ;
- select t.con_id, t.name , d.name , d.status , t.status
- *
- ERROR at line 1:
- ORA-00904: "T"."STATUS": invalid identifier
- SQL> ed
- Wrote file afiedt.buf
- 1 select t.con_id, t.name , d.name , d.status
- 2 from v$tablespace t , v$datafile d
- 3 where t.ts#=d.ts# and t.con_id=d.con_id
- 4* order by 1,2
- SQL> /
- CON_ID NAME
- ---------- ------------------------------
- NAME
- --------------------------------------------------------------------------------
- STATUS
- -------
- 0 UNDOTBS1
- /u01/app/oracle/oradata/cdb2/undotbs01.dbf
- ONLINE
- 3 SYSAUX
- /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- ONLINE
- CON_ID NAME
- ---------- ------------------------------
- NAME
- --------------------------------------------------------------------------------
- STATUS
- -------
- 3 SYSTEM
- /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- SYSTEM
- SQL> select t.con_id, t.name , d.name , d.status
- 2 from v$tablespace t , v$tempfile d
- 3 where t.ts#=d.ts# and t.con_id=d.con_id
- 4 order by 1,2;
- CON_ID NAME
- ---------- ------------------------------
- NAME
- --------------------------------------------------------------------------------
- STATUS
- -------
- 3 TEMP
- /u01/app/oracle/oradata/cdb2/pdb2_1/pdbseed_temp012017-12-22_06-04-39-PM.dbf
- ONLINE
- SQL> !date
- Mon Dec 25 20:17:27 CST 2017
- SQL> ^Exit
- SP2-0042: unknown command "xit" - rest of line ignored.
- SQL> exit
- Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
- [oracle@station26 admin]$ cd /u01/app/oracle/oradata/
- [oracle@station26 oradata]$ ls
- cdb2 orcl
- [oracle@station26 oradata]$ cd cdb2
- [oracle@station26 cdb2]$ ls
- control01.ctl pdbseed redo02.log sysaux01.dbf temp01.dbf users01.dbf
- pdb2_1 redo01.log redo03.log system01.dbf undotbs01.dbf
- [oracle@station26 cdb2]$ cd pdbseed
- [oracle@station26 pdbseed]$ ls
- pdbseed_temp012017-12-22_06-04-39-PM.dbf sysaux01.dbf system01.dbf
- [oracle@station26 pdbseed]$ cd ..
- [oracle@station26 cdb2]$ ls
- control01.ctl pdbseed redo02.log sysaux01.dbf temp01.dbf users01.dbf
- pdb2_1 redo01.log redo03.log system01.dbf undotbs01.dbf
- [oracle@station26 cdb2]$ cd pdb2_1
- [oracle@station26 pdb2_1]$ ls
- pdbseed_temp012017-12-22_06-04-39-PM.dbf sysaux01.dbf system01.dbf
- [oracle@station26 pdb2_1]$
复制代码 创建的第一个插件数据库容器ID为3:
- [oracle@station26 pdb2_1]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Mon Dec 25 20:29:12 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn sys/oracle_4U@pdb2_1 as sysdba
- Connected.
- SQL> show con_id
- CON_ID
- ------------------------------
- 3
- SQL> show con_name
- CON_NAME
- ------------------------------
- PDB2_1
复制代码
ADMIN用户都是本地的:
- 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';
-
复制代码
SQLPLUS命令删除插件数据库:
- select con_id, open_mode , name from v$pdbs;
- drop pluggable database pdb2_1 including datafiles;
- alter pluggable database pdb2_1 close immediate ;
- drop pluggable database pdb2_1 including datafiles;
复制代码
P60以下这句是完全不需要的:
- alter system set db_create_file_dest =
- '/u01/app/oracle/oradata/cdb2/pdb2_1' scope=both;
复制代码 原因是因为我们在SQL Developer中制定和命令行等效的语句:
file_name_convert=('/u01/app/oracle/oradata/cdb2/pdbseed',
'/u01/app/oracle/oradata/cdb2/pdb2_1')
- select con_id, name , open_mode
- from v$pdbs;
- 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 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;
复制代码 准备做pdb2_2,书P64页莫名其妙选用OMF方式,非常怪:
以下演示与P64页不同。
- [oracle@station26 cdb2]$ mkdir pdb2_2
复制代码 在12.1.0.2后,克隆时,源头库已经可以不停机了(P65页有停机)
- select con_id, name , open_mode
- from v$pdbs;
- create pluggable database pdb2_2 from pdb2_1
- file_name_convert=('/u01/app/oracle/oradata/cdb2/pdb2_1',
- '/u01/app/oracle/oradata/cdb2/pdb2_2');
- alter pluggable database pdb2_2 open ;
- select con_id, name , open_mode
- from v$pdbs;
复制代码
书上做PDB2_2是这样OMF的:
- [oracle@station26 admin]$ cp tnsnames.ora /u01/app/oracle/product/12.1.0/
- dbhome_1/ dbhome_2/ grid/
- [oracle@station26 admin]$ cp tnsnames.ora /u01/app/oracle/product/12.1.0/grid/network/admin/
- [oracle@station26 admin]$
- [oracle@station26 admin]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Mon Dec 25 21:25:42 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn sys/oracle_4U@pdb2_2 as sysdba
- Connected.
- SQL> show con_id
- CON_ID
- ------------------------------
- 4
复制代码- SQL>
- SQL> select p.CON_ID,
- p.NAME,
- p.OPEN_MODE,
- p.CON_UID
- from v$pdbs p;
- 2 3 4 5
- CON_ID NAME OPEN_MODE CON_UID
- ---------- ------------------------------ ---------- ----------
- 4 PDB2_2 MOUNTED 2662063752
- SQL> alter pluggable database pdb2_2 open ;
- Pluggable database altered.
- SQL> select con_id, name , open_mode from v$pdbs;
- CON_ID NAME OPEN_MODE
- ---------- ------------------------------ ----------
- 4 PDB2_2 READ WRITE
复制代码 P76页,插进一个非容器的12c,利用用现成的数据文件:
注意以下脚本最后几行说明,创建插件数据库时都要新建临时文件。
- [oracle@station26 admin]$ . oraenv
- ORACLE_SID = [cdb2] ? orcl2
- The Oracle base remains unchanged with value /u01/app/oracle
- [oracle@station26 admin]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Mon Dec 25 21:34:13 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> select open_mode from v$database;
- OPEN_MODE
- --------------------
- READ WRITE
- SQL> shutdown immediate
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
- SQL> startup mount
- ORACLE instance started.
- Total System Global Area 2147483648 bytes
- Fixed Size 3712904 bytes
- Variable Size 1291847800 bytes
- Database Buffers 838860800 bytes
- Redo Buffers 13062144 bytes
- Database mounted.
- SQL> alter database open read only ;
- Database altered.
- SQL> exec dbms_pdb.describe('/home/oracle/orcl2.xml') ;
- PL/SQL procedure successfully completed.
- SQL> shutdown immediate
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
- SQL> exit
- Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
- and Real Application Testing options
- [oracle@station26 admin]$ . oraenv
- ORACLE_SID = [orcl2] ? +ASM
- The Oracle base remains unchanged with value /u01/app/oracle
- [oracle@station26 admin]$ asmcmd
- ASMCMD> ls
- DATA/
- FRA/
- ASMCMD> cd data
- ASMCMD> ls
- ASM/
- CDB1/
- ORCL2/
- orapwasm
- ASMCMD> cd ORCL2/
- ASMCMD> sl
- ASMCMD-9487: 'sl' cannot be run with 'sysasm' privilege
- ASMCMD> ls
- CONTROLFILE/
- DATAFILE/
- ONLINELOG/
- PARAMETERFILE/
- TEMPFILE/
- ASMCMD> cd TEMPFILE/
- ASMCMD> ls
- TEMP.283.934891281
- ASMCMD> rm TEMP.283.934891281
- ASMCMD> pwd
- +data/ORCL2/TEMPFILE
- ASMCMD> cd ..
- ASMCMD> ls
- CONTROLFILE/
- DATAFILE/
- ONLINELOG/
- PARAMETERFILE/
- ASMCMD>
复制代码- create pluggable database pdb_orcl2 using
- '/home/oracle/orcl2.xml' nocopy;
复制代码 新的临时文件:
- [oracle@station26 admin]$ asmcmd
- ASMCMD> ls
- DATA/
- FRA/
- ASMCMD> cd DATA/
- ASMCMD> ls
- ASM/
- CDB1/
- CDB2/
- ORCL2/
- orapwasm
- ASMCMD> cd ORCL2/
- ASMCMD> ls
- CONTROLFILE/
- DATAFILE/
- ONLINELOG/
- PARAMETERFILE/
- ASMCMD> cd ..
- ASMCMD> ls
- ASM/
- CDB1/
- CDB2/
- ORCL2/
- orapwasm
- ASMCMD> cd CDB2/
- ASMCMD> ls
- 47853795B0E904BAE0531A00A8C0DAD5/
- ASMCMD>
- TEMPFILE/
- ASMCMD> cd TEMPFILE/
- ASMCMD> ls
- TEMP.283.963697221
- ASMCMD>
复制代码 数据文件用现成的:
临时文件新建的:
|
|