Problem with data guard Creating a Physical Standby Database turorial
There is a tutorial of Creating a data guard Physical Standby Database:
http://www.oracle.com/technology/obe/11gr1_db/ha/dataguard/physstby/physstdby.htm
I tried to install it on two servers. One for primary database second for physical standby.
I have error on C. Creating the standby database over the network, action #6:
"On the standby system, set the ORACLE_SID environment variable to your <physical standby SID> (i.e. orclsby1) and start the instance in NOMOUNT mode with the text initialization parameter file."
When I try to connect to idle instance there is an error pops up:
C:\>sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Thu May 21 16:28:10 2009
Copyright (c) 1982, 2008, Oracle. All rights reserved.
ERROR:
ORA-12560: TNS:protocol adapter error
I'v checked listener and it is runned. There is no service for database because there is no database yet.
The question is did some one installed data guard configuration using this tutorial? Is there any errors in it? What should I do to finish this installation?
On Windhose for every instance a service must have been created using the oradim command.
Oracle tutorials are usually Unix-centric, as Windhose is an odd man out, so they don't discuss that bit.
'Kindly do the needful' and create the service prior to starting the instance in nomount mode
Hint: oradim is documented and has a help=y clause.
IIRC there is an option in database control (in the maintenance part) which automates everything.
Sybrand Bakker
Senior Oracle DBA
Experts: those who do read documentation
Similar Messages
-
I have one problem with Data Guard. My archive log files are not applied.
I have one problem with Data Guard. My archive log files are not applied. However I have received all archive log files to my physical Standby db
I have created a Physical Standby database on Oracle 10gR2 (Windows XP professional). Primary database is on another computer.
In Enterprise Manager on Primary database it looks ok. I get the following message Data Guard status Normal
But as I wrote above the archive log files are not applied
After I created the Physical Standby database, I have also done:
1. I connected to the Physical Standby database instance.
CONNECT SYS/SYS@luda AS SYSDBA
2. I started the Oracle instance at the Physical Standby database without mounting the database.
STARTUP NOMOUNT PFILE=C:\oracle\product\10.2.0\db_1\database\initluda.ora
3. I mounted the Physical Standby database:
ALTER DATABASE MOUNT STANDBY DATABASE
4. I started redo apply on Physical Standby database
alter database recover managed standby database disconnect from session
5. I switched the log files on Physical Standby database
alter system switch logfile
6. I verified the redo data was received and archived on Physical Standby database
select sequence#, first_time, next_time from v$archived_log order by sequence#
SEQUENCE# FIRST_TIME NEXT_TIME
3 2006-06-27 2006-06-27
4 2006-06-27 2006-06-27
5 2006-06-27 2006-06-27
6 2006-06-27 2006-06-27
7 2006-06-27 2006-06-27
8 2006-06-27 2006-06-27
7. I verified the archived redo log files were applied on Physical Standby database
select sequence#,applied from v$archived_log;
SEQUENCE# APP
4 NO
3 NO
5 NO
6 NO
7 NO
8 NO
8. on Physical Standby database
select * from v$archive_gap;
No rows
9. on Physical Standby database
SELECT MESSAGE FROM V$DATAGUARD_STATUS;
MESSAGE
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARC4: Archival started
ARC5: Archival started
ARC6: Archival started
ARC7: Archival started
ARC8: Archival started
ARC9: Archival started
ARCa: Archival started
ARCb: Archival started
ARCc: Archival started
ARCd: Archival started
ARCe: Archival started
ARCf: Archival started
ARCg: Archival started
ARCh: Archival started
ARCi: Archival started
ARCj: Archival started
ARCk: Archival started
ARCl: Archival started
ARCm: Archival started
ARCn: Archival started
ARCo: Archival started
ARCp: Archival started
ARCq: Archival started
ARCr: Archival started
ARCs: Archival started
ARCt: Archival started
ARC0: Becoming the 'no FAL' ARCH
ARC0: Becoming the 'no SRL' ARCH
ARC1: Becoming the heartbeat ARCH
Attempt to start background Managed Standby Recovery process
MRP0: Background Managed Standby Recovery process started
Managed Standby Recovery not using Real Time Apply
MRP0: Background Media Recovery terminated with error 1110
MRP0: Background Media Recovery process shutdown
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[1]: Assigned to RFS process 2148
RFS[1]: Identified database type as 'physical standby'
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[2]: Assigned to RFS process 2384
RFS[2]: Identified database type as 'physical standby'
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[3]: Assigned to RFS process 3188
RFS[3]: Identified database type as 'physical standby'
Primary database is in MAXIMUM PERFORMANCE mode
Primary database is in MAXIMUM PERFORMANCE mode
RFS[3]: No standby redo logfiles created
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[4]: Assigned to RFS process 3168
RFS[4]: Identified database type as 'physical standby'
RFS[4]: No standby redo logfiles created
Primary database is in MAXIMUM PERFORMANCE mode
RFS[3]: No standby redo logfiles created
10. on Physical Standby database
SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;
PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 1 9 13664 2
RFS IDLE 0 0 0 0
10) on Primary database:
select message from v$dataguard_status;
MESSAGE
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARC4: Archival started
ARC5: Archival started
ARC6: Archival started
ARC7: Archival started
ARC8: Archival started
ARC9: Archival started
ARCa: Archival started
ARCb: Archival started
ARCc: Archival started
ARCd: Archival started
ARCe: Archival started
ARCf: Archival started
ARCg: Archival started
ARCh: Archival started
ARCi: Archival started
ARCj: Archival started
ARCk: Archival started
ARCl: Archival started
ARCm: Archival started
ARCn: Archival started
ARCo: Archival started
ARCp: Archival started
ARCq: Archival started
ARCr: Archival started
ARCs: Archival started
ARCt: Archival started
ARCm: Becoming the 'no FAL' ARCH
ARCm: Becoming the 'no SRL' ARCH
ARCd: Becoming the heartbeat ARCH
Error 1034 received logging on to the standby
Error 1034 received logging on to the standby
LGWR: Error 1034 creating archivelog file 'luda'
LNS: Failed to archive log 3 thread 1 sequence 7 (1034)
FAL[server, ARCh]: Error 1034 creating remote archivelog file 'luda'
11)on primary db
select name,sequence#,applied from v$archived_log;
NAME SEQUENCE# APP
C:\ORACLE\PRODUCT\10.2.0\ORADATA\IRINA\ARC00003_0594204176.001 3 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\IRINA\ARC00004_0594204176.001 4 NO
Luda 4 NO
Luda 3 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\IRINA\ARC00005_0594204176.001 5 NO
Luda 5 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\IRINA\ARC00006_0594204176.001 6 NO
Luda 6 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\IRINA\ARC00007_0594204176.001 7 NO
Luda 7 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\IRINA\ARC00008_0594204176.001 8 NO
Luda 8 NO
12) on standby db
select name,sequence#,applied from v$archived_log;
NAME SEQUENCE# APP
C:\ORACLE\PRODUCT\10.2.0\ORADATA\LUDA\ARC00004_0594204176.001 4 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\LUDA\ARC00003_0594204176.001 3 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\LUDA\ARC00005_0594204176.001 5 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\LUDA\ARC00006_0594204176.001 6 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\LUDA\ARC00007_0594204176.001 7 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\LUDA\ARC00008_0594204176.001 8 NO
13) my init.ora files
On standby db
irina.__db_cache_size=79691776
irina.__java_pool_size=4194304
irina.__large_pool_size=4194304
irina.__shared_pool_size=75497472
irina.__streams_pool_size=0
*.audit_file_dest='C:\oracle\product\10.2.0\admin\luda\adump'
*.background_dump_dest='C:\oracle\product\10.2.0\admin\luda\bdump'
*.compatible='10.2.0.1.0'
*.control_files='C:\oracle\product\10.2.0\oradata\luda\luda.ctl'
*.core_dump_dest='C:\oracle\product\10.2.0\admin\luda\cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_file_name_convert='luda','irina'
*.db_name='irina'
*.db_unique_name='luda'
*.db_recovery_file_dest='C:\oracle\product\10.2.0\flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=irinaXDB)'
*.fal_client='luda'
*.fal_server='irina'
*.job_queue_processes=10
*.log_archive_config='DG_CONFIG=(irina,luda)'
*.log_archive_dest_1='LOCATION=C:/oracle/product/10.2.0/oradata/luda/ VALID_FOR=(ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME=luda'
*.log_archive_dest_2='SERVICE=irina LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=irina'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_max_processes=30
*.log_file_name_convert='C:/oracle/product/10.2.0/oradata/irina/','C:/oracle/product/10.2.0/oradata/luda/'
*.open_cursors=300
*.pga_aggregate_target=16777216
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=167772160
*.standby_file_management='AUTO'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='C:\oracle\product\10.2.0\admin\luda\udump'
On primary db
irina.__db_cache_size=79691776
irina.__java_pool_size=4194304
irina.__large_pool_size=4194304
irina.__shared_pool_size=75497472
irina.__streams_pool_size=0
*.audit_file_dest='C:\oracle\product\10.2.0/admin/irina/adump'
*.background_dump_dest='C:\oracle\product\10.2.0/admin/irina/bdump'
*.compatible='10.2.0.1.0'
*.control_files='C:\oracle\product\10.2.0\oradata\irina\control01.ctl','C:\oracle\product\10.2.0\oradata\irina\control02.ctl','C:\oracle\product\10.2.0\oradata\irina\control03.ctl'
*.core_dump_dest='C:\oracle\product\10.2.0/admin/irina/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_file_name_convert='luda','irina'
*.db_name='irina'
*.db_recovery_file_dest='C:\oracle\product\10.2.0/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=irinaXDB)'
*.fal_client='irina'
*.fal_server='luda'
*.job_queue_processes=10
*.log_archive_config='DG_CONFIG=(irina,luda)'
*.log_archive_dest_1='LOCATION=C:/oracle/product/10.2.0/oradata/irina/ VALID_FOR=(ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME=irina'
*.log_archive_dest_2='SERVICE=luda LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=luda'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_max_processes=30
*.log_file_name_convert='C:/oracle/product/10.2.0/oradata/luda/','C:/oracle/product/10.2.0/oradata/irina/'
*.open_cursors=300
*.pga_aggregate_target=16777216
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=167772160
*.standby_file_management='AUTO'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='C:\oracle\product\10.2.0/admin/irina/udump'
Please help me!!!!Hi,
After several tries my redo logs are applied now. I think in my case it had to do with the tnsnames.ora. At this moment I have both database in both tnsnames.ora files using the SID and not the SERVICE_NAME.
Now I want to use DGMGRL. Adding a configuration and a stand-by database is working fine, but when I try to enable the configuration DGMGRL gives no feedback and it looks like it is hanging. The log, although says that it succeeded.
In another session 'show configuration' results in the following, confirming that the enable succeeded.
DGMGRL> show configuration
Configuration
Name: avhtest
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases:
avhtest - Primary database
avhtestls53 - Physical standby database
Current status for "avhtest":
Warning: ORA-16610: command 'ENABLE CONFIGURATION' in progress
It there anybody that experienced the same problem and/or knows the solution to this?
With kind regards,
Martin Schaap -
What are the differences of creating a physical standby database with ASM?
I want to create a physical standby database for my 10g(10.2.0.1) database. But it is using ASM. Is it possible to create a standby database for a database using ASM?
What are the differences of creating a physical standby database with ASM?tell us what your research shows and we'll try to
validate it. I am simulating Oracle ASM on a PC and I want to try
DataGuard on it now. So I am trying to create DataGuard
on an ASM system. The purpose is only learning and test.That's telling us how you are researching, not what you have observed.
Your research could have included looking at the documetation, and you might have found http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/scenarios.htm#sthref1642
which discusses exactly what you are looking for.
Message was edited by:
Hans Forbrich -
Clarification on creating a Physical Standby Database
I'm practicing with data guard with Oracle 10.2.0.1.0 on two Windows 2003 servers.
I'm in the process of creating a physical standby database by following the steps outlined in the guide http://www.filibeto.org/sun/lib/nonsun/oracle/10.2.0.1.0/B19306_01/server.102/b14239/create_ps.htm
I've created the primary database and did a cold backup of all the datafiles and copied them to the standby server using OS commands. I've created a pfile from the spile in primary database and changed the needed parameters for the standby database.
What I don't understand is this statement I think is creating a control file for the standby database: SQL> ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/tamp/standby.ctl'
Exactly what I don't understand is what to do with this control file. I'm thinking that if I try to use it as the controlfile for the standby database, the standby database will refuse to open since the database name in the control file wont match the one the server expects.
I don't want to proceed until this becomes clear. So my question is what to do with the output of the above statement that seems to create a control file for the standby database.
Any help would be appreciated.
Dula>
You're thinking wrong.
Please clarify the difference between db_name and
db_unique_name.
Db_unique_name needs to be identical for both primary
AND standby database.
If db_unique_name differs, you'll get errors.
Sybrand,
Perhaps, you meant DB_NAME has to be identical for both databases.
DB_NAME name has to be the same for both primary and physical standby database.
DB_UNIQUE_NAME should be unique for each database in the standby configuration.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm#i68626
If you configure Logical Standby Database, DB_NAME may be different.
For the original poster: Chapter 3 - Creating a Physical Standby Database of Oracle® Data Guard Concepts and Administration has all the steps you have to do in order to configure a physical standby database.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm#g88234
Cheers, -
Creating a Physical Standby Database using OEM GC
This Paper is about the creation of a physical Stanby Database using OEM GC.
You will see that there is really nothing to it and using the Data Guard Broker, performing a switchover is as easy as 1,2,3,.
BTW, this works in both OEM GC 10.2.0.5 and 11.1
http://oemgc.wordpress.com/2010/07/19/creating-a-physical-standby-database-using-oem-gc/Thanks Rob for sharing this.
Regards
Rajesh -
Creating a Physical Standby Database
Hi,
I'm reading Oracle® Data Guard
Concepts and Administration
10g Release 2 (10.2)
B14239-04.
In 3.2 Step-by-Step Instructions for Creating a Physical Standby Database chapter it says :
3.2.1 Create a Backup Copy of the Primary Database Datafiles and recommend RMAN to do that.
And in
3.2.4 Copy Files from the Primary System to the Standby System
Use an operating system copy utility to copy the following binary files from the
primary system to the standby system:
■ Backup datafiles created in Section 3.2.1
Finallysorry , I did not finish.
I continue
finally,
3.2.6 Start the Physical Standby Database
Step 1 Start the physical standby database.
On the standby database, issue the following SQL statement to start and mount the
database:
SQL> STARTUP MOUNT;
I wonder , how to transform RMAN backup files to data files ? It is not explained or it is not necessary ?
Many thanks. -
Createing a physical standby database.
Hi,
Can we create a physical standby database with in a single system in windows.
If possible please please help me how to do.
Thanks and Regards
Poorna PrasadHi,
After making changes in the pfile and when i am starting the database in nomount stage with pfile i am getting the following error
SQL> startup nomount pfile='E:\oracle\product\10.2.0\db_1\database\initoracle.ora'
ORA-16024: parameter LOG_ARCHIVE_DEST_1 cannot be parsed
SQL>
and my parameter file is
oracle.__db_cache_size=427819008
oracle.__java_pool_size=4194304
oracle.__large_pool_size=4194304
oracle.__shared_pool_size=167772160
oracle.__streams_pool_size=0
audit_file_dest='E:\oracle\product\10.2.0/admin/oracle/adump'
background_dump_dest='E:\oracle\product\10.2.0/admin/oracle/bdump'
compatible='10.2.0.1.0'
control_files='E:\oracle\product\10.2.0/oradata/oracle/\control01.ctl','E:\oracle\product\10.2.0/oradata/oracle/\control02.ctl','E:\oracle\product\10.2.0/oradata/oracle/\control03.ctl'
core_dump_dest='E:\oracle\product\10.2.0/admin/oracle/cdump'
db_block_size=8192
db_domain=''
db_file_multiblock_read_count=16
db_name='oracle'
db_recovery_file_dest='E:\oracle\product\10.2.0/flash_recovery_area'
db_recovery_file_dest_size=2147483648
dispatchers='(PROTOCOL=TCP) (SERVICE=oracleXDB)'
job_queue_processes=10
open_cursors=300
pga_aggregate_target=202375168
processes=150
remote_login_passwordfile='EXCLUSIVE'
sga_target=609222656
undo_management='AUTO'
undo_tablespace='UNDOTBS1'
user_dump_dest='E:\oracle\product\10.2.0/admin/oracle/udump'
db_unique_name='oracle'
LOG_ARCHIVE_CONFIG='DG_CONFIG=(oracle,orap)'
LOG_ARCHIVE_DEST_1= 'LOCATION=E:\oracle\product\10.2.0\flash_recovery_area\ORACLE\ARCHIVELOG/VALID_FOR=(ALL_LOGFILES,ALL_ROLES)DB_UNIQUE_NAME=oracle'
LOG_ARCHIVE_DEST_2='SERVICE=orap LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)DB_UNIQUE_NAME=orap'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
LOG_ARCHIVE_MAX_PROCESSES=30
fal_server=orap
fal_client=oracle
standby_file_management=auto
db_file_name_convert='d:\orap\data\','E:\oracle\product\10.2.0\oradata\oracle'
log_file_name_convert='d:\orap\data\','E:\oracle\product\10.2.0\oradata\oracle','E:\oracle\product\10.2.0\flash_recovery_area\ORAP\ONLINELOG','E:\oracle\product\10.2.0\flash_recovery_area\ORACLE\ONLINELOG' -
Data Guard Broker connecting to standby database fails
Hello everybody
I checked lots of pages but I'm not able to find a solution für my problem. I already set up a primary and a standby database (prim = ALPHA1 / standby = ALPHA2).
After enabling my dgmgrl configuration I got two errors:
DGM-17016: failed to retrieve status for database "alpha2"
ORA-16664: unable to receive the result from a database
The dg log from ALPHA1 says:
06/04/2013 16:06:57
Site alpha2 returned ORA-16664.
Data Guard Broker Status Summary:
Type Name Severity Status
Configuration alphadgb Warning ORA-16607
Primary Database alpha1 Success ORA-00000
Physical Standby Database alpha2 Error ORA-16664
While the dg log from ALPHA2 (standby) says:
06/04/2013 16:43:28
SPFILE is missing value for property 'LogArchiveFormat' with sid='ALPHA2'
Warning: Property 'LogArchiveFormat' has inconsistent values:METADATA='arch_ALPHA2_%S_%t_%r.arc', SPFILE='(missing)', DATABASE='arch_ALPHA2_%S_%t_%r.arc'
Failed to connect to remote database alpha1. Error is ORA-12514
Failed to send message to site alpha1. Error code is ORA-12514.
How can I solve this issue? Every type of tnsping is successfull. The sqlplus login from the primary to the standby database works, the other way round works too! Therefore the tnsnames and listener data seems to be correct.
My configuration for ALPHA1 (primary db):
Listener
LISTENER_ALPHA1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.3.13)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
SID_LIST_LISTENER_ALPHA1 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ALPHA1_DGMGRL)
(ORACLE_HOME = /oracle/ALPHA1/orahome)
(SID_NAME = ALPHA1)
tnsnames.ora
ALPHA1.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.3.13)(PORT = 1521))
(CONNECT_DATA =
(SID = ALPHA1)
ALPHA2.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.3.13)(PORT = 1522))
(CONNECT_DATA =
(SID = ALPHA2)
DG_ALPHA1.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.3.13)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = ALPHA1_DGMGRL)
DG_ALPHA2.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.3.13)(PORT = 1522))
(CONNECT_DATA =
(SERVICE_NAME = ALPHA2_DGMGRL)
Parameters
archive_lag_target integer 0
log_archive_config string DG_CONFIG=(ALPHA2,ALPHA1)
log_archive_dest string
log_archive_dest_1 string LOCATION=USE_DB_RECOVERY_FILE_DEST valid_for=(all_logfiles,all_roles) DB_UNIQUE_NAME=ALPHA2
log_archive_dest_2 string SERVICE=ALPHA1 SYNC valid_for=(online_logfiles,primary_role) DB_UNIQUE_NAME=ALPHA1
log_archive_format string arch_ALPHA2_%S_%t_%r.arc
log_archive_local_first boolean TRUE
log_archive_max_processes integer 4
log_archive_min_succeed_dest integer 1
log_archive_start boolean FALSE
log_archive_trace integer 0
standby_archive_dest string ?/dbs/arch
For the DG Broker configuration
DGMGRL> connect sys/dgalpha42@DG_ALPHA1
DGMGRL> create configuration ALPHADGB
DGMGRL> primary database is ALPHA1
DGMGRL> connect identifier is DG_ALPHA1
DGMGRL> ;
DGMGRL> add database ALPHA2
DGMGRL> connect identifier is DG_ALPHA2
DGMGRL> maintained as physical
DGMGRL> ;
There were no errors.
DGMGRL> show database verbose ALPHA1
Database - alpha1
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
ALPHA1
Properties:
DGConnectIdentifier = 'dg_alpha1'
ObserverConnectIdentifier = ''
LogXptMode = 'ASYNC'
DelayMins = '0'
Binding = 'optional'
MaxFailure = '0'
MaxConnections = '1'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
PreferredApplyInstance = ''
ApplyInstanceTimeout = '0'
ApplyParallel = 'AUTO'
StandbyFileManagement = 'AUTO'
ArchiveLagTarget = '0'
LogArchiveMaxProcesses = '4'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert = 'ALPHA2, ALPHA1'
LogFileNameConvert = 'ALPHA2, ALPHA1'
FastStartFailoverTarget = ''
InconsistentProperties = '(monitor)'
InconsistentLogXptProps = '(monitor)'
SendQEntries = '(monitor)'
LogXptStatus = '(monitor)'
RecvQEntries = '(monitor)'
SidName = 'ALPHA1'
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oraprakt)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ALPHA1_DGMGRL)(INSTANCE_NAME=ALPHA1)(SERVER=DEDICATED)))'
StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = 'arch_ALPHA1_%S_%t_%r.arc'
TopWaitEvents = '(monitor)'
Database Status:
SUCCESS
DGMGRL> show database verbose ALPHA2
Database - alpha2
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: (unknown)
Apply Lag: (unknown)
Real Time Query: OFF
Instance(s):
ALPHA2
Properties:
DGConnectIdentifier = 'dg_alpha2'
ObserverConnectIdentifier = ''
LogXptMode = 'SYNC'
DelayMins = '0'
Binding = 'OPTIONAL'
MaxFailure = '0'
MaxConnections = '1'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
PreferredApplyInstance = ''
ApplyInstanceTimeout = '0'
ApplyParallel = 'AUTO'
StandbyFileManagement = 'AUTO'
ArchiveLagTarget = '0'
LogArchiveMaxProcesses = '4'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert = 'ALPHA1, ALPHA2'
LogFileNameConvert = 'ALPHA1, ALPHA2'
FastStartFailoverTarget = ''
InconsistentProperties = '(monitor)'
InconsistentLogXptProps = '(monitor)'
SendQEntries = '(monitor)'
LogXptStatus = '(monitor)'
RecvQEntries = '(monitor)'
SidName = 'ALPHA2'
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oraprakt)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ALPHA2_DGMGRL)(INSTANCE_NAME=ALPHA2)(SERVER=DEDICATED)))'
StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = 'arch_ALPHA2_%S_%t_%r.arc'
TopWaitEvents = '(monitor)'
Database Status:
DGM-17016: failed to retrieve status for database "alpha2"
ORA-16664: unable to receive the result from a database
Can anybody help me to find a solution for this?Hey
thanks for the answer. I followed you recommendations but I got the same error again. I restored/recovered the old status and looked deeper into the dgmgrl configuration before enabling. I found an interesting point. (show database verbose ALPHAx)
Database - alpha1
Role: PRIMARY
Intended State: OFFLINE
Instance(s):
ALPHA1
Properties:
DGConnectIdentifier = 'dg_alpha1'
ObserverConnectIdentifier = ''
LogXptMode = 'ASYNC'
DelayMins = '0'
Binding = 'optional'
MaxFailure = '0'
MaxConnections = '1'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
PreferredApplyInstance = ''
ApplyInstanceTimeout = '0'
ApplyParallel = 'AUTO'
StandbyFileManagement = 'AUTO'
ArchiveLagTarget = '0'
LogArchiveMaxProcesses = '4'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert = 'ALPHA2, ALPHA1'
LogFileNameConvert = 'ALPHA2, ALPHA1'
FastStartFailoverTarget = ''
InconsistentProperties = '(monitor)'
InconsistentLogXptProps = '(monitor)'
SendQEntries = '(monitor)'
LogXptStatus = '(monitor)'
RecvQEntries = '(monitor)'
SidName = 'ALPHA1'
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oraprakt)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ALPHA1_DGMGRL)(INSTANCE_NAME=ALPHA1)(SERVER=DEDICATED)))'
StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = 'arch_ALPHA1_%S_%t_%r.arc'
TopWaitEvents = '(monitor)'
Database Status:
DISABLED
Database - alpha2
Role: PHYSICAL STANDBY
Intended State: OFFLINE
Transport Lag: (unknown)
Apply Lag: (unknown)
Real Time Query: OFF
Instance(s):
ALPHA2
Properties:
DGConnectIdentifier = 'dg_alpha2'
ObserverConnectIdentifier = ''
LogXptMode = 'ASYNC'
DelayMins = '0'
Binding = 'OPTIONAL'
MaxFailure = '0'
MaxConnections = '1'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
PreferredApplyInstance = ''
ApplyInstanceTimeout = '0'
ApplyParallel = 'AUTO'
StandbyFileManagement = 'AUTO'
ArchiveLagTarget = '0'
LogArchiveMaxProcesses = '4'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert = 'ALPHA1, ALPHA2'
LogFileNameConvert = 'ALPHA1, ALPHA2'
FastStartFailoverTarget = ''
InconsistentProperties = '(monitor)'
InconsistentLogXptProps = '(monitor)'
SendQEntries = '(monitor)'
LogXptStatus = '(monitor)'
RecvQEntries = '(monitor)'
SidName = 'ALPHA2'
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oraprakt)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ALPHA2_DGMGRL)(INSTANCE_NAME=ALPHA2)(SERVER=DEDICATED)))'
StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = 'arch_ALPHA2_%S_%t_%r.arc'
TopWaitEvents = '(monitor)'
Database Status:
DISABLED
As the listener are configured ALPHA1 (prim) should be on port 1521 while ALPHA2 (stby) should work on 1522. In the configuration of DGMGRL only appears port 1521 (look at StaticConnectIdentifier). Is this maybe the reason of the networking problems with DG Broker? How can I fix this?
Regards Mirko
Edited by: 1009733 on 04.06.2013 09:22 -
Questions regarding creating a physical standby database in 10gR2
I'm setting up a physical standby database in a test environment using two windows 2003 servers. I was wondering if someone could answer a few questions I'm not too clear on. I've been thru the data guard manual and as much online information as i can find. I may have it working but wanted to post some things I'm not sure I did quite right.
My tnsnames.ora files.
On my primary database server:
# tnsnames.ora Network Configuration File: F:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
PRIMARY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SERVER1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PRIMARY.MYDOMAIN.com)
STANDBY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SERVER2)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = STANDBY.MYDOMAIN.com)
On my physical standby database server:
# tnsnames.ora Network Configuration File: f:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
STANDBY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SERVER2)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = STANDBY.MYDOMAIN.com)
PRIMARY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SERVER1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PRIMARY.MYDOMAIN.com)
My Listener.ora files:
On my primary database server:
# listener.ora Network Configuration File: F:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = PRIMARY.MYDOMAIN.com)
(ORACLE_HOME = f:\oracle\product\10.2.0\db_1)
(SID_NAME = primary)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = server1.mydomain.com)(PORT = 1521))
On my physical standby database server:
# listener.ora Network Configuration File: f:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = standby.mydomain.com)
(ORACLE_HOME = f:\oracle\product\10.2.0\db_1)
(SID_NAME = standby)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sever2.mydomain.com)(PORT = 1521))
The next item I'm not sure about is after creating the control file for standby use.
One the primary server I created it using:
alter database create standby controlfile as 'sbcontrol01.ctl';
I copied the primary database pfile I had created earlier to the standby server, renamed it and edited it.
Initially I left the CONTROL_FILES= parameter pointing to the control01.ctl, control02.ctl and control03.ctl that I restored. But I was getting the error ORA-01665: control file is not a standby control file
So I copied the sbcontrol01.ctl to sbcontrol02 and sbcontrol03.ctl and pointed the CONTROL_FILES= parameter at them.
The error went away and the database came up. I still need to test it some more but wanted to see if what i did was correct or a fluke.
Edited by: tjohnson on Mar 23, 2009 2:26 PMIf in the primary I had control files named control01, control02 and control03 would I have been able to create a standby controlfile called control01.ctl or would I have had to name it something else like I did (sbcontrol01.ctl) and rename it to control01.ctl once I got it over to the standby database server?Suppose you have the primary database control file in C:\oracle\primary\control location with names control01.ctl and control02.ctl. Then also you can create a standby controlfile with control01.ctl and control02.ctl , but then the location to be created must be different.You can create it in C:\oracle\primary location and then transfer to the specified location mentioed in the pfile of the standby database and mount the standby database.
But saying this i would suggested to keep the name different from control01.ctl as far as naming conventions are followed.It might confuse someoe whether its a primary database controlfe or a standby database controlfile.Usally primary database controlfile are named control01.ctl , coltrol02.ctl etc and for standby many do prefer keeping standby01.ctl, standby02.ctl.Thats just for for understanding.
HTH
Anand -
ERROR in creating a Physical Standby Database
Hello all,
I am using a Windows Vista O/S and Oracle 10g Enterprise Edition. Both my primary and standby are on the same host. Created standby instance using oradim.
I have followed instruction in the documentation and created a manual standby database.
primary database is 'orcl'
standby database is 'stby'
My primary archives is not being copied to the the stby location as confirmed by an error shown:
SQL> select dest_name, status from v$archive_dest_status
DEST_NAME
STATUS
LOG_ARCHIVE_DEST_1
VALID
LOG_ARCHIVE_DEST_2
ERROR
Also my standby does not open in read only mode, error:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
ERROR at line 1:
ORA-01153: an incompatible media recovery is active
SQL> ALTER DATABASE open read only;
ALTER DATABASE open read only
ERROR at line 1:
ORA-01154: database busy. Open, close, mount, and dismount not allowed now
I have copied both my prim and stby init.ora here for your reference
PRIMARY INIT
============================================
orcl.__db_cache_size=394264576
orcl.__java_pool_size=20971520
orcl.__large_pool_size=4194304
orcl.__shared_pool_size=184549376
orcl.__streams_pool_size=0
*.audit_file_dest='E:\oracle\product\10.2.0\admin\orcl\adump'
*.background_dump_dest='E:\oracle\product\10.2.0\admin\orcl\bdump'
*.compatible='10.2.0.3.0'
*.control_files='E:\oracle\product\10.2.0\oradata\orcl\control01.ctl'
*.core_dump_dest='E:\oracle\product\10.2.0\admin\orcl\cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='orcl'
*.db_unique_name=orcl
*.db_recovery_file_dest_size=2147483648
*.db_recovery_file_dest='E:\oracle\product\10.2.0\flash_recovery_area'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.job_queue_processes=10
*.nls_language='ENGLISH'
*.nls_territory='UNITED KINGDOM'
*.open_cursors=300
*.pga_aggregate_target=203423744
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=611319808
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='E:\oracle\product\10.2.0\admin\orcl\udump'
*.standby_file_management=AUTO
*.log_archive_dest_1='location=E:\oracle\product\10.2.0\flash_recovery_area\orcl\archivelog valid_for=(all_logfiles,primary_role) db_unique_name=orcl'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_2='SERVICE=stby LGWR ASYNC valid_for=(online_logfiles,primary_role) db_unique_name=stby'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_config='DG_CONFIG=(orcl,stby)'
*.db_file_name_convert='orcl','stby'
*.fal_client='orcl'
*.fal_server='stby'
*.db_file_name_convert='E:\oracle\product\10.2.0\oradata\stby', 'E:\oracle\product\10.2.0\oradata\orcl'
*.log_file_name_convert='E:\oracle\product\10.2.0\oradata\stby', 'E:\oracle\product\10.2.0\oradata\orcl'
*.standby_file_management=AUTO
======================================
STANDBY INIT.ora
stby.__db_cache_size=423624704
stby.__java_pool_size=4194304
tby.__large_pool_size=4194304
stby.__large_pool_size=4194304
stby.__shared_pool_size=171966464
stby.__streams_pool_size=0
*.audit_file_dest='E:\oracle\product\10.2.0\admin\stby\adump'
*.background_dump_dest='E:\oracle\product\10.2.0\admin\stby\bdump'
*.compatible='10.2.0.3.0'
*.control_files='E:\oracle\product\10.2.0\oradata\stby\CONTROL_SB01.CTL'
*.core_dump_dest='E:\oracle\product\10.2.0\admin\stby\cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_file_name_convert='orcl','stby'
*.db_name='orcl'
*.db_recovery_file_dest_size=2147483648
*.db_recovery_file_dest='E:\oracle\product\10.2.0\flash_recovery_area\STBY'
*.db_unique_name='stby'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.fal_client='stby'
*.fal_server='orcl'
*.job_queue_processes=10
*.log_archive_config='DG_CONFIG=(orcl,stby)'
*.log_archive_dest_1='location=E:\oracle\product\10.2.0\flash_recovery_area\stby valid_for=(all_logfiles,primary_role) db_unique_name=stby'
*.log_archive_dest_2='SERVICE=stby LGWR ASYNC valid_for=(online_logfiles,primary_role) db_unique_name=orcl'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_file_name_convert='E:\oracle\product\10.2.0\oradata\orcl','E:\oracle\product\10.2.0\oradata\stby'
*.nls_language='ENGLISH'
*.nls_territory='UNITED KINGDOM'
*.open_cursors=300
*.pga_aggregate_target=203423744
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=611319808
*.standby_archive_dest='USE_DB_RECOVERY_FILE_DEST'
*.standby_file_management='AUTO'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='E:\oracle\product\10.2.0\admin\stby\udump'
=================================================
Any help would be much appreciated. Apologies for my ignorance!
Thanks!
null
nullOK that solves part of the problem.
Now this is very strange error I am getting. The path it looks to recover from archive is not right, it should point as per my actual archive log dest. See below.
Standby:
=================
SQL> alter database open;
alter database open
ERROR at line 1:
ORA-16004: backup database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\STBY\SYSTEM01.DBF'
SQL> recover standby database until cancel;
ORA-00279: change 619067 generated at 06/22/2008 13:20:14 needed for thread 1
ORA-00289: suggestion :
E:\ORACLE\PRODUCT\10.2.0\DB_1\RDBMS\ARC00006_0658028298.001
ORA-00280: change 619067 for thread 1 is in sequence #6
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
ORA-00308: cannot open archived log
'E:\ORACLE\PRODUCT\10.2.0\DB_1\RDBMS\ARC00006_0658028298.001'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\STBY\SYSTEM01.DBF'
==================================================
Why is not pointing to the destination below, where the above archives reside??
=====================================
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination E:\oracle\product\10.2.0\flash_recovery_area\stby
Oldest online log sequence 12
Next log sequence to archive 0
Current log sequence 14
================= -
Problem with data format when getting from a database
I'm trying to get a date from the database but the problem is that it also return the time. I have tried to change the format of the date when retrived from my database but it still returns the time.
Any solutions?
String theDBDate = rset.getString("date_of_call");
SimpleDateFormat formatterdate = new SimpleDateFormat ("EEE, MMM d, ''yy");
String date = formatterdate.format(theDBDate);
theCalls.setDateofCall(date);// callin my Call Class to store the date which is a stringHi could any help me? I have this problem for the last few day. I gave up on it for a while but today I'm trying to get to the botton of this problem.
I connecting to an oracle database but it return back the date & time but I want only the date.
Here my code.
Locale currentLocale= new Locale("en","GB");
Date today = new Date();
DateFormat formatter = DateFormat.getDateInstance(DateFormat.DATE_FIELD,currentLocale);
String theSQL = (" Select * From Call ") ;
Statement stmt;
stmt = conn.createStatement();
ArrayList CallsList = new ArrayList();
ResultSet rset;
rset = stmt.executeQuery(theSQL);
while(rset.next() == true)
Call theCalls = new Call();
theCalls.setCallNo(rset.getInt("call_no"));
theCalls.setUsername(rset.getString("username"));
theCalls.setCompID(rset.getString("comp_id"));
theCalls.setTimeofCall(rset.getString("time_of_call"));
Date todaydate = rset.getDate("date_of_call");
Timestamp theDBDate = rset.getTimestamp("date_of_call");
SimpleDateFormat formatterdate = new SimpleDateFormat ("EEE, MMM d, ''yy");
String date = formatterdate.format(theDBDate);
theCalls.setDateofCall(date);
theCalls.setPriorty(rset.getString("priorty"));
theCalls.setProbCat(rset.getString("problem_cat"));
theCalls.setProbDesc(rset.getString("problem_desc"));
theCalls.setCloseDate(rset.getString("close_date"));
theCalls.setProbSol(rset.getString("problem_sol"));
theCalls.setStatus(rset.getString("status"));
theCalls.setAssign(rset.getString("assign"));
CallsList.add(theCalls);
conn.close();
return CallsList; -
Problem in recover physical standby database(Data Guard) by rman
Hello to all
I have created a physical standby database ,I want make backup of it by rman and when I lose it's datafile I can restore it ,making backup and restore is fine but in recovery I encounter some problem
scenarios is follow
1- In rman I create a backup of standby database by this command:
backup database plus archivelog delete all input;
2- I run this comman in rman for recover standby database
run{
2> set until scn 1392701;
3> restore database;
4> recover database;
5> }
(1392701 is extracted from this query "SELECT MAX(NEXT_CHANGE#)+1 UNTIL_SCN FROM V$LOG_HISTORY LH,
V$DATABASE DB WHERE LH.RESETLOGS_CHANGE#=DB.RESETLOGS_CHANGE# AND LH.RESETLOGS_TIME =
DB.RESETLOGS_TIME;" "http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/rman.htm")
but RMAN result is like this:
executing command: SET until clause
Starting restore at 13-DEC-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from
backup set
restoring datafile 00001 to /u01/app/oracle/oradata/sari/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/sari/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/sari/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/sari/users01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/sari/example01.dbf
restoring datafile 00006 to /u01/app/oracle/oradata/sari/users02.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/backup/0ek24dt4_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/home/oracle/backup/0ek24dt4_1_1
tag=TAG20081213T042506
channel ORA_DISK_1: restore complete, elapsed time: 00:01:07
Finished restore at 13-DEC-08
Starting recover at 13-DEC-08
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 116 is already on disk as file /u01/app/oracle/oradata/archive/1_116_666786084.arc
archive log thread 1 sequence 117 is already on disk as file /u01/app/oracle/oradata/archive/1_117_666786084.arc
archive log filename=/u01/app/oracle/oradata/archive/1_116_666786084.arc thread=1 sequence=116
archive log filename=/u01/app/oracle/oradata/archive/1_117_666786084.arc thread=1 sequence=117
unable to find archive log
archive log thread=1 sequence=118
RMAN-03002: failure of recover command at 12/13/2008 05:14:13
RMAN-06054: media recovery requesting unknown log: thread 1
seq 118 lowscn 1392700
3- then I decline 1392701 to 1392700 and i run this command
run{
2> set until scn 1392700;
3> restore database ;
4> recover database;
5> }
executing command: SET until clause
Starting restore at 13-DEC-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from
backup set
restoring datafile 00001 to /u01/app/oracle/oradata/sari/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/sari/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/sari/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/sari/users01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/sari/example01.dbf
restoring datafile 00006 to /u01/app/oracle/oradata/sari/users02.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/backup/0ek24dt4_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/home/oracle/backup/0ek24dt4_1_1 tag=TAG20081213T042506
channel ORA_DISK_1: restore complete, elapsed time: 00:01:08
Finished restore at 13-DEC-08
Starting recover at 13-DEC-08
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 116 is already on disk as
file /u01/app/oracle/oradata/archive/1_116_666786084.arc
archive log thread 1 sequence 117 is already on disk as
file /u01/app/oracle/oradata/archive/1_117_666786084.arc
archive log filename=/u01/app/oracle/oradata/archive/1_116_666786084.arc thread=1
sequence=116archive log
filename=/u01/app/oracle/oradata/archive/1_117_666786084.arc
thread=1 sequence=117Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS
would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/oradata/sari/system01.dbf'
media recovery complete, elapsed time: 00:00:10
Finished recover at 13-DEC-08
4- if I run
run{
restore database;
recover database;
I will recieve that error of step 2 (RMAN-06054: media recovery requesting unknown log: thread 1
seq 118 lowscn 1392700)
5- if I just restore the database and I don't perform recovery by rman and I restart redo apply all thing seem fine
but in opening database I'll recieve ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/oradata/sari/system01.dbf' error)
do you know what is problem
thanks
Edited by: ARKH on Dec 12, 2008 11:06 PMhi
I myself have found the solution , when I recover the standby database
it do recovery but at the end of recovery it raise the error(RMAN-06054: media recovery requesting unknown log: thread 1
seq 118 lowscn 1392700) but if I begain redo apply before open the database
and I wait till all redo apply process start and communication between the
standby database and the primary database start, then I can
open the standby database and no error will raise
but if befor restarting redo apply I open the database I'll recieve the
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/oradata/sari/system01.dbf' error
thanks -
Hi,
We have Oracle 11.2.0.4 and are currently using Active Data Guard on a physical standby. My boss wants me to use Goldengate
to replicate several schema from Oracle to SqlSserver. She doesn't want to touch the Primary, which is in production. Would it be better
to setup a Logical standby for Goldendate to use, in addition to the Physical standby? Or will it be sufficient to use the Physical standby?
The application tables don't all have primary keys. I'm trying to decide if the Logical standby adds another layer of complexity or would
introduce delays in getting the data from Oracle to Sqlserver.
Thanks in advance,Hi,
In this case I recommend you to use physical standby + Golden gate with ALO mode. You might have sligthly more trouble in logical standby. it means you might have more trouble at Goldengate's extract side.
You said
The application tables don't all have primary keys.
so you have to add keycols on replicat side.
I recommend you to add an index which should consist of keycols columns. it will be necessary for replicat performance.
Best Regards -
Difference between physical standby database and Data Guard
Hi guys,
Today I attended one interview. They asked me a difference between the Oracle Physical Standby database and Oracle Dataguard?
Upto my knowledge Oracle Physical Standby Database is one type of Standby Database can be configured using Oracle Databaguard Feature.
Can you people calrify me on this.
Regards,
Vijayaraghavan Khello,
yes you are right upto some extent...here is para form oracle doc
Oracle Data Guard is the most effective and comprehensive
data availability, data protection, and disaster recovery solution
for enterprise databases. It provides the management, monitoring,
and automation software infrastructure to create and maintain one
or more synchronized standby databases to protect data from failures,
disasters, errors, and corruptions.
Data Guard standby databases can be located at remote disaster
recovery sites thousands of miles away from the production data center,
or they may be located in the same city, same campus,
or even in the same building. If the production database
becomes unavailable because of a planned or an unplanned outage,
Data Guard can switch any standby database to the production role,
thus minimizing downtime and preventing any data loss.oracle data guard is maximum availiblity solution which maintain physical standby databases and in case of failure of production can switch production role to and standby database.
read it here
http://www.oracle.com/technology/deploy/availability/htdocs/DataGuardOverview.html
thanks and regards
VD
Edited by: Dixit on Aug 31, 2009 1:35 AM
Edited by: Dixit on Aug 31, 2009 1:36 AM -
SQL exception during creation of a physical standby database with EM
Version: EM Oracle 10.2.5 (agents running, repository running, primary db running, all targets visible and reachable with EM)
I try to create a physical standby database with the enterprise manager and each time the process is aborted with a SQL exception during the preparation of the job by the EM. I have added a part of the OMs log containing the error at the end of the excerpt.
=============
2010-04-29 16:00:39,856 [EMUI_16_00_39_/console/targets] WARN pref.SubtabPref getFolders.710 - Unknown folder id: VirtualServers retrieved from repository
2010-04-29 16:01:04,765 [EMUI_16_01_04_/console/database/dataguard/create] ERROR em.dataguard validate.1329 - CreateBean: ClassNotFoundException: null
2010-04-29 16:02:05,476 [EMUI_16_02_05_/console/database/dataguard/create] ERROR jobs.dbclone checkSetFileError.79 - DatabaseFileAttributes.checkSetFileError(): Null database file!
2010-04-29 16:02:05,476 [EMUI_16_02_05_/console/database/dataguard/create] ERROR jobs.dbclone setControlfiles.160 - DatabaseFileAttributes.setDatafiles(): Invalid control file!
2010-04-29 16:02:05,492 [EMUI_16_02_05_/console/database/dataguard/create] ERROR jobs.dbclone getControlFileNames.616 - DatabaseFileAttributes.getDatafileNames(): null datafile names!
2010-04-29 16:02:32,823 [Thread-28] ERROR em.jobs remoteOp.2389 - DBVerify.remoteOp(): Error: max_stamp# 6071384
2010-04-29 16:02:32,823 [Thread-28] ERROR jobs.dbclone submitJobPreparation.3297 - DBCloneObject.submitJobPreparation(): getMaxLogSequenceNum: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
2010-04-29 16:02:32,823 [Thread-28] ERROR jobs.dbclone submitJobPreparation.3501 - DBCloneObject.submitJobPreparation(): Exception: java.lang.Exception: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
2010-04-29 16:02:32,823 [Thread-28] ERROR jobs.dbclone submitDBCloneJob.3716 - DBCloneObject.submitDBCloneJob(): Exception: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
2010-04-29 16:02:37,496 [EMUI_16_02_37_/console/database/dataguard/create] ERROR em.dataguard onEvent.1243 - CreateConfigController: Exception: oracle.sysman.db.dg.util.VxxStandbyException: Während der Vorbereitung des Jobs ist eine SQL Exception aufgetreten. Um das Problem zu diagnostizieren, legen Sie das Agent Perl-Skript-Tracing auf DEBUG fest und wiederholen den Vorgang
=========
I have set the agent perl script tracing to DEBUG, but can't find any reason, why the job preparation failed.
Has anyone an idea why the job cannot be prepared? Thanks in advance for investigation :-)Can you please tell me how can i see data gaurd on EM..
I have oracle 11gR1..i have implemmented primary as well standby database..
I have already started EM but i have no idea where to find datagaurd option..or how to create standdby db using EM..
You got error that means u did it using EM..how can i do it on EM
Maybe you are looking for
-
Automatically mount USB 3.0 WD External HDD with iMac 24-inch mid-2007
I am using a 2TB Western Digital (WD) My Book Essential external Hard Disk Drive for my iMac 24-inch mid-2007 to use it as a Time Machine backup disk. This HDD only comes with a USB 3.0 connection. Function-wise, it works with the iMac and Time mach
-
JSF page goes blank when using with servlet filters...
Hi there, I have a JSF page, which shows up fine (in both IE and Firefox) in normal scenarios. But as soon as I apply servlet filters onto the faces extension, I get into trouble. So after setting up the filters, when I load the same page(s) in each
-
Problematic Button Sound audio latency occuring in Windows only
hi we have a music composer game for school children where they click buttons to play short samples in time with a backing track. Our .swf file when run on a Mac works fine with no discernible latency. When played on a Windows machine ( and also seem
-
The system cannot find the file -DRCU_HOME
Hi, WHile running RCU for Oracle Data Integrator, I am getting the above error. I checked and the file exists. So not sure why this error happens. any help is really appreciated. Thanks Amit
-
Error Generating WebService for SOAP over JMS
Hi, I've been tring to create an addition web service thta takes two input and returns the sum. I was able to generate the WSDL using JDevelopers GUI tool for generating WSDL, but I notices that there was no transport layer, in thebinding that suppoe