|
12c CLOUDCONTROL和12c OCP的配置
(昨天课堂真实录屏,剪掉了几句无关紧要的话。上午教室隔壁公司装修,录屏中可以想像当时全班遭受了什么样的噪音折磨。幸好下午就不再装修了。)
上完1Z0-052第15章(图形界面配置备份)
上完1Z0-052第16章(简单恢复)
(052共19章,053共21章,063多租户共9章,49-17)- [root@station90 桌面]# su - oracle
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 27 16:12:25 2016
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> alter database backup controlfile to trace ;
- Database altered.
- SQL> !ps
- PID TTY TIME CMD
- 15878 pts/28 00:00:00 sqlplus
- 17469 pts/28 00:00:00 ps
- SQL> select spid from v$session s , v$process p
- 2 where s.paddr=p.addr
- 3 and s.terminal='pts/28';
- SPID
- ------------------------
- 15917
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, Automatic Storage Management, OLAP, Data Mining
- and Real Application Testing options
- [oracle@station90 ~]$ rman target /
- Recovery Manager: Release 11.2.0.1.0 - Production on Tue Dec 27 17:56:04 2016
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1343950367)
- RMAN> list failure;
- using target database control file instead of recovery catalog
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 2808 HIGH OPEN 27-DEC-16 Tablespace 4: 'USERS' is offline
- 788 HIGH OPEN 27-DEC-16 One or more non-system datafiles are missing
- RMAN> advise failure all;
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 2808 HIGH OPEN 27-DEC-16 Tablespace 4: 'USERS' is offline
- 788 HIGH OPEN 27-DEC-16 One or more non-system datafiles are missing
- analyzing automatic repair options; this may take some time
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=145 device type=DISK
- allocated channel: ORA_DISK_2
- channel ORA_DISK_2: SID=81 device type=DISK
- allocated channel: ORA_DISK_3
- channel ORA_DISK_3: SID=79 device type=DISK
- allocated channel: ORA_DISK_4
- channel ORA_DISK_4: SID=138 device type=DISK
- allocated channel: ORA_DISK_5
- channel ORA_DISK_5: SID=206 device type=DISK
- allocated channel: ORA_DISK_6
- channel ORA_DISK_6: SID=21 device type=DISK
- allocated channel: ORA_DISK_7
- channel ORA_DISK_7: SID=82 device type=DISK
- allocated channel: ORA_DISK_8
- channel ORA_DISK_8: SID=143 device type=DISK
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=205 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=80 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- analyzing automatic repair options complete
- Not all specified failures can currently be repaired.
- The following failures must be repaired before advise for others can be given.
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 788 HIGH OPEN 27-DEC-16 One or more non-system datafiles are missing
- Mandatory Manual Actions
- ========================
- 1. If file +DATA/orcl/datafile/users.259.930909037 was unintentionally renamed or moved, restore it
- 2. If you have an export of tablespace USERS, then drop and re-create the tablespace and import the data.
- 3. Contact Oracle Support Services if the preceding recommendations cannot be used, or if they do not fix the failures selected for repair
- Optional Manual Actions
- =======================
- no manual actions available
- Automated Repair Options
- ========================
- no automatic repair options available
- RMAN> repaire failure preview;
- 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: repaire
- RMAN-01007: at line 1 column 1 file: standard input
- RMAN> repair failure preview;
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of repair command at 12/27/2016 17:58:32
- RMAN-06953: no automatic repairs were listed by ADVISE FAILURE
- RMAN> list backup of datafile '+DATA/orcl/datafile/users.259.930909037';
- List of Backup Sets
- ===================
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 63 Full 675.75M SBT_TAPE 00:00:46 25-DEC-16
- BP Key: 69 Status: AVAILABLE Compressed: NO Tag: TAG20161225T152607
- Handle: 34roc54f_1_1 Media: station90-000011
- List of Datafiles in backup set 63
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- --------- ----
- 4 Full 1639605 25-DEC-16 +DATA/orcl/datafile/users.259.930909037
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 65 Incr 1 18.48M DISK 00:00:02 26-DEC-16
- BP Key: 72 Status: AVAILABLE Compressed: NO Tag: ORA_OEM_LEVEL_0
- Piece Name: +FRA/orcl/backupset/2016_12_26/nnndn1_ora_oem_level_0_0.392.931620325
- List of Datafiles in backup set 65
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- --------- ----
- 4 1 Incr 1643178 26-DEC-16 +DATA/orcl/datafile/users.259.930909037
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 70 Incr 1 20.14M DISK 00:00:01 27-DEC-16
- BP Key: 77 Status: AVAILABLE Compressed: NO Tag: ORA_OEM_LEVEL_0
- Piece Name: +FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.382.931706737
- List of Datafiles in backup set 70
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- --------- ----
- 4 1 Incr 1647548 27-DEC-16 +DATA/orcl/datafile/users.259.930909037
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 75 Incr 1 94.16M DISK 00:00:02 27-DEC-16
- BP Key: 82 Status: AVAILABLE Compressed: NO Tag: ORA_OEM_LEVEL_0
- Piece Name: +FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.376.931707425
- List of Datafiles in backup set 75
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- --------- ----
- 4 1 Incr 1649995 27-DEC-16 +DATA/orcl/datafile/users.259.930909037
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 80 Incr 1 6.10M DISK 00:00:01 27-DEC-16
- BP Key: 87 Status: AVAILABLE Compressed: NO Tag: ORA_OEM_LEVEL_0
- Piece Name: +FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.373.931708447
- List of Datafiles in backup set 80
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- --------- ----
- 4 1 Incr 1652048 27-DEC-16 +DATA/orcl/datafile/users.259.930909037
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 85 Incr 1 13.18M DISK 00:00:01 27-DEC-16
- BP Key: 92 Status: AVAILABLE Compressed: NO Tag: ORA_OEM_LEVEL_0
- Piece Name: +FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.369.931708565
- List of Datafiles in backup set 85
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- --------- ----
- 4 1 Incr 1654105 27-DEC-16 +DATA/orcl/datafile/users.259.930909037
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 89 Incr 1 904.00K DISK 00:00:00 27-DEC-16
- BP Key: 96 Status: AVAILABLE Compressed: NO Tag: ORA_OEM_LEVEL_0
- Piece Name: +FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.366.931708685
- List of Datafiles in backup set 89
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- --------- ----
- 4 1 Incr 1654400 27-DEC-16 +DATA/orcl/datafile/users.259.930909037
- RMAN> list copy of datafile '+DATA/orcl/datafile/users.259.930909037';
- List of Datafile Copies
- =======================
- Key File S Completion Time Ckp SCN Ckp Time
- ------- ---- - --------------- ---------- ---------------
- 32 4 A 27-DEC-16 1654105 27-DEC-16
- Name: +FRA/orcl/datafile/users.390.931533947
- Tag: ORA_OEM_LEVEL_0
- RMAN> restore datafile '+DATA/orcl/datafile/users.259.930909037';
- Starting restore at 27-DEC-16
- using channel ORA_DISK_1
- using channel ORA_DISK_2
- using channel ORA_DISK_3
- using channel ORA_DISK_4
- using channel ORA_DISK_5
- using channel ORA_DISK_6
- using channel ORA_DISK_7
- using channel ORA_DISK_8
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_DISK_1: restoring datafile 00004
- input datafile copy RECID=32 STAMP=931708682 file name=+FRA/orcl/datafile/users.390.931533947
- destination for restore of datafile 00004: +DATA/orcl/datafile/users.259.930909037
- ORA-19505: failed to identify file "+FRA/orcl/datafile/users.390.931533947"
- ORA-17503: ksfdopn:2 Failed to open file +FRA/orcl/datafile/users.390.931533947
- ORA-15012: ASM file '+FRA/orcl/datafile/users.390.931533947' does not exist
- ORA-19600: input file is datafile-copy 32 (+FRA/orcl/datafile/users.390.931533947)
- ORA-19601: output file is datafile 4 (+DATA)
- failover to previous backup
- channel ORA_SBT_TAPE_1: starting datafile backup set restore
- channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
- channel ORA_SBT_TAPE_1: restoring datafile 00004 to +DATA/orcl/datafile/users.259.930909037
- channel ORA_SBT_TAPE_1: reading from backup piece 34roc54f_1_1
- channel ORA_SBT_TAPE_1: piece handle=34roc54f_1_1 tag=TAG20161225T152607
- channel ORA_SBT_TAPE_1: restored backup piece 1
- channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:55
- Finished restore at 27-DEC-16
- RMAN> list failure;
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 2808 HIGH OPEN 27-DEC-16 Tablespace 4: 'USERS' is offline
- RMAN> advise failure all;
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 2808 HIGH OPEN 27-DEC-16 Tablespace 4: 'USERS' is offline
- analyzing automatic repair options; this may take some time
- using channel ORA_DISK_1
- using channel ORA_DISK_2
- using channel ORA_DISK_3
- using channel ORA_DISK_4
- using channel ORA_DISK_5
- using channel ORA_DISK_6
- using channel ORA_DISK_7
- using channel ORA_DISK_8
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- analyzing automatic repair options complete
- Mandatory Manual Actions
- ========================
- 1. Please contact Oracle Support Services to resolve failure 2808: Tablespace 4: 'USERS' is offline
- Optional Manual Actions
- =======================
- no manual actions available
- Automated Repair Options
- ========================
- no automatic repair options available
- RMAN> repair failure preview;
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of repair command at 12/27/2016 18:01:31
- RMAN-06953: no automatic repairs were listed by ADVISE FAILURE
- RMAN> sql "alter tablespace users online";
- sql statement: alter tablespace users online
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03009: failure of sql command on default channel at 12/27/2016 18:01:48
- RMAN-11003: failure during parse/execution of SQL statement: alter tablespace users online
- ORA-01113: file 4 needs media recovery
- ORA-01110: data file 4: '+DATA/orcl/datafile/users.259.931716043'
- RMAN> list failure;
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 8 HIGH OPEN 27-DEC-16 One or more non-system datafiles need media recovery
- 2808 HIGH OPEN 27-DEC-16 Tablespace 4: 'USERS' is offline
- RMAN> advise failure all;
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 8 HIGH OPEN 27-DEC-16 One or more non-system datafiles need media recovery
- 2808 HIGH OPEN 27-DEC-16 Tablespace 4: 'USERS' is offline
- analyzing automatic repair options; this may take some time
- using channel ORA_DISK_1
- using channel ORA_DISK_2
- using channel ORA_DISK_3
- using channel ORA_DISK_4
- using channel ORA_DISK_5
- using channel ORA_DISK_6
- using channel ORA_DISK_7
- using channel ORA_DISK_8
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- analyzing automatic repair options complete
- Not all specified failures can currently be repaired.
- The following failures must be repaired before advise for others can be given.
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 8 HIGH OPEN 27-DEC-16 One or more non-system datafiles need media recovery
- Mandatory Manual Actions
- ========================
- no manual actions available
- Optional Manual Actions
- =======================
- 1. If you restored the wrong version of data file +DATA/orcl/datafile/users.259.931716043, then replace it with the correct one
- Automated Repair Options
- ========================
- Option Repair Description
- ------ ------------------
- 1 Recover datafile 4
- Strategy: The repair includes complete media recovery with no data loss
- Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_2101988646.hm
- RMAN> repair failure preview;
- Strategy: The repair includes complete media recovery with no data loss
- Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_2101988646.hm
- contents of repair script:
- # recover datafile
- sql 'alter database datafile 4 offline';
- recover datafile 4;
- sql 'alter database datafile 4 online';
- RMAN> repair failure;
- Strategy: The repair includes complete media recovery with no data loss
- Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_2101988646.hm
- contents of repair script:
- # recover datafile
- sql 'alter database datafile 4 offline';
- recover datafile 4;
- sql 'alter database datafile 4 online';
- Do you really want to execute the above repair (enter YES or NO)? YES
- executing repair script
- sql statement: alter database datafile 4 offline
- Starting recover at 27-DEC-16
- using channel ORA_DISK_1
- using channel ORA_DISK_2
- using channel ORA_DISK_3
- using channel ORA_DISK_4
- using channel ORA_DISK_5
- using channel ORA_DISK_6
- using channel ORA_DISK_7
- using channel ORA_DISK_8
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_DISK_1: starting incremental datafile backup set restore
- channel ORA_DISK_1: specifying datafile(s) to restore from backup set
- destination for restore of datafile 00004: +DATA/orcl/datafile/users.259.931716043
- channel ORA_DISK_1: reading from backup piece +FRA/orcl/backupset/2016_12_26/nnndn1_ora_oem_level_0_0.392.931620325
- channel ORA_DISK_1: piece handle=+FRA/orcl/backupset/2016_12_26/nnndn1_ora_oem_level_0_0.392.931620325 tag=ORA_OEM_LEVEL_0
- channel ORA_DISK_1: restored backup piece 1
- channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
- channel ORA_DISK_1: starting incremental datafile backup set restore
- channel ORA_DISK_1: specifying datafile(s) to restore from backup set
- destination for restore of datafile 00004: +DATA/orcl/datafile/users.259.931716043
- channel ORA_DISK_1: reading from backup piece +FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.382.931706737
- channel ORA_DISK_1: piece handle=+FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.382.931706737 tag=ORA_OEM_LEVEL_0
- channel ORA_DISK_1: restored backup piece 1
- channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
- channel ORA_DISK_1: starting incremental datafile backup set restore
- channel ORA_DISK_1: specifying datafile(s) to restore from backup set
- destination for restore of datafile 00004: +DATA/orcl/datafile/users.259.931716043
- channel ORA_DISK_1: reading from backup piece +FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.376.931707425
- channel ORA_DISK_1: piece handle=+FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.376.931707425 tag=ORA_OEM_LEVEL_0
- channel ORA_DISK_1: restored backup piece 1
- channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
- channel ORA_DISK_1: starting incremental datafile backup set restore
- channel ORA_DISK_1: specifying datafile(s) to restore from backup set
- destination for restore of datafile 00004: +DATA/orcl/datafile/users.259.931716043
- channel ORA_DISK_1: reading from backup piece +FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.373.931708447
- channel ORA_DISK_1: piece handle=+FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.373.931708447 tag=ORA_OEM_LEVEL_0
- channel ORA_DISK_1: restored backup piece 1
- channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
- channel ORA_DISK_1: starting incremental datafile backup set restore
- channel ORA_DISK_1: specifying datafile(s) to restore from backup set
- destination for restore of datafile 00004: +DATA/orcl/datafile/users.259.931716043
- channel ORA_DISK_1: reading from backup piece +FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.369.931708565
- channel ORA_DISK_1: piece handle=+FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.369.931708565 tag=ORA_OEM_LEVEL_0
- channel ORA_DISK_1: restored backup piece 1
- channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
- channel ORA_DISK_1: starting incremental datafile backup set restore
- channel ORA_DISK_1: specifying datafile(s) to restore from backup set
- destination for restore of datafile 00004: +DATA/orcl/datafile/users.259.931716043
- channel ORA_DISK_1: reading from backup piece +FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.366.931708685
- channel ORA_DISK_1: piece handle=+FRA/orcl/backupset/2016_12_27/nnndn1_ora_oem_level_0_0.366.931708685 tag=ORA_OEM_LEVEL_0
- channel ORA_DISK_1: restored backup piece 1
- channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
- starting media recovery
- archived log for thread 1 with sequence 73 is already on disk as file +FRA/orcl/archivelog/2016_12_27/thread_1_seq_73.364.931708705
- archived log for thread 1 with sequence 74 is already on disk as file +FRA/orcl/archivelog/2016_12_27/thread_1_seq_74.363.931708817
- archived log for thread 1 with sequence 75 is already on disk as file +FRA/orcl/archivelog/2016_12_27/thread_1_seq_75.362.931715235
- archived log for thread 1 with sequence 76 is already on disk as file +FRA/orcl/archivelog/2016_12_27/thread_1_seq_76.361.931715235
- archived log for thread 1 with sequence 77 is already on disk as file +FRA/orcl/archivelog/2016_12_27/thread_1_seq_77.360.931715239
- archived log for thread 1 with sequence 78 is already on disk as file +FRA/orcl/archivelog/2016_12_27/thread_1_seq_78.359.931715239
- archived log for thread 1 with sequence 79 is already on disk as file +FRA/orcl/archivelog/2016_12_27/thread_1_seq_79.358.931715241
- archived log for thread 1 with sequence 80 is already on disk as file +FRA/orcl/archivelog/2016_12_27/thread_1_seq_80.357.931715243
- archived log file name=+FRA/orcl/archivelog/2016_12_27/thread_1_seq_73.364.931708705 thread=1 sequence=73
- archived log file name=+FRA/orcl/archivelog/2016_12_27/thread_1_seq_74.363.931708817 thread=1 sequence=74
- archived log file name=+FRA/orcl/archivelog/2016_12_27/thread_1_seq_75.362.931715235 thread=1 sequence=75
- archived log file name=+FRA/orcl/archivelog/2016_12_27/thread_1_seq_76.361.931715235 thread=1 sequence=76
- archived log file name=+FRA/orcl/archivelog/2016_12_27/thread_1_seq_77.360.931715239 thread=1 sequence=77
- archived log file name=+FRA/orcl/archivelog/2016_12_27/thread_1_seq_78.359.931715239 thread=1 sequence=78
- media recovery complete, elapsed time: 00:00:01
- Finished recover at 27-DEC-16
- sql statement: alter database datafile 4 online
- repair failure complete
- RMAN> list failure;
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 2808 HIGH OPEN 27-DEC-16 Tablespace 4: 'USERS' is offline
- RMAN> sql "alter tablespace users online";
- sql statement: alter tablespace users online
- RMAN> list failure;
- no failures found that match specification
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$
复制代码
DRA:
|
|