|
1Z0-063第5/6章
1Z0-052共19章(上完19章),1Z0-053共21章(上完21章)和1Z0-063多租户部分共9章(上完6章)
总共上完全部49章中的46章
cdb2:
- select p.ISPDB_MODIFIABLE, p.value
- from v$parameter p
- where p.NAME='optimizer_use_sql_plan_baselines';
-
- select con_id, name , open_mode
- from v$pdbs;
-
- select p.CON_ID, p.ISPDB_MODIFIABLE,p.VALUE
- from v$system_parameter p
- where p.NAME='optimizer_use_sql_plan_baselines';
-
-
复制代码 pdb2:
- [oracle@station26 admin]$ tnsping pdb2
- TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 29-DEC-2017 09:26:51
- Copyright (c) 1997, 2014, Oracle. All rights reserved.
- Used parameter files:
- 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)))
- OK (10 msec)
- [oracle@station26 admin]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 29 09:26:54 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn sys/oracle_4U@pdb2 as sysdba
- Connected.
- SQL> select p.ISPDB_MODIFIABLE
- from v$parameter p
- where p.NAME='optimizer_use_sql_plan_baselines'; 2 3
- ISPDB
- -----
- TRUE
- SQL> ed
- Wrote file afiedt.buf
- 1 select p.ISPDB_MODIFIABLE, p.value
- 2 from v$parameter p
- 3* where p.NAME='optimizer_use_sql_plan_baselines'
- SQL> /
- ISPDB
- -----
- VALUE
- --------------------------------------------------------------------------------
- TRUE
- TRUE
- SQL> alter system set optimizer_use_sql_plan_baselines=false;
- System altered.
- SQL> show parameter optimizer_use_sql_plan_baselines
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- optimizer_use_sql_plan_baselines boolean FALSE
- SQL> shutdown immediate
- Pluggable Database closed.
- SQL> startup
- Pluggable Database opened.
- SQL> show parameter optimi
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- optimizer_adaptive_features boolean TRUE
- optimizer_adaptive_reporting_only boolean FALSE
- optimizer_capture_sql_plan_baselines boolean FALSE
- optimizer_dynamic_sampling integer 2
- optimizer_features_enable string 12.1.0.2
- optimizer_index_caching integer 0
- optimizer_index_cost_adj integer 100
- optimizer_inmemory_aware boolean TRUE
- optimizer_mode string ALL_ROWS
- optimizer_secure_view_merging boolean TRUE
- optimizer_use_invisible_indexes boolean FALSE
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- optimizer_use_pending_statistics boolean FALSE
- optimizer_use_sql_plan_baselines boolean FALSE
- plsql_optimize_level integer 2
- SQL>
复制代码 pdb2_2:
- [oracle@station26 ~]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 29 09:30:31 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn sys/oracle_4U@pdb2_2 as sysdba
- Connected.
- SQL> show parameter optimizer_use_sql_plan_baselines
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- optimizer_use_sql_plan_baselines boolean TRUE
- SQL>
复制代码
又一个显示成conid=0的v$视图:
pdb2_2:
- SQL> desc v$pdbs
- Name Null? Type
- ----------------------------------------- -------- ----------------------------
- CON_ID NUMBER
- DBID NUMBER
- CON_UID NUMBER
- GUID RAW(16)
- NAME VARCHAR2(30)
- OPEN_MODE VARCHAR2(10)
- RESTRICTED VARCHAR2(3)
- OPEN_TIME TIMESTAMP(3) WITH TIME ZONE
- CREATE_SCN NUMBER
- TOTAL_SIZE NUMBER
- BLOCK_SIZE NUMBER
- RECOVERY_STATUS VARCHAR2(8)
- SNAPSHOT_PARENT_CON_ID NUMBER
- SQL> select con_id , name , open_mode , RESTRICTED from v$pdbs ;
- CON_ID NAME OPEN_MODE RES
- ---------- ------------------------------ ---------- ---
- 4 PDB2_2 READ WRITE NO
- SQL> alter system enable restricted session;
- System altered.
- SQL> select con_id , name , open_mode , RESTRICTED from v$pdbs ;
- CON_ID NAME OPEN_MODE RES
- ---------- ------------------------------ ---------- ---
- 4 PDB2_2 READ WRITE YES
- SQL> CREATE USER u1_pdb2_2 IDENTIFIED BY oracle_4U;
- User created.
- SQL> grant create session to u1_pdb2_2;
- Grant succeeded.
- SQL> conn u1_pdb2_2/oracle_4U@pdb2_2
- ERROR:
- ORA-01035: ORACLE only available to users with RESTRICTED SESSION privilege
- Warning: You are no longer connected to ORACLE.
- SQL> alter system disable restricted session;
- SP2-0640: Not connected
- SQL> conn sys/oracle_4U@pdb2_2 as sysdba
- Connected.
- SQL> alter system disable restricted session;
- System altered.
- SQL> select con_id , name , open_mode , RESTRICTED from v$pdbs ;
- CON_ID NAME OPEN_MODE RES
- ---------- ------------------------------ ---------- ---
- 4 PDB2_2 READ WRITE NO
- SQL> conn u1_pdb2_2/oracle_4U@pdb2_2
- Connected.
- SQL>
复制代码
pdb2:
- SQL> show con_name
- CON_NAME
- ------------------------------
- PDB2
- SQL> CREATE USER u1_pdb2 IDENTIFIED BY oracle_4U;
- User created.
- SQL> grant create session to u1_pdb2;
- Grant succeeded.
- SQL> conn u1_pdb2/oracle_4U@pdb2
- Connected.
- SQL> conn sys/oracle_4U@pdb2 as sysdba
- Connected.
- SQL> select con_id , name , open_mode , RESTRICTED from v$pdbs ;
- CON_ID NAME OPEN_MODE RES
- ---------- ------------------------------ ---------- ---
- 3 PDB2 READ WRITE NO
- SQL>
复制代码
根容器和每个插件数据库各自有自己的默认表空间和默认临时表空间,如果显示成'USERS'也不是同一个'USERS':
CDB2:
- select * from database_properties;
- 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;
复制代码 PDB2:
- SQL> col PROPERTY_NAME format a30
- SQL> col PROPERTY_VALUE format a25
- SQL> SELECT property_name, property_value
- 2 FROM database_properties
- 3 WHERE property_name LIKE 'DEFAULT_%TABLE%';
- PROPERTY_NAME PROPERTY_VALUE
- ------------------------------ -------------------------
- DEFAULT_TEMP_TABLESPACE TEMP
- DEFAULT_PERMANENT_TABLESPACE SYSTEM
复制代码 PDB_ORCL2:
- SQL> col PROPERTY_NAME format a30
- SQL> col PROPERTY_VALUE format a25
- SQL> SELECT property_name, property_value
- 2 FROM database_properties
- 3 WHERE property_name LIKE 'DEFAULT_%TABLE%';
- PROPERTY_NAME PROPERTY_VALUE
- ------------------------------ -------------------------
- DEFAULT_TEMP_TABLESPACE TEMP
- DEFAULT_PERMANENT_TABLESPACE USERS
- SQL> 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> set linesize 10000
- CON_ID NAME NAME STATUS
- ---------- ------------------------------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------
- 0 UNDOTBS1 /u01/app/oracle/oradata/cdb2/undotbs01.dbf ONLINE
- 5 EXAMPLE +DATA/ORCL2/DATAFILE/example.284.934891291 ONLINE
- 5 SYSAUX +DATA/ORCL2/DATAFILE/sysaux.275.934891047 ONLINE
- 5 SYSTEM +DATA/ORCL2/DATAFILE/system.276.934891113 SYSTEM
- 5 USERS +DATA/ORCL2/DATAFILE/users.277.934891199 ONLINE
复制代码- --cdb2
- create tablespace cdata
- datafile '/u01/app/oracle/oradata/cdb2/cdata_01.dbf'
- size 10M;
-
- select con_id, tablespace_name
- from cdb_tablespaces order by 1;
- select * from database_properties;
-
- alter database default tablespace cdata;
-
- select * from database_properties;
- --pdb2
- select * from database_properties;
- create tablespace ldata datafile
- '/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf'
- size 10M;
- select * from dba_tablespaces;
- alter database default tablespace ldata;
- select * from database_properties;
- --cdb2
- create temporary tablespace temp_root
- tempfile '/u01/app/oracle/oradata/cdb2/temproot_01.dbf'
- size 500M;
- select * from database_properties;
- alter database default temporary tablespace temp_root;
- select * from database_properties;
- --pdb2
- create temporary tablespace temp_pdb2 tempfile
- '/u01/app/oracle/oradata/cdb2/pdb2_1/temppdb2_01.dbf'
- size 100M;
- select * from database_properties;
- alter database default temporary tablespace temp_pdb2;
- select * from database_properties;
- create temporary tablespace my_temp tempfile
- '/u01/app/oracle/oradata/cdb2/pdb2_1/my_temp_pdb2_01.dbf'
- size 10M;
- --pdb_orcl2
- select * from database_properties;
复制代码
通用用户的表空间属性随插件数据库的默认属性而定制分配:
- --create user botang identified by oracle_4U;
- create user c##botang identified by oracle_4U;
- create user c##u identified by x;
- select c.CON_ID, c.USERNAME,
- c.COMMON,
- c.DEFAULT_TABLESPACE,
- c.TEMPORARY_TABLESPACE
- from cdb_users c
- where c.USERNAME='C##U'
- order by 1;
复制代码
CDB2:
- select c.CON_ID, c.USERNAME,
- c.COMMON,
- c.DEFAULT_TABLESPACE,
- c.TEMPORARY_TABLESPACE
- from cdb_users c
- where c.USERNAME='LU';
-
- -- alter user lu temporary tablespace my_temp;
复制代码
PDB2:
- SQL> create user botang identified by oracle_4U;
- User created.
- SQL> CREATE USER lu IDENTIFIED BY x;
- User created.
- SQL> show con_name
- CON_NAME
- ------------------------------
- PDB2
- SQL> alter user lu temporary tablespace my_temp;
- User altered.
- SQL>
复制代码 在插件数据库中执行创建undo表空间的命令是不会报错的假命令:
- SQL> create undo tablespace undo_pdb2 datafile
- 2 '/u01/app/oracle/oradata/cdb2/pdb2_1/undo_pdb2_01.dbf' size 10M ;
- Tablespace created.
复制代码
报告“Tablespace created.”但是以下命令是找不到产出物的:
- 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 con_id , tablespace_name
- from cdb_tablespaces order by con_id, tablespace_name;
复制代码 看刚刚创建的两个用户:
- select u.USERNAME, u.COMMON, u.CON_ID
- from cdb_users u where u.USERNAME in ('C##U','LU')
- order by u.CON_ID;
复制代码 在根容器上,如果不写container=all,建的用户是通用,授的权限是本地的(即相当于授权是container=(current)):
- select u.USERNAME, u.COMMON, u.CON_ID
- from cdb_users u where u.USERNAME in ('C##U','LU')
- order by u.CON_ID;
-
- create user c##_user identified by x container=all;
-
- select u.USERNAME, u.COMMON, u.CON_ID,
- u.TEMPORARY_TABLESPACE ,u.DEFAULT_TABLESPACE
-
- from cdb_users u where u.USERNAME in ('C##U','LU', 'C##_USER')
- order by u.CON_ID , u.USERNAME;
-
- grant create session to c##u;
-
复制代码 在插件数据库中是不能做通用DDL操作的:
- SQL> conn c##_user/x@pdb2
- Connected.
- SQL>
- create user c##_user_pdb2 identified by x
- container=all;SQL> 2
- create user c##_user_pdb2 identified by x
- *
- ERROR at line 1:
- ORA-65050: Common DDLs only allowed in CDB$ROOT
复制代码 在根容器上创建角色时不写container=all,默认就是container=all:
- select r.CON_ID, r.COMMON, r.ROLE
- from cdb_roles r
- where r.COMMON='NO';
-
- create role c##_role;
-
- select r.CON_ID, r.COMMON, r.ROLE
- from cdb_roles r
- where r.ROLE='C##_ROLE' order by 1;
复制代码 在插件上创建角色时不写container=current,默认就是container=current:
- SQL> conn sys/oracle_4U@pdb2 as sysdba
- Connected.
- SQL> create role local_role_PDB2
- 2 ;
- Role created.
- SQL>
复制代码 在cdb2上查第一个本地角色:
查看角色(通用/本地)是怎么授权(通用/本地)的:
- grant c##_role to c##_user;
- select CON_ID, GRANTEE, GRANTED_ROLE, COMMON
- from cdb_role_privs where grantee='C##_USER'
- order by con_id;
复制代码 同一个角色的本地和通用授权,算两次授权:revoke时要分别回收两次(即不要认为通用授权回收了,本地授权就跟回收)
由于在插件里能够看到通用角色,所以插件数据库也可以像根容器那样进行通用角色的本地授权(通用角色的本地用户的本地授权):
- SQL> grant c##_role to local_user_pdb2;
- Grant succeeded.
复制代码 在插件数据库里,都不必写container子句,原因是插件里不可能container=all
- SQL> grant CREATE SYNONYM to C##_USER
- 2 ;
- Grant succeeded.
- SQL>
复制代码- select * from cdb_sys_privs sp
- where sp.GRANTEE in('C##_USER','LOCAL_USER_PDB2')
- order by con_id , grantee, sp.PRIVILEGE;
-
- grant create table , unlimited tablespace to c##_user
- container=all;
-
- select * from cdb_sys_privs sp
- where sp.GRANTEE in('C##_USER','LOCAL_USER_PDB2')
- order by con_id , grantee, sp.PRIVILEGE;
-
- grant create sequence to c##_user ;
-
- select * from cdb_sys_privs sp
- where sp.GRANTEE in('C##_USER','LOCAL_USER_PDB2')
- order by con_id , grantee, sp.PRIVILEGE;
-
复制代码 根容器上没有本地用户,但是能查看所有用户的连接信息:
- select * from CDB_CONTAINER_DATA
- WHERE username NOT IN
- ('GSMADMIN_INTERNAL', 'APPQOSSYS', 'DBSNMP')
- ORDER BY OBJECT_NAME;
- create user c##jfv identified by oracle_4U container=all;
- GRANT CREATE SESSION, SET CONTAINER TO c##jfv
- CONTAINER=ALL;
- grant select on sys.v_$session to c##jfv container=all;
- SELECT username, con_id FROM v_$session
- WHERE username IS NOT NULL AND username <> 'DBSNMP';
复制代码
到此,C##JFV只是每个插件的SYS助理,专门负责帮各个SYS看各自的v$session:
- [oracle@station26 ~]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 29 15:30:45 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> CONNECT c##jfv/oracle_4U
- Connected.
- SQL> SELECT username, con_id FROM v_$session
- WHERE username IS NOT NULL AND username <> 'DBSNMP'; 2
- SELECT username, con_id FROM v_$session
- *
- ERROR at line 1:
- ORA-00942: table or view does not exist
- SQL> SELECT username, con_id FROM sys.v_$session
- 2 WHERE username IS NOT NULL AND username <> 'DBSNMP';
- USERNAME CON_ID
- ------------------------------ ----------
- SYS 0
- SYS 1
- SYS 0
- SYS 0
- C##JFV 1
- SQL> conn c##jfv/x@pdb2
- ERROR:
- ORA-01017: invalid username/password; logon denied
- Warning: You are no longer connected to ORACLE.
- SQL> conn c##jfv/oracle_4U@pdb2
- Connected.
- SQL> SELECT username, con_id FROM sys.v_$session
- 2 WHERE username IS NOT NULL AND username <> 'DBSNMP';
- USERNAME CON_ID
- ------------------------------ ----------
- SYS 0
- C##JFV 3
- LOCAL_USER_PDB2 3
- SYS 0
- SYS 0
- SQL> conn c##jfv/oracle_4U@pdb2_2
- Connected.
- SQL> SELECT username, con_id FROM sys.v_$session
- 2 WHERE username IS NOT NULL AND username <> 'DBSNMP';
- USERNAME CON_ID
- ------------------------------ ----------
- SYS 0
- C##JFV 4
- SYS 0
- SYS 0
- SQL> conn c##jfv/oracle_4U@pdb_orcl2
- Connected.
- SQL> SELECT username, con_id FROM sys.v_$session
- 2 WHERE username IS NOT NULL AND username <> 'DBSNMP';
- USERNAME CON_ID
- ------------------------------ ----------
- SYS 0
- C##JFV 5
- SYS 0
- SYS 0
- SQL> conn c##jfv/oracle_4U@pdb_orcl
- Connected.
- SQL> SELECT username, con_id FROM sys.v_$session
- 2 WHERE username IS NOT NULL AND username <> 'DBSNMP';
- USERNAME CON_ID
- ------------------------------ ----------
- SYS 0
- SYS 0
- SYS 0
- C##JFV 6
- SQL> conn c##jfv/oracle_4U@pdb1_1
- Connected.
- SQL> SELECT username, con_id FROM sys.v_$session
- 2 WHERE username IS NOT NULL AND username <> 'DBSNMP';
- USERNAME CON_ID
- ------------------------------ ----------
- SYS 0
- SYS 0
- SYS 7
- SYS 0
- C##JFV 7
- SQL>
复制代码
以下命令扩大了c##jfv在根容器上查看数据库v$session信息的范围:
- SELECT username, con_id FROM v_$session
- WHERE username IS NOT NULL AND username <> 'DBSNMP';
- alter user c##jfv
- set container_data=(cdb$root,pdb1_1,pdb2_2)
- for v_$session
- container=current;
-
- select username from cdb_users
- where con_id=4 and common='NO';
复制代码
进入第7章之前,把磁盘组空间加回文件系统(我们推的环境只有90G)
- [root@station26 stage]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/RAC12crhel6-root
- 44G 35G 7.0G 84% /
- tmpfs 8.5G 2.7G 5.9G 32% /dev/shm
- /dev/vda1 283M 114M 150M 44% /boot
- //192.168.0.199/data 23G 23G 914M 97% /mnt
- [root@station26 stage]# lvs
- LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
- root RAC12crhel6 -wi-ao---- 44.66g
- [root@station26 stage]# pvs
- PV VG Fmt Attr PSize PFree
- /dev/vda2 RAC12crhel6 lvm2 a--u 44.72g 64.00m
- [root@station26 stage]# su - oracle
- [oracle@station26 ~]$ . oraenv
- ORACLE_SID = [cdb2] ? +ASM
- The Oracle base remains unchanged with value /u01/app/oracle
- [oracle@station26 ~]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 29 16:01:45 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn / as sysasm
- Connected.
- SQL> drop diskgroup data including contents;
- drop diskgroup data including contents
- *
- ERROR at line 1:
- ORA-15039: diskgroup not dropped
- ORA-15027: active use of diskgroup "DATA" precludes its dismount
- SQL> exit
- Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- With the Automatic Storage Management option
- [oracle@station26 ~]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 29 16:02:14 2017
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn / sysasm
- SP2-0306: Invalid option.
- Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM}] [edition=value]]
- where <logon> ::= <username>[/<password>][@<connect_identifier>]
- <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
- SQL> conn / as sysasm
- Connected.
- SQL> desc v$asm_client
- Name Null? Type
- ----------------------------------------- -------- ----------------------------
- GROUP_NUMBER NUMBER
- INSTANCE_NAME VARCHAR2(64)
- DB_NAME VARCHAR2(8)
- CLUSTER_NAME VARCHAR2(31)
- STATUS VARCHAR2(12)
- SOFTWARE_VERSION VARCHAR2(60)
- COMPATIBLE_VERSION VARCHAR2(60)
- CON_ID NUMBER
- SQL> select DB_NAME , GROUP_NUMBER from v$asm_client;
- DB_NAME GROUP_NUMBER
- ------------------------ ------------
- cdb2 0
- +ASM 0
- SQL> /
- DB_NAME GROUP_NUMBER
- ------------------------ ------------
- +ASM 0
- SQL> drop diskgroup data including contents;
- drop diskgroup data including contents
- *
- ERROR at line 1:
- ORA-15039: diskgroup not dropped
- ORA-15027: active use of diskgroup "DATA" precludes its dismount
- SQL> drop diskgroup fra including contents ;
- Diskgroup dropped.
- SQL> drop diskgroup data including contents force ;
- drop diskgroup data including contents force
- *
- ERROR at line 1:
- ORA-00933: SQL command not properly ended
- SQL> drop diskgroup data dismount;
- drop diskgroup data dismount
- *
- ERROR at line 1:
- ORA-00933: SQL command not properly ended
- SQL> alter diskgroup data dismount;
- alter diskgroup data dismount
- *
- ERROR at line 1:
- ORA-15032: not all alterations performed
- ORA-15027: active use of diskgroup "DATA" precludes its dismount
- SQL> alter diskgroup data dismount force ;
- Diskgroup altered.
- SQL> drop diskgroup data ;
- drop diskgroup data
- *
- ERROR at line 1:
- ORA-15039: diskgroup not dropped
- ORA-15001: diskgroup "DATA" does not exist or is not mounted
- SQL> alter diskgroup data mount;
- Diskgroup altered.
- SQL> drop diskgroup data;
- drop diskgroup data
- *
- ERROR at line 1:
- ORA-15039: diskgroup not dropped
- ORA-15027: active use of diskgroup "DATA" precludes its dismount
- SQL> select name from v$asm_disk;
- NAME
- --------------------------------------------------------------------------------
- ASMDISK01
- ASMDISK02
- ASMDISK03
- ASMDISK04
- SQL> alter diskgroup data drop disk ASMDISK01;
- Diskgroup altered.
- SQL> alter diskgroup data drop disk ASMDISK02 ;
- Diskgroup altered.
- SQL> alter diskgroup data drop disk ASMDISK03 ;
- alter diskgroup data drop disk ASMDISK03
- *
- ERROR at line 1:
- ORA-15067: command or option incompatible with diskgroup redundancy
- SQL> exit
- Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- With the Automatic Storage Management option
- [oracle@station26 ~]$ exit
- logout
- [root@station26 stage]# cd /dev/oracleasm/disks/
- [root@station26 disks]# ls
- ASMDISK01 ASMDISK02 ASMDISK03 ASMDISK04 ASMDISK05
- [root@station26 disks]# ls -l
- 总用量 0
- brw-rw----. 1 oracle asmadmin 250, 5 11月 14 11:40 ASMDISK01
- brw-rw----. 1 oracle asmadmin 250, 6 11月 14 11:40 ASMDISK02
- brw-rw----. 1 oracle asmadmin 250, 7 11月 14 11:40 ASMDISK03
- brw-rw----. 1 oracle asmadmin 250, 8 11月 14 11:40 ASMDISK04
- brw-rw----. 1 oracle asmadmin 250, 3 11月 14 11:40 ASMDISK05
- [root@station26 disks]# oracleasm -h
- Usage: oracleasm [--exec-path=<exec_path>] <command> [ <args> ]
- oracleasm --exec-path
- oracleasm -h
- oracleasm -V
- The basic oracleasm commands are:
- configure Configure the Oracle Linux ASMLib driver
- init Load and initialize the ASMLib driver
- exit Stop the ASMLib driver
- scandisks Scan the system for Oracle ASMLib disks
- status Display the status of the Oracle ASMLib driver
- listdisks List known Oracle ASMLib disks
- querydisk Determine if a disk belongs to Oracle ASMlib
- createdisk Allocate a device for Oracle ASMLib use
- deletedisk Return a device to the operating system
- renamedisk Change the label of an Oracle ASMlib disk
- update-driver Download the latest ASMLib driver
- [root@station26 disks]# oracleasm deletedisk ASMDISK01
- Clearing disk header: done
- Dropping disk: done
- [root@station26 disks]# oracleasm deletedisk ASMDISK02
- Clearing disk header: done
- Dropping disk: done
- [root@station26 disks]# oracleasm deletedisk ASMDISK05
- Clearing disk header: done
- Dropping disk: done
- [root@station26 disks]# ls -l
- 总用量 0
- brw-rw----. 1 oracle asmadmin 250, 7 11月 14 11:40 ASMDISK03
- brw-rw----. 1 oracle asmadmin 250, 8 11月 14 11:40 ASMDISK04
- [root@station26 disks]# cd /dev/
- [root@station26 dev]# ls -l /dev/vda*
- brw-rw----. 1 root disk 250, 0 11月 14 11:40 /dev/vda
- brw-rw----. 1 root disk 250, 1 11月 14 11:40 /dev/vda1
- brw-rw----. 1 root disk 250, 2 11月 14 11:40 /dev/vda2
- brw-rw----. 1 root disk 250, 3 11月 14 11:40 /dev/vda3
- brw-rw----. 1 root disk 250, 4 11月 14 11:40 /dev/vda4
- brw-rw----. 1 root disk 250, 5 11月 14 11:40 /dev/vda5
- brw-rw----. 1 root disk 250, 6 11月 14 11:40 /dev/vda6
- brw-rw----. 1 root disk 250, 7 11月 14 11:40 /dev/vda7
- brw-rw----. 1 root disk 250, 8 11月 14 11:40 /dev/vda8
- brw-rw----. 1 root disk 250, 9 11月 14 11:40 /dev/vda9
- [root@station26 dev]# pvs
- PV VG Fmt Attr PSize PFree
- /dev/vda2 RAC12crhel6 lvm2 a--u 44.72g 64.00m
- [root@station26 dev]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/RAC12crhel6-root
- 44G 32G 9.7G 77% /
- tmpfs 8.5G 680M 7.9G 8% /dev/shm
- /dev/vda1 283M 114M 150M 44% /boot
- //192.168.0.199/data 23G 23G 914M 97% /mnt
- [root@station26 dev]# swapon -a
- [root@station26 dev]# swapon -s
- Filename Type Size Used Priority
- /dev/vda9 partition 4194300 134740 -1
- [root@station26 dev]# pvcreate /dev/vda3
- Physical volume "/dev/vda3" successfully created
- [root@station26 dev]# pvcreate /dev/vda5
- Physical volume "/dev/vda5" successfully created
- [root@station26 dev]# pvcreate /dev/vda6
- Physical volume "/dev/vda6" successfully created
- [root@station26 dev]# pvs
- PV VG Fmt Attr PSize PFree
- /dev/vda2 RAC12crhel6 lvm2 a--u 44.72g 64.00m
- /dev/vda3 lvm2 ---- 9.77g 9.77g
- /dev/vda5 lvm2 ---- 6.84g 6.84g
- /dev/vda6 lvm2 ---- 6.84g 6.84g
- [root@station26 dev]# vgextend RAC12crhel6 /dev/vda3 /dev/vda5 /dev/vda6
- Volume group "RAC12crhel6" successfully extended
- [root@station26 dev]# vgdisplay
- --- Volume group ---
- VG Name RAC12crhel6
- System ID
- Format lvm2
- Metadata Areas 4
- Metadata Sequence No 3
- VG Access read/write
- VG Status resizable
- MAX LV 0
- Cur LV 1
- Open LV 1
- Max PV 0
- Cur PV 4
- Act PV 4
- VG Size 68.09 GiB
- PE Size 32.00 MiB
- Total PE 2179
- Alloc PE / Size 1429 / 44.66 GiB
- Free PE / Size 750 / 23.44 GiB
- VG UUID qH5HhK-rJL0-j7ar-1Xhz-CN0x-nMVU-1j9MAk
-
- [root@station26 dev]# lvs
- LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
- root RAC12crhel6 -wi-ao---- 44.66g
- [root@station26 dev]# lvextend -l +750 /dev/RAC12crhel6/root
- Size of logical volume RAC12crhel6/root changed from 44.66 GiB (1429 extents) to 68.09 GiB (2179 extents).
- Logical volume root successfully resized.
- [root@station26 dev]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/RAC12crhel6-root
- 44G 32G 9.7G 77% /
- tmpfs 8.5G 680M 7.9G 8% /dev/shm
- /dev/vda1 283M 114M 150M 44% /boot
- //192.168.0.199/data 23G 23G 914M 97% /mnt
- [root@station26 dev]# resize2fs /dev/RAC12crhel6/root
- resize2fs 1.43-WIP (20-Jun-2013)
- Filesystem at /dev/RAC12crhel6/root is mounted on /; on-line resizing required
- old_desc_blocks = 3, new_desc_blocks = 5
- The filesystem on /dev/RAC12crhel6/root is now 17850368 blocks long.
- [root@station26 dev]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/RAC12crhel6-root
- 67G 32G 32G 51% /
- tmpfs 8.5G 680M 7.9G 8% /dev/shm
- /dev/vda1 283M 114M 150M 44% /boot
- //192.168.0.199/data 23G 23G 914M 97% /mnt
- [root@station26 dev]#
复制代码- [oracle@station26 ~]$ rman target /
- Recovery Manager: Release 12.1.0.2.0 - Production on Fri Dec 29 16:29:25 2017
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: CDB2 (DBID=710472048)
- RMAN> show all;
- using target database control file instead of recovery catalog
- RMAN configuration parameters for database with db_unique_name CDB2 are:
- CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
- CONFIGURE BACKUP OPTIMIZATION OFF; # default
- CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
- CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
- CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE MAXSETSIZE TO UNLIMITED; # default
- CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
- CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
- CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
- CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
- CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
- CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/snapcf_cdb2.f'; # default
- RMAN> CONFIGURE RETENTION POLICY TO recovery window of 1 days;
- new RMAN configuration parameters:
- CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
- new RMAN configuration parameters are successfully stored
- RMAN> CONFIGURE BACKUP OPTIMIZATION on ;
- new RMAN configuration parameters:
- CONFIGURE BACKUP OPTIMIZATION ON;
- new RMAN configuration parameters are successfully stored
- RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt ;
- new RMAN configuration parameters:
- CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
- new RMAN configuration parameters are successfully stored
- RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 16 BACKUP TYPE TO BACKUPSET;
- new RMAN configuration parameters:
- CONFIGURE DEVICE TYPE DISK PARALLELISM 16 BACKUP TYPE TO BACKUPSET;
- new RMAN configuration parameters are successfully stored
- RMAN> CONFIGURE DEVICE TYPE sbt parallelism 2 BACKUP TYPE TO BACKUPSET;
- new RMAN configuration parameters:
- CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
- new RMAN configuration parameters are successfully stored
- RMAN> show all;
- RMAN configuration parameters for database with db_unique_name CDB2 are:
- CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
- CONFIGURE BACKUP OPTIMIZATION ON;
- CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
- CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
- CONFIGURE DEVICE TYPE DISK PARALLELISM 16 BACKUP TYPE TO BACKUPSET;
- CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
- CONFIGURE MAXSETSIZE TO UNLIMITED; # default
- CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
- CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
- CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
- CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
- CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
- CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/snapcf_cdb2.f'; # default
- RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=station26)';
- new RMAN configuration parameters:
- CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=station26)';
- new RMAN configuration parameters are successfully stored
- RMAN> CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=station26)';
- new RMAN configuration parameters:
- CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=station26)';
- new RMAN configuration parameters are successfully stored
- RMAN> backup tag '0T_WHOLE_INCR0' incremental level 0 database plus archivelog delete all input;
- Starting backup at 2017-12-29:16:36:24
- current log archived
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=414 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=244 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting archived log backup set
- channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
- input archived log thread=1 sequence=150 RECID=1 STAMP=964024585
- channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:36:27
- channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:37:02
- piece handle=01snbm8b_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:35
- channel ORA_SBT_TAPE_1: deleting archived log(s)
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_150_f4czn8v3_.arc RECID=1 STAMP=964024585
- Finished backup at 2017-12-29:16:37:03
- Starting backup at 2017-12-29:16:37:03
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00003 name=/u01/app/oracle/oradata/cdb2/sysaux01.dbf
- input datafile file number=00001 name=/u01/app/oracle/oradata/cdb2/system01.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:37:03
- channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00004 name=/u01/app/oracle/oradata/cdb2/undotbs01.dbf
- input datafile file number=00037 name=/u01/app/oracle/oradata/cdb2/cdata_01.dbf
- input datafile file number=00006 name=/u01/app/oracle/oradata/cdb2/users01.dbf
- channel ORA_SBT_TAPE_2: starting piece 1 at 2017-12-29:16:37:04
- channel ORA_SBT_TAPE_2: finished piece 1 at 2017-12-29:16:37:29
- piece handle=03snbm9f_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
- channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- channel ORA_SBT_TAPE_2: starting piece 1 at 2017-12-29:16:37:29
- channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:38:04
- piece handle=02snbm9f_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:01:01
- channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00015 name=/u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/612B093C409C4C0FE0531A00A8C013C6/datafile/o1_mf_sysaux_f41yt1kj_.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:38:04
- channel ORA_SBT_TAPE_2: finished piece 1 at 2017-12-29:16:38:04
- piece handle=04snbma9_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:35
- channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00007 name=/u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf
- channel ORA_SBT_TAPE_2: starting piece 1 at 2017-12-29:16:38:04
- channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:38:49
- piece handle=05snbmbc_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:45
- channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00010 name=/u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- input datafile file number=00038 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:38:50
- channel ORA_SBT_TAPE_2: finished piece 1 at 2017-12-29:16:38:50
- piece handle=06snbmbc_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:46
- channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00014 name=/u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/612B093C409C4C0FE0531A00A8C013C6/datafile/o1_mf_system_f41yt1kf_.dbf
- channel ORA_SBT_TAPE_2: starting piece 1 at 2017-12-29:16:38:50
- channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:39:15
- piece handle=07snbmcq_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
- channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00005 name=/u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:39:15
- channel ORA_SBT_TAPE_2: finished piece 1 at 2017-12-29:16:39:22
- piece handle=08snbmcq_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:32
- channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:39:50
- piece handle=09snbmdj_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:35
- Finished backup at 2017-12-29:16:39:50
- Starting backup at 2017-12-29:16:39:50
- current log archived
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting archived log backup set
- channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
- input archived log thread=1 sequence=151 RECID=2 STAMP=964024790
- channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:39:51
- channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:40:06
- piece handle=0asnbmen_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:15
- channel ORA_SBT_TAPE_1: deleting archived log(s)
- archived log file name=/u01/app/oracle/fast_recovery_area/CDB2/archivelog/2017_12_29/o1_mf_1_151_f4cztprz_.arc RECID=2 STAMP=964024790
- Finished backup at 2017-12-29:16:40:06
- Starting Control File and SPFILE Autobackup at 2017-12-29:16:40:06
- piece handle=c-710472048-20171229-00 comment=API Version 2.0,MMS Version 10.4.0.4
- Finished Control File and SPFILE Autobackup at 2017-12-29:16:40:31
- RMAN> list backup;
- List of Backup Sets
- ===================
- BS Key Size Device Type Elapsed Time Completion Time
- ------- ---------- ----------- ------------ -------------------
- 1 29.56M SBT_TAPE 00:00:17 2017-12-29:16:36:44
- BP Key: 1 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 01snbm8b_1_1 Media: station26-000001
- List of Archived Logs in backup set 1
- Thrd Seq Low SCN Low Time Next SCN Next Time
- ---- ------- ---------- ------------------- ---------- ---------
- 1 150 6909897 2017-12-29:14:00:16 6924768 2017-12-29:16:36:24
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 2 Incr 0 7.38M SBT_TAPE 00:00:17 2017-12-29:16:37:20
- BP Key: 2 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 03snbm9f_1_1 Media: station26-000002
- List of Datafiles in backup set 2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 4 0 Incr 6924799 2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/undotbs01.dbf
- 6 0 Incr 6924799 2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/users01.dbf
- 37 0 Incr 6924799 2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/cdata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 3 Incr 0 466.88M SBT_TAPE 00:00:15 2017-12-29:16:37:44
- BP Key: 3 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 04snbma9_1_1 Media: station26-000002
- List of Datafiles in backup set 3
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 11 0 Incr 6924810 2017-12-29:16:37:29 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 4 Incr 0 1.40G SBT_TAPE 00:00:43 2017-12-29:16:37:46
- BP Key: 4 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 02snbm9f_1_1 Media: station26-000001
- List of Datafiles in backup set 4
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 1 0 Incr 6924798 2017-12-29:16:37:03 /u01/app/oracle/oradata/cdb2/system01.dbf
- 3 0 Incr 6924798 2017-12-29:16:37:03 /u01/app/oracle/oradata/cdb2/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 5 Incr 0 466.56M SBT_TAPE 00:00:27 2017-12-29:16:38:31
- BP Key: 5 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 05snbmbc_1_1 Media: station26-000001,station26-000003
- List of Datafiles in backup set 5
- Container ID: 4, PDB Name: PDB2_2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 15 0 Incr 6924823 2017-12-29:16:38:04 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/612B093C409C4C0FE0531A00A8C013C6/datafile/o1_mf_sysaux_f41yt1kj_.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 6 Incr 0 455.75M SBT_TAPE 00:00:24 2017-12-29:16:38:28
- BP Key: 6 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 06snbmbc_1_1 Media: station26-000002
- List of Datafiles in backup set 6
- Container ID: 2, PDB Name: PDB$SEED
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 7 0 Incr 1741064 2017-12-22:18:16:00 /u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 7 Incr 0 210.13M SBT_TAPE 00:00:11 2017-12-29:16:39:01
- BP Key: 7 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 07snbmcq_1_1 Media: station26-000003
- List of Datafiles in backup set 7
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 0 Incr 6924864 2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- 38 0 Incr 6924864 2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 8 Incr 0 209.13M SBT_TAPE 00:00:21 2017-12-29:16:39:11
- BP Key: 8 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 08snbmcq_1_1 Media: station26-000002
- List of Datafiles in backup set 8
- Container ID: 4, PDB Name: PDB2_2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 14 0 Incr 6924865 2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/612B093C409C4C0FE0531A00A8C013C6/datafile/o1_mf_system_f41yt1kf_.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 9 Incr 0 204.75M SBT_TAPE 00:00:19 2017-12-29:16:39:34
- BP Key: 9 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 09snbmdj_1_1 Media: station26-000003
- List of Datafiles in backup set 9
- Container ID: 2, PDB Name: PDB$SEED
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 5 0 Incr 1741064 2017-12-22:18:16:00 /u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf
- BS Key Size Device Type Elapsed Time Completion Time
- ------- ---------- ----------- ------------ -------------------
- 10 64.00K SBT_TAPE 00:00:07 2017-12-29:16:39:58
- BP Key: 10 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 0asnbmen_1_1 Media: station26-000003
- List of Archived Logs in backup set 10
- Thrd Seq Low SCN Low Time Next SCN Next Time
- ---- ------- ---------- ------------------- ---------- ---------
- 1 151 6924768 2017-12-29:16:36:24 6924907 2017-12-29:16:39:50
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 11 Full 17.25M SBT_TAPE 00:00:17 2017-12-29:16:40:23
- BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20171229T164006
- Handle: c-710472048-20171229-00 Media: station26-000003
- SPFILE Included: Modification time: 2017-12-29:16:28:05
- SPFILE db_unique_name: CDB2
- Control File Included: Ckp SCN: 6924940 Ckp time: 2017-12-29:16:40:06
- RMAN> backup tag '1T_WHOLEPDB2_INCR0' pluggable database pdb2 ;
- Starting backup at 2017-12-29:16:43:40
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:43:41
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00010 name=/u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- input datafile file number=00038 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- channel ORA_SBT_TAPE_2: starting piece 1 at 2017-12-29:16:43:41
- Status: AVAILABLE Compressed: NO Tag: TAG20171229T164006
- Handle: c-710472048-20171229-00 Media: station26-000003
- SPFILE Included: Modification time: 2017-12-29:16:28:05
- channel ORA_SBT_TAPE_2: finished piece 1 at 2017-12-29:16:44:06
- piece handle=0dsnbmlt_1_1 tag=1T_WHOLEPDB2_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
- channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:44:26
- piece handle=0csnbmlt_1_1 tag=1T_WHOLEPDB2_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:45
- Finished backup at 2017-12-29:16:44:26
- Starting Control File and SPFILE Autobackup at 2017-12-29:16:44:26
- piece handle=c-710472048-20171229-01 comment=API Version 2.0,MMS Version 10.4.0.4
- Finished Control File and SPFILE Autobackup at 2017-12-29:16:44:51
- RMAN>
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-00558: error encountered while parsing input commands
- RMAN-01009: syntax error: found "identifier": expecting one of: "advise, allocate, alter, analyze, associate statistics, audit, backup, begin, @, call, catalog, change, comment, commit, configure, connect, convert, copy, create, create catalog, create global, create script, create virtual, crosscheck, declare, delete, delete from, describe, describe catalog, disassociate statistics, drop, drop catalog, drop database, duplicate, exit, explain plan, flashback, flashback table, grant, grant catalog, grant register, host, import, insert, list, lock, merge, mount, noaudit, open, print, purge, quit, recover, register, release, rename, repair, replace, report, "
- RMAN-01008: the bad identifier was: Status
- RMAN-01007: at line 1 column 4 file: standard input
- RMAN>
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-00558: error encountered while parsing input commands
- RMAN-01009: syntax error: found "identifier": expecting one of: "advise, allocate, alter, analyze, associate statistics, audit, backup, begin, @, call, catalog, change, comment, commit, configure, connect, convert, copy, create, create catalog, create global, create script, create virtual, crosscheck, declare, delete, delete from, describe, describe catalog, disassociate statistics, drop, drop catalog, drop database, duplicate, exit, explain plan, flashback, flashback table, grant, grant catalog, grant register, host, import, insert, list, lock, merge, mount, noaudit, open, print, purge, quit, recover, register, release, rename, repair, replace, report, "
- RMAN-01008: the bad identifier was: Handle
- RMAN-01007: at line 1 column 9 file: standard input
- RMAN>
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-00558: error encountered while parsing input commands
- RMAN-01009: syntax error: found "spfile": expecting one of: "advise, allocate, alter, analyze, associate statistics, audit, backup, begin, @, call, catalog, change, comment, commit, configure, connect, convert, copy, create, create catalog, create global, create script, create virtual, crosscheck, declare, delete, delete from, describe, describe catalog, disassociate statistics, drop, drop catalog, drop database, duplicate, exit, explain plan, flashback, flashback table, grant, grant catalog, grant register, host, import, insert, list, lock, merge, mount, noaudit, open, print, purge, quit, recover, register, release, rename, repair, replace, report, "
- RMAN-01007: at line 1 column 3 file: standard input
- RMAN> backup tag '2T_WHOLEPDB2_REAL0' incremental level 0 pluggable database pdb2 ;
- Starting backup at 2017-12-29:16:45:31
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:45:32
- channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00010 name=/u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- input datafile file number=00038 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- channel ORA_SBT_TAPE_2: starting piece 1 at 2017-12-29:16:45:32
- channel ORA_SBT_TAPE_2: finished piece 1 at 2017-12-29:16:45:57
- piece handle=0gsnbmpc_1_1 tag=2T_WHOLEPDB2_REAL0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
- channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:46:27
- piece handle=0fsnbmpc_1_1 tag=2T_WHOLEPDB2_REAL0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:55
- Finished backup at 2017-12-29:16:46:27
- Starting Control File and SPFILE Autobackup at 2017-12-29:16:46:27
- piece handle=c-710472048-20171229-02 comment=API Version 2.0,MMS Version 10.4.0.4
- Finished Control File and SPFILE Autobackup at 2017-12-29:16:46:52
- RMAN> list backup;
- List of Backup Sets
- ===================
- BS Key Size Device Type Elapsed Time Completion Time
- ------- ---------- ----------- ------------ -------------------
- 1 29.56M SBT_TAPE 00:00:17 2017-12-29:16:36:44
- BP Key: 1 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 01snbm8b_1_1 Media: station26-000001
- List of Archived Logs in backup set 1
- Thrd Seq Low SCN Low Time Next SCN Next Time
- ---- ------- ---------- ------------------- ---------- ---------
- 1 150 6909897 2017-12-29:14:00:16 6924768 2017-12-29:16:36:24
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 2 Incr 0 7.38M SBT_TAPE 00:00:17 2017-12-29:16:37:20
- BP Key: 2 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 03snbm9f_1_1 Media: station26-000002
- List of Datafiles in backup set 2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 4 0 Incr 6924799 2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/undotbs01.dbf
- 6 0 Incr 6924799 2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/users01.dbf
- 37 0 Incr 6924799 2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/cdata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 3 Incr 0 466.88M SBT_TAPE 00:00:15 2017-12-29:16:37:44
- BP Key: 3 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 04snbma9_1_1 Media: station26-000002
- List of Datafiles in backup set 3
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 11 0 Incr 6924810 2017-12-29:16:37:29 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 4 Incr 0 1.40G SBT_TAPE 00:00:43 2017-12-29:16:37:46
- BP Key: 4 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 02snbm9f_1_1 Media: station26-000001
- List of Datafiles in backup set 4
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 1 0 Incr 6924798 2017-12-29:16:37:03 /u01/app/oracle/oradata/cdb2/system01.dbf
- 3 0 Incr 6924798 2017-12-29:16:37:03 /u01/app/oracle/oradata/cdb2/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 5 Incr 0 466.56M SBT_TAPE 00:00:27 2017-12-29:16:38:31
- BP Key: 5 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 05snbmbc_1_1 Media: station26-000001,station26-000003
- List of Datafiles in backup set 5
- Container ID: 4, PDB Name: PDB2_2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 15 0 Incr 6924823 2017-12-29:16:38:04 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/612B093C409C4C0FE0531A00A8C013C6/datafile/o1_mf_sysaux_f41yt1kj_.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 6 Incr 0 455.75M SBT_TAPE 00:00:24 2017-12-29:16:38:28
- BP Key: 6 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 06snbmbc_1_1 Media: station26-000002
- List of Datafiles in backup set 6
- Container ID: 2, PDB Name: PDB$SEED
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 7 0 Incr 1741064 2017-12-22:18:16:00 /u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 7 Incr 0 210.13M SBT_TAPE 00:00:11 2017-12-29:16:39:01
- BP Key: 7 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 07snbmcq_1_1 Media: station26-000003
- List of Datafiles in backup set 7
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 0 Incr 6924864 2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- 38 0 Incr 6924864 2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 8 Incr 0 209.13M SBT_TAPE 00:00:21 2017-12-29:16:39:11
- BP Key: 8 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 08snbmcq_1_1 Media: station26-000002
- List of Datafiles in backup set 8
- Container ID: 4, PDB Name: PDB2_2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 14 0 Incr 6924865 2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/612B093C409C4C0FE0531A00A8C013C6/datafile/o1_mf_system_f41yt1kf_.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 9 Incr 0 204.75M SBT_TAPE 00:00:19 2017-12-29:16:39:34
- BP Key: 9 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 09snbmdj_1_1 Media: station26-000003
- List of Datafiles in backup set 9
- Container ID: 2, PDB Name: PDB$SEED
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 5 0 Incr 1741064 2017-12-22:18:16:00 /u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf
- BS Key Size Device Type Elapsed Time Completion Time
- ------- ---------- ----------- ------------ -------------------
- 10 64.00K SBT_TAPE 00:00:07 2017-12-29:16:39:58
- BP Key: 10 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 0asnbmen_1_1 Media: station26-000003
- List of Archived Logs in backup set 10
- Thrd Seq Low SCN Low Time Next SCN Next Time
- ---- ------- ---------- ------------------- ---------- ---------
- 1 151 6924768 2017-12-29:16:36:24 6924907 2017-12-29:16:39:50
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 11 Full 17.25M SBT_TAPE 00:00:17 2017-12-29:16:40:23
- BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20171229T164006
- Handle: c-710472048-20171229-00 Media: station26-000003
- SPFILE Included: Modification time: 2017-12-29:16:28:05
- SPFILE db_unique_name: CDB2
- Control File Included: Ckp SCN: 6924940 Ckp time: 2017-12-29:16:40:06
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 12 Full 210.13M SBT_TAPE 00:00:11 2017-12-29:16:43:52
- BP Key: 12 Status: AVAILABLE Compressed: NO Tag: 1T_WHOLEPDB2_INCR0
- Handle: 0dsnbmlt_1_1 Media: station26-000002
- List of Datafiles in backup set 12
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 Full 6925048 2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- 38 Full 6925048 2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 13 Full 466.88M SBT_TAPE 00:00:22 2017-12-29:16:44:03
- BP Key: 13 Status: AVAILABLE Compressed: NO Tag: 1T_WHOLEPDB2_INCR0
- Handle: 0csnbmlt_1_1 Media: station26-000003
- List of Datafiles in backup set 13
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 11 Full 6925047 2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 14 Full 17.25M SBT_TAPE 00:00:09 2017-12-29:16:44:35
- BP Key: 14 Status: AVAILABLE Compressed: NO Tag: TAG20171229T164426
- Handle: c-710472048-20171229-01 Media: station26-000003
- SPFILE Included: Modification time: 2017-12-29:16:28:05
- SPFILE db_unique_name: CDB2
- Control File Included: Ckp SCN: 6925077 Ckp time: 2017-12-29:16:44:26
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 15 Incr 0 210.13M SBT_TAPE 00:00:12 2017-12-29:16:45:44
- BP Key: 15 Status: AVAILABLE Compressed: NO Tag: 2T_WHOLEPDB2_REAL0
- Handle: 0gsnbmpc_1_1 Media: station26-000002
- List of Datafiles in backup set 15
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 0 Incr 6925250 2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- 38 0 Incr 6925250 2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 16 Incr 0 466.88M SBT_TAPE 00:00:39 2017-12-29:16:46:11
- BP Key: 16 Status: AVAILABLE Compressed: NO Tag: 2T_WHOLEPDB2_REAL0
- Handle: 0fsnbmpc_1_1 Media: station26-000003,station26-000004
- List of Datafiles in backup set 16
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 11 0 Incr 6925249 2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 17 Full 17.25M SBT_TAPE 00:00:09 2017-12-29:16:46:36
- BP Key: 17 Status: AVAILABLE Compressed: NO Tag: TAG20171229T164627
- Handle: c-710472048-20171229-02 Media: station26-000004
- SPFILE Included: Modification time: 2017-12-29:16:28:05
- SPFILE db_unique_name: CDB2
- Control File Included: Ckp SCN: 6925281 Ckp time: 2017-12-29:16:46:27
- RMAN> backup tag '3T_PDB2:LDATA_INCR0' incremental level 0 tablespace pdb2:ldata;
- Starting backup at 2017-12-29:16:48:21
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00038 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:48:21
- channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:48:46
- piece handle=0isnbmul_1_1 tag=3T_PDB2:LDATA_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
- Finished backup at 2017-12-29:16:48:46
- Starting Control File and SPFILE Autobackup at 2017-12-29:16:48:46
- piece handle=c-710472048-20171229-03 comment=API Version 2.0,MMS Version 10.4.0.4
- Finished Control File and SPFILE Autobackup at 2017-12-29:16:49:11
- RMAN> list backup;
- List of Backup Sets
- ===================
- BS Key Size Device Type Elapsed Time Completion Time
- ------- ---------- ----------- ------------ -------------------
- 1 29.56M SBT_TAPE 00:00:17 2017-12-29:16:36:44
- BP Key: 1 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 01snbm8b_1_1 Media: station26-000001
- List of Archived Logs in backup set 1
- Thrd Seq Low SCN Low Time Next SCN Next Time
- ---- ------- ---------- ------------------- ---------- ---------
- 1 150 6909897 2017-12-29:14:00:16 6924768 2017-12-29:16:36:24
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 2 Incr 0 7.38M SBT_TAPE 00:00:17 2017-12-29:16:37:20
- BP Key: 2 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 03snbm9f_1_1 Media: station26-000002
- List of Datafiles in backup set 2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 4 0 Incr 6924799 2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/undotbs01.dbf
- 6 0 Incr 6924799 2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/users01.dbf
- 37 0 Incr 6924799 2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/cdata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 3 Incr 0 466.88M SBT_TAPE 00:00:15 2017-12-29:16:37:44
- BP Key: 3 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 04snbma9_1_1 Media: station26-000002
- List of Datafiles in backup set 3
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 11 0 Incr 6924810 2017-12-29:16:37:29 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 4 Incr 0 1.40G SBT_TAPE 00:00:43 2017-12-29:16:37:46
- BP Key: 4 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 02snbm9f_1_1 Media: station26-000001
- List of Datafiles in backup set 4
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 1 0 Incr 6924798 2017-12-29:16:37:03 /u01/app/oracle/oradata/cdb2/system01.dbf
- 3 0 Incr 6924798 2017-12-29:16:37:03 /u01/app/oracle/oradata/cdb2/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 5 Incr 0 466.56M SBT_TAPE 00:00:27 2017-12-29:16:38:31
- BP Key: 5 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 05snbmbc_1_1 Media: station26-000001,station26-000003
- List of Datafiles in backup set 5
- Container ID: 4, PDB Name: PDB2_2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 15 0 Incr 6924823 2017-12-29:16:38:04 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/612B093C409C4C0FE0531A00A8C013C6/datafile/o1_mf_sysaux_f41yt1kj_.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 6 Incr 0 455.75M SBT_TAPE 00:00:24 2017-12-29:16:38:28
- BP Key: 6 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 06snbmbc_1_1 Media: station26-000002
- List of Datafiles in backup set 6
- Container ID: 2, PDB Name: PDB$SEED
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 7 0 Incr 1741064 2017-12-22:18:16:00 /u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 7 Incr 0 210.13M SBT_TAPE 00:00:11 2017-12-29:16:39:01
- BP Key: 7 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 07snbmcq_1_1 Media: station26-000003
- List of Datafiles in backup set 7
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 0 Incr 6924864 2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- 38 0 Incr 6924864 2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 8 Incr 0 209.13M SBT_TAPE 00:00:21 2017-12-29:16:39:11
- BP Key: 8 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 08snbmcq_1_1 Media: station26-000002
- List of Datafiles in backup set 8
- Container ID: 4, PDB Name: PDB2_2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 14 0 Incr 6924865 2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/612B093C409C4C0FE0531A00A8C013C6/datafile/o1_mf_system_f41yt1kf_.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 9 Incr 0 204.75M SBT_TAPE 00:00:19 2017-12-29:16:39:34
- BP Key: 9 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 09snbmdj_1_1 Media: station26-000003
- List of Datafiles in backup set 9
- Container ID: 2, PDB Name: PDB$SEED
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 5 0 Incr 1741064 2017-12-22:18:16:00 /u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf
- BS Key Size Device Type Elapsed Time Completion Time
- ------- ---------- ----------- ------------ -------------------
- 10 64.00K SBT_TAPE 00:00:07 2017-12-29:16:39:58
- BP Key: 10 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 0asnbmen_1_1 Media: station26-000003
- List of Archived Logs in backup set 10
- Thrd Seq Low SCN Low Time Next SCN Next Time
- ---- ------- ---------- ------------------- ---------- ---------
- 1 151 6924768 2017-12-29:16:36:24 6924907 2017-12-29:16:39:50
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 11 Full 17.25M SBT_TAPE 00:00:17 2017-12-29:16:40:23
- BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20171229T164006
- Handle: c-710472048-20171229-00 Media: station26-000003
- SPFILE Included: Modification time: 2017-12-29:16:28:05
- SPFILE db_unique_name: CDB2
- Control File Included: Ckp SCN: 6924940 Ckp time: 2017-12-29:16:40:06
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 12 Full 210.13M SBT_TAPE 00:00:11 2017-12-29:16:43:52
- BP Key: 12 Status: AVAILABLE Compressed: NO Tag: 1T_WHOLEPDB2_INCR0
- Handle: 0dsnbmlt_1_1 Media: station26-000002
- List of Datafiles in backup set 12
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 Full 6925048 2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- 38 Full 6925048 2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 13 Full 466.88M SBT_TAPE 00:00:22 2017-12-29:16:44:03
- BP Key: 13 Status: AVAILABLE Compressed: NO Tag: 1T_WHOLEPDB2_INCR0
- Handle: 0csnbmlt_1_1 Media: station26-000003
- List of Datafiles in backup set 13
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 11 Full 6925047 2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 14 Full 17.25M SBT_TAPE 00:00:09 2017-12-29:16:44:35
- BP Key: 14 Status: AVAILABLE Compressed: NO Tag: TAG20171229T164426
- Handle: c-710472048-20171229-01 Media: station26-000003
- SPFILE Included: Modification time: 2017-12-29:16:28:05
- SPFILE db_unique_name: CDB2
- Control File Included: Ckp SCN: 6925077 Ckp time: 2017-12-29:16:44:26
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 15 Incr 0 210.13M SBT_TAPE 00:00:12 2017-12-29:16:45:44
- BP Key: 15 Status: AVAILABLE Compressed: NO Tag: 2T_WHOLEPDB2_REAL0
- Handle: 0gsnbmpc_1_1 Media: station26-000002
- List of Datafiles in backup set 15
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 0 Incr 6925250 2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- 38 0 Incr 6925250 2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 16 Incr 0 466.88M SBT_TAPE 00:00:39 2017-12-29:16:46:11
- BP Key: 16 Status: AVAILABLE Compressed: NO Tag: 2T_WHOLEPDB2_REAL0
- Handle: 0fsnbmpc_1_1 Media: station26-000003,station26-000004
- List of Datafiles in backup set 16
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 11 0 Incr 6925249 2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 17 Full 17.25M SBT_TAPE 00:00:09 2017-12-29:16:46:36
- BP Key: 17 Status: AVAILABLE Compressed: NO Tag: TAG20171229T164627
- Handle: c-710472048-20171229-02 Media: station26-000004
- SPFILE Included: Modification time: 2017-12-29:16:28:05
- SPFILE db_unique_name: CDB2
- Control File Included: Ckp SCN: 6925281 Ckp time: 2017-12-29:16:46:27
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 18 Incr 0 1.06M SBT_TAPE 00:00:16 2017-12-29:16:48:37
- BP Key: 18 Status: AVAILABLE Compressed: NO Tag: 3T_PDB2:LDATA_INCR0
- Handle: 0isnbmul_1_1 Media: station26-000004
- List of Datafiles in backup set 18
- Container ID: 3, PDB Name: PDB2
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 38 0 Incr 6925352 2017-12-29:16:48:21 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 19 Full 17.25M SBT_TAPE 00:00:09 2017-12-29:16:48:55
- BP Key: 19 Status: AVAILABLE Compressed: NO Tag: TAG20171229T164846
- Handle: c-710472048-20171229-03 Media: station26-000004
- SPFILE Included: Modification time: 2017-12-29:16:28:05
- SPFILE db_unique_name: CDB2
- Control File Included: Ckp SCN: 6925366 Ckp time: 2017-12-29:16:48:46
- RMAN> list backup of tablespace pdb2:system;
- List of Backup Sets
- ===================
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 7 Incr 0 210.13M SBT_TAPE 00:00:11 2017-12-29:16:39:01
- BP Key: 7 Status: AVAILABLE Compressed: NO Tag: 0T_WHOLE_INCR0
- Handle: 07snbmcq_1_1 Media: station26-000003
- List of Datafiles in backup set 7
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 0 Incr 6924864 2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 12 Full 210.13M SBT_TAPE 00:00:11 2017-12-29:16:43:52
- BP Key: 12 Status: AVAILABLE Compressed: NO Tag: 1T_WHOLEPDB2_INCR0
- Handle: 0dsnbmlt_1_1 Media: station26-000002
- List of Datafiles in backup set 12
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 Full 6925048 2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 15 Incr 0 210.13M SBT_TAPE 00:00:12 2017-12-29:16:45:44
- BP Key: 15 Status: AVAILABLE Compressed: NO Tag: 2T_WHOLEPDB2_REAL0
- Handle: 0gsnbmpc_1_1 Media: station26-000002
- List of Datafiles in backup set 15
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- ------------------- ----
- 10 0 Incr 6925250 2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
- RMAN>
复制代码
P168/P169页在恢复pdb2:system时关闭整个cdb2是完全没必要的。
- SQL> alter database open ;
- alter database open
- *
- ERROR at line 1:
- ORA-01113: file 38 needs media recovery
- ORA-01110: data file 38: '/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf'
- SQL> recover datafile 38 ;
- Media recovery complete.
- SQL> alter database open ;
- alter database open
- *
- ERROR at line 1:
- ORA-01113: file 11 needs media recovery
- ORA-01110: data file 11: '/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf'
- SQL> recover datafile 11;
- Media recovery complete.
- SQL> alter database open ;
- Database altered.
- SQL>
复制代码 控制文件的trace脚本和过去的trace脚本唯一不同的就在添加临时文件的哪一段:
- -- Other tempfiles may require adjustment.
- ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/temp01.dbf'
- SIZE 206569472 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
- ALTER SESSION SET CONTAINER = PDB$SEED;
- ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/pdbseed/pdbseed_temp012017-12-22_06-04-39-PM.dbf'
- SIZE 104857600 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
- ALTER SESSION SET CONTAINER = PDB2;
- ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/pdb2_1/pdbseed_temp012017-12-22_06-04-39-PM.dbf'
- SIZE 20971520 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
- ALTER SESSION SET CONTAINER = PDB2_2;
- ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/612B093C409C4C0FE0531A00A8C013C6/datafile/o1_mf_temp_f41yt1kl_.dbf'
- SIZE 20971520 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
- ALTER SESSION SET CONTAINER = CDB$ROOT;
- ALTER TABLESPACE TEMP_ROOT ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/temproot_01.dbf'
- SIZE 524288000 REUSE AUTOEXTEND OFF;
- ALTER SESSION SET CONTAINER = PDB2;
- ALTER TABLESPACE TEMP_PDB2 ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/pdb2_1/temppdb2_01.dbf'
- SIZE 104857600 REUSE AUTOEXTEND OFF;
- ALTER TABLESPACE MY_TEMP ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/pdb2_1/my_temp_pdb2_01.dbf'
- SIZE 10485760 REUSE AUTOEXTEND OFF;
- ALTER SESSION SET CONTAINER = CDB$ROOT;
- -- End of tempfile additions.
复制代码
书P198页,如果能在硬盘原来地方回复,可以根过去一样:
- RMAN> run {
- 2> set until scn 7130739 ;
- 3> restore pluggable database pdb2;
- 4> recover pluggable database pdb2;
- 5> }
复制代码
书上脚本的好处是在临时实例别处恢复:
- RMAN> run {
- set until scn 7130739 ;
- restore pluggable database pdb2;
- recover pluggable database pdb2 auxiliary destination '/u01/app/oracle/oradata';
- alter pluggable database pdb2 open resetlogs;
- }
复制代码
|
|