Bo's Oracle Station

查看: 2275|回复: 0

课程第31次(2018-04-16星期一)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2018-4-17 10:16:44 | 显示全部楼层 |阅读模式

1Z0-053
3-28:

创建三个用户:
  1. SQL> create user u100 identified by oracle_4U default tablespace RCAT quota unlimited on RCAT   ;

  2. User created.

  3. SQL> grant recovery_catalog_owner to u100;

  4. Grant succeeded.

  5. SQL> exit
  6. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  7. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  8. [oracle@station90 ~]$ exit
  9. logout
  10. [root@station90 ~]# su - oracle
  11. [oracle@station90 ~]$ rman  catalog u100/oracle_4U@rcat

  12. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 20:51:10 2018

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

  14. connected to recovery catalog database

  15. RMAN> create catalog;

  16. recovery catalog created

  17. RMAN> exit


  18. Recovery Manager complete.
  19. [oracle@station90 ~]$ . oraenv
  20. ORACLE_SID = [orcl] ? rcat
  21. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  22. [oracle@station90 ~]$ sqlplus  /nolog

  23. SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 18 20:54:05 2018

  24. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  25. SQL> conn / as sysdba
  26. Connected.
  27. SQL> create user v101  identified by oracle_4U default tablespace RCAT quota unlimited on RCAT   ;

  28. User created.

  29. SQL> grant recovery_catalog_owner to v101;

  30. Grant succeeded.

  31. SQL> create user v102 identified by oracle_4U default tablespace RCAT quota unlimited on RCAT   ;

  32. User created.

  33. SQL> grant recovery_catalog_owner to v102;

  34. Grant succeeded.

  35. SQL>
