设为首页收藏本站

Botang唐波's Oracle Station

查看: 559|回复: 0

课程第67/68次(2017-12-09星期六上下午)

[复制链接]

659

主题

1018

帖子

7486

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
7486
发表于 2017-12-9 09:43:38 | 显示全部楼层 |阅读模式
1Z0-063第5/6章
1Z0-05219章(上完19章),1Z0-05321章(上完21章)和1Z0-063多租户部分共9章(上6
总共上完全部49章中的46

cdb2:
  1. select p.ISPDB_MODIFIABLE, p.value
  2. from v$parameter p
  3. where p.NAME='optimizer_use_sql_plan_baselines';

  4. select  con_id, name , open_mode
  5. from v$pdbs;

  6. select  p.CON_ID, p.ISPDB_MODIFIABLE,p.VALUE
  7.   from v$system_parameter p
  8.   where p.NAME='optimizer_use_sql_plan_baselines';

复制代码
pdb2:
  1. [oracle@station26 admin]$ tnsping  pdb2

  2. TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 29-DEC-2017 09:26:51

  3. Copyright (c) 1997, 2014, Oracle.  All rights reserved.

  4. Used parameter files:


  5. Used TNSNAMES adapter to resolve the alias
  6. Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = station26.example.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdb2)))
  7. OK (10 msec)
  8. [oracle@station26 admin]$ sqlplus /nolog

  9. SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 29 09:26:54 2017

  10. Copyright (c) 1982, 2014, Oracle.  All rights reserved.

  11. SQL> conn sys/oracle_4U@pdb2 as sysdba
  12. Connected.
  13. SQL> select p.ISPDB_MODIFIABLE
  14. from v$parameter p
  15. where p.NAME='optimizer_use_sql_plan_baselines';  2    3  

  16. ISPDB
  17. -----
  18. TRUE

  19. SQL> ed  
  20. Wrote file afiedt.buf

  21.   1  select p.ISPDB_MODIFIABLE, p.value
  22.   2   from v$parameter p
  23.   3*  where p.NAME='optimizer_use_sql_plan_baselines'
  24. SQL> /

  25. ISPDB
  26. -----
  27. VALUE
  28. --------------------------------------------------------------------------------
  29. TRUE
  30. TRUE


  31. SQL> alter system set optimizer_use_sql_plan_baselines=false;

  32. System altered.

  33. SQL> show parameter optimizer_use_sql_plan_baselines

  34. NAME                                     TYPE         VALUE
  35. ------------------------------------ ----------- ------------------------------
  36. optimizer_use_sql_plan_baselines     boolean         FALSE
  37. SQL> shutdown  immediate
  38. Pluggable Database closed.
  39. SQL> startup
  40. Pluggable Database opened.
  41. SQL> show parameter optimi

  42. NAME                                     TYPE         VALUE
  43. ------------------------------------ ----------- ------------------------------
  44. optimizer_adaptive_features             boolean         TRUE
  45. optimizer_adaptive_reporting_only    boolean         FALSE
  46. optimizer_capture_sql_plan_baselines boolean         FALSE
  47. optimizer_dynamic_sampling             integer         2
  48. optimizer_features_enable             string         12.1.0.2
  49. optimizer_index_caching              integer         0
  50. optimizer_index_cost_adj             integer         100
  51. optimizer_inmemory_aware             boolean         TRUE
  52. optimizer_mode                             string         ALL_ROWS
  53. optimizer_secure_view_merging             boolean         TRUE
  54. optimizer_use_invisible_indexes      boolean         FALSE

  55. NAME                                     TYPE         VALUE
  56. ------------------------------------ ----------- ------------------------------
  57. optimizer_use_pending_statistics     boolean         FALSE
  58. optimizer_use_sql_plan_baselines     boolean         FALSE
  59. plsql_optimize_level                     integer         2
  60. SQL>
复制代码
pdb2_2:
  1. [oracle@station26 ~]$ sqlplus /nolog

  2. SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 29 09:30:31 2017

  3. Copyright (c) 1982, 2014, Oracle.  All rights reserved.

  4. SQL> conn sys/oracle_4U@pdb2_2 as sysdba
  5. Connected.
  6. SQL> show parameter optimizer_use_sql_plan_baselines

  7. NAME                                     TYPE         VALUE
  8. ------------------------------------ ----------- ------------------------------
  9. optimizer_use_sql_plan_baselines     boolean         TRUE
  10. SQL>
复制代码

又一个显示成conid=0的v$视图:
Screenshot.png


pdb2_2:
  1. SQL> desc v$pdbs
  2. Name                                           Null?    Type
  3. ----------------------------------------- -------- ----------------------------
  4. CON_ID                                             NUMBER
  5. DBID                                                    NUMBER
  6. CON_UID                                            NUMBER
  7. GUID                                                    RAW(16)
  8. NAME                                                    VARCHAR2(30)
  9. OPEN_MODE                                            VARCHAR2(10)
  10. RESTRICTED                                            VARCHAR2(3)
  11. OPEN_TIME                                            TIMESTAMP(3) WITH TIME ZONE
  12. CREATE_SCN                                            NUMBER
  13. TOTAL_SIZE                                            NUMBER
  14. BLOCK_SIZE                                            NUMBER
  15. RECOVERY_STATUS                                    VARCHAR2(8)
  16. SNAPSHOT_PARENT_CON_ID                             NUMBER

  17. SQL> select  con_id , name , open_mode , RESTRICTED  from v$pdbs ;

  18.     CON_ID NAME                           OPEN_MODE  RES
  19. ---------- ------------------------------ ---------- ---
  20.          4 PDB2_2                          READ WRITE NO

  21. SQL> alter system enable restricted session;

  22. System altered.

  23. SQL>  select  con_id , name , open_mode , RESTRICTED  from v$pdbs ;

  24.     CON_ID NAME                           OPEN_MODE  RES
  25. ---------- ------------------------------ ---------- ---
  26.          4 PDB2_2                          READ WRITE YES

  27. SQL> CREATE USER u1_pdb2_2 IDENTIFIED BY oracle_4U;

  28. User created.

  29. SQL> grant create session to u1_pdb2_2;

  30. Grant succeeded.

  31. SQL> conn u1_pdb2_2/oracle_4U@pdb2_2  
  32. ERROR:
  33. ORA-01035: ORACLE only available to users with RESTRICTED SESSION privilege


  34. Warning: You are no longer connected to ORACLE.
  35. SQL> alter system   disable restricted session;
  36. SP2-0640: Not connected
  37. SQL> conn sys/oracle_4U@pdb2_2 as sysdba
  38. Connected.
  39. SQL>  alter system   disable restricted session;

  40. System altered.

  41. SQL>  select  con_id , name , open_mode , RESTRICTED  from v$pdbs ;

  42.     CON_ID NAME                           OPEN_MODE  RES
  43. ---------- ------------------------------ ---------- ---
  44.          4 PDB2_2                          READ WRITE NO

  45. SQL> conn u1_pdb2_2/oracle_4U@pdb2_2
  46. Connected.
  47. SQL>
复制代码

pdb2:
  1. SQL> show con_name

  2. CON_NAME
  3. ------------------------------
  4. PDB2
  5. SQL>  CREATE USER u1_pdb2 IDENTIFIED BY oracle_4U;

  6. User created.

  7. SQL> grant create session to u1_pdb2;

  8. Grant succeeded.

  9. SQL> conn u1_pdb2/oracle_4U@pdb2  
  10. Connected.
  11. SQL> conn sys/oracle_4U@pdb2 as sysdba
  12. Connected.
  13. SQL> select  con_id , name , open_mode , RESTRICTED  from v$pdbs ;

  14.     CON_ID NAME                           OPEN_MODE  RES
  15. ---------- ------------------------------ ---------- ---
  16.          3 PDB2                           READ WRITE NO

  17. SQL>
复制代码

根容器和每个插件数据库各自有自己的默认表空间和默认临时表空间,如果显示成'USERS'也不是同一个'USERS':
CDB2:
  1. select  * from database_properties;

  2. select  t.con_id, t.name, d.name , d.status
  3. from v$tablespace t , v$datafile d
  4. where t.ts#=d.ts# and t.con_id=d.con_id
  5. order by 1,2;
复制代码
PDB2:
  1. SQL> col PROPERTY_NAME format a30
  2. SQL> col PROPERTY_VALUE format a25
  3. SQL> SELECT property_name, property_value
  4.   2  FROM database_properties
  5.   3  WHERE property_name LIKE 'DEFAULT_%TABLE%';

  6. PROPERTY_NAME                       PROPERTY_VALUE
  7. ------------------------------ -------------------------
  8. DEFAULT_TEMP_TABLESPACE        TEMP
  9. DEFAULT_PERMANENT_TABLESPACE   SYSTEM

复制代码
PDB_ORCL2:
  1. SQL> col PROPERTY_NAME format a30
  2. SQL> col PROPERTY_VALUE format a25
  3. SQL> SELECT property_name, property_value
  4.   2  FROM database_properties
  5.   3  WHERE property_name LIKE 'DEFAULT_%TABLE%';

  6. PROPERTY_NAME                       PROPERTY_VALUE
  7. ------------------------------ -------------------------
  8. DEFAULT_TEMP_TABLESPACE        TEMP
  9. DEFAULT_PERMANENT_TABLESPACE   USERS

  10. SQL> select  t.con_id, t.name, d.name , d.status
  11.   2  from v$tablespace t , v$datafile d
  12.   3  where t.ts#=d.ts# and t.con_id=d.con_id
  13.   4  order by 1,2;

  14.    

  15. SQL> set linesize 10000

  16.     CON_ID NAME                           NAME                                                                                                    STATUS
  17. ---------- ------------------------------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------
  18.          0 UNDOTBS1                          /u01/app/oracle/oradata/cdb2/undotbs01.dbf                                                            ONLINE
  19.          5 EXAMPLE                          +DATA/ORCL2/DATAFILE/example.284.934891291                                                            ONLINE
  20.          5 SYSAUX                          +DATA/ORCL2/DATAFILE/sysaux.275.934891047                                                            ONLINE
  21.          5 SYSTEM                          +DATA/ORCL2/DATAFILE/system.276.934891113                                                            SYSTEM
  22.          5 USERS                          +DATA/ORCL2/DATAFILE/users.277.934891199                                                            ONLINE

复制代码
  1. --cdb2
  2. create tablespace cdata
  3.   datafile '/u01/app/oracle/oradata/cdb2/cdata_01.dbf'
  4.   size 10M;
  5.   
  6.   select con_id, tablespace_name
  7.   from cdb_tablespaces  order by 1;

  8. select  * from database_properties;

  9. alter database default tablespace cdata;

  10. select  * from database_properties;

  11. --pdb2
  12. select  * from database_properties;

  13. create tablespace ldata datafile
  14. '/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf'
  15. size 10M;

  16. select * from dba_tablespaces;

  17. alter database default tablespace ldata;

  18. select  * from database_properties;


  19. --cdb2

  20. create temporary tablespace temp_root
  21. tempfile '/u01/app/oracle/oradata/cdb2/temproot_01.dbf'
  22. size 500M;

  23. select  * from database_properties;

  24. alter database default temporary tablespace temp_root;

  25. select  * from database_properties;

  26. --pdb2
  27. create temporary tablespace temp_pdb2 tempfile
  28. '/u01/app/oracle/oradata/cdb2/pdb2_1/temppdb2_01.dbf'
  29. size 100M;

  30. select  * from database_properties;

  31. alter database default temporary tablespace temp_pdb2;

  32. select  * from database_properties;

  33. create temporary tablespace my_temp tempfile
  34. '/u01/app/oracle/oradata/cdb2/pdb2_1/my_temp_pdb2_01.dbf'
  35. size 10M;

  36. --pdb_orcl2
  37. select  * from database_properties;
