|
1Z0-053
3-28:
创建三个用户:
- SQL> create user u100 identified by oracle_4U default tablespace RCAT quota unlimited on RCAT ;
- User created.
- SQL> grant recovery_catalog_owner to u100;
- Grant succeeded.
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- [oracle@station90 ~]$ exit
- logout
- [root@station90 ~]# su - oracle
- [oracle@station90 ~]$ rman catalog u100/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 20:51:10 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to recovery catalog database
- RMAN> create catalog;
- recovery catalog created
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ . oraenv
- ORACLE_SID = [orcl] ? rcat
- The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 18 20:54:05 2018
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> create user v101 identified by oracle_4U default tablespace RCAT quota unlimited on RCAT ;
- User created.
- SQL> grant recovery_catalog_owner to v101;
- Grant succeeded.
- SQL> create user v102 identified by oracle_4U default tablespace RCAT quota unlimited on RCAT ;
- User created.
- SQL> grant recovery_catalog_owner to v102;
- Grant succeeded.
- SQL>
复制代码 u100去注册两个库:
- [oracle@station90 ~]$ rman target / catalog u100/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 20:58:30 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1343950367)
- connected to recovery catalog database
- RMAN> register database;
- database registered in recovery catalog
- starting full resync of recovery catalog
- full resync complete
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target sys/oracle_4U@winorcl catalog u100/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:00:02 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1347195613)
- connected to recovery catalog database
- RMAN> register database;
- database registered in recovery catalog
- starting full resync of recovery catalog
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03008: error while performing automatic resync of recovery catalog
- ORA-06502: PL/SQL: numeric or value error
- RMAN> register database;
- starting full resync of recovery catalog
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of register command at 04/18/2018 21:00:25
- RMAN-03014: implicit resync of recovery catalog failed
- RMAN-03009: failure of full resync command on default channel at 04/18/2018 21:00:25
- ORA-06502: PL/SQL: numeric or value error
- RMAN> resync catalog;
- starting full resync of recovery catalog
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03009: failure of resync command on default channel at 04/18/2018 21:00:37
- ORA-06502: PL/SQL: numeric or value error
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target sys/oracle_4U@utforcl catalog u100/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:00:57 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: UTFORCL (DBID=454057935)
- connected to recovery catalog database
- RMAN> register database;
- database registered in recovery catalog
- starting full resync of recovery catalog
- full resync complete
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target sys/oracle_4U@winorcl catalog u100/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:03:11 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1347195613)
- connected to recovery catalog database
- RMAN> register database;
- starting full resync of recovery catalog
- full resync complete
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03009: failure of register command on default channel at 04/18/2018 21:03:20
- RMAN-20002: target database already registered in recovery catalog
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ . oraenv
- ORACLE_SID = [orcl] ? rcat
- The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 18 21:03:37 2018
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn u100/oracle_4U
- Connected.
- SQL> select * from db;
- DB_KEY DB_ID CURR_DBINC_KEY
- ---------- ---------- --------------
- 2 1343950367 4
- 146 1347195613 147
- 238 454057935 239
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- [oracle@station90 ~]$ rman catalog u100/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:05:12 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to recovery catalog database
- RMAN> grant catalog for database 1343950367 to v101;
- Grant succeeded.
- RMAN> grant catalog for database 1347195613 to v101;
- Grant succeeded.
- RMAN> grant catalog for database 454057935 to v102;
- Grant succeeded.
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman catalog v101/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:06:33 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to recovery catalog database
- RMAN> create virtual catalog;
- found ineligible base catalog owned by U3
- found ineligible base catalog owned by U4
- found ineligible base catalog owned by U6
- found ineligible base catalog owned by U8
- found ineligible base catalog owned by U11
- found ineligible base catalog owned by U13
- found ineligible base catalog owned by U90
- found eligible base catalog owned by U100
- created virtual catalog against base catalog owned by U100
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman catalog v102/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:08:22 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to recovery catalog database
- RMAN> create virtual catalog;
- found ineligible base catalog owned by U3
- found ineligible base catalog owned by U4
- found ineligible base catalog owned by U6
- found ineligible base catalog owned by U8
- found ineligible base catalog owned by U11
- found ineligible base catalog owned by U13
- found ineligible base catalog owned by U90
- found eligible base catalog owned by U100
- created virtual catalog against base catalog owned by U100
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman catalog ^C02/oracle_4U@rcat
- [oracle@station90 ~]$
- [oracle@station90 ~]$
- [oracle@station90 ~]$
- [oracle@station90 ~]$ . oraenv
- ORACLE_SID = [rcat] ? orcl
- The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
- [oracle@station90 ~]$ rman target / catalog v101/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:09:36 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1343950367)
- connected to recovery catalog database
- RMAN> report schema;
- Report of database schema for database with db_unique_name ORCL
- List of Permanent Datafiles
- ===========================
- File Size(MB) Tablespace RB segs Datafile Name
- ---- -------- -------------------- ------- ------------------------
- 1 700 SYSTEM YES +DATA/orcl/datafile/system.256.973682053
- 2 730 SYSAUX NO +DATA/orcl/datafile/sysaux.257.973682053
- 3 160 UNDOTBS1 YES +DATA/orcl/datafile/undotbs1.263.973682055
- 4 7 USERS NO +DATA/orcl/datafile/users.261.973682055
- 5 100 EXAMPLE NO +DATA/orcl/datafile/example.262.973682055
- 6 5 TBSOCP05_TEST NO +DATA/orcl/datafile/tbsocp05_test.268.973703145
- List of Temporary Files
- =======================
- File Size(MB) Tablespace Maxsize(MB) Tempfile Name
- ---- -------- -------------------- ----------- --------------------
- 1 30 TEMP 30 +DATA/orcl/tempfile/temp.270.973682389
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target sys/oracle_4U@winorcl catalog v101/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:10:47 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1347195613)
- connected to recovery catalog database
- RMAN> list copy;
- specification does not match any control file copy in the repository
- List of Datafile Copies
- =======================
- Key File S Completion Time Ckp SCN Ckp Time
- ------- ---- - --------------- ---------- ---------------
- 327 4 A 18-APR-18 1158425 18-APR-18
- Name: C:\DATA\USERS01.DBF
- List of Archived Log Copies for database with db_unique_name ORCL
- =====================================================================
- Key Thrd Seq S Low Time
- ------- ---- ------- - ---------
- 321 1 13 A 18-APR-18
- Name: C:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2018_04_18\O1_MF_1_13_FFGJGVPL_.ARC
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target sys/oracle_4U@utforcl catalog v101/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:11:20 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: UTFORCL (DBID=454057935)
- connected to recovery catalog database
- RMAN> report schema;
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of report command at 04/18/2018 21:11:30
- RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target sys/oracle_4U@utforcl catalog v102/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:11:38 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: UTFORCL (DBID=454057935)
- connected to recovery catalog database
- RMAN> report schema;
- Report of database schema for database with db_unique_name UTFORCL
- List of Permanent Datafiles
- ===========================
- File Size(MB) Tablespace RB segs Datafile Name
- ---- -------- -------------------- ------- ------------------------
- 1 700 SYSTEM YES C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\SYSTEM01.DBF
- 2 540 SYSAUX NO C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\SYSAUX01.DBF
- 3 100 UNDOTBS1 YES C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\UNDOTBS01.DBF
- 4 60 USERS NO C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\USERS01.DBF
- 5 100 EXAMPLE NO C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\EXAMPLE01.DBF
- 6 5 TBSUTF8_11G NO C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TBSUTF8_11G01.DBF
- 7 40 TBSCAT NO C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TBSCAT.DBF
- List of Temporary Files
- =======================
- File Size(MB) Tablespace Maxsize(MB) Tempfile Name
- ---- -------- -------------------- ----------- --------------------
- 1 29 TEMP 32767 C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TEMP01.DBF
- RMAN>
复制代码
另外一种做法:
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ . oraenv
- ORACLE_SID = [orcl] ? rcat
- The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 18 21:03:37 2018
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn u100/oracle_4U
- Connected.
- SQL> select * from db;
- DB_KEY DB_ID CURR_DBINC_KEY
- ---------- ---------- --------------
- 2 1343950367 4
- 146 1347195613 147
- 238 454057935 239
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- [oracle@station90 ~]$ rman catalog u100/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:05:12 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to recovery catalog database
- RMAN> grant catalog for database 1343950367 to v101;
- Grant succeeded.
- RMAN> grant catalog for database 1347195613 to v101;
- Grant succeeded.
- RMAN> grant catalog for database 454057935 to v102;
- Grant succeeded.
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman catalog v101/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:06:33 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to recovery catalog database
- RMAN> create virtual catalog;
- found ineligible base catalog owned by U3
- found ineligible base catalog owned by U4
- found ineligible base catalog owned by U6
- found ineligible base catalog owned by U8
- found ineligible base catalog owned by U11
- found ineligible base catalog owned by U13
- found ineligible base catalog owned by U90
- found eligible base catalog owned by U100
- created virtual catalog against base catalog owned by U100
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman catalog v102/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:08:22 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to recovery catalog database
- RMAN> create virtual catalog;
- found ineligible base catalog owned by U3
- found ineligible base catalog owned by U4
- found ineligible base catalog owned by U6
- found ineligible base catalog owned by U8
- found ineligible base catalog owned by U11
- found ineligible base catalog owned by U13
- found ineligible base catalog owned by U90
- found eligible base catalog owned by U100
- created virtual catalog against base catalog owned by U100
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman catalog ^C02/oracle_4U@rcat
- [oracle@station90 ~]$
- [oracle@station90 ~]$
- [oracle@station90 ~]$
- [oracle@station90 ~]$ . oraenv
- ORACLE_SID = [rcat] ? orcl
- The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
- [oracle@station90 ~]$ rman target / catalog v101/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:09:36 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1343950367)
- connected to recovery catalog database
- RMAN> report schema;
- Report of database schema for database with db_unique_name ORCL
- List of Permanent Datafiles
- ===========================
- File Size(MB) Tablespace RB segs Datafile Name
- ---- -------- -------------------- ------- ------------------------
- 1 700 SYSTEM YES +DATA/orcl/datafile/system.256.973682053
- 2 730 SYSAUX NO +DATA/orcl/datafile/sysaux.257.973682053
- 3 160 UNDOTBS1 YES +DATA/orcl/datafile/undotbs1.263.973682055
- 4 7 USERS NO +DATA/orcl/datafile/users.261.973682055
- 5 100 EXAMPLE NO +DATA/orcl/datafile/example.262.973682055
- 6 5 TBSOCP05_TEST NO +DATA/orcl/datafile/tbsocp05_test.268.973703145
- List of Temporary Files
- =======================
- File Size(MB) Tablespace Maxsize(MB) Tempfile Name
- ---- -------- -------------------- ----------- --------------------
- 1 30 TEMP 30 +DATA/orcl/tempfile/temp.270.973682389
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target sys/oracle_4U@winorcl catalog v101/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:10:47 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1347195613)
- connected to recovery catalog database
- RMAN> list copy;
- specification does not match any control file copy in the repository
- List of Datafile Copies
- =======================
- Key File S Completion Time Ckp SCN Ckp Time
- ------- ---- - --------------- ---------- ---------------
- 327 4 A 18-APR-18 1158425 18-APR-18
- Name: C:\DATA\USERS01.DBF
- List of Archived Log Copies for database with db_unique_name ORCL
- =====================================================================
- Key Thrd Seq S Low Time
- ------- ---- ------- - ---------
- 321 1 13 A 18-APR-18
- Name: C:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2018_04_18\O1_MF_1_13_FFGJGVPL_.ARC
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target sys/oracle_4U@utforcl catalog v101/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:11:20 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: UTFORCL (DBID=454057935)
- connected to recovery catalog database
- RMAN> report schema;
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of report command at 04/18/2018 21:11:30
- RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target sys/oracle_4U@utforcl catalog v102/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:11:38 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: UTFORCL (DBID=454057935)
- connected to recovery catalog database
- RMAN> report schema;
- Report of database schema for database with db_unique_name UTFORCL
- List of Permanent Datafiles
- ===========================
- File Size(MB) Tablespace RB segs Datafile Name
- ---- -------- -------------------- ------- ------------------------
- 1 700 SYSTEM YES C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\SYSTEM01.DBF
- 2 540 SYSAUX NO C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\SYSAUX01.DBF
- 3 100 UNDOTBS1 YES C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\UNDOTBS01.DBF
- 4 60 USERS NO C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\USERS01.DBF
- 5 100 EXAMPLE NO C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\EXAMPLE01.DBF
- 6 5 TBSUTF8_11G NO C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TBSUTF8_11G01.DBF
- 7 40 TBSCAT NO C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TBSCAT.DBF
- List of Temporary Files
- =======================
- File Size(MB) Tablespace Maxsize(MB) Tempfile Name
- ---- -------- -------------------- ----------- --------------------
- 1 29 TEMP 32767 C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TEMP01.DBF
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ . oraenv
- ORACLE_SID = [orcl] ? rcat
- The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 18 21:13:58 2018
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> create user u200 identified by oracle_4U default tablespace RCAT quota unlimited on RCAT ;
- User created.
- SQL> grant recovery_catalog_owner to u200;
- Grant succeeded.
- SQL> create user v201 identified by oracle_4U default tablespace RCAT quota unlimited on RCAT ;
- User created.
- SQL> grant recovery_catalog_owner to v201;
- Grant succeeded.
- SQL> create user v202 identified by oracle_4U default tablespace RCAT quota unlimited on RCAT ;
- User created.
- SQL> grant recovery_catalog_owner to v202;
- Grant succeeded.
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- [oracle@station90 ~]$ rman caralog u200/oracle_4U@rcat
- Argument Value Description
- -----------------------------------------------------------------------------
- target quoted-string connect-string for target database
- catalog quoted-string connect-string for recovery catalog
- nocatalog none if specified, then no recovery catalog
- cmdfile quoted-string name of input command file
- log quoted-string name of output message log file
- trace quoted-string name of output debugging message log file
- append none if specified, log is opened in append mode
- debug optional-args activate debugging
- msgno none show RMAN-nnnn prefix for all messages
- send quoted-string send a command to the media manager
- pipe string building block for pipe names
- timeout integer number of seconds to wait for pipe input
- checksyntax none check the command file for syntax errors
- -----------------------------------------------------------------------------
- Both single and double quotes (' or ") are accepted for a quoted-string.
- Quotes are not required unless the string contains embedded white-space.
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-00552: syntax error in command line arguments
- RMAN-01009: syntax error: found "identifier": expecting one of: "append, auxiliary, catalog, checksyntax, cmdfile, log, msgno, nocatalog, pipe, script, send, target, timeout, using, @, ;"
- RMAN-01008: the bad identifier was: caralog
- RMAN-01007: at line 2 column 1 file: command line arguments
- [oracle@station90 ~]$ rman catalog u200/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:15:53 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to recovery catalog database
- RMAN> create catalog;
- recovery catalog created
- RMAN> grant register database to v201;
- Grant succeeded.
- RMAN> grant register database to v202;
- Grant succeeded.
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman catalog v201/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:16:57 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to recovery catalog database
- RMAN> create virtual catalog;
- found ineligible base catalog owned by U3
- found ineligible base catalog owned by U4
- found ineligible base catalog owned by U6
- found ineligible base catalog owned by U8
- found ineligible base catalog owned by U11
- found ineligible base catalog owned by U13
- found ineligible base catalog owned by U90
- found ineligible base catalog owned by U100
- found eligible base catalog owned by U200
- created virtual catalog against base catalog owned by U200
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman catalog v202/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:17:10 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to recovery catalog database
- RMAN> create virtual catalog;
- found ineligible base catalog owned by U3
- found ineligible base catalog owned by U4
- found ineligible base catalog owned by U6
- found ineligible base catalog owned by U8
- found ineligible base catalog owned by U11
- found ineligible base catalog owned by U13
- found ineligible base catalog owned by U90
- found ineligible base catalog owned by U100
- found eligible base catalog owned by U200
- created virtual catalog against base catalog owned by U200
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target sys/oracle_4U@orcl catalog v201/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:17:55 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1343950367)
- connected to recovery catalog database
- RMAN> register database;
- database registered in recovery catalog
- starting full resync of recovery catalog
- full resync complete
- RMAN> eixt
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-00558: error encountered while parsing input commands
- RMAN-01009: syntax error: found "identifier": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck, delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore, resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
- RMAN-01008: the bad identifier was: eixt
- RMAN-01007: at line 1 column 1 file: standard input
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target sys/oracle_4U@winorcl catalog v201/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:19:07 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1347195613)
- connected to recovery catalog database
- RMAN> register database;
- database registered in recovery catalog
- starting full resync of recovery catalog
- full resync complete
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target sys/oracle_4U@utforcl catalog v202/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:19:25 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: UTFORCL (DBID=454057935)
- connected to recovery catalog database
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ . oraenv
- ORACLE_SID = [rcat] ?
- The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 18 21:19:47 2018
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn u200/oracle_4U@rcat
- Connected.
- SQL> select * from db;
- DB_KEY DB_ID CURR_DBINC_KEY
- ---------- ---------- --------------
- 2 1343950367 4
- 181 1347195613 182
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- [oracle@station90 ~]$ rman target sys/oracle_4U@utforcl catalog v202/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:20:21 2018
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: UTFORCL (DBID=454057935)
- connected to recovery catalog database
- RMAN> register database;
- database registered in recovery catalog
- starting full resync of recovery catalog
- full resync complete
- RMAN> exitg
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-00558: error encountered while parsing input commands
- RMAN-01009: syntax error: found "identifier": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck, delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore, resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
- RMAN-01008: the bad identifier was: exitg
- RMAN-01007: at line 1 column 1 file: standard input
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 18 21:20:36 2018
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn u200/oracle_4U@rcat
- Connected.
- SQL> select * from db;
- DB_KEY DB_ID CURR_DBINC_KEY
- ---------- ---------- --------------
- 2 1343950367 4
- 181 1347195613 182
- 236 454057935 237
- SQL>
复制代码
|
|