复制代码
u100去注册两个库:

  1. [oracle@station90 ~]$ rman target /  catalog u100/oracle_4U@rcat

  2. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 20:58:30 2018

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

  4. connected to target database: ORCL (DBID=1343950367)
  5. connected to recovery catalog database

  6. RMAN> register database;

  7. database registered in recovery catalog
  8. starting full resync of recovery catalog
  9. full resync complete

  10. RMAN> exit


  11. Recovery Manager complete.
  12. [oracle@station90 ~]$ rman target sys/oracle_4U@winorcl  catalog u100/oracle_4U@rcat

  13. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:00:02 2018

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

  15. connected to target database: ORCL (DBID=1347195613)
  16. connected to recovery catalog database

  17. RMAN> register database;

  18. database registered in recovery catalog
  19. starting full resync of recovery catalog
  20. RMAN-00571: ===========================================================
  21. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  22. RMAN-00571: ===========================================================
  23. RMAN-03008: error while performing automatic resync of recovery catalog
  24. ORA-06502: PL/SQL: numeric or value error

  25. RMAN> register database;

  26. starting full resync of recovery catalog
  27. RMAN-00571: ===========================================================
  28. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  29. RMAN-00571: ===========================================================
  30. RMAN-03002: failure of register command at 04/18/2018 21:00:25
  31. RMAN-03014: implicit resync of recovery catalog failed
  32. RMAN-03009: failure of full resync command on default channel at 04/18/2018 21:00:25
  33. ORA-06502: PL/SQL: numeric or value error

  34. RMAN> resync catalog;

  35. starting full resync of recovery catalog
  36. RMAN-00571: ===========================================================
  37. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  38. RMAN-00571: ===========================================================
  39. RMAN-03009: failure of resync command on default channel at 04/18/2018 21:00:37
  40. ORA-06502: PL/SQL: numeric or value error

  41. RMAN> exit


  42. Recovery Manager complete.
  43. [oracle@station90 ~]$ rman target sys/oracle_4U@utforcl  catalog u100/oracle_4U@rcat

  44. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:00:57 2018

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

  46. connected to target database: UTFORCL (DBID=454057935)
  47. connected to recovery catalog database

  48. RMAN> register database;

  49. database registered in recovery catalog
  50. starting full resync of recovery catalog
  51. full resync complete

  52. RMAN> exit


  53. Recovery Manager complete.
  54. [oracle@station90 ~]$ rman target sys/oracle_4U@winorcl  catalog u100/oracle_4U@rcat

  55. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:03:11 2018

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

  57. connected to target database: ORCL (DBID=1347195613)
  58. connected to recovery catalog database

  59. RMAN> register database;

  60. starting full resync of recovery catalog
  61. full resync complete
  62. RMAN-00571: ===========================================================
  63. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  64. RMAN-00571: ===========================================================
  65. RMAN-03009: failure of register command on default channel at 04/18/2018 21:03:20
  66. RMAN-20002: target database already registered in recovery catalog

  67. RMAN> exit


  68. Recovery Manager complete.
  69. [oracle@station90 ~]$ . oraenv
  70. ORACLE_SID = [orcl] ? rcat
  71. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  72. [oracle@station90 ~]$ sqlplus /nolog

  73. SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 18 21:03:37 2018

  74. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  75. SQL> conn u100/oracle_4U
  76. Connected.
  77. SQL> select  * from db;

  78.     DB_KEY        DB_ID CURR_DBINC_KEY
  79. ---------- ---------- --------------
  80.          2 1343950367                   4
  81.        146 1347195613                 147
  82.        238  454057935                 239

  83. SQL> exit
  84. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  85. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  86. [oracle@station90 ~]$ rman catalog u100/oracle_4U@rcat

  87. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:05:12 2018

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

  89. connected to recovery catalog database

  90. RMAN> grant catalog for database 1343950367 to v101;

  91. Grant succeeded.

  92. RMAN> grant catalog for database 1347195613 to v101;

  93. Grant succeeded.

  94. RMAN> grant catalog for database 454057935 to v102;

  95. Grant succeeded.

  96. RMAN> exit


  97. Recovery Manager complete.
  98. [oracle@station90 ~]$ rman catalog v101/oracle_4U@rcat

  99. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:06:33 2018

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

  101. connected to recovery catalog database

  102. RMAN> create virtual  catalog;

  103. found ineligible base catalog owned by U3
  104. found ineligible base catalog owned by U4
  105. found ineligible base catalog owned by U6
  106. found ineligible base catalog owned by U8
  107. found ineligible base catalog owned by U11
  108. found ineligible base catalog owned by U13
  109. found ineligible base catalog owned by U90
  110. found eligible base catalog owned by U100
  111. created virtual catalog against base catalog owned by U100

  112. RMAN> exit


  113. Recovery Manager complete.
  114. [oracle@station90 ~]$ rman catalog v102/oracle_4U@rcat

  115. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:08:22 2018

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

  117. connected to recovery catalog database

  118. RMAN> create virtual  catalog;

  119. found ineligible base catalog owned by U3
  120. found ineligible base catalog owned by U4
  121. found ineligible base catalog owned by U6
  122. found ineligible base catalog owned by U8
  123. found ineligible base catalog owned by U11
  124. found ineligible base catalog owned by U13
  125. found ineligible base catalog owned by U90
  126. found eligible base catalog owned by U100
  127. created virtual catalog against base catalog owned by U100

  128. RMAN> exit


  129. Recovery Manager complete.
  130. [oracle@station90 ~]$ rman catalog ^C02/oracle_4U@rcat
  131. [oracle@station90 ~]$
  132. [oracle@station90 ~]$
  133. [oracle@station90 ~]$
  134. [oracle@station90 ~]$ . oraenv
  135. ORACLE_SID = [rcat] ? orcl
  136. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  137. [oracle@station90 ~]$ rman target /  catalog v101/oracle_4U@rcat

  138. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:09:36 2018

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

  140. connected to target database: ORCL (DBID=1343950367)
  141. connected to recovery catalog database

  142. RMAN> report schema;

  143. Report of database schema for database with db_unique_name ORCL

  144. List of Permanent Datafiles
  145. ===========================
  146. File Size(MB) Tablespace           RB segs Datafile Name
  147. ---- -------- -------------------- ------- ------------------------
  148. 1    700      SYSTEM               YES     +DATA/orcl/datafile/system.256.973682053
  149. 2    730      SYSAUX               NO      +DATA/orcl/datafile/sysaux.257.973682053
  150. 3    160      UNDOTBS1             YES     +DATA/orcl/datafile/undotbs1.263.973682055
  151. 4    7        USERS                NO      +DATA/orcl/datafile/users.261.973682055
  152. 5    100      EXAMPLE              NO      +DATA/orcl/datafile/example.262.973682055
  153. 6    5        TBSOCP05_TEST        NO      +DATA/orcl/datafile/tbsocp05_test.268.973703145

  154. List of Temporary Files
  155. =======================
  156. File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
  157. ---- -------- -------------------- ----------- --------------------
  158. 1    30       TEMP                 30          +DATA/orcl/tempfile/temp.270.973682389

  159. RMAN> exit


  160. Recovery Manager complete.
  161. [oracle@station90 ~]$ rman target sys/oracle_4U@winorcl  catalog v101/oracle_4U@rcat

  162. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:10:47 2018

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

  164. connected to target database: ORCL (DBID=1347195613)
  165. connected to recovery catalog database

  166. RMAN> list copy;

  167. specification does not match any control file copy in the repository
  168. List of Datafile Copies
  169. =======================

  170. Key     File S Completion Time Ckp SCN    Ckp Time      
  171. ------- ---- - --------------- ---------- ---------------
  172. 327     4    A 18-APR-18       1158425    18-APR-18      
  173.         Name: C:\DATA\USERS01.DBF

  174. List of Archived Log Copies for database with db_unique_name ORCL
  175. =====================================================================

  176. Key     Thrd Seq     S Low Time
  177. ------- ---- ------- - ---------
  178. 321     1    13      A 18-APR-18
  179.         Name: C:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2018_04_18\O1_MF_1_13_FFGJGVPL_.ARC


  180. RMAN> exit


  181. Recovery Manager complete.
  182. [oracle@station90 ~]$ rman target sys/oracle_4U@utforcl  catalog v101/oracle_4U@rcat

  183. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:11:20 2018

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

  185. connected to target database: UTFORCL (DBID=454057935)
  186. connected to recovery catalog database

  187. RMAN> report schema;

  188. RMAN-00571: ===========================================================
  189. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  190. RMAN-00571: ===========================================================
  191. RMAN-03002: failure of report command at 04/18/2018 21:11:30
  192. RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog

  193. RMAN> exit


  194. Recovery Manager complete.
  195. [oracle@station90 ~]$ rman target sys/oracle_4U@utforcl  catalog v102/oracle_4U@rcat

  196. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:11:38 2018

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

  198. connected to target database: UTFORCL (DBID=454057935)
  199. connected to recovery catalog database

  200. RMAN> report schema;

  201. Report of database schema for database with db_unique_name UTFORCL

  202. List of Permanent Datafiles
  203. ===========================
  204. File Size(MB) Tablespace           RB segs Datafile Name
  205. ---- -------- -------------------- ------- ------------------------
  206. 1    700      SYSTEM               YES     C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\SYSTEM01.DBF
  207. 2    540      SYSAUX               NO      C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\SYSAUX01.DBF
  208. 3    100      UNDOTBS1             YES     C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\UNDOTBS01.DBF
  209. 4    60       USERS                NO      C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\USERS01.DBF
  210. 5    100      EXAMPLE              NO      C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\EXAMPLE01.DBF
  211. 6    5        TBSUTF8_11G          NO      C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TBSUTF8_11G01.DBF
  212. 7    40       TBSCAT               NO      C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TBSCAT.DBF

  213. List of Temporary Files
  214. =======================
  215. File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
  216. ---- -------- -------------------- ----------- --------------------
  217. 1    29       TEMP                 32767       C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TEMP01.DBF

  218. RMAN>