复制代码

通用用户的表空间属性随插件数据库的默认属性而定制分配:

  1. --create user botang identified by oracle_4U;
  2. create user c##botang identified by oracle_4U;

  3. create user c##u identified by x;

  4. select  c.CON_ID, c.USERNAME,
  5.     c.COMMON,
  6.     c.DEFAULT_TABLESPACE,
  7.    c.TEMPORARY_TABLESPACE
  8. from cdb_users c
  9.   where c.USERNAME='C##U'
  10.   order by 1;
复制代码

Screenshot-1.png

CDB2:
  1. select  c.CON_ID, c.USERNAME,
  2.     c.COMMON,
  3.     c.DEFAULT_TABLESPACE,
  4.    c.TEMPORARY_TABLESPACE
  5. from cdb_users c
  6.   where c.USERNAME='LU';
  7.   
  8. -- alter user lu temporary tablespace my_temp;
复制代码

PDB2:

  1. SQL> create user botang identified by oracle_4U;

  2. User created.

  3. SQL> CREATE USER lu IDENTIFIED BY x;

  4. User created.

  5. SQL> show con_name

  6. CON_NAME
  7. ------------------------------
  8. PDB2
  9. SQL>  alter user lu temporary tablespace my_temp;

  10. User altered.

  11. SQL>
复制代码
在插件数据库中执行创建undo表空间的命令是不会报错的假命令:

  1. SQL> create undo tablespace undo_pdb2 datafile
  2.   2  '/u01/app/oracle/oradata/cdb2/pdb2_1/undo_pdb2_01.dbf'  size 10M ;

  3. Tablespace created.
复制代码


报告“Tablespace created.”但是以下命令是找不到产出物的:

  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;

  5. select    con_id , tablespace_name
  6. from cdb_tablespaces  order by con_id, tablespace_name;
复制代码
看刚刚创建的两个用户:
  1. select  u.USERNAME, u.COMMON, u.CON_ID
  2. from  cdb_users u where u.USERNAME in ('C##U','LU')
  3. order by  u.CON_ID;
复制代码
在根容器上,如果不写container=all,建的用户是通用,授的权限是本地的(即相当于授权是container=(current)):

  1. select  u.USERNAME, u.COMMON, u.CON_ID
  2. from  cdb_users u where u.USERNAME in ('C##U','LU')
  3. order by  u.CON_ID;

  4. create user c##_user identified by x container=all;

  5. select  u.USERNAME, u.COMMON, u.CON_ID,
  6. u.TEMPORARY_TABLESPACE ,u.DEFAULT_TABLESPACE

  7. from  cdb_users u where u.USERNAME in ('C##U','LU', 'C##_USER')
  8. order by  u.CON_ID , u.USERNAME;

  9. grant create session to c##u;
复制代码
在插件数据库中是不能做通用DDL操作的:
  1. SQL> conn c##_user/x@pdb2
  2. Connected.
  3. SQL>
  4. create user c##_user_pdb2 identified by x
  5. container=all;SQL>   2  
  6. create user c##_user_pdb2 identified by x
  7.                                         *
  8. ERROR at line 1:
  9. ORA-65050: Common DDLs only allowed in CDB$ROOT
复制代码
在根容器上创建角色时不写container=all,默认就是container=all:
  1. select  r.CON_ID, r.COMMON, r.ROLE
  2. from cdb_roles r
  3. where r.COMMON='NO';

  4. create role c##_role;

  5.   select  r.CON_ID, r.COMMON, r.ROLE
  6. from cdb_roles r
  7. where r.ROLE='C##_ROLE' order by 1;
复制代码
在插件上创建角色时不写container=current,默认就是container=current:
  1. SQL> conn sys/oracle_4U@pdb2 as sysdba
  2. Connected.
  3. SQL>  create role local_role_PDB2
  4.   2  ;

  5. Role created.

  6. SQL>
复制代码
在cdb2上查第一个本地角色:
Screenshot-2.png

查看角色(通用/本地)是怎么授权(通用/本地)的:
  1. grant c##_role to c##_user;

  2. select CON_ID,  GRANTEE, GRANTED_ROLE, COMMON
  3. from cdb_role_privs where grantee='C##_USER'
  4. order by con_id;
复制代码
同一个角色的本地和通用授权,算两次授权:revoke时要分别回收两次(即不要认为通用授权回收了,本地授权就跟回收)

Screenshot-3.png

由于在插件里能够看到通用角色,所以插件数据库也可以像根容器那样进行通用角色的本地授权(通用角色的本地用户的本地授权):
  1. SQL> grant c##_role to local_user_pdb2;

  2. Grant succeeded.
复制代码
在插件数据库里,都不必写container子句,原因是插件里不可能container=all
  1. SQL> grant CREATE SYNONYM to C##_USER
  2.   2  ;

  3. Grant succeeded.

  4. SQL>
复制代码
  1. select  * from cdb_sys_privs sp
  2. where sp.GRANTEE in('C##_USER','LOCAL_USER_PDB2')
  3. order by con_id , grantee, sp.PRIVILEGE;

  4. grant create table , unlimited tablespace to c##_user
  5. container=all;

  6. select  * from cdb_sys_privs sp
  7. where sp.GRANTEE in('C##_USER','LOCAL_USER_PDB2')
  8. order by con_id , grantee, sp.PRIVILEGE;

  9. grant create sequence to c##_user ;

  10.   select  * from cdb_sys_privs sp
  11. where sp.GRANTEE in('C##_USER','LOCAL_USER_PDB2')
  12. order by con_id , grantee, sp.PRIVILEGE;
复制代码
根容器上没有本地用户,但是能查看所有用户的连接信息:
Screenshot-4.png

  1. select  * from  CDB_CONTAINER_DATA
  2. WHERE username NOT IN
  3. ('GSMADMIN_INTERNAL', 'APPQOSSYS', 'DBSNMP')
  4. ORDER BY OBJECT_NAME;

  5. create user c##jfv identified by oracle_4U container=all;

  6. GRANT CREATE SESSION, SET CONTAINER TO c##jfv
  7. CONTAINER=ALL;

  8. grant select  on sys.v_$session to c##jfv container=all;

  9. SELECT username, con_id FROM v_$session
  10. WHERE username IS NOT NULL AND username <> 'DBSNMP';

复制代码

到此,C##JFV只是每个插件的SYS助理,专门负责帮各个SYS看各自的v$session:
  1. [oracle@station26 ~]$ sqlplus /nolog

  2. SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 29 15:30:45 2017

  3. Copyright (c) 1982, 2014, Oracle.  All rights reserved.

  4. SQL> CONNECT c##jfv/oracle_4U
  5. Connected.
  6. SQL> SELECT username, con_id FROM v_$session
  7. WHERE username IS NOT NULL AND username <> 'DBSNMP';  2  
  8. SELECT username, con_id FROM v_$session
  9.                              *
  10. ERROR at line 1:
  11. ORA-00942: table or view does not exist


  12. SQL> SELECT username, con_id FROM sys.v_$session
  13.   2  WHERE username IS NOT NULL AND username <> 'DBSNMP';

  14. USERNAME                           CON_ID
  15. ------------------------------ ----------
  16. SYS                                        0
  17. SYS                                        1
  18. SYS                                        0
  19. SYS                                        0
  20. C##JFV                                        1

  21. SQL> conn c##jfv/x@pdb2
  22. ERROR:
  23. ORA-01017: invalid username/password; logon denied


  24. Warning: You are no longer connected to ORACLE.
  25. SQL>  conn c##jfv/oracle_4U@pdb2
  26. Connected.
  27. SQL> SELECT username, con_id FROM sys.v_$session
  28.   2  WHERE username IS NOT NULL AND username <> 'DBSNMP';

  29. USERNAME                           CON_ID
  30. ------------------------------ ----------
  31. SYS                                        0
  32. C##JFV                                        3
  33. LOCAL_USER_PDB2                         3
  34. SYS                                        0
  35. SYS                                        0

  36. SQL> conn c##jfv/oracle_4U@pdb2_2
  37. Connected.
  38. SQL> SELECT username, con_id FROM sys.v_$session
  39.   2  WHERE username IS NOT NULL AND username <> 'DBSNMP';

  40. USERNAME                           CON_ID
  41. ------------------------------ ----------
  42. SYS                                        0
  43. C##JFV                                        4
  44. SYS                                        0
  45. SYS                                        0

  46. SQL> conn c##jfv/oracle_4U@pdb_orcl2
  47. Connected.
  48. SQL>  SELECT username, con_id FROM sys.v_$session
  49.   2  WHERE username IS NOT NULL AND username <> 'DBSNMP';

  50. USERNAME                           CON_ID
  51. ------------------------------ ----------
  52. SYS                                        0
  53. C##JFV                                        5
  54. SYS                                        0
  55. SYS                                        0

  56. SQL> conn c##jfv/oracle_4U@pdb_orcl
  57. Connected.
  58. SQL> SELECT username, con_id FROM sys.v_$session
  59.   2  WHERE username IS NOT NULL AND username <> 'DBSNMP';

  60. USERNAME                           CON_ID
  61. ------------------------------ ----------
  62. SYS                                        0
  63. SYS                                        0
  64. SYS                                        0
  65. C##JFV                                        6

  66. SQL> conn c##jfv/oracle_4U@pdb1_1
  67. Connected.
  68. SQL> SELECT username, con_id FROM sys.v_$session
  69.   2  WHERE username IS NOT NULL AND username <> 'DBSNMP';

  70. USERNAME                           CON_ID
  71. ------------------------------ ----------
  72. SYS                                        0
  73. SYS                                        0
  74. SYS                                        7
  75. SYS                                        0
  76. C##JFV                                        7

  77. SQL>
复制代码

以下命令扩大了c##jfv在根容器上查看数据库v$session信息的范围:
  1. SELECT username, con_id FROM v_$session
  2. WHERE username IS NOT NULL AND username <> 'DBSNMP';

  3. alter user c##jfv
  4.   set container_data=(cdb$root,pdb1_1,pdb2_2)
  5.   for v_$session
  6.   container=current;
  7.   
  8. select  username from cdb_users
  9.   where con_id=4 and common='NO';
复制代码
Screenshot-5.png

