喜欢就来多看看

创建ora11g dataguard

上一篇 / 下一篇  2007-11-02 00:00:00 / 个人分类:11g&Grid

SQL> shutdown immedaite
SP2-0717: illegal SHUTDOWN option
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 410112000 bytes
Fixed Size 1300268 bytes
Variable Size 243271892 bytes
Database Buffers 159383552 bytes
Redo Buffers 6156288 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> alter database force logging;

Database altered.
SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle/arch';

System altered.

SQL> alter system set log_archive_dest_2='SERVICE=STDB REOPEN=120';

System altered.

SQL> ALTER SYSTEM SET log_archive_dest_state_2=DEFER;

SQL> SHOW PARAMETER REMOTE

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_dependencies_mode string TIMESTAMP
remote_listener string
remote_login_passwordfile string EXCLUSIVE
remote_os_authent boolean FALSE
remote_os_roles boolean FALSE
result_cache_remote_expiration integer 0
SQL> CREATE PFILE='/u01/app/oracle/arch/stdb.ora' from spfile;

File created.

SQL> alter database create standby controlfile as '/u01/app/oracle/arch/st.ctl';

Database altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 410112000 bytes
Fixed Size 1300268 bytes
Variable Size 243271892 bytes
Database Buffers 159383552 bytes
Redo Buffers 6156288 bytes
Database mounted.
Database opened.
SQL> ALTER SYSTEM SET log_archive_dest_state_2=enable;

System altered.

SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/arch
Oldest online log sequence 25
Next log sequence to archive 27
Current log sequence 27
SQL> alter system archive log current;

System altered.

SQL> /

System altered.


select instance_name,status from v$instance;

INSTANCE_NAME STATUS
---------------- ------------
ora11g MOUNTED

SQL> alter database drop standby logfile ('/u01/app/oracle/oradata/ora11g/slog01.log')
2 ;

Database altered.

SQL> alter database add standby logfile ('/u01/app/oracle/oradata/ora11g/slog01.log') size 50M;

Database altered.

SQL> alter database add standby logfile ('/u01/app/oracle/oradata/ora11g/slog02.log') size 50M;

Database altered.

SQL> alter database add standby logfile ('/u01/app/oracle/oradata/ora11g/slog03.log') size 50M;

Database altered.

SQL> recover managed standby database disconnect;
Media recovery complete.
SQL>

********log

Thread 1 cannot allocate new log, sequence 26
Checkpoint not complete
Current log# 1 seq# 25 mem# 0: /u01/app/oracle/oradata/ora11g/redo01.log
Fri Nov 02 04:21:26 2007
Thread 1 advanced to log sequence 26
Current log# 2 seq# 26 mem# 0: /u01/app/oracle/oradata/ora11g/redo02.log
Fri Nov 02 04:21:26 2007
LNS: Standby redo logfile selected for thread 1 sequence 26 for destination LOG_ARCHIVE_DEST_2
Fri Nov 02 04:21:49 2007
Thread 1 advanced to log sequence 27
Current log# 3 seq# 27 mem# 0: /u01/app/oracle/oradata/ora11g/redo03.log
Fri Nov 02 04:21:49 2007
LNS: Standby redo logfile selected for thread 1 sequence 27 for destination LOG_ARCHIVE_DEST_2

---stdb

Fri Nov 02 03:37:00 2007
Media Recovery Log /u01/app/oracle/flash_recovery_area/ORA11G/archivelog/2007_11_02/o1_mf_1_24_3lnbpt51_.arc
Media Recovery Waiting for thread 1 sequence 25 (in transit)
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 4: '/u01/app/oracle/oradata/ora11g/slog01.log'
Fri Nov 02 03:37:10 2007
Media Recovery Log /u01/app/oracle/flash_recovery_area/ORA11G/archivelog/2007_11_02/o1_mf_1_25_3lnbq3gp_.arc
Media Recovery Waiting for thread 1 sequence 26 (in transit)
Fri Nov 02 03:37:30 2007
Primary database is in MAXIMUM PERFORMANCE mode
kcrrvslf: active RFS archival for log 4 thread 1 sequence 26
RFS[2]: Successfully opened standby log 5: '/u01/app/oracle/oradata/ora11g/slog02.log'
Fri Nov 02 03:37:30 2007
Media Recovery Log /u01/app/oracle/flash_recovery_area/ORA11G/archivelog/2007_11_02/o1_mf_1_26_3lnbqt9h_.arc
Media Recovery Waiting for thread 1 sequence 27 (in transit)

SQL> recover managed standby database cancel;
Media recovery complete.
SQL> recover managed standby database using current logfile disconnect;
Media recovery complete.
SQL>

Recovery of Online Redo Log: Thread 1 Group 5 Seq 28 Reading mem 0
Mem# 0: /u01/app/oracle/oradata/ora11g/slog02.log
Media Recovery Waiting for thread 1 sequence 29
Primary database is in MAXIMUM PERFORMANCE mode
kcrrvslf: active RFS archival for log 5 thread 1 sequence 28
RFS[2]: Successfully opened standby log 4: '/u01/app/oracle/oradata/ora11g/slog01.log'
Fri Nov 02 03:40:42 2007
Recovery of Online Redo Log: Thread 1 Group 4 Seq 29 Reading mem 0
Mem# 0: /u01/app/oracle/oradata/ora11g/slog01.log


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-12-05  
 123456
78910111213
14151617181920
21222324252627
28293031   

数据统计

  • 访问量: 11530
  • 日志数: 1129
  • 图片数: 1
  • 书签数: 1
  • 建立时间: 2007-12-13
  • 更新时间: 2008-06-02

RSS订阅

Open Toolbar