Bo's Oracle Station

查看: 2402|回复: 0

课程第18次(2016-05-06星期星期五):备份恢复概念,网格

[复制链接]

75

主题

115

帖子

2772

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2772
发表于 2016-5-7 09:35:26 | 显示全部楼层 |阅读模式
课程第18次(2016-05-06星期星期五):备份恢复概念,053介绍
【上完1Z0-052的第14章】:备份恢复概念
【上完1Z0-053的第0章】:介绍
【1Z0-051】:共10章
【1Z0-052】:共8章
【1Z0-053】:共1章
[root@station90 桌面]# su - oracle
[oracle@station90 ~]$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
https://station90.example.com:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ..... started.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/station90.example.com_orcl/sysman/log
[oracle@station90 ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Fri May 6 20:13:13 2016

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

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 6680915968 bytes
Fixed Size            2213936 bytes
Variable Size         3758098384 bytes
Database Buffers     2885681152 bytes
Redo Buffers           34922496 bytes
Database mounted.
Database opened.
SQL> show parameter db_create

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest             string     +DATA
db_create_online_log_dest_1         string
db_create_online_log_dest_2         string
db_create_online_log_dest_3         string
db_create_online_log_dest_4         string
db_create_online_log_dest_5         string
SQL> show parameter db_recovery

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest             string     +FRA
db_recovery_file_dest_size         big integer 3882M
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 ~]$ cd /u01/app/oracle/
[oracle@station90 oracle]$ ls
admin        checkpoints  flash_recovery_area  man_recovery_area.11g  oradiag_oracle
cfgtoollogs  diag         man_recovery_area    oradata                product
[oracle@station90 oracle]$ cd diag/
[oracle@station90 diag]$ ls
asm  rdbms  tnslsnr
[oracle@station90 diag]$ cd rdbms/
[oracle@station90 rdbms]$ ls
orcl  rcat
[oracle@station90 rdbms]$ cd orcl/
[oracle@station90 orcl]$ ls
i_1.mif  orcl
[oracle@station90 orcl]$ cd orcl/
[oracle@station90 orcl]$ ls
alert  cdump  hm  incident  incpkg  ir  lck  metadata  stage  sweep  trace
[oracle@station90 orcl]$ cd trace/
[oracle@station90 trace]$ tail -n 20 -f alert_orcl.log  
Thread 1 cannot allocate new log, sequence 169
Private strand flush not complete
  Current log# 3 seq# 168 mem# 0: +DATA/orcl/onlinelog/group_3.263.816169641
  Current log# 3 seq# 168 mem# 1: +FRA/orcl/onlinelog/group_3.259.816169641
Beginning log switch checkpoint up to RBA [0xa9.2.10], SCN: 2336518
Thread 1 advanced to log sequence 169 (LGWR switch)
  Current log# 1 seq# 169 mem# 0: +DATA/orcl/onlinelog/group_1.261.816169635
  Current log# 1 seq# 169 mem# 1: +FRA/orcl/onlinelog/group_1.257.816169637
Archived Log entry 160 added for thread 1 sequence 168 ID 0x501b221c dest 1:
Fri May 06 20:18:31 2016
Starting background process SMCO
Fri May 06 20:18:31 2016
SMCO started with pid=29, OS id=8963
Fri May 06 20:20:29 2016
Completed checkpoint up to RBA [0xa8.2.10], SCN: 2336163
Fri May 06 20:23:00 2016
alter database add logfile group 4 size 52428800
Completed: alter database add logfile group 4 size 52428800
Fri May 06 20:23:29 2016
Completed checkpoint up to RBA [0xa9.2.10], SCN: 2336518




Fri May 06 20:27:47 2016
alter database add logfile member '+DATA'  to group 1
Completed: alter database add logfile member '+DATA'  to group 1
Fri May 06 20:28:23 2016
Thread 1 cannot allocate new log, sequence 170
Private strand flush not complete
  Current log# 1 seq# 169 mem# 0: +DATA/orcl/onlinelog/group_1.261.816169635
  Current log# 1 seq# 169 mem# 1: +FRA/orcl/onlinelog/group_1.257.816169637