进入第7章之前,把磁盘组空间加回文件系统(我们推的环境只有90G)

  1. [root@station26 stage]# df -h
  2. Filesystem            Size  Used Avail Use% Mounted on
  3. /dev/mapper/RAC12crhel6-root
  4.                        44G   35G  7.0G  84% /
  5. tmpfs                 8.5G  2.7G  5.9G  32% /dev/shm
  6. /dev/vda1             283M  114M  150M  44% /boot
  7. //192.168.0.199/data   23G   23G  914M  97% /mnt
  8. [root@station26 stage]# lvs
  9.   LV   VG          Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  10.   root RAC12crhel6 -wi-ao---- 44.66g                                                   
  11. [root@station26 stage]# pvs
  12.   PV         VG          Fmt  Attr PSize  PFree
  13.   /dev/vda2  RAC12crhel6 lvm2 a--u 44.72g 64.00m
  14. [root@station26 stage]# su - oracle
  15. [oracle@station26 ~]$ . oraenv
  16. ORACLE_SID = [cdb2] ? +ASM
  17. The Oracle base remains unchanged with value /u01/app/oracle
  18. [oracle@station26 ~]$ sqlplus /nolog

  19. SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 29 16:01:45 2017

  20. Copyright (c) 1982, 2014, Oracle.  All rights reserved.

  21. SQL> conn / as sysasm
  22. Connected.
  23. SQL> drop diskgroup data including contents;
  24. drop diskgroup data including contents
  25. *
  26. ERROR at line 1:
  27. ORA-15039: diskgroup not dropped
  28. ORA-15027: active use of diskgroup "DATA" precludes its dismount


  29. SQL> exit
  30. Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
  31. With the Automatic Storage Management option
  32. [oracle@station26 ~]$ sqlplus /nolog

  33. SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 29 16:02:14 2017

  34. Copyright (c) 1982, 2014, Oracle.  All rights reserved.

  35. SQL> conn /  sysasm
  36. SP2-0306: Invalid option.
  37. Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM}] [edition=value]]
  38. where <logon> ::= <username>[/<password>][@<connect_identifier>]
  39.       <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
  40. SQL> conn / as sysasm
  41. Connected.
  42. SQL> desc v$asm_client
  43. Name                                           Null?    Type
  44. ----------------------------------------- -------- ----------------------------
  45. GROUP_NUMBER                                            NUMBER
  46. INSTANCE_NAME                                            VARCHAR2(64)
  47. DB_NAME                                            VARCHAR2(8)
  48. CLUSTER_NAME                                            VARCHAR2(31)
  49. STATUS                                             VARCHAR2(12)
  50. SOFTWARE_VERSION                                    VARCHAR2(60)
  51. COMPATIBLE_VERSION                                    VARCHAR2(60)
  52. CON_ID                                             NUMBER

  53. SQL> select  DB_NAME  , GROUP_NUMBER  from v$asm_client;

  54. DB_NAME                  GROUP_NUMBER
  55. ------------------------ ------------
  56. cdb2                                    0
  57. +ASM                                    0

  58. SQL> /

  59. DB_NAME                  GROUP_NUMBER
  60. ------------------------ ------------
  61. +ASM                                    0

  62. SQL> drop diskgroup data including contents;
  63. drop diskgroup data including contents
  64. *
  65. ERROR at line 1:
  66. ORA-15039: diskgroup not dropped
  67. ORA-15027: active use of diskgroup "DATA" precludes its dismount


  68. SQL> drop diskgroup fra including contents ;

  69. Diskgroup dropped.

  70. SQL> drop diskgroup data including contents  force ;
  71. drop diskgroup data including contents        force
  72.                                         *
  73. ERROR at line 1:
  74. ORA-00933: SQL command not properly ended


  75. SQL>  drop diskgroup data dismount;
  76. drop diskgroup data dismount
  77.                      *
  78. ERROR at line 1:
  79. ORA-00933: SQL command not properly ended


  80. SQL> alter diskgroup data dismount;
  81. alter diskgroup data dismount
  82. *
  83. ERROR at line 1:
  84. ORA-15032: not all alterations performed
  85. ORA-15027: active use of diskgroup "DATA" precludes its dismount


  86. SQL> alter diskgroup data dismount  force ;

  87. Diskgroup altered.

  88. SQL> drop diskgroup data ;
  89. drop diskgroup data
  90. *
  91. ERROR at line 1:
  92. ORA-15039: diskgroup not dropped
  93. ORA-15001: diskgroup "DATA" does not exist or is not mounted


  94. SQL> alter diskgroup data mount;

  95. Diskgroup altered.

  96. SQL> drop diskgroup data;
  97. drop diskgroup data
  98. *
  99. ERROR at line 1:
  100. ORA-15039: diskgroup not dropped
  101. ORA-15027: active use of diskgroup "DATA" precludes its dismount


  102. SQL> select  name  from v$asm_disk;

  103. NAME
  104. --------------------------------------------------------------------------------

  105. ASMDISK01
  106. ASMDISK02
  107. ASMDISK03
  108. ASMDISK04

  109. SQL> alter diskgroup data drop disk ASMDISK01;

  110. Diskgroup altered.

  111. SQL>  alter diskgroup data drop disk  ASMDISK02 ;

  112. Diskgroup altered.

  113. SQL>  alter diskgroup data drop disk ASMDISK03 ;
  114. alter diskgroup data drop disk ASMDISK03
  115. *
  116. ERROR at line 1:
  117. ORA-15067: command or option incompatible with diskgroup redundancy


  118. SQL> exit
  119. Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
  120. With the Automatic Storage Management option
  121. [oracle@station26 ~]$ exit
  122. logout
  123. [root@station26 stage]# cd /dev/oracleasm/disks/
  124. [root@station26 disks]# ls
  125. ASMDISK01  ASMDISK02  ASMDISK03  ASMDISK04  ASMDISK05
  126. [root@station26 disks]# ls -l
  127. 总用量 0
  128. brw-rw----. 1 oracle asmadmin 250, 5 11月 14 11:40 ASMDISK01
  129. brw-rw----. 1 oracle asmadmin 250, 6 11月 14 11:40 ASMDISK02
  130. brw-rw----. 1 oracle asmadmin 250, 7 11月 14 11:40 ASMDISK03
  131. brw-rw----. 1 oracle asmadmin 250, 8 11月 14 11:40 ASMDISK04
  132. brw-rw----. 1 oracle asmadmin 250, 3 11月 14 11:40 ASMDISK05
  133. [root@station26 disks]# oracleasm   -h
  134. Usage: oracleasm [--exec-path=<exec_path>] <command> [ <args> ]
  135.        oracleasm --exec-path
  136.        oracleasm -h
  137.        oracleasm -V

  138. The basic oracleasm commands are:
  139.     configure        Configure the Oracle Linux ASMLib driver
  140.     init             Load and initialize the ASMLib driver
  141.     exit             Stop the ASMLib driver
  142.     scandisks        Scan the system for Oracle ASMLib disks
  143.     status           Display the status of the Oracle ASMLib driver
  144.     listdisks        List known Oracle ASMLib disks
  145.     querydisk        Determine if a disk belongs to Oracle ASMlib
  146.     createdisk       Allocate a device for Oracle ASMLib use
  147.     deletedisk       Return a device to the operating system
  148.     renamedisk       Change the label of an Oracle ASMlib disk
  149.     update-driver    Download the latest ASMLib driver
  150. [root@station26 disks]# oracleasm   deletedisk ASMDISK01
  151. Clearing disk header: done
  152. Dropping disk: done
  153. [root@station26 disks]# oracleasm   deletedisk ASMDISK02
  154. Clearing disk header: done
  155. Dropping disk: done
  156. [root@station26 disks]# oracleasm   deletedisk ASMDISK05
  157. Clearing disk header: done
  158. Dropping disk: done
  159. [root@station26 disks]# ls -l
  160. 总用量 0
  161. brw-rw----. 1 oracle asmadmin 250, 7 11月 14 11:40 ASMDISK03
  162. brw-rw----. 1 oracle asmadmin 250, 8 11月 14 11:40 ASMDISK04
  163. [root@station26 disks]# cd /dev/
  164. [root@station26 dev]# ls -l /dev/vda*
  165. brw-rw----. 1 root disk 250, 0 11月 14 11:40 /dev/vda
  166. brw-rw----. 1 root disk 250, 1 11月 14 11:40 /dev/vda1
  167. brw-rw----. 1 root disk 250, 2 11月 14 11:40 /dev/vda2
  168. brw-rw----. 1 root disk 250, 3 11月 14 11:40 /dev/vda3
  169. brw-rw----. 1 root disk 250, 4 11月 14 11:40 /dev/vda4
  170. brw-rw----. 1 root disk 250, 5 11月 14 11:40 /dev/vda5
  171. brw-rw----. 1 root disk 250, 6 11月 14 11:40 /dev/vda6
  172. brw-rw----. 1 root disk 250, 7 11月 14 11:40 /dev/vda7
  173. brw-rw----. 1 root disk 250, 8 11月 14 11:40 /dev/vda8
  174. brw-rw----. 1 root disk 250, 9 11月 14 11:40 /dev/vda9
  175. [root@station26 dev]# pvs
  176.   PV         VG          Fmt  Attr PSize  PFree
  177.   /dev/vda2  RAC12crhel6 lvm2 a--u 44.72g 64.00m
  178. [root@station26 dev]# df -h
  179. Filesystem            Size  Used Avail Use% Mounted on
  180. /dev/mapper/RAC12crhel6-root
  181.                        44G   32G  9.7G  77% /
  182. tmpfs                 8.5G  680M  7.9G   8% /dev/shm
  183. /dev/vda1             283M  114M  150M  44% /boot
  184. //192.168.0.199/data   23G   23G  914M  97% /mnt
  185. [root@station26 dev]# swapon -a
  186. [root@station26 dev]# swapon -s
  187. Filename                                Type                Size        Used        Priority
  188. /dev/vda9                               partition        4194300        134740        -1
  189. [root@station26 dev]# pvcreate /dev/vda3
  190.   Physical volume "/dev/vda3" successfully created
  191. [root@station26 dev]# pvcreate /dev/vda5
  192.   Physical volume "/dev/vda5" successfully created
  193. [root@station26 dev]# pvcreate /dev/vda6
  194.   Physical volume "/dev/vda6" successfully created
  195. [root@station26 dev]# pvs
  196.   PV         VG          Fmt  Attr PSize  PFree
  197.   /dev/vda2  RAC12crhel6 lvm2 a--u 44.72g 64.00m
  198.   /dev/vda3              lvm2 ----  9.77g  9.77g
  199.   /dev/vda5              lvm2 ----  6.84g  6.84g
  200.   /dev/vda6              lvm2 ----  6.84g  6.84g
  201. [root@station26 dev]# vgextend  RAC12crhel6 /dev/vda3  /dev/vda5  /dev/vda6
  202.   Volume group "RAC12crhel6" successfully extended
  203. [root@station26 dev]# vgdisplay
  204.   --- Volume group ---
  205.   VG Name               RAC12crhel6
  206.   System ID            
  207.   Format                lvm2
  208.   Metadata Areas        4
  209.   Metadata Sequence No  3
  210.   VG Access             read/write
  211.   VG Status             resizable
  212.   MAX LV                0
  213.   Cur LV                1
  214.   Open LV               1
  215.   Max PV                0
  216.   Cur PV                4
  217.   Act PV                4
  218.   VG Size               68.09 GiB
  219.   PE Size               32.00 MiB
  220.   Total PE              2179
  221.   Alloc PE / Size       1429 / 44.66 GiB
  222.   Free  PE / Size       750 / 23.44 GiB
  223.   VG UUID               qH5HhK-rJL0-j7ar-1Xhz-CN0x-nMVU-1j9MAk
  224.    
  225. [root@station26 dev]# lvs
  226.   LV   VG          Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  227.   root RAC12crhel6 -wi-ao---- 44.66g                                                   
  228. [root@station26 dev]# lvextend -l +750  /dev/RAC12crhel6/root  
  229.   Size of logical volume RAC12crhel6/root changed from 44.66 GiB (1429 extents) to 68.09 GiB (2179 extents).
  230.   Logical volume root successfully resized.
  231. [root@station26 dev]# df -h
  232. Filesystem            Size  Used Avail Use% Mounted on
  233. /dev/mapper/RAC12crhel6-root
  234.                        44G   32G  9.7G  77% /
  235. tmpfs                 8.5G  680M  7.9G   8% /dev/shm
  236. /dev/vda1             283M  114M  150M  44% /boot
  237. //192.168.0.199/data   23G   23G  914M  97% /mnt
  238. [root@station26 dev]# resize2fs   /dev/RAC12crhel6/root
  239. resize2fs 1.43-WIP (20-Jun-2013)
  240. Filesystem at /dev/RAC12crhel6/root is mounted on /; on-line resizing required
  241. old_desc_blocks = 3, new_desc_blocks = 5
  242. The filesystem on /dev/RAC12crhel6/root is now 17850368 blocks long.

  243. [root@station26 dev]# df -h
  244. Filesystem            Size  Used Avail Use% Mounted on
  245. /dev/mapper/RAC12crhel6-root
  246.                        67G   32G   32G  51% /
  247. tmpfs                 8.5G  680M  7.9G   8% /dev/shm
  248. /dev/vda1             283M  114M  150M  44% /boot
  249. //192.168.0.199/data   23G   23G  914M  97% /mnt
  250. [root@station26 dev]#
