我的环境:
新手第一次建dataguard,建库过程是:
将主库的oradata文件夹里面的redo01.log-redo0103.log,stdbyredo01.log-stdbyredo0104.log,*.dbf文件全部拷贝到备库的oradata文件夹下,
创建一个备库控制文件/密码文件/初始化文件
initorcl.ora文件内容为:
*.db_unique_name='orcl'
*.log_archive_config='dg_config=(orcl,orcldg)'
*.log_archive_dest_2='service=orcldg lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=orcldg'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='enable'
*.fal_server=orcldg
*.fal_client=orcl
*.standby_file_management=auto
我的错误:
主库切换时出的错。如下:
SQL> select switchover_status from v$database; 
SWITCHOVER_STATUS
--------------------
TO STANDBY
SQL> alter database commit to switchover to physical standby with session shutdown;
Database altered.
SQL> shutdown immediate
ORA-01092: ORACLE instance terminated. Disconnection forced
SQL> startup
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist
SQL> 
这是告警日志的内容
All FAL entries have been archived.
Waiting for potential Physical Standby switchover target to become synchronized...
Active, synchronized Physical Standby switchover target has been identified
Switchover End-Of-Redo Log thread 1 sequence 650 has been fixed
Switchover: Primary highest seen SCN set to 0x0.0x19e905
ARCH: Noswitch archival of thread 1, sequence 650
ARCH: End-Of-Redo Branch archival of thread 1 sequence 650
ARCH: LGWR is actively archiving destination LOG_ARCHIVE_DEST_2
Archived Log entry 825 added for thread 1 sequence 650 ID 0x5017a391 dest 1:
ARCH: Archiving is disabled due to current logfile archival
Primary will check for some target standby to have received alls redo
Final check for a synchronized target standby. Check will be made once.
LOG_ARCHIVE_DEST_2 is a potential Physical Standby switchover target
Active, synchronized target has been identified
Target has also received all redo
Backup controlfile written to trace file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_9851.trc
Clearing standby activation ID 1343726481 (0x5017a391)
The primary database controlfile was created using the
'MAXLOGFILES 16' clause.
There is space for up to 13 standby redo logfiles
Use the following SQL commands on the standby database to create
standby redo logfiles that match the primary database:
ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 52428800;
Archivelog for thread 1 sequence 650 required for standby recovery
Switchover: Primary controlfile converted to standby controlfile succesfully.
Switchover: Complete - Database shutdown required
Completed: alter database commit to switchover to physical standby with session shutdown
Tue Jun 04 23:21:30 2013
Process (ospid 8273) is suspended due to switchover to physical standby operation.
Tue Jun 04 23:21:32 2013
Performing implicit shutdown abort due to switchover to physical standby
Shutting down instance (abort)
License high water  = 15
USER (ospid: 9851): terminating the instance
Instance terminated by USER, pid = 9851
Tue Jun 04 23:21:33 2013
Instance shutdown complete
ORA-1092 : opitsk aborting process我的问题:
1 请问大家,我的建库过程是不是有错,是不是配置有问题,还是拷贝文件的时候有问题,主库所有的*.log *.dbf都要拷到备库?
2 如果不是建库的错,那么这个切换的错还请指教先在这谢谢了!