Beginning log switch checkpoint up to RBA [0xaa.2.10], SCN: 2337410
Thread 1 advanced to log sequence 170 (LGWR switch)
  Current log# 4 seq# 170 mem# 0: +DATA/orcl/onlinelog/group_4.258.911161381
  Current log# 4 seq# 170 mem# 1: +FRA/orcl/onlinelog/group_4.348.911161381
Fri May 06 20:28:23 2016
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_arc1_6570.trc:
ORA-00313: open failed for members of log group 1 of thread 1
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_arc1_6570.trc:
ORA-00313: open failed for members of log group 1 of thread 1
Fri May 06 20:28:23 2016
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_m000_10231.trc:
Archived Log entry 161 added for thread 1 sequence 169 ID 0x501b221c dest 1:
Fri May 06 20:30:22 2016
alter database drop logfile member '+FRA/orcl/onlinelog/group_4.348.911161381'
ORA-1609 signalled during: alter database drop logfile member '+FRA/orcl/onlinelog/group_4.348.911161381'
...
Fri May 06 20:30:22 2016
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_m000_10516.trc:
Fri May 06 20:31:09 2016
alter database drop logfile member  '+FRA/orcl/onlinelog/group_3.259.816169641'
Deleted Oracle managed file +FRA/orcl/onlinelog/group_3.259.816169641
Completed: alter database drop logfile member  '+FRA/orcl/onlinelog/group_3.259.816169641'
Fri May 06 20:32:09 2016
ALTER SYSTEM ARCHIVE LOG
Fri May 06 20:32:09 2016
Thread 1 cannot allocate new log, sequence 171
Private strand flush not complete
  Current log# 4 seq# 170 mem# 0: +DATA/orcl/onlinelog/group_4.258.911161381
  Current log# 4 seq# 170 mem# 1: +FRA/orcl/onlinelog/group_4.348.911161381
Beginning log switch checkpoint up to RBA [0xab.2.10], SCN: 2337604
Thread 1 advanced to log sequence 171 (LGWR switch)
  Current log# 2 seq# 171 mem# 0: +DATA/orcl/onlinelog/group_2.262.816169639
  Current log# 2 seq# 171 mem# 1: +FRA/orcl/onlinelog/group_2.258.816169639
Archived Log entry 162 added for thread 1 sequence 170 ID 0x501b221c dest 1:
Fri May 06 20:32:20 2016
ALTER SYSTEM ARCHIVE LOG
Fri May 06 20:32:20 2016
Thread 1 cannot allocate new log, sequence 172
Private strand flush not complete
  Current log# 2 seq# 171 mem# 0: +DATA/orcl/onlinelog/group_2.262.816169639
  Current log# 2 seq# 171 mem# 1: +FRA/orcl/onlinelog/group_2.258.816169639
Beginning log switch checkpoint up to RBA [0xac.2.10], SCN: 2337611
Thread 1 advanced to log sequence 172 (LGWR switch)
  Current log# 3 seq# 172 mem# 0: +DATA/orcl/onlinelog/group_3.263.816169641
Archived Log entry 163 added for thread 1 sequence 171 ID 0x501b221c dest 1:
Fri May 06 20:32:39 2016
ALTER SYSTEM ARCHIVE LOG
Fri May 06 20:32:39 2016
Thread 1 cannot allocate new log, sequence 173
Checkpoint not complete
  Current log# 3 seq# 172 mem# 0: +DATA/orcl/onlinelog/group_3.263.816169641
Fri May 06 20:32:41 2016
Completed checkpoint up to RBA [0xaa.2.10], SCN: 2337410
Thread 1 cannot allocate new log, sequence 173
Private strand flush not complete
  Current log# 3 seq# 172 mem# 0: +DATA/orcl/onlinelog/group_3.263.816169641