复制代码
  1. SQL> alter system set db_recovery_file_dest_size=32G;

  2. System altered.

  3. SQL> exit
  4. Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
  5. With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
  6. [oracle@station26 admin]$ cd  
  7. [oracle@station26 ~]$ vim .bash_profile
  8. [oracle@station26 ~]$ . .bash_profile
  9. [oracle@station26 ~]$ rman target /

  10. Recovery Manager: Release 12.1.0.2.0 - Production on Fri Dec 29 16:29:25 2017

  11. Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

  12. connected to target database: CDB2 (DBID=710472048)

  13. RMAN> show all;

  14. using target database control file instead of recovery catalog
  15. RMAN configuration parameters for database with db_unique_name CDB2 are:
  16. CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
  17. CONFIGURE BACKUP OPTIMIZATION OFF; # default
  18. CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
  19. CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
  20. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
  21. CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
  22. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  23. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  24. CONFIGURE MAXSETSIZE TO UNLIMITED; # default
  25. CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
  26. CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
  27. CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
  28. CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
  29. CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
  30. CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/snapcf_cdb2.f'; # default

  31. RMAN> CONFIGURE RETENTION POLICY TO  recovery window of 1 days;

  32. new RMAN configuration parameters:
  33. CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
  34. new RMAN configuration parameters are successfully stored

  35. RMAN> CONFIGURE BACKUP OPTIMIZATION  on ;

  36. new RMAN configuration parameters:
  37. CONFIGURE BACKUP OPTIMIZATION ON;
  38. new RMAN configuration parameters are successfully stored

  39. RMAN> CONFIGURE DEFAULT DEVICE TYPE TO  sbt ;

  40. new RMAN configuration parameters:
  41. CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
  42. new RMAN configuration parameters are successfully stored

  43. RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM  16 BACKUP TYPE TO BACKUPSET;

  44. new RMAN configuration parameters:
  45. CONFIGURE DEVICE TYPE DISK PARALLELISM 16 BACKUP TYPE TO BACKUPSET;
  46. new RMAN configuration parameters are successfully stored

  47. RMAN> CONFIGURE DEVICE TYPE sbt parallelism 2 BACKUP TYPE TO BACKUPSET;

  48. new RMAN configuration parameters:
  49. CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
  50. new RMAN configuration parameters are successfully stored

  51. RMAN> show all;

  52. RMAN configuration parameters for database with db_unique_name CDB2 are:
  53. CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
  54. CONFIGURE BACKUP OPTIMIZATION ON;
  55. CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
  56. CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
  57. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
  58. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
  59. CONFIGURE DEVICE TYPE DISK PARALLELISM 16 BACKUP TYPE TO BACKUPSET;
  60. CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
  61. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  62. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  63. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  64. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  65. CONFIGURE MAXSETSIZE TO UNLIMITED; # default
  66. CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
  67. CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
  68. CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
  69. CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
  70. CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
  71. CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/snapcf_cdb2.f'; # default

  72. RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE'    PARMS  'ENV=(OB_MEDIA_FAMILY=station26)';

  73. new RMAN configuration parameters:
  74. CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station26)';
  75. new RMAN configuration parameters are successfully stored

  76. RMAN> CONFIGURE CHANNEL  2 DEVICE TYPE 'SBT_TAPE'    PARMS  'ENV=(OB_MEDIA_FAMILY=station26)';

  77. new RMAN configuration parameters:
  78. CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station26)';
  79. new RMAN configuration parameters are successfully stored

  80. RMAN> backup tag '0T_WHOLE_INCR0'  incremental level 0 database plus archivelog delete all input;


  81. Starting backup at 2017-12-29:16:36:24
  82. current log archived
  83. allocated channel: ORA_SBT_TAPE_1
  84. channel ORA_SBT_TAPE_1: SID=414 device type=SBT_TAPE
  85. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  86. allocated channel: ORA_SBT_TAPE_2
  87. channel ORA_SBT_TAPE_2: SID=244 device type=SBT_TAPE
  88. channel ORA_SBT_TAPE_2: Oracle Secure Backup
  89. channel ORA_SBT_TAPE_1: starting archived log backup set
  90. channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
  91. input archived log thread=1 sequence=150 RECID=1 STAMP=964024585
  92. channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:36:27

