|
上完1Z0-053第3章(Recovery Catalog和虚拟专用Recovery Catalog)
(052共19章,053共21章,063多租户共9章,49-19)
- [oracle@station90 ~]$ expdp system/oracle_4U directory=dir1 dumpfile=u90.dmp schemas=u90
- Export: Release 11.2.0.1.0 - Production on Sat Jan 7 22:35:26 2017
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01": system/******** directory=dir1 dumpfile=u90.dmp schemas=u90
- Estimate in progress using BLOCKS method...
- Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
- Total estimation using BLOCKS method: 2.5 MB
- Processing object type SCHEMA_EXPORT/USER
- Processing object type SCHEMA_EXPORT/ROLE_GRANT
- Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
- Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
- Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
- Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
- Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
- Processing object type SCHEMA_EXPORT/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
- Processing object type SCHEMA_EXPORT/TABLE/TABLE
- Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
- Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
- Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
- Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
- Processing object type SCHEMA_EXPORT/PACKAGE/GRANT/OWNER_GRANT/OBJECT_GRANT
- Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
- Processing object type SCHEMA_EXPORT/FUNCTION/GRANT/OWNER_GRANT/OBJECT_GRANT
- Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
- Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
- Processing object type SCHEMA_EXPORT/VIEW/VIEW
- Processing object type SCHEMA_EXPORT/VIEW/GRANT/OWNER_GRANT/OBJECT_GRANT
- Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
- Processing object type SCHEMA_EXPORT/TYPE/TYPE_BODY
- Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
- Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
- . . exported "U90"."ROUT" 384.9 KB 5293 rows
- . . exported "U90"."CFS" 89.83 KB 157 rows
- . . exported "U90"."RSR" 79.72 KB 520 rows
- . . exported "U90"."AL" 16.14 KB 9 rows
- . . exported "U90"."BCF" 10.35 KB 2 rows
- . . exported "U90"."BDF" 17.10 KB 7 rows
- . . exported "U90"."BP" 16.91 KB 12 rows
- . . exported "U90"."BRL" 11.32 KB 16 rows
- . . exported "U90"."BS" 13.07 KB 11 rows
- . . exported "U90"."BSF" 7.882 KB 2 rows
- . . exported "U90"."CDF" 19.43 KB 6 rows
- . . exported "U90"."CKP" 8.718 KB 2 rows
- . . exported "U90"."CONF" 8.257 KB 12 rows
- . . exported "U90"."CONFIG" 5.421 KB 1 rows
- . . exported "U90"."DB" 5.820 KB 1 rows
- . . exported "U90"."DBINC" 7.851 KB 12 rows
- . . exported "U90"."DF" 15.07 KB 5 rows
- . . exported "U90"."NODE" 20.60 KB 1 rows
- . . exported "U90"."OFFR" 8.898 KB 6 rows
- . . exported "U90"."ORL" 7.796 KB 6 rows
- . . exported "U90"."RCVER" 5.023 KB 1 rows
- . . exported "U90"."RLH" 15.01 KB 137 rows
- . . exported "U90"."RT" 7.835 KB 1 rows
- . . exported "U90"."SCR" 6.226 KB 1 rows
- . . exported "U90"."SCRL" 6.929 KB 11 rows
- . . exported "U90"."SITE_DFATT" 6.062 KB 5 rows
- . . exported "U90"."SITE_TFATT" 8.265 KB 1 rows
- . . exported "U90"."TF" 8.226 KB 1 rows
- . . exported "U90"."TS" 9.257 KB 6 rows
- . . exported "U90"."TSATT" 7.125 KB 6 rows
- . . exported "U90"."BCB" 0 KB 0 rows
- . . exported "U90"."BCR" 0 KB 0 rows
- . . exported "U90"."CCB" 0 KB 0 rows
- . . exported "U90"."CCF" 0 KB 0 rows
- . . exported "U90"."FB" 0 KB 0 rows
- . . exported "U90"."GRSP" 0 KB 0 rows
- . . exported "U90"."NRSP" 0 KB 0 rows
- . . exported "U90"."RR" 0 KB 0 rows
- . . exported "U90"."TEMPRES" 0 KB 0 rows
- . . exported "U90"."VPC_DATABASES" 0 KB 0 rows
- . . exported "U90"."VPC_USERS" 0 KB 0 rows
- . . exported "U90"."XAL" 0 KB 0 rows
- . . exported "U90"."XCF" 0 KB 0 rows
- . . exported "U90"."XDF" 0 KB 0 rows
- Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
- ******************************************************************************
- Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
- /home/oracle/myrcatbackup/u90.dmp
- Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at 22:36:00
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Sat Jan 7 22:36:48 2017
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> drop user u90 cascade ;
- SP2-0640: Not connected
- SQL> conn / as sysdba
- Connected.
- SQL> drop user u90 cascade ;
- User dropped.
- 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 ~]$ impdp system/oracle_4U directory=dir1 dumpfile=u90.dmp schemas=u90
- Import: Release 11.2.0.1.0 - Production on Sat Jan 7 22:37:52 2017
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- Master table "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
- Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01": system/******** directory=dir1 dumpfile=u90.dmp schemas=u90
- Processing object type SCHEMA_EXPORT/USER
- Processing object type SCHEMA_EXPORT/ROLE_GRANT
- Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
- Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
- Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
- Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
- Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
- Processing object type SCHEMA_EXPORT/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
- Processing object type SCHEMA_EXPORT/TABLE/TABLE
- Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
- . . imported "U90"."ROUT" 384.9 KB 5293 rows
- . . imported "U90"."CFS" 89.83 KB 157 rows
- . . imported "U90"."RSR" 79.72 KB 520 rows
- . . imported "U90"."AL" 16.14 KB 9 rows
- . . imported "U90"."BCF" 10.35 KB 2 rows
- . . imported "U90"."BDF" 17.10 KB 7 rows
- . . imported "U90"."BP" 16.91 KB 12 rows
- . . imported "U90"."BRL" 11.32 KB 16 rows
- . . imported "U90"."BS" 13.07 KB 11 rows
- . . imported "U90"."BSF" 7.882 KB 2 rows
- . . imported "U90"."CDF" 19.43 KB 6 rows
- . . imported "U90"."CKP" 8.718 KB 2 rows
- . . imported "U90"."CONF" 8.257 KB 12 rows
- . . imported "U90"."CONFIG" 5.421 KB 1 rows
- . . imported "U90"."DB" 5.820 KB 1 rows
- . . imported "U90"."DBINC" 7.851 KB 12 rows
- . . imported "U90"."DF" 15.07 KB 5 rows
- . . imported "U90"."NODE" 20.60 KB 1 rows
- . . imported "U90"."OFFR" 8.898 KB 6 rows
- . . imported "U90"."ORL" 7.796 KB 6 rows
- . . imported "U90"."RCVER" 5.023 KB 1 rows
- . . imported "U90"."RLH" 15.01 KB 137 rows
- . . imported "U90"."RT" 7.835 KB 1 rows
- . . imported "U90"."SCR" 6.226 KB 1 rows
- . . imported "U90"."SCRL" 6.929 KB 11 rows
- . . imported "U90"."SITE_DFATT" 6.062 KB 5 rows
- . . imported "U90"."SITE_TFATT" 8.265 KB 1 rows
- . . imported "U90"."TF" 8.226 KB 1 rows
- . . imported "U90"."TS" 9.257 KB 6 rows
- . . imported "U90"."TSATT" 7.125 KB 6 rows
- . . imported "U90"."BCB" 0 KB 0 rows
- . . imported "U90"."BCR" 0 KB 0 rows
- . . imported "U90"."CCB" 0 KB 0 rows
- . . imported "U90"."CCF" 0 KB 0 rows
- . . imported "U90"."FB" 0 KB 0 rows
- . . imported "U90"."GRSP" 0 KB 0 rows
- . . imported "U90"."NRSP" 0 KB 0 rows
- . . imported "U90"."RR" 0 KB 0 rows
- . . imported "U90"."TEMPRES" 0 KB 0 rows
- . . imported "U90"."VPC_DATABASES" 0 KB 0 rows
- . . imported "U90"."VPC_USERS" 0 KB 0 rows
- . . imported "U90"."XAL" 0 KB 0 rows
- . . imported "U90"."XCF" 0 KB 0 rows
- . . imported "U90"."XDF" 0 KB 0 rows
- Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
- Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
- Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
- Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
- Processing object type SCHEMA_EXPORT/PACKAGE/GRANT/OWNER_GRANT/OBJECT_GRANT
- Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
- Processing object type SCHEMA_EXPORT/FUNCTION/GRANT/OWNER_GRANT/OBJECT_GRANT
- Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
- Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
- Processing object type SCHEMA_EXPORT/VIEW/VIEW
- Processing object type SCHEMA_EXPORT/VIEW/GRANT/OWNER_GRANT/OBJECT_GRANT
- Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
- Processing object type SCHEMA_EXPORT/TYPE/TYPE_BODY
- Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
- Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
- Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully completed at 22:38:13
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Sat Jan 7 23:04:00 2017
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn u90/oracle_4U
- Connected.
- SQL> select * from db;
- DB_KEY DB_ID CURR_DBINC_KEY
- ---------- ---------- --------------
- 2 1343950367 4
- 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 u90/oracle_4U
- Recovery Manager: Release 11.2.0.1.0 - Production on Sat Jan 7 23:05:39 2017
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to recovery catalog database
- RMAN> import catalog u90/oracle_4U@utforcl;
- Starting import catalog at 2017-01-07:23:06:35
- connected to source recovery catalog database
- import validation complete
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of import catalog command at 01/07/2017 23:06:36
- RMAN-06004: ORACLE error from recovery catalog database: RMAN-20512: source database already registered in recovery catalog
- RMAN> import catalog u90/oracle_4U@utforcl dbid=1347195613;
- Starting import catalog at 2017-01-07:23:08:28
- connected to source recovery catalog database
- import validation complete
- database unregistered from the source recovery catalog
- Finished import catalog at 2017-01-07:23:08:31
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Sat Jan 7 23:12:53 2017
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn u90/oracle_4U
- Connected.
- SQL> select * from db;
- DB_KEY DB_ID CURR_DBINC_KEY
- ---------- ---------- --------------
- 2 1343950367 4
- 3575 1347195613 3576
- SQL> conn / as sysdba
- Connected.
- SQL> drop user u90 cascade;
- drop user u90 cascade
- *
- ERROR at line 1:
- ORA-01940: cannot drop a user that is currently connected
- SQL> drop user u90 cascade;
- User dropped.
- SQL> create user u90 identified by oracle_4U default tablespace rcat quota unlimited on rcat ;
- User created.
- SQL> grant recovery_catalog_owner to u90;
- 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 catalog u90/oracle_4U
- Recovery Manager: Release 11.2.0.1.0 - Production on Sat Jan 7 23:20:20 2017
- 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 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Sat Jan 7 23:21:06 2017
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> create user v901 identified by oracle_4U default tablespace rcat quota unlimited on rcat ;
- User created.
- SQL> create user v902 identified by oracle_4U default tablespace rcat quota unlimited on rcat ;
- User created.
- SQL> grant recovery_catalog_owner to v901;
- Grant succeeded.
- SQL> grant recovery_catalog_owner to v902;
- Grant succeeded.
- SQL>
- SQL>
复制代码
|
|