Beginning log switch checkpoint up to RBA [0xad.2.10], SCN: 2337629
Thread 1 advanced to log sequence 173 (LGWR switch)
  Current log# 1 seq# 173 mem# 0: +DATA/orcl/onlinelog/group_1.261.816169635
  Current log# 1 seq# 173 mem# 1: +FRA/orcl/onlinelog/group_1.257.816169637
  Current log# 1 seq# 173 mem# 2: +DATA/orcl/onlinelog/group_1.268.911161667
Archived Log entry 164 added for thread 1 sequence 172 ID 0x501b221c dest 1:
Fri May 06 20:36:53 2016
Completed checkpoint up to RBA [0xad.2.10], SCN: 2337629
Completed checkpoint up to RBA [0xac.2.10], SCN: 2337611
Completed checkpoint up to RBA [0xab.2.10], SCN: 2337604
Fri May 06 20:43:41 2016
Incremental checkpoint up to RBA [0xad.76a.0], current log tail at RBA [0xad.116b.0]
Fri May 06 20:44:44 2016
ALTER SYSTEM SET db_recovery_file_dest_size='6G' SCOPE=BOTH;
Fri May 06 20:55:50 2016
ALTER SYSTEM SET control_files='+DATA/orcl/controlfile/current.260.816169631','+FRA/orcl/controlfile/current.256.816169633','/home/oracle/control03.ctl' SCOPE=SPFILE;
Shutting down instance (immediate)
Stopping background process SMCO
Shutting down instance: further logons disabled
Fri May 06 20:55:56 2016
Stopping background process CJQ0
Stopping background process QMNC
Stopping background process MMNL
Stopping background process MMON
License high water mark = 17
Stopping Job queue slave processes, flags = 7
Job queue slave processes stopped
All dispatchers and shared servers shutdown
Fri May 06 20:56:01 2016
ALTER DATABASE CLOSE NORMAL
Fri May 06 20:56:01 2016
SMON: disabling tx recovery
SMON: disabling cache recovery
Fri May 06 20:56:01 2016
Block change tracking service stopping.
Stopping background process CTWR
Fri May 06 20:56:02 2016
Shutting down archive processes
Archiving is disabled
Fri May 06 20:56:02 2016
Fri May 06 20:56:02 2016
ARCH shutting downARCH shutting downFri May 06 20:56:02 2016


ARCH shutting down
ARC2: Archival stoppedARC1: Archival stoppedARC0: Archival stopped


Fri May 06 20:56:02 2016
ARCH shutting down
ARC3: Archival stopped
Thread 1 closed at log sequence 173
Successful close of redo thread 1
Completed: ALTER DATABASE CLOSE NORMAL
ALTER DATABASE DISMOUNT
Completed: ALTER DATABASE DISMOUNT
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
Fri May 06 20:56:05 2016
Stopping background process VKTM:
Fri May 06 20:56:05 2016
NOTE: Shutting down MARK background process
Fri May 06 20:56:07 2016
Instance shutdown complete
Fri May 06 20:58:11 2016
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 3
Using LOG_ARCHIVE_DEST_1 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on.
IMODE=BR
ILAT =27
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
Using parameter settings in server-side pfile /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl.ora
System parameters with non-default values:
  processes                = 150
  spfile                   = "+DATA/orcl/spfileorcl.ora"
  memory_target            = 6400M
  control_files            = "+DATA/orcl/controlfile/current.260.816169631"
  control_files            = "+FRA/orcl/controlfile/current.256.816169633"
  control_files            = "/home/oracle/control03.ctl"
  db_block_size            = 8192
  compatible               = "11.2.0.0.0"
  db_create_file_dest      = "+DATA"
  db_recovery_file_dest    = "+FRA"
  db_recovery_file_dest_size= 6G
  fast_start_mttr_target   = 3600
  log_checkpoints_to_alert = TRUE
  undo_tablespace          = "UNDOTBS1"
  remote_login_passwordfile= "EXCLUSIVE"
  db_domain                = "example.com"
  dispatchers              = "(PROTOCOL=TCP) (dispatchers=3) (listener= test)"
  shared_servers           = 3
  local_listener           = "FORL2"
  job_queue_processes      = 1000
  audit_file_dest          = "/u01/app/oracle/admin/orcl/adump"
  audit_trail              = "DB"
  db_name                  = "orcl"
  open_cursors             = 300
  diagnostic_dest          = "/u01/app/oracle"