复制代码
  1. [oracle@station26 ~]$ rman target /

  2. Recovery Manager: Release 12.1.0.2.0 - Production on Fri Dec 29 16:29:25 2017

  3. Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

  4. connected to target database: CDB2 (DBID=710472048)

  5. RMAN> show all;

  6. using target database control file instead of recovery catalog
  7. RMAN configuration parameters for database with db_unique_name CDB2 are:
  8. CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
  9. CONFIGURE BACKUP OPTIMIZATION OFF; # default
  10. CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
  11. CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
  12. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
  13. CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
  14. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  15. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  16. CONFIGURE MAXSETSIZE TO UNLIMITED; # default
  17. CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
  18. CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
  19. CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
  20. CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
  21. CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
  22. CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/snapcf_cdb2.f'; # default

  23. RMAN> CONFIGURE RETENTION POLICY TO  recovery window of 1 days;

  24. new RMAN configuration parameters:
  25. CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
  26. new RMAN configuration parameters are successfully stored

  27. RMAN> CONFIGURE BACKUP OPTIMIZATION  on ;

  28. new RMAN configuration parameters:
  29. CONFIGURE BACKUP OPTIMIZATION ON;
  30. new RMAN configuration parameters are successfully stored

  31. RMAN> CONFIGURE DEFAULT DEVICE TYPE TO  sbt ;

  32. new RMAN configuration parameters:
  33. CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
  34. new RMAN configuration parameters are successfully stored

  35. RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM  16 BACKUP TYPE TO BACKUPSET;

  36. new RMAN configuration parameters:
  37. CONFIGURE DEVICE TYPE DISK PARALLELISM 16 BACKUP TYPE TO BACKUPSET;
  38. new RMAN configuration parameters are successfully stored

  39. RMAN> CONFIGURE DEVICE TYPE sbt parallelism 2 BACKUP TYPE TO BACKUPSET;

  40. new RMAN configuration parameters:
  41. CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
  42. new RMAN configuration parameters are successfully stored

  43. RMAN> show all;

  44. RMAN configuration parameters for database with db_unique_name CDB2 are:
  45. CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
  46. CONFIGURE BACKUP OPTIMIZATION ON;
  47. CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
  48. CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
  49. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
  50. CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
  51. CONFIGURE DEVICE TYPE DISK PARALLELISM 16 BACKUP TYPE TO BACKUPSET;
  52. CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
  53. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  54. CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  55. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
  56. CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
  57. CONFIGURE MAXSETSIZE TO UNLIMITED; # default
  58. CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
  59. CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
  60. CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
  61. CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
  62. CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
  63. CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/snapcf_cdb2.f'; # default

  64. RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE'    PARMS  'ENV=(OB_MEDIA_FAMILY=station26)';

  65. new RMAN configuration parameters:
  66. CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station26)';
  67. new RMAN configuration parameters are successfully stored

  68. RMAN> CONFIGURE CHANNEL  2 DEVICE TYPE 'SBT_TAPE'    PARMS  'ENV=(OB_MEDIA_FAMILY=station26)';

  69. new RMAN configuration parameters:
  70. CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB_MEDIA_FAMILY=station26)';
  71. new RMAN configuration parameters are successfully stored

  72. RMAN> backup tag '0T_WHOLE_INCR0'  incremental level 0 database plus archivelog delete all input;


  73. Starting backup at 2017-12-29:16:36:24
  74. current log archived
  75. allocated channel: ORA_SBT_TAPE_1
  76. channel ORA_SBT_TAPE_1: SID=414 device type=SBT_TAPE
  77. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  78. allocated channel: ORA_SBT_TAPE_2
  79. channel ORA_SBT_TAPE_2: SID=244 device type=SBT_TAPE
  80. channel ORA_SBT_TAPE_2: Oracle Secure Backup
  81. channel ORA_SBT_TAPE_1: starting archived log backup set
  82. channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
  83. input archived log thread=1 sequence=150 RECID=1 STAMP=964024585
  84. channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:36:27
  85. channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:37:02
  86. piece handle=01snbm8b_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  87. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:35
  88. channel ORA_SBT_TAPE_1: deleting archived log(s)
  89. 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
  90. Finished backup at 2017-12-29:16:37:03

  91. Starting backup at 2017-12-29:16:37:03
  92. using channel ORA_SBT_TAPE_1
  93. using channel ORA_SBT_TAPE_2
  94. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  95. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  96. input datafile file number=00003 name=/u01/app/oracle/oradata/cdb2/sysaux01.dbf
  97. input datafile file number=00001 name=/u01/app/oracle/oradata/cdb2/system01.dbf
  98. channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:37:03
  99. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  100. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  101. input datafile file number=00004 name=/u01/app/oracle/oradata/cdb2/undotbs01.dbf
  102. input datafile file number=00037 name=/u01/app/oracle/oradata/cdb2/cdata_01.dbf
  103. input datafile file number=00006 name=/u01/app/oracle/oradata/cdb2/users01.dbf
  104. channel ORA_SBT_TAPE_2: starting piece 1 at 2017-12-29:16:37:04
  105. channel ORA_SBT_TAPE_2: finished piece 1 at 2017-12-29:16:37:29
  106. piece handle=03snbm9f_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  107. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
  108. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  109. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  110. input datafile file number=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
  111. channel ORA_SBT_TAPE_2: starting piece 1 at 2017-12-29:16:37:29
  112. channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:38:04
  113. piece handle=02snbm9f_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  114. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:01:01
  115. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  116. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  117. input datafile file number=00015 name=/u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/612B093C409C4C0FE0531A00A8C013C6/datafile/o1_mf_sysaux_f41yt1kj_.dbf
  118. channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:38:04
  119. channel ORA_SBT_TAPE_2: finished piece 1 at 2017-12-29:16:38:04
  120. piece handle=04snbma9_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  121. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:35
  122. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  123. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  124. input datafile file number=00007 name=/u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf
  125. channel ORA_SBT_TAPE_2: starting piece 1 at 2017-12-29:16:38:04
  126. channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:38:49
  127. piece handle=05snbmbc_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  128. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:45
  129. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  130. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  131. input datafile file number=00010 name=/u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  132. input datafile file number=00038 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
  133. channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:38:50
  134. channel ORA_SBT_TAPE_2: finished piece 1 at 2017-12-29:16:38:50
  135. piece handle=06snbmbc_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  136. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:46
  137. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  138. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  139. input datafile file number=00014 name=/u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/612B093C409C4C0FE0531A00A8C013C6/datafile/o1_mf_system_f41yt1kf_.dbf
  140. channel ORA_SBT_TAPE_2: starting piece 1 at 2017-12-29:16:38:50
  141. channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:39:15
  142. piece handle=07snbmcq_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  143. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  144. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  145. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  146. input datafile file number=00005 name=/u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf
  147. channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:39:15
  148. channel ORA_SBT_TAPE_2: finished piece 1 at 2017-12-29:16:39:22
  149. piece handle=08snbmcq_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  150. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:32
  151. channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:39:50
  152. piece handle=09snbmdj_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  153. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:35
  154. Finished backup at 2017-12-29:16:39:50

  155. Starting backup at 2017-12-29:16:39:50
  156. current log archived
  157. using channel ORA_SBT_TAPE_1
  158. using channel ORA_SBT_TAPE_2
  159. channel ORA_SBT_TAPE_1: starting archived log backup set
  160. channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
  161. input archived log thread=1 sequence=151 RECID=2 STAMP=964024790
  162. channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:39:51
  163. channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:40:06
  164. piece handle=0asnbmen_1_1 tag=0T_WHOLE_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  165. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:15
  166. channel ORA_SBT_TAPE_1: deleting archived log(s)
  167. 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
  168. Finished backup at 2017-12-29:16:40:06

  169. Starting Control File and SPFILE Autobackup at 2017-12-29:16:40:06
  170. piece handle=c-710472048-20171229-00 comment=API Version 2.0,MMS Version 10.4.0.4
  171. Finished Control File and SPFILE Autobackup at 2017-12-29:16:40:31

  172. RMAN> list backup;


  173. List of Backup Sets
  174. ===================


  175. BS Key  Size       Device Type Elapsed Time Completion Time   
  176. ------- ---------- ----------- ------------ -------------------
  177. 1       29.56M     SBT_TAPE    00:00:17     2017-12-29:16:36:44
  178.         BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  179.         Handle: 01snbm8b_1_1   Media: station26-000001

  180.   List of Archived Logs in backup set 1
  181.   Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  182.   ---- ------- ---------- ------------------- ---------- ---------
  183.   1    150     6909897    2017-12-29:14:00:16 6924768    2017-12-29:16:36:24

  184. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  185. ------- ---- -- ---------- ----------- ------------ -------------------
  186. 2       Incr 0  7.38M      SBT_TAPE    00:00:17     2017-12-29:16:37:20
  187.         BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  188.         Handle: 03snbm9f_1_1   Media: station26-000002
  189.   List of Datafiles in backup set 2
  190.   File LV Type Ckp SCN    Ckp Time            Name
  191.   ---- -- ---- ---------- ------------------- ----
  192.   4    0  Incr 6924799    2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/undotbs01.dbf
  193.   6    0  Incr 6924799    2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/users01.dbf
  194.   37   0  Incr 6924799    2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/cdata_01.dbf

  195. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  196. ------- ---- -- ---------- ----------- ------------ -------------------
  197. 3       Incr 0  466.88M    SBT_TAPE    00:00:15     2017-12-29:16:37:44
  198.         BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  199.         Handle: 04snbma9_1_1   Media: station26-000002
  200.   List of Datafiles in backup set 3
  201.   Container ID: 3, PDB Name: PDB2
  202.   File LV Type Ckp SCN    Ckp Time            Name
  203.   ---- -- ---- ---------- ------------------- ----
  204.   11   0  Incr 6924810    2017-12-29:16:37:29 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf

  205. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  206. ------- ---- -- ---------- ----------- ------------ -------------------
  207. 4       Incr 0  1.40G      SBT_TAPE    00:00:43     2017-12-29:16:37:46
  208.         BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  209.         Handle: 02snbm9f_1_1   Media: station26-000001
  210.   List of Datafiles in backup set 4
  211.   File LV Type Ckp SCN    Ckp Time            Name
  212.   ---- -- ---- ---------- ------------------- ----
  213.   1    0  Incr 6924798    2017-12-29:16:37:03 /u01/app/oracle/oradata/cdb2/system01.dbf
  214.   3    0  Incr 6924798    2017-12-29:16:37:03 /u01/app/oracle/oradata/cdb2/sysaux01.dbf

  215. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  216. ------- ---- -- ---------- ----------- ------------ -------------------
  217. 5       Incr 0  466.56M    SBT_TAPE    00:00:27     2017-12-29:16:38:31
  218.         BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  219.         Handle: 05snbmbc_1_1   Media: station26-000001,station26-000003
  220.   List of Datafiles in backup set 5
  221.   Container ID: 4, PDB Name: PDB2_2
  222.   File LV Type Ckp SCN    Ckp Time            Name
  223.   ---- -- ---- ---------- ------------------- ----
  224.   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

  225. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  226. ------- ---- -- ---------- ----------- ------------ -------------------
  227. 6       Incr 0  455.75M    SBT_TAPE    00:00:24     2017-12-29:16:38:28
  228.         BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  229.         Handle: 06snbmbc_1_1   Media: station26-000002
  230.   List of Datafiles in backup set 6
  231.   Container ID: 2, PDB Name: PDB$SEED
  232.   File LV Type Ckp SCN    Ckp Time            Name
  233.   ---- -- ---- ---------- ------------------- ----
  234.   7    0  Incr 1741064    2017-12-22:18:16:00 /u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf

  235. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  236. ------- ---- -- ---------- ----------- ------------ -------------------
  237. 7       Incr 0  210.13M    SBT_TAPE    00:00:11     2017-12-29:16:39:01
  238.         BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  239.         Handle: 07snbmcq_1_1   Media: station26-000003
  240.   List of Datafiles in backup set 7
  241.   Container ID: 3, PDB Name: PDB2
  242.   File LV Type Ckp SCN    Ckp Time            Name
  243.   ---- -- ---- ---------- ------------------- ----
  244.   10   0  Incr 6924864    2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  245.   38   0  Incr 6924864    2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  246. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  247. ------- ---- -- ---------- ----------- ------------ -------------------
  248. 8       Incr 0  209.13M    SBT_TAPE    00:00:21     2017-12-29:16:39:11
  249.         BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  250.         Handle: 08snbmcq_1_1   Media: station26-000002
  251.   List of Datafiles in backup set 8
  252.   Container ID: 4, PDB Name: PDB2_2
  253.   File LV Type Ckp SCN    Ckp Time            Name
  254.   ---- -- ---- ---------- ------------------- ----
  255.   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

  256. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  257. ------- ---- -- ---------- ----------- ------------ -------------------
  258. 9       Incr 0  204.75M    SBT_TAPE    00:00:19     2017-12-29:16:39:34
  259.         BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  260.         Handle: 09snbmdj_1_1   Media: station26-000003
  261.   List of Datafiles in backup set 9
  262.   Container ID: 2, PDB Name: PDB$SEED
  263.   File LV Type Ckp SCN    Ckp Time            Name
  264.   ---- -- ---- ---------- ------------------- ----
  265.   5    0  Incr 1741064    2017-12-22:18:16:00 /u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf

  266. BS Key  Size       Device Type Elapsed Time Completion Time   
  267. ------- ---------- ----------- ------------ -------------------
  268. 10      64.00K     SBT_TAPE    00:00:07     2017-12-29:16:39:58
  269.         BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  270.         Handle: 0asnbmen_1_1   Media: station26-000003

  271.   List of Archived Logs in backup set 10
  272.   Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  273.   ---- ------- ---------- ------------------- ---------- ---------
  274.   1    151     6924768    2017-12-29:16:36:24 6924907    2017-12-29:16:39:50

  275. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  276. ------- ---- -- ---------- ----------- ------------ -------------------
  277. 11      Full    17.25M     SBT_TAPE    00:00:17     2017-12-29:16:40:23
  278.         BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: TAG20171229T164006
  279.         Handle: c-710472048-20171229-00   Media: station26-000003
  280.   SPFILE Included: Modification time: 2017-12-29:16:28:05
  281.   SPFILE db_unique_name: CDB2
  282.   Control File Included: Ckp SCN: 6924940      Ckp time: 2017-12-29:16:40:06

  283. RMAN> backup tag '1T_WHOLEPDB2_INCR0'  pluggable database pdb2 ;

  284. Starting backup at 2017-12-29:16:43:40
  285. using channel ORA_SBT_TAPE_1
  286. using channel ORA_SBT_TAPE_2
  287. channel ORA_SBT_TAPE_1: starting full datafile backup set
  288. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  289. input datafile file number=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
  290. channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:43:41
  291. channel ORA_SBT_TAPE_2: starting full datafile backup set
  292. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  293. input datafile file number=00010 name=/u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  294. input datafile file number=00038 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
  295. channel ORA_SBT_TAPE_2: starting piece 1 at 2017-12-29:16:43:41
  296.    Status: AVAILABLE  Compressed: NO  Tag: TAG20171229T164006
  297.         Handle: c-710472048-20171229-00   Media: station26-000003
  298.   SPFILE Included: Modification time: 2017-12-29:16:28:05
  299. channel ORA_SBT_TAPE_2: finished piece 1 at 2017-12-29:16:44:06
  300. piece handle=0dsnbmlt_1_1 tag=1T_WHOLEPDB2_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  301. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
  302. channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:44:26
  303. piece handle=0csnbmlt_1_1 tag=1T_WHOLEPDB2_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  304. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:45
  305. Finished backup at 2017-12-29:16:44:26

  306. Starting Control File and SPFILE Autobackup at 2017-12-29:16:44:26
  307. piece handle=c-710472048-20171229-01 comment=API Version 2.0,MMS Version 10.4.0.4
  308. Finished Control File and SPFILE Autobackup at 2017-12-29:16:44:51

  309. RMAN>
  310. RMAN-00571: ===========================================================
  311. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  312. RMAN-00571: ===========================================================
  313. RMAN-00558: error encountered while parsing input commands
  314. 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, "
  315. RMAN-01008: the bad identifier was: Status
  316. RMAN-01007: at line 1 column 4 file: standard input

  317. RMAN>
  318. RMAN-00571: ===========================================================
  319. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  320. RMAN-00571: ===========================================================
  321. RMAN-00558: error encountered while parsing input commands
  322. 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, "
  323. RMAN-01008: the bad identifier was: Handle
  324. RMAN-01007: at line 1 column 9 file: standard input

  325. RMAN>
  326. RMAN-00571: ===========================================================
  327. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  328. RMAN-00571: ===========================================================
  329. RMAN-00558: error encountered while parsing input commands
  330. 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, "
  331. RMAN-01007: at line 1 column 3 file: standard input

  332. RMAN>  backup tag '2T_WHOLEPDB2_REAL0' incremental level 0 pluggable database pdb2 ;

  333. Starting backup at 2017-12-29:16:45:31
  334. using channel ORA_SBT_TAPE_1
  335. using channel ORA_SBT_TAPE_2
  336. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  337. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  338. input datafile file number=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
  339. channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:45:32
  340. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  341. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  342. input datafile file number=00010 name=/u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  343. input datafile file number=00038 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
  344. channel ORA_SBT_TAPE_2: starting piece 1 at 2017-12-29:16:45:32
  345. channel ORA_SBT_TAPE_2: finished piece 1 at 2017-12-29:16:45:57
  346. piece handle=0gsnbmpc_1_1 tag=2T_WHOLEPDB2_REAL0 comment=API Version 2.0,MMS Version 10.4.0.4
  347. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
  348. channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:46:27
  349. piece handle=0fsnbmpc_1_1 tag=2T_WHOLEPDB2_REAL0 comment=API Version 2.0,MMS Version 10.4.0.4
  350. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:55
  351. Finished backup at 2017-12-29:16:46:27

  352. Starting Control File and SPFILE Autobackup at 2017-12-29:16:46:27
  353. piece handle=c-710472048-20171229-02 comment=API Version 2.0,MMS Version 10.4.0.4
  354. Finished Control File and SPFILE Autobackup at 2017-12-29:16:46:52

  355. RMAN> list backup;


  356. List of Backup Sets
  357. ===================


  358. BS Key  Size       Device Type Elapsed Time Completion Time   
  359. ------- ---------- ----------- ------------ -------------------
  360. 1       29.56M     SBT_TAPE    00:00:17     2017-12-29:16:36:44
  361.         BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  362.         Handle: 01snbm8b_1_1   Media: station26-000001

  363.   List of Archived Logs in backup set 1
  364.   Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  365.   ---- ------- ---------- ------------------- ---------- ---------
  366.   1    150     6909897    2017-12-29:14:00:16 6924768    2017-12-29:16:36:24

  367. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  368. ------- ---- -- ---------- ----------- ------------ -------------------
  369. 2       Incr 0  7.38M      SBT_TAPE    00:00:17     2017-12-29:16:37:20
  370.         BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  371.         Handle: 03snbm9f_1_1   Media: station26-000002
  372.   List of Datafiles in backup set 2
  373.   File LV Type Ckp SCN    Ckp Time            Name
  374.   ---- -- ---- ---------- ------------------- ----
  375.   4    0  Incr 6924799    2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/undotbs01.dbf
  376.   6    0  Incr 6924799    2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/users01.dbf
  377.   37   0  Incr 6924799    2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/cdata_01.dbf

  378. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  379. ------- ---- -- ---------- ----------- ------------ -------------------
  380. 3       Incr 0  466.88M    SBT_TAPE    00:00:15     2017-12-29:16:37:44
  381.         BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  382.         Handle: 04snbma9_1_1   Media: station26-000002
  383.   List of Datafiles in backup set 3
  384.   Container ID: 3, PDB Name: PDB2
  385.   File LV Type Ckp SCN    Ckp Time            Name
  386.   ---- -- ---- ---------- ------------------- ----
  387.   11   0  Incr 6924810    2017-12-29:16:37:29 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf

  388. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  389. ------- ---- -- ---------- ----------- ------------ -------------------
  390. 4       Incr 0  1.40G      SBT_TAPE    00:00:43     2017-12-29:16:37:46
  391.         BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  392.         Handle: 02snbm9f_1_1   Media: station26-000001
  393.   List of Datafiles in backup set 4
  394.   File LV Type Ckp SCN    Ckp Time            Name
  395.   ---- -- ---- ---------- ------------------- ----
  396.   1    0  Incr 6924798    2017-12-29:16:37:03 /u01/app/oracle/oradata/cdb2/system01.dbf
  397.   3    0  Incr 6924798    2017-12-29:16:37:03 /u01/app/oracle/oradata/cdb2/sysaux01.dbf

  398. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  399. ------- ---- -- ---------- ----------- ------------ -------------------
  400. 5       Incr 0  466.56M    SBT_TAPE    00:00:27     2017-12-29:16:38:31
  401.         BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  402.         Handle: 05snbmbc_1_1   Media: station26-000001,station26-000003
  403.   List of Datafiles in backup set 5
  404.   Container ID: 4, PDB Name: PDB2_2
  405.   File LV Type Ckp SCN    Ckp Time            Name
  406.   ---- -- ---- ---------- ------------------- ----
  407.   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

  408. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  409. ------- ---- -- ---------- ----------- ------------ -------------------
  410. 6       Incr 0  455.75M    SBT_TAPE    00:00:24     2017-12-29:16:38:28
  411.         BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  412.         Handle: 06snbmbc_1_1   Media: station26-000002
  413.   List of Datafiles in backup set 6
  414.   Container ID: 2, PDB Name: PDB$SEED
  415.   File LV Type Ckp SCN    Ckp Time            Name
  416.   ---- -- ---- ---------- ------------------- ----
  417.   7    0  Incr 1741064    2017-12-22:18:16:00 /u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf

  418. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  419. ------- ---- -- ---------- ----------- ------------ -------------------
  420. 7       Incr 0  210.13M    SBT_TAPE    00:00:11     2017-12-29:16:39:01
  421.         BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  422.         Handle: 07snbmcq_1_1   Media: station26-000003
  423.   List of Datafiles in backup set 7
  424.   Container ID: 3, PDB Name: PDB2
  425.   File LV Type Ckp SCN    Ckp Time            Name
  426.   ---- -- ---- ---------- ------------------- ----
  427.   10   0  Incr 6924864    2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  428.   38   0  Incr 6924864    2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  429. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  430. ------- ---- -- ---------- ----------- ------------ -------------------
  431. 8       Incr 0  209.13M    SBT_TAPE    00:00:21     2017-12-29:16:39:11
  432.         BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  433.         Handle: 08snbmcq_1_1   Media: station26-000002
  434.   List of Datafiles in backup set 8
  435.   Container ID: 4, PDB Name: PDB2_2
  436.   File LV Type Ckp SCN    Ckp Time            Name
  437.   ---- -- ---- ---------- ------------------- ----
  438.   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

  439. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  440. ------- ---- -- ---------- ----------- ------------ -------------------
  441. 9       Incr 0  204.75M    SBT_TAPE    00:00:19     2017-12-29:16:39:34
  442.         BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  443.         Handle: 09snbmdj_1_1   Media: station26-000003
  444.   List of Datafiles in backup set 9
  445.   Container ID: 2, PDB Name: PDB$SEED
  446.   File LV Type Ckp SCN    Ckp Time            Name
  447.   ---- -- ---- ---------- ------------------- ----
  448.   5    0  Incr 1741064    2017-12-22:18:16:00 /u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf

  449. BS Key  Size       Device Type Elapsed Time Completion Time   
  450. ------- ---------- ----------- ------------ -------------------
  451. 10      64.00K     SBT_TAPE    00:00:07     2017-12-29:16:39:58
  452.         BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  453.         Handle: 0asnbmen_1_1   Media: station26-000003

  454.   List of Archived Logs in backup set 10
  455.   Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  456.   ---- ------- ---------- ------------------- ---------- ---------
  457.   1    151     6924768    2017-12-29:16:36:24 6924907    2017-12-29:16:39:50

  458. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  459. ------- ---- -- ---------- ----------- ------------ -------------------
  460. 11      Full    17.25M     SBT_TAPE    00:00:17     2017-12-29:16:40:23
  461.         BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: TAG20171229T164006
  462.         Handle: c-710472048-20171229-00   Media: station26-000003
  463.   SPFILE Included: Modification time: 2017-12-29:16:28:05
  464.   SPFILE db_unique_name: CDB2
  465.   Control File Included: Ckp SCN: 6924940      Ckp time: 2017-12-29:16:40:06

  466. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  467. ------- ---- -- ---------- ----------- ------------ -------------------
  468. 12      Full    210.13M    SBT_TAPE    00:00:11     2017-12-29:16:43:52
  469.         BP Key: 12   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLEPDB2_INCR0
  470.         Handle: 0dsnbmlt_1_1   Media: station26-000002
  471.   List of Datafiles in backup set 12
  472.   Container ID: 3, PDB Name: PDB2
  473.   File LV Type Ckp SCN    Ckp Time            Name
  474.   ---- -- ---- ---------- ------------------- ----
  475.   10      Full 6925048    2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  476.   38      Full 6925048    2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  477. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  478. ------- ---- -- ---------- ----------- ------------ -------------------
  479. 13      Full    466.88M    SBT_TAPE    00:00:22     2017-12-29:16:44:03
  480.         BP Key: 13   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLEPDB2_INCR0
  481.         Handle: 0csnbmlt_1_1   Media: station26-000003
  482.   List of Datafiles in backup set 13
  483.   Container ID: 3, PDB Name: PDB2
  484.   File LV Type Ckp SCN    Ckp Time            Name
  485.   ---- -- ---- ---------- ------------------- ----
  486.   11      Full 6925047    2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf

  487. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  488. ------- ---- -- ---------- ----------- ------------ -------------------
  489. 14      Full    17.25M     SBT_TAPE    00:00:09     2017-12-29:16:44:35
  490.         BP Key: 14   Status: AVAILABLE  Compressed: NO  Tag: TAG20171229T164426
  491.         Handle: c-710472048-20171229-01   Media: station26-000003
  492.   SPFILE Included: Modification time: 2017-12-29:16:28:05
  493.   SPFILE db_unique_name: CDB2
  494.   Control File Included: Ckp SCN: 6925077      Ckp time: 2017-12-29:16:44:26

  495. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  496. ------- ---- -- ---------- ----------- ------------ -------------------
  497. 15      Incr 0  210.13M    SBT_TAPE    00:00:12     2017-12-29:16:45:44
  498.         BP Key: 15   Status: AVAILABLE  Compressed: NO  Tag: 2T_WHOLEPDB2_REAL0
  499.         Handle: 0gsnbmpc_1_1   Media: station26-000002
  500.   List of Datafiles in backup set 15
  501.   Container ID: 3, PDB Name: PDB2
  502.   File LV Type Ckp SCN    Ckp Time            Name
  503.   ---- -- ---- ---------- ------------------- ----
  504.   10   0  Incr 6925250    2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  505.   38   0  Incr 6925250    2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  506. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  507. ------- ---- -- ---------- ----------- ------------ -------------------
  508. 16      Incr 0  466.88M    SBT_TAPE    00:00:39     2017-12-29:16:46:11
  509.         BP Key: 16   Status: AVAILABLE  Compressed: NO  Tag: 2T_WHOLEPDB2_REAL0
  510.         Handle: 0fsnbmpc_1_1   Media: station26-000003,station26-000004
  511.   List of Datafiles in backup set 16
  512.   Container ID: 3, PDB Name: PDB2
  513.   File LV Type Ckp SCN    Ckp Time            Name
  514.   ---- -- ---- ---------- ------------------- ----
  515.   11   0  Incr 6925249    2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf

  516. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  517. ------- ---- -- ---------- ----------- ------------ -------------------
  518. 17      Full    17.25M     SBT_TAPE    00:00:09     2017-12-29:16:46:36
  519.         BP Key: 17   Status: AVAILABLE  Compressed: NO  Tag: TAG20171229T164627
  520.         Handle: c-710472048-20171229-02   Media: station26-000004
  521.   SPFILE Included: Modification time: 2017-12-29:16:28:05
  522.   SPFILE db_unique_name: CDB2
  523.   Control File Included: Ckp SCN: 6925281      Ckp time: 2017-12-29:16:46:27

  524. RMAN> backup tag '3T_PDB2:LDATA_INCR0' incremental level 0 tablespace pdb2:ldata;

  525. Starting backup at 2017-12-29:16:48:21
  526. using channel ORA_SBT_TAPE_1
  527. using channel ORA_SBT_TAPE_2
  528. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  529. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  530. input datafile file number=00038 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
  531. channel ORA_SBT_TAPE_1: starting piece 1 at 2017-12-29:16:48:21
  532. channel ORA_SBT_TAPE_1: finished piece 1 at 2017-12-29:16:48:46
  533. piece handle=0isnbmul_1_1 tag=3T_PDB2:LDATA_INCR0 comment=API Version 2.0,MMS Version 10.4.0.4
  534. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  535. Finished backup at 2017-12-29:16:48:46

  536. Starting Control File and SPFILE Autobackup at 2017-12-29:16:48:46
  537. piece handle=c-710472048-20171229-03 comment=API Version 2.0,MMS Version 10.4.0.4
  538. Finished Control File and SPFILE Autobackup at 2017-12-29:16:49:11

  539. RMAN> list backup;


  540. List of Backup Sets
  541. ===================


  542. BS Key  Size       Device Type Elapsed Time Completion Time   
  543. ------- ---------- ----------- ------------ -------------------
  544. 1       29.56M     SBT_TAPE    00:00:17     2017-12-29:16:36:44
  545.         BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  546.         Handle: 01snbm8b_1_1   Media: station26-000001

  547.   List of Archived Logs in backup set 1
  548.   Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  549.   ---- ------- ---------- ------------------- ---------- ---------
  550.   1    150     6909897    2017-12-29:14:00:16 6924768    2017-12-29:16:36:24

  551. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  552. ------- ---- -- ---------- ----------- ------------ -------------------
  553. 2       Incr 0  7.38M      SBT_TAPE    00:00:17     2017-12-29:16:37:20
  554.         BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  555.         Handle: 03snbm9f_1_1   Media: station26-000002
  556.   List of Datafiles in backup set 2
  557.   File LV Type Ckp SCN    Ckp Time            Name
  558.   ---- -- ---- ---------- ------------------- ----
  559.   4    0  Incr 6924799    2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/undotbs01.dbf
  560.   6    0  Incr 6924799    2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/users01.dbf
  561.   37   0  Incr 6924799    2017-12-29:16:37:04 /u01/app/oracle/oradata/cdb2/cdata_01.dbf

  562. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  563. ------- ---- -- ---------- ----------- ------------ -------------------
  564. 3       Incr 0  466.88M    SBT_TAPE    00:00:15     2017-12-29:16:37:44
  565.         BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  566.         Handle: 04snbma9_1_1   Media: station26-000002
  567.   List of Datafiles in backup set 3
  568.   Container ID: 3, PDB Name: PDB2
  569.   File LV Type Ckp SCN    Ckp Time            Name
  570.   ---- -- ---- ---------- ------------------- ----
  571.   11   0  Incr 6924810    2017-12-29:16:37:29 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf

  572. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  573. ------- ---- -- ---------- ----------- ------------ -------------------
  574. 4       Incr 0  1.40G      SBT_TAPE    00:00:43     2017-12-29:16:37:46
  575.         BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  576.         Handle: 02snbm9f_1_1   Media: station26-000001
  577.   List of Datafiles in backup set 4
  578.   File LV Type Ckp SCN    Ckp Time            Name
  579.   ---- -- ---- ---------- ------------------- ----
  580.   1    0  Incr 6924798    2017-12-29:16:37:03 /u01/app/oracle/oradata/cdb2/system01.dbf
  581.   3    0  Incr 6924798    2017-12-29:16:37:03 /u01/app/oracle/oradata/cdb2/sysaux01.dbf

  582. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  583. ------- ---- -- ---------- ----------- ------------ -------------------
  584. 5       Incr 0  466.56M    SBT_TAPE    00:00:27     2017-12-29:16:38:31
  585.         BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  586.         Handle: 05snbmbc_1_1   Media: station26-000001,station26-000003
  587.   List of Datafiles in backup set 5
  588.   Container ID: 4, PDB Name: PDB2_2
  589.   File LV Type Ckp SCN    Ckp Time            Name
  590.   ---- -- ---- ---------- ------------------- ----
  591.   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

  592. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  593. ------- ---- -- ---------- ----------- ------------ -------------------
  594. 6       Incr 0  455.75M    SBT_TAPE    00:00:24     2017-12-29:16:38:28
  595.         BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  596.         Handle: 06snbmbc_1_1   Media: station26-000002
  597.   List of Datafiles in backup set 6
  598.   Container ID: 2, PDB Name: PDB$SEED
  599.   File LV Type Ckp SCN    Ckp Time            Name
  600.   ---- -- ---- ---------- ------------------- ----
  601.   7    0  Incr 1741064    2017-12-22:18:16:00 /u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf

  602. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  603. ------- ---- -- ---------- ----------- ------------ -------------------
  604. 7       Incr 0  210.13M    SBT_TAPE    00:00:11     2017-12-29:16:39:01
  605.         BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  606.         Handle: 07snbmcq_1_1   Media: station26-000003
  607.   List of Datafiles in backup set 7
  608.   Container ID: 3, PDB Name: PDB2
  609.   File LV Type Ckp SCN    Ckp Time            Name
  610.   ---- -- ---- ---------- ------------------- ----
  611.   10   0  Incr 6924864    2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  612.   38   0  Incr 6924864    2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  613. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  614. ------- ---- -- ---------- ----------- ------------ -------------------
  615. 8       Incr 0  209.13M    SBT_TAPE    00:00:21     2017-12-29:16:39:11
  616.         BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  617.         Handle: 08snbmcq_1_1   Media: station26-000002
  618.   List of Datafiles in backup set 8
  619.   Container ID: 4, PDB Name: PDB2_2
  620.   File LV Type Ckp SCN    Ckp Time            Name
  621.   ---- -- ---- ---------- ------------------- ----
  622.   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

  623. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  624. ------- ---- -- ---------- ----------- ------------ -------------------
  625. 9       Incr 0  204.75M    SBT_TAPE    00:00:19     2017-12-29:16:39:34
  626.         BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  627.         Handle: 09snbmdj_1_1   Media: station26-000003
  628.   List of Datafiles in backup set 9
  629.   Container ID: 2, PDB Name: PDB$SEED
  630.   File LV Type Ckp SCN    Ckp Time            Name
  631.   ---- -- ---- ---------- ------------------- ----
  632.   5    0  Incr 1741064    2017-12-22:18:16:00 /u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf

  633. BS Key  Size       Device Type Elapsed Time Completion Time   
  634. ------- ---------- ----------- ------------ -------------------
  635. 10      64.00K     SBT_TAPE    00:00:07     2017-12-29:16:39:58
  636.         BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  637.         Handle: 0asnbmen_1_1   Media: station26-000003

  638.   List of Archived Logs in backup set 10
  639.   Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  640.   ---- ------- ---------- ------------------- ---------- ---------
  641.   1    151     6924768    2017-12-29:16:36:24 6924907    2017-12-29:16:39:50

  642. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  643. ------- ---- -- ---------- ----------- ------------ -------------------
  644. 11      Full    17.25M     SBT_TAPE    00:00:17     2017-12-29:16:40:23
  645.         BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: TAG20171229T164006
  646.         Handle: c-710472048-20171229-00   Media: station26-000003
  647.   SPFILE Included: Modification time: 2017-12-29:16:28:05
  648.   SPFILE db_unique_name: CDB2
  649.   Control File Included: Ckp SCN: 6924940      Ckp time: 2017-12-29:16:40:06

  650. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  651. ------- ---- -- ---------- ----------- ------------ -------------------
  652. 12      Full    210.13M    SBT_TAPE    00:00:11     2017-12-29:16:43:52
  653.         BP Key: 12   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLEPDB2_INCR0
  654.         Handle: 0dsnbmlt_1_1   Media: station26-000002
  655.   List of Datafiles in backup set 12
  656.   Container ID: 3, PDB Name: PDB2
  657.   File LV Type Ckp SCN    Ckp Time            Name
  658.   ---- -- ---- ---------- ------------------- ----
  659.   10      Full 6925048    2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  660.   38      Full 6925048    2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  661. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  662. ------- ---- -- ---------- ----------- ------------ -------------------
  663. 13      Full    466.88M    SBT_TAPE    00:00:22     2017-12-29:16:44:03
  664.         BP Key: 13   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLEPDB2_INCR0
  665.         Handle: 0csnbmlt_1_1   Media: station26-000003
  666.   List of Datafiles in backup set 13
  667.   Container ID: 3, PDB Name: PDB2
  668.   File LV Type Ckp SCN    Ckp Time            Name
  669.   ---- -- ---- ---------- ------------------- ----
  670.   11      Full 6925047    2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf

  671. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  672. ------- ---- -- ---------- ----------- ------------ -------------------
  673. 14      Full    17.25M     SBT_TAPE    00:00:09     2017-12-29:16:44:35
  674.         BP Key: 14   Status: AVAILABLE  Compressed: NO  Tag: TAG20171229T164426
  675.         Handle: c-710472048-20171229-01   Media: station26-000003
  676.   SPFILE Included: Modification time: 2017-12-29:16:28:05
  677.   SPFILE db_unique_name: CDB2
  678.   Control File Included: Ckp SCN: 6925077      Ckp time: 2017-12-29:16:44:26

  679. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  680. ------- ---- -- ---------- ----------- ------------ -------------------
  681. 15      Incr 0  210.13M    SBT_TAPE    00:00:12     2017-12-29:16:45:44
  682.         BP Key: 15   Status: AVAILABLE  Compressed: NO  Tag: 2T_WHOLEPDB2_REAL0
  683.         Handle: 0gsnbmpc_1_1   Media: station26-000002
  684.   List of Datafiles in backup set 15
  685.   Container ID: 3, PDB Name: PDB2
  686.   File LV Type Ckp SCN    Ckp Time            Name
  687.   ---- -- ---- ---------- ------------------- ----
  688.   10   0  Incr 6925250    2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  689.   38   0  Incr 6925250    2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  690. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  691. ------- ---- -- ---------- ----------- ------------ -------------------
  692. 16      Incr 0  466.88M    SBT_TAPE    00:00:39     2017-12-29:16:46:11
  693.         BP Key: 16   Status: AVAILABLE  Compressed: NO  Tag: 2T_WHOLEPDB2_REAL0
  694.         Handle: 0fsnbmpc_1_1   Media: station26-000003,station26-000004
  695.   List of Datafiles in backup set 16
  696.   Container ID: 3, PDB Name: PDB2
  697.   File LV Type Ckp SCN    Ckp Time            Name
  698.   ---- -- ---- ---------- ------------------- ----
  699.   11   0  Incr 6925249    2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf

  700. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  701. ------- ---- -- ---------- ----------- ------------ -------------------
  702. 17      Full    17.25M     SBT_TAPE    00:00:09     2017-12-29:16:46:36
  703.         BP Key: 17   Status: AVAILABLE  Compressed: NO  Tag: TAG20171229T164627
  704.         Handle: c-710472048-20171229-02   Media: station26-000004
  705.   SPFILE Included: Modification time: 2017-12-29:16:28:05
  706.   SPFILE db_unique_name: CDB2
  707.   Control File Included: Ckp SCN: 6925281      Ckp time: 2017-12-29:16:46:27

  708. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  709. ------- ---- -- ---------- ----------- ------------ -------------------
  710. 18      Incr 0  1.06M      SBT_TAPE    00:00:16     2017-12-29:16:48:37
  711.         BP Key: 18   Status: AVAILABLE  Compressed: NO  Tag: 3T_PDB2:LDATA_INCR0
  712.         Handle: 0isnbmul_1_1   Media: station26-000004
  713.   List of Datafiles in backup set 18
  714.   Container ID: 3, PDB Name: PDB2
  715.   File LV Type Ckp SCN    Ckp Time            Name
  716.   ---- -- ---- ---------- ------------------- ----
  717.   38   0  Incr 6925352    2017-12-29:16:48:21 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf

  718. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  719. ------- ---- -- ---------- ----------- ------------ -------------------
  720. 19      Full    17.25M     SBT_TAPE    00:00:09     2017-12-29:16:48:55
  721.         BP Key: 19   Status: AVAILABLE  Compressed: NO  Tag: TAG20171229T164846
  722.         Handle: c-710472048-20171229-03   Media: station26-000004
  723.   SPFILE Included: Modification time: 2017-12-29:16:28:05
  724.   SPFILE db_unique_name: CDB2
  725.   Control File Included: Ckp SCN: 6925366      Ckp time: 2017-12-29:16:48:46

  726. RMAN> list backup of tablespace pdb2:system;


  727. List of Backup Sets
  728. ===================


  729. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  730. ------- ---- -- ---------- ----------- ------------ -------------------
  731. 7       Incr 0  210.13M    SBT_TAPE    00:00:11     2017-12-29:16:39:01
  732.         BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: 0T_WHOLE_INCR0
  733.         Handle: 07snbmcq_1_1   Media: station26-000003
  734.   List of Datafiles in backup set 7
  735.   File LV Type Ckp SCN    Ckp Time            Name
  736.   ---- -- ---- ---------- ------------------- ----
  737.   10   0  Incr 6924864    2017-12-29:16:38:50 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf

  738. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  739. ------- ---- -- ---------- ----------- ------------ -------------------
  740. 12      Full    210.13M    SBT_TAPE    00:00:11     2017-12-29:16:43:52
  741.         BP Key: 12   Status: AVAILABLE  Compressed: NO  Tag: 1T_WHOLEPDB2_INCR0
  742.         Handle: 0dsnbmlt_1_1   Media: station26-000002
  743.   List of Datafiles in backup set 12
  744.   File LV Type Ckp SCN    Ckp Time            Name
  745.   ---- -- ---- ---------- ------------------- ----
  746.   10      Full 6925048    2017-12-29:16:43:41 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf

  747. BS Key  Type LV Size       Device Type Elapsed Time Completion Time   
  748. ------- ---- -- ---------- ----------- ------------ -------------------
  749. 15      Incr 0  210.13M    SBT_TAPE    00:00:12     2017-12-29:16:45:44
  750.         BP Key: 15   Status: AVAILABLE  Compressed: NO  Tag: 2T_WHOLEPDB2_REAL0
  751.         Handle: 0gsnbmpc_1_1   Media: station26-000002
  752.   List of Datafiles in backup set 15
  753.   File LV Type Ckp SCN    Ckp Time            Name
  754.   ---- -- ---- ---------- ------------------- ----
  755.   10   0  Incr 6925250    2017-12-29:16:45:32 /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf

  756. RMAN>