复制代码

另外一种做法:

  1. RMAN> exit


  2. Recovery Manager complete.
  3. [oracle@station90 ~]$ . oraenv
  4. ORACLE_SID = [orcl] ? rcat
  5. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  6. [oracle@station90 ~]$ sqlplus /nolog

  7. SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 18 21:03:37 2018

  8. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  9. SQL> conn u100/oracle_4U
  10. Connected.
  11. SQL> select  * from db;

  12.     DB_KEY        DB_ID CURR_DBINC_KEY
  13. ---------- ---------- --------------
  14.          2 1343950367                   4
  15.        146 1347195613                 147
  16.        238  454057935                 239

  17. SQL> exit
  18. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  19. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  20. [oracle@station90 ~]$ rman catalog u100/oracle_4U@rcat

  21. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:05:12 2018

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

  23. connected to recovery catalog database

  24. RMAN> grant catalog for database 1343950367 to v101;

  25. Grant succeeded.

  26. RMAN> grant catalog for database 1347195613 to v101;

  27. Grant succeeded.

  28. RMAN> grant catalog for database 454057935 to v102;

  29. Grant succeeded.

  30. RMAN> exit


  31. Recovery Manager complete.
  32. [oracle@station90 ~]$ rman catalog v101/oracle_4U@rcat

  33. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:06:33 2018

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

  35. connected to recovery catalog database

  36. RMAN> create virtual  catalog;

  37. found ineligible base catalog owned by U3
  38. found ineligible base catalog owned by U4
  39. found ineligible base catalog owned by U6
  40. found ineligible base catalog owned by U8
  41. found ineligible base catalog owned by U11
  42. found ineligible base catalog owned by U13
  43. found ineligible base catalog owned by U90
  44. found eligible base catalog owned by U100
  45. created virtual catalog against base catalog owned by U100

  46. RMAN> exit


  47. Recovery Manager complete.
  48. [oracle@station90 ~]$ rman catalog v102/oracle_4U@rcat

  49. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:08:22 2018

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

  51. connected to recovery catalog database

  52. RMAN> create virtual  catalog;

  53. found ineligible base catalog owned by U3
  54. found ineligible base catalog owned by U4
  55. found ineligible base catalog owned by U6
  56. found ineligible base catalog owned by U8
  57. found ineligible base catalog owned by U11
  58. found ineligible base catalog owned by U13
  59. found ineligible base catalog owned by U90
  60. found eligible base catalog owned by U100
  61. created virtual catalog against base catalog owned by U100

  62. RMAN> exit


  63. Recovery Manager complete.
  64. [oracle@station90 ~]$ rman catalog ^C02/oracle_4U@rcat
  65. [oracle@station90 ~]$
  66. [oracle@station90 ~]$
  67. [oracle@station90 ~]$
  68. [oracle@station90 ~]$ . oraenv
  69. ORACLE_SID = [rcat] ? orcl
  70. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  71. [oracle@station90 ~]$ rman target /  catalog v101/oracle_4U@rcat

  72. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:09:36 2018

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

  74. connected to target database: ORCL (DBID=1343950367)
  75. connected to recovery catalog database

  76. RMAN> report schema;

  77. Report of database schema for database with db_unique_name ORCL

  78. List of Permanent Datafiles
  79. ===========================
  80. File Size(MB) Tablespace           RB segs Datafile Name
  81. ---- -------- -------------------- ------- ------------------------
  82. 1    700      SYSTEM               YES     +DATA/orcl/datafile/system.256.973682053
  83. 2    730      SYSAUX               NO      +DATA/orcl/datafile/sysaux.257.973682053
  84. 3    160      UNDOTBS1             YES     +DATA/orcl/datafile/undotbs1.263.973682055
  85. 4    7        USERS                NO      +DATA/orcl/datafile/users.261.973682055
  86. 5    100      EXAMPLE              NO      +DATA/orcl/datafile/example.262.973682055
  87. 6    5        TBSOCP05_TEST        NO      +DATA/orcl/datafile/tbsocp05_test.268.973703145

  88. List of Temporary Files
  89. =======================
  90. File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
  91. ---- -------- -------------------- ----------- --------------------
  92. 1    30       TEMP                 30          +DATA/orcl/tempfile/temp.270.973682389

  93. RMAN> exit


  94. Recovery Manager complete.
  95. [oracle@station90 ~]$ rman target sys/oracle_4U@winorcl  catalog v101/oracle_4U@rcat

  96. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:10:47 2018

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

  98. connected to target database: ORCL (DBID=1347195613)
  99. connected to recovery catalog database

  100. RMAN> list copy;

  101. specification does not match any control file copy in the repository
  102. List of Datafile Copies
  103. =======================

  104. Key     File S Completion Time Ckp SCN    Ckp Time      
  105. ------- ---- - --------------- ---------- ---------------
  106. 327     4    A 18-APR-18       1158425    18-APR-18      
  107.         Name: C:\DATA\USERS01.DBF

  108. List of Archived Log Copies for database with db_unique_name ORCL
  109. =====================================================================

  110. Key     Thrd Seq     S Low Time
  111. ------- ---- ------- - ---------
  112. 321     1    13      A 18-APR-18
  113.         Name: C:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2018_04_18\O1_MF_1_13_FFGJGVPL_.ARC


  114. RMAN> exit


  115. Recovery Manager complete.
  116. [oracle@station90 ~]$ rman target sys/oracle_4U@utforcl  catalog v101/oracle_4U@rcat

  117. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:11:20 2018

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

  119. connected to target database: UTFORCL (DBID=454057935)
  120. connected to recovery catalog database

  121. RMAN> report schema;

  122. RMAN-00571: ===========================================================
  123. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  124. RMAN-00571: ===========================================================
  125. RMAN-03002: failure of report command at 04/18/2018 21:11:30
  126. RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog

  127. RMAN> exit


  128. Recovery Manager complete.
  129. [oracle@station90 ~]$ rman target sys/oracle_4U@utforcl  catalog v102/oracle_4U@rcat

  130. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:11:38 2018

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

  132. connected to target database: UTFORCL (DBID=454057935)
  133. connected to recovery catalog database

  134. RMAN> report schema;

  135. Report of database schema for database with db_unique_name UTFORCL

  136. List of Permanent Datafiles
  137. ===========================
  138. File Size(MB) Tablespace           RB segs Datafile Name
  139. ---- -------- -------------------- ------- ------------------------
  140. 1    700      SYSTEM               YES     C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\SYSTEM01.DBF
  141. 2    540      SYSAUX               NO      C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\SYSAUX01.DBF
  142. 3    100      UNDOTBS1             YES     C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\UNDOTBS01.DBF
  143. 4    60       USERS                NO      C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\USERS01.DBF
  144. 5    100      EXAMPLE              NO      C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\EXAMPLE01.DBF
  145. 6    5        TBSUTF8_11G          NO      C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TBSUTF8_11G01.DBF
  146. 7    40       TBSCAT               NO      C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TBSCAT.DBF

  147. List of Temporary Files
  148. =======================
  149. File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
  150. ---- -------- -------------------- ----------- --------------------
  151. 1    29       TEMP                 32767       C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TEMP01.DBF

  152. RMAN> exit


  153. Recovery Manager complete.
  154. [oracle@station90 ~]$ . oraenv
  155. ORACLE_SID = [orcl] ? rcat
  156. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  157. [oracle@station90 ~]$ sqlplus /nolog

  158. SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 18 21:13:58 2018

  159. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  160. SQL> conn / as sysdba
  161. Connected.
  162. SQL>  create user u200 identified by oracle_4U default tablespace RCAT quota unlimited on RCAT ;

  163. User created.

  164. SQL> grant recovery_catalog_owner to u200;

  165. Grant succeeded.

  166. SQL> create user v201 identified by oracle_4U default tablespace RCAT quota unlimited on RCAT ;  
  167. User created.

  168. SQL> grant recovery_catalog_owner to v201;

  169. Grant succeeded.

  170. SQL> create user v202 identified by oracle_4U default tablespace RCAT quota unlimited on RCAT ;

  171. User created.

  172. SQL> grant recovery_catalog_owner to v202;

  173. Grant succeeded.

  174. SQL> exit
  175. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  176. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  177. [oracle@station90 ~]$ rman  caralog u200/oracle_4U@rcat

  178. Argument     Value          Description
  179. -----------------------------------------------------------------------------
  180. target       quoted-string  connect-string for target database
  181. catalog      quoted-string  connect-string for recovery catalog
  182. nocatalog    none           if specified, then no recovery catalog
  183. cmdfile      quoted-string  name of input command file
  184. log          quoted-string  name of output message log file
  185. trace        quoted-string  name of output debugging message log file
  186. append       none           if specified, log is opened in append mode
  187. debug        optional-args  activate debugging
  188. msgno        none           show RMAN-nnnn prefix for all messages
  189. send         quoted-string  send a command to the media manager
  190. pipe         string         building block for pipe names
  191. timeout      integer        number of seconds to wait for pipe input
  192. checksyntax  none           check the command file for syntax errors
  193. -----------------------------------------------------------------------------
  194. Both single and double quotes (' or ") are accepted for a quoted-string.
  195. Quotes are not required unless the string contains embedded white-space.

  196. RMAN-00571: ===========================================================
  197. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  198. RMAN-00571: ===========================================================
  199. RMAN-00552: syntax error in command line arguments
  200. RMAN-01009: syntax error: found "identifier": expecting one of: "append, auxiliary, catalog, checksyntax, cmdfile, log, msgno, nocatalog, pipe, script, send, target, timeout, using, @, ;"
  201. RMAN-01008: the bad identifier was: caralog
  202. RMAN-01007: at line 2 column 1 file: command line arguments
  203. [oracle@station90 ~]$ rman  catalog u200/oracle_4U@rcat

  204. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:15:53 2018

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

  206. connected to recovery catalog database

  207. RMAN> create catalog;

  208. recovery catalog created

  209. RMAN> grant register database to v201;

  210. Grant succeeded.

  211. RMAN> grant register database to v202;

  212. Grant succeeded.

  213. RMAN> exit


  214. Recovery Manager complete.
  215. [oracle@station90 ~]$ rman  catalog v201/oracle_4U@rcat

  216. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:16:57 2018

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

  218. connected to recovery catalog database

  219. RMAN> create virtual catalog;

  220. found ineligible base catalog owned by U3
  221. found ineligible base catalog owned by U4
  222. found ineligible base catalog owned by U6
  223. found ineligible base catalog owned by U8
  224. found ineligible base catalog owned by U11
  225. found ineligible base catalog owned by U13
  226. found ineligible base catalog owned by U90
  227. found ineligible base catalog owned by U100
  228. found eligible base catalog owned by U200
  229. created virtual catalog against base catalog owned by U200

  230. RMAN> exit


  231. Recovery Manager complete.
  232. [oracle@station90 ~]$ rman  catalog v202/oracle_4U@rcat

  233. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:17:10 2018

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

  235. connected to recovery catalog database

  236. RMAN> create virtual catalog;

  237. found ineligible base catalog owned by U3
  238. found ineligible base catalog owned by U4
  239. found ineligible base catalog owned by U6
  240. found ineligible base catalog owned by U8
  241. found ineligible base catalog owned by U11
  242. found ineligible base catalog owned by U13
  243. found ineligible base catalog owned by U90
  244. found ineligible base catalog owned by U100
  245. found eligible base catalog owned by U200
  246. created virtual catalog against base catalog owned by U200

  247. RMAN> exit


  248. Recovery Manager complete.
  249. [oracle@station90 ~]$ rman target  sys/oracle_4U@orcl  catalog v201/oracle_4U@rcat

  250. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:17:55 2018

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

  252. connected to target database: ORCL (DBID=1343950367)
  253. connected to recovery catalog database

  254. RMAN> register database;

  255. database registered in recovery catalog
  256. starting full resync of recovery catalog
  257. full resync complete

  258. RMAN> eixt

  259. RMAN-00571: ===========================================================
  260. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  261. RMAN-00571: ===========================================================
  262. RMAN-00558: error encountered while parsing input commands
  263. 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, {, "
  264. RMAN-01008: the bad identifier was: eixt
  265. RMAN-01007: at line 1 column 1 file: standard input

  266. RMAN> exit


  267. Recovery Manager complete.
  268. [oracle@station90 ~]$ rman target  sys/oracle_4U@winorcl  catalog v201/oracle_4U@rcat

  269. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:19:07 2018

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

  271. connected to target database: ORCL (DBID=1347195613)
  272. connected to recovery catalog database

  273. RMAN> register database;

  274. database registered in recovery catalog
  275. starting full resync of recovery catalog
  276. full resync complete

  277. RMAN> exit


  278. Recovery Manager complete.
  279. [oracle@station90 ~]$ rman target  sys/oracle_4U@utforcl  catalog v202/oracle_4U@rcat

  280. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:19:25 2018

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

  282. connected to target database: UTFORCL (DBID=454057935)
  283. connected to recovery catalog database

  284. RMAN> exit


  285. Recovery Manager complete.
  286. [oracle@station90 ~]$ . oraenv
  287. ORACLE_SID = [rcat] ?
  288. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  289. [oracle@station90 ~]$ sqlplus /nolog

  290. SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 18 21:19:47 2018

  291. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  292. SQL> conn u200/oracle_4U@rcat
  293. Connected.
  294. SQL> select  * from db;

  295.     DB_KEY        DB_ID CURR_DBINC_KEY
  296. ---------- ---------- --------------
  297.          2 1343950367                   4
  298.        181 1347195613                 182

  299. SQL> exit
  300. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  301. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  302. [oracle@station90 ~]$ rman target  sys/oracle_4U@utforcl  catalog v202/oracle_4U@rcat

  303. Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 18 21:20:21 2018

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

  305. connected to target database: UTFORCL (DBID=454057935)
  306. connected to recovery catalog database

  307. RMAN> register database;

  308. database registered in recovery catalog
  309. starting full resync of recovery catalog
  310. full resync complete

  311. RMAN> exitg

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

  319. RMAN> exit


  320. Recovery Manager complete.
  321. [oracle@station90 ~]$ sqlplus /nolog

  322. SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 18 21:20:36 2018

  323. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  324. SQL> conn u200/oracle_4U@rcat
  325. Connected.
  326. SQL> select  * from db;

  327.     DB_KEY        DB_ID CURR_DBINC_KEY
  328. ---------- ---------- --------------
  329.          2 1343950367                   4
  330.        181 1347195613                 182
  331.        236  454057935                 237

  332. SQL>

复制代码



回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-11-11 03:44 , Processed in 0.044070 second(s), 25 queries .

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