Fri May 06 20:58:12 2016
PMON started with pid=2, OS id=14497
Fri May 06 20:58:12 2016
VKTM started with pid=3, OS id=14499 at elevated priority
VKTM running at (10)millisec precision with DBRM quantum (100)ms
Fri May 06 20:58:12 2016
GEN0 started with pid=4, OS id=14503
Fri May 06 20:58:12 2016
DIAG started with pid=5, OS id=14505
Fri May 06 20:58:12 2016
DBRM started with pid=6, OS id=14507
Fri May 06 20:58:12 2016
PSP0 started with pid=7, OS id=14509
Fri May 06 20:58:12 2016
DIA0 started with pid=8, OS id=14511
Fri May 06 20:58:12 2016
MMAN started with pid=9, OS id=14513
Fri May 06 20:58:12 2016
DBW0 started with pid=10, OS id=14515
Fri May 06 20:58:12 2016
LGWR started with pid=11, OS id=14517
Fri May 06 20:58:12 2016
CKPT started with pid=12, OS id=14519
Fri May 06 20:58:12 2016
SMON started with pid=13, OS id=14521
Fri May 06 20:58:12 2016
RECO started with pid=14, OS id=14523
Fri May 06 20:58:12 2016
RBAL started with pid=15, OS id=14525
Fri May 06 20:58:12 2016
ASMB started with pid=16, OS id=14527
Fri May 06 20:58:12 2016
MMON started with pid=17, OS id=14529
starting up 3 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
Fri May 06 20:58:12 2016
MMNL started with pid=18, OS id=14533
NOTE: initiating MARK startup
Starting background process MARK
Fri May 06 20:58:12 2016
MARK started with pid=20, OS id=14537
NOTE: MARK has subscribed
starting up 3 shared server(s) ...
ORACLE_BASE from environment = /u01/app/oracle
Fri May 06 20:58:12 2016
ALTER DATABASE   MOUNT
NOTE: Loaded library: System
SUCCESS: diskgroup DATA was mounted
SUCCESS: diskgroup FRA was mounted
NOTE: dependency between database orcl and diskgroup resource ora.DATA.dg is established
NOTE: dependency between database orcl and diskgroup resource ora.FRA.dg is established
Successful mount of redo thread 1, with mount id 1438933220
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE   MOUNT
Fri May 06 20:58:20 2016
ALTER DATABASE OPEN
Block change tracking file is current.
LGWR: STARTING ARCH PROCESSES
Fri May 06 20:58:20 2016
ARC0 started with pid=28, OS id=14620
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Fri May 06 20:58:21 2016
ARC1 started with pid=29, OS id=14654
Fri May 06 20:58:21 2016
ARC2 started with pid=30, OS id=14656
ARC1: Archival started
Fri May 06 20:58:21 2016
ARC3 started with pid=31, OS id=14658
ARC2: Archival started
ARC2: Becoming the 'no FAL' ARCH
ARC2: Becoming the 'no SRL' ARCH
ARC1: Becoming the heartbeat ARCH
Thread 1 opened at log sequence 173
  Current log# 1 seq# 173 mem# 0: +DATA/orcl/onlinelog/group_1.261.816169635
  Current log# 1 seq# 173 mem# 1: +FRA/orcl/onlinelog/group_1.257.816169637
  Current log# 1 seq# 173 mem# 2: +DATA/orcl/onlinelog/group_1.268.911161667