复制代码

P168/P169页在恢复pdb2:system时关闭整个cdb2是完全没必要的。

  1. SQL> alter database open ;
  2. alter database open
  3. *
  4. ERROR at line 1:
  5. ORA-01113: file 38 needs media recovery
  6. ORA-01110: data file 38: '/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf'


  7. SQL> recover datafile 38 ;
  8. Media recovery complete.
  9. SQL> alter database open ;
  10. alter database open
  11. *
  12. ERROR at line 1:
  13. ORA-01113: file 11 needs media recovery
  14. ORA-01110: data file 11: '/u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf'


  15. SQL> recover datafile 11;
  16. Media recovery complete.
  17. SQL> alter database open ;

  18. Database altered.

  19. SQL>
复制代码
  1. RMAN> restore tablespace pdb2:system;

  2. Starting restore at 2017-12-29:16:56:37
  3. allocated channel: ORA_DISK_1
  4. channel ORA_DISK_1: SID=67 device type=DISK
  5. allocated channel: ORA_DISK_2
  6. channel ORA_DISK_2: SID=186 device type=DISK
  7. allocated channel: ORA_DISK_3
  8. channel ORA_DISK_3: SID=242 device type=DISK
  9. allocated channel: ORA_DISK_4
  10. channel ORA_DISK_4: SID=301 device type=DISK
  11. allocated channel: ORA_DISK_5
  12. channel ORA_DISK_5: SID=361 device type=DISK
  13. allocated channel: ORA_DISK_6
  14. channel ORA_DISK_6: SID=418 device type=DISK
  15. allocated channel: ORA_DISK_7
  16. channel ORA_DISK_7: SID=6 device type=DISK
  17. allocated channel: ORA_DISK_8
  18. channel ORA_DISK_8: SID=68 device type=DISK
  19. allocated channel: ORA_DISK_9
  20. channel ORA_DISK_9: SID=129 device type=DISK
  21. allocated channel: ORA_DISK_10
  22. channel ORA_DISK_10: SID=243 device type=DISK
  23. allocated channel: ORA_DISK_11
  24. channel ORA_DISK_11: SID=304 device type=DISK
  25. allocated channel: ORA_DISK_12
  26. channel ORA_DISK_12: SID=363 device type=DISK
  27. allocated channel: ORA_DISK_13
  28. channel ORA_DISK_13: SID=420 device type=DISK
  29. allocated channel: ORA_DISK_14
  30. channel ORA_DISK_14: SID=7 device type=DISK
  31. allocated channel: ORA_DISK_15
  32. channel ORA_DISK_15: SID=66 device type=DISK
  33. allocated channel: ORA_DISK_16
  34. channel ORA_DISK_16: SID=130 device type=DISK
  35. using channel ORA_SBT_TAPE_1
  36. using channel ORA_SBT_TAPE_2

  37. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  38. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  39. channel ORA_SBT_TAPE_1: restoring datafile 00010 to /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  40. channel ORA_SBT_TAPE_1: reading from backup piece 0gsnbmpc_1_1
  41. channel ORA_SBT_TAPE_1: piece handle=0gsnbmpc_1_1 tag=2T_WHOLEPDB2_REAL0
  42. channel ORA_SBT_TAPE_1: restored backup piece 1
  43. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:35
  44. Finished restore at 2017-12-29:16:57:21

  45. RMAN> recover tablespace pdb2:system ;

  46. Starting recover at 2017-12-29:16:57:36
  47. using channel ORA_DISK_1
  48. using channel ORA_DISK_2
  49. using channel ORA_DISK_3
  50. using channel ORA_DISK_4
  51. using channel ORA_DISK_5
  52. using channel ORA_DISK_6
  53. using channel ORA_DISK_7
  54. using channel ORA_DISK_8
  55. using channel ORA_DISK_9
  56. using channel ORA_DISK_10
  57. using channel ORA_DISK_11
  58. using channel ORA_DISK_12
  59. using channel ORA_DISK_13
  60. using channel ORA_DISK_14
  61. using channel ORA_DISK_15
  62. using channel ORA_DISK_16
  63. using channel ORA_SBT_TAPE_1
  64. using channel ORA_SBT_TAPE_2

  65. starting media recovery
  66. media recovery complete, elapsed time: 00:00:00

  67. Finished recover at 2017-12-29:16:57:38

  68. RMAN> restore pluggable database pdb2;  

  69. Starting restore at 2017-12-29:17:03:06
  70. using channel ORA_DISK_1
  71. using channel ORA_DISK_2
  72. using channel ORA_DISK_3
  73. using channel ORA_DISK_4
  74. using channel ORA_DISK_5
  75. using channel ORA_DISK_6
  76. using channel ORA_DISK_7
  77. using channel ORA_DISK_8
  78. using channel ORA_DISK_9
  79. using channel ORA_DISK_10
  80. using channel ORA_DISK_11
  81. using channel ORA_DISK_12
  82. using channel ORA_DISK_13
  83. using channel ORA_DISK_14
  84. using channel ORA_DISK_15
  85. using channel ORA_DISK_16
  86. using channel ORA_SBT_TAPE_1
  87. using channel ORA_SBT_TAPE_2

  88. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  89. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  90. channel ORA_SBT_TAPE_1: restoring datafile 00010 to /u01/app/oracle/oradata/cdb2/pdb2_1/system01.dbf
  91. channel ORA_SBT_TAPE_1: reading from backup piece 0gsnbmpc_1_1
  92. channel ORA_SBT_TAPE_2: starting datafile backup set restore
  93. channel ORA_SBT_TAPE_2: specifying datafile(s) to restore from backup set
  94. channel ORA_SBT_TAPE_2: restoring datafile 00011 to /u01/app/oracle/oradata/cdb2/pdb2_1/sysaux01.dbf
  95. channel ORA_SBT_TAPE_2: reading from backup piece 0fsnbmpc_1_1
  96. channel ORA_SBT_TAPE_1: piece handle=0gsnbmpc_1_1 tag=2T_WHOLEPDB2_REAL0
  97. channel ORA_SBT_TAPE_1: restored backup piece 1
  98. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:36
  99. channel ORA_SBT_TAPE_2: piece handle=0fsnbmpc_1_1 tag=2T_WHOLEPDB2_REAL0
  100. channel ORA_SBT_TAPE_2: restored backup piece 1
  101. channel ORA_SBT_TAPE_2: restore complete, elapsed time: 00:00:56
  102. channel ORA_SBT_TAPE_2: starting datafile backup set restore
  103. channel ORA_SBT_TAPE_2: specifying datafile(s) to restore from backup set
  104. channel ORA_SBT_TAPE_2: restoring datafile 00038 to /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
  105. channel ORA_SBT_TAPE_2: reading from backup piece 0isnbmul_1_1
  106. channel ORA_SBT_TAPE_2: piece handle=0isnbmul_1_1 tag=3T_PDB2:LDATA_INCR0
  107. channel ORA_SBT_TAPE_2: restored backup piece 1
  108. channel ORA_SBT_TAPE_2: restore complete, elapsed time: 00:00:25
  109. Finished restore at 2017-12-29:17:04:28

  110. RMAN> recover pluggable database pdb2;

  111. Starting recover at 2017-12-29:17:04:48
  112. using channel ORA_DISK_1
  113. using channel ORA_DISK_2
  114. using channel ORA_DISK_3
  115. using channel ORA_DISK_4
  116. using channel ORA_DISK_5
  117. using channel ORA_DISK_6
  118. using channel ORA_DISK_7
  119. using channel ORA_DISK_8
  120. using channel ORA_DISK_9
  121. using channel ORA_DISK_10
  122. using channel ORA_DISK_11
  123. using channel ORA_DISK_12
  124. using channel ORA_DISK_13
  125. using channel ORA_DISK_14
  126. using channel ORA_DISK_15
  127. using channel ORA_DISK_16
  128. using channel ORA_SBT_TAPE_1
  129. using channel ORA_SBT_TAPE_2

  130. starting media recovery
  131. media recovery complete, elapsed time: 00:00:01

  132. Finished recover at 2017-12-29:17:04:49

  133. RMAN>