Successful open of redo thread 1
Starting background process CTWR
Fri May 06 20:58:21 2016
CTWR started with pid=33, OS id=14664
Block change tracking service is active.
SMON: enabling cache recovery
Successfully onlined Undo Tablespace 5.
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is AL32UTF8
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Fri May 06 20:58:22 2016
QMNC started with pid=34, OS id=14668
Completed: ALTER DATABASE OPEN
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Fri May 06 20:58:23 2016
db_recovery_file_dest_size of 6144 MB is 12.99% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Fri May 06 20:58:24 2016
Incremental checkpoint up to RBA [0xad.1878.0], current log tail at RBA [0xad.18c8.0]
Fri May 06 20:58:25 2016
Starting background process CJQ0
Fri May 06 20:58:25 2016
CJQ0 started with pid=36, OS id=14688
Fri May 06 21:00:31 2016
Beginning log switch checkpoint up to RBA [0xae.2.10], SCN: 2342020
Thread 1 advanced to log sequence 174 (LGWR switch)
  Current log# 4 seq# 174 mem# 0: +DATA/orcl/onlinelog/group_4.258.911161381
  Current log# 4 seq# 174 mem# 1: +FRA/orcl/onlinelog/group_4.348.911161381
Fri May 06 21:00:31 2016
Archived Log entry 165 added for thread 1 sequence 173 ID 0x501b221c dest 1:
Fri May 06 21:03:22 2016
Starting background process SMCO
Fri May 06 21:03:22 2016
SMCO started with pid=22, OS id=15321
Fri May 06 21:05:38 2016
Completed checkpoint up to RBA [0xae.2.10], SCN: 2342020
Fri May 06 21:09:05 2016
alter tablespace system begin backup
Completed: alter tablespace system begin backup
Fri May 06 21:11:14 2016
alter tablespace system end backup
Completed: alter tablespace system end backup


Fri May 06 21:28:37 2016
Incremental checkpoint up to RBA [0xae.31d6.0], current log tail at RBA [0xae.3874.0]
Fri May 06 21:42:27 2016
ALTER SYSTEM SET log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST MANDATORY REOPEN=300' SCOPE=BOTH;
ALTER SYSTEM SET log_archive_dest_2='LOCATION=/home/oracle/archivelog OPTIONAL REOPEN=300' SCOPE=BOTH;
^C
[oracle@station90 trace]$ cd /home/oracle
[oracle@station90 ~]$ ls
archivelog            create_t04209_uname.sql  ptable.sql         select_t04209_uname.sql  update2_t04209_uname.sql  视频  音乐
bclcustom-subprogram  mail                     rac_tns            temp02.dbf               update_t04209_uname.sql   图片  桌面
control03.ctl         oradiag_oracle           rcat.sql           tnsnames.ora             公共的                    文档
copytape-root.sh      pfile                    revertape-root.sh  ttio.rcv                 模板                      下载
[oracle@station90 ~]$ cd archivelog
[oracle@station90 archivelog]$ ls
[oracle@station90 archivelog]$ ls
1_174_816169635.dbf
[oracle@station90 archivelog]$







select  * from v$log;

select  * from v$archived_log  order by 7 desc, 6 desc ;

alter system archive log current;

select  * from v$logfile;

alter database add logfile group 4 size 52428800;

alter database add logfile member '+DATA'  to group 1 ;

alter system switch logfile;
--ERROR
alter database drop logfile member '+FRA/orcl/onlinelog/group_4.348.911161381';

alter database drop logfile member  '+FRA/orcl/onlinelog/group_3.259.816169641';

回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-11-22 04:46 , Processed in 0.039223 second(s), 28 queries .

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