复制代码
控制文件的trace脚本和过去的trace脚本唯一不同的就在添加临时文件的哪一段:
  1. -- Other tempfiles may require adjustment.
  2. ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/temp01.dbf'
  3.      SIZE 206569472  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;
  4. ALTER SESSION SET CONTAINER = PDB$SEED;
  5. ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/pdbseed/pdbseed_temp012017-12-22_06-04-39-PM.dbf'
  6.      SIZE 104857600  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;
  7. ALTER SESSION SET CONTAINER = PDB2;
  8. ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/pdb2_1/pdbseed_temp012017-12-22_06-04-39-PM.dbf'
  9.      SIZE 20971520  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;
  10. ALTER SESSION SET CONTAINER = PDB2_2;
  11. ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/pdb2_2/CDB2/612B093C409C4C0FE0531A00A8C013C6/datafile/o1_mf_temp_f41yt1kl_.dbf'
  12.      SIZE 20971520  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;
  13. ALTER SESSION SET CONTAINER = CDB$ROOT;
  14. ALTER TABLESPACE TEMP_ROOT ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/temproot_01.dbf'
  15.      SIZE 524288000  REUSE AUTOEXTEND OFF;
  16. ALTER SESSION SET CONTAINER = PDB2;
  17. ALTER TABLESPACE TEMP_PDB2 ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/pdb2_1/temppdb2_01.dbf'
  18.      SIZE 104857600  REUSE AUTOEXTEND OFF;
  19. ALTER TABLESPACE MY_TEMP ADD TEMPFILE '/u01/app/oracle/oradata/cdb2/pdb2_1/my_temp_pdb2_01.dbf'
  20.      SIZE 10485760  REUSE AUTOEXTEND OFF;
  21. ALTER SESSION SET CONTAINER = CDB$ROOT;
  22. -- End of tempfile additions.
复制代码

书P198页,如果能在硬盘原来地方回复,可以根过去一样:
  1. RMAN> run {
  2. 2> set until scn 7130739 ;
  3. 3> restore  pluggable database pdb2;
  4. 4> recover pluggable database pdb2;
  5. 5> }
复制代码

书上脚本的好处是在临时实例别处恢复:

  1. RMAN> run {
  2. set until scn 7130739 ;
  3. restore pluggable database pdb2;
  4. recover pluggable database pdb2 auxiliary destination '/u01/app/oracle/oradata';
  5. alter pluggable database pdb2 open resetlogs;
  6. }
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Botang唐波's Oracle Station   

GMT+8, 2018-6-23 01:04 , Processed in 0.150815 second(s), 27 queries .

快速回复 返回顶部 返回列表