How standby database works
Hi!!
I have created standby database (testcat) for primary database (test) using Duplicate Command of RMAN on same server (windows XP) on Oracle 11.2 . I know how to create standby database But i don't know how and when standby database works. I checked init.ora file of standby database it contains all parameters prefixed with *. as follow
*.db_create_file_dest='F:\app\Administrator\oradata'
*.db_domain=''
*.db_recovery_file_dest='F:\app\Administrator\flash_recovery_area'
*.db_recovery_file_dest_size=10737418240
*.db_unique_name='testcat'
*.DB_NAME='test'
*.control_files="D:\APP\ORACLE\ORADATA\TESTCAT\CONTROLFILE\CONTROL_STAND1.CTL‘'
While init.ora file of primary database contains entries like
db_create_file_dest=F:\app\Administrator\oradata
db_recovery_file_dest=F:\app\Administrator\flash_recovery_area
db_recovery_file_dest_size=4039114752
control_files="F:\APP\ADMINISTRATOR\ORADATA\TEST\CONTROLFILE\O1_MF_8TXW6QN0_.CTL"
So I want to know is
1. IS there any difference between parameter that start with .* and start without .*
2. Can i set db_create_file_dest parameter in init.ora of standby database to another location.
3. How redo log will be applied to standby database when I run ALTER DATABASE RECOVER ..... command
4. where archived log files of standby database will stored?
1. Fetch Archive Log (FAL) Client :- It requests for archived redo log files from the primary site.
That means FAL Client is required (should exist) on standby database server. Am i right here?
FAL Client is Standby database, FAL Client requre archived log from FAL Server (primary, Cascading standby database ) for Gap Resolution.
2. Fetch Archive Log (FAL) Server:- It requests for archive redo logs from FAL Client (Standby database).That means FAL Server is required (should exist) on primary database server.
If yes then, why it is required because FAL Server request for archived redo logs from standby database while on other side standby database can not have redo logs as it runs in READ ONLY Access mode (So no DML and DDL) ?.
Also primary database will be always one step ahead in terms of archive logs than standby database and hence there is no need to request for archived logs from stanby. Am i right here?
Yes you are right. Primary is newer require archived log from standby. You asked and answered.
Regards
Mahir M. Quluzade
Similar Messages
-
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 -
Standby database SRL & Online logs
Hi,
I have just tried my hand at building a Physical standby database in Oracle 10gR2 using RMAN. I will detail out the steps that i have performed before asking my question.
I configured every pre-requisite and i did not create any SRL's on primary before building a standby database. I am using LGWR ASYNC for redo transmission. I have configured FAL_CLIENT and FAL_SERVER. Protection mode is MAX PERFORMANCE and it is on Solaris 10 x86_64
1. Took a RMAN full backup
and created a standby control file as
SQL> alter database create standby controlfile as '/tmp/standby.ctl';
2. On another server, I copied the pfile, standby controlfile (renamed it) from primary and mounted the database.
sqlplus /as sysdba'
SQL> startup mount pfile='...';
rman target /
RMAN> restore database;
SQL> alter database recover managed standby database disconnect from session;
Everything worked and MRP was applying the archived logs as they were received from the primary. But, i have seen the SRL's created with default names on the primary database & standby database by Oracle even though i did not explicitly create them. Is this a normal behaviour? I saw them using v$standby_log.
As a Physical standby database will not use any ONLINE REDO LOGS and i haven't created any with the procedure i have used. i have performed a SWITCHOVER, which has worked with out any problem. My question here is
1. How did Oracle open the database database when there were no redo logs physically present on the standby site? Is this a normal behavior in a standby environment where Oracle creates ONLINE REDO LOG files for a Standby database being transitioned to Primary whenever a SWITCHOVER or FAILOVER occurs? If this is the case, it is obvious that Oracle will take the LOG SEQUENCE from the last applied ARCHIVED LOG and will start the ONLINE LOG from that sequence?
Please correct me if i have understood anything wrong here or if i have configured anything wrong. But with the above configuration the Standby database worked perfectly well and switchover was successful too.
Thanks,
Harris.Correction: I have not created the Standby Database using RMAN but only performed a FULL backup, which i have restored before starting the MRP.
-
Adding a second physical standby database
Please, here is my problem:
I have a physical standby database working fine and I would like to add to it another physical standby database. Please, what about these two parameters:
db_file_name_convert=('prim','second'),('prim',''third')
and the same for log_file_) name_convert?
Please, can I have any help from the gurus?
Thanks for any helpdb_file_name_convern and log_file_name_convert is meant to be set on standby database
it can have multiple values to remap paths values on standbying'
like
db_file_name_convert='source_string','target_string'
db_file_name_convert='source_string1','target_string1','source_string2','target_string2','source_string3','target_string4' -
How to delete archivelog with RMAN in the Primary and Standby database?
Hello,
I am working on Oracle 10gR2.
My question is :
How could I implement a automatized and secure way of:
1) Delete archivelogs on my PRIMARY server only when these logs are successfully TRANSFERED to all my standby databases?
2) Delete archivelogs on my STANDBY server only when these logs are sucessfully APPLIED to the database?
Thanks a lot for your help!on 10G
CONFIGURE ARCHIVELOG DELETION POLICY TO [CLEAR | NONE | APPLIED ON STANDBY];
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/rman.htm#CHDBEICE
Coskan Gundogar
http://coskan.wordpress.com -
How to configure standby database in a single machine
I am in Windows XP professional and oracle 9i . I want to configure a standby database for a database called proddb in the same machine. For doing this, I created a standby controlfile. But this work for the same name standby database?. How this happen ? two database with same name possible? How to create the second database (Standby) Please help?
ShijuThe Oracle Solaris Cluster concepts guide has some information on which zone model to choose:
http://docs.oracle.com/cd/E18728_01/html/821-2682/gcbkf.html#scrolltoc
When managing a Solaris zone with the HA Zones agent, the cluster basically regards the non-global zone as a blackbox.
As such you can either start the Oracle database as part of the runlevel/SMF startup of the non-global zone, or you can use the sczsh or sczsmf component and use your own scripts to start, probe and stop the Oracle database.
Usage of the standard HA Oracle data service is not supported in combination with the HA Zones agent.
If you require a more fine grained control of services running in non-global zones, why not setup a zone cluster and then having HA Oracle failover the Oracle database between non-global zones?
Regards
Thorsten -
How to get the date of the last transaction in a mounted standby database?
Hello,
Could you tell me how to get the date of the last transaction recorded in a MOUNTED standby database?
The following query doesn't work...because the database is not open...
select scn_to_timestamp(current_scn) from v$database;
ThanksHi,
You should be able to run the following command in mounted mode on standby database.
select current_scn from v$database;
then run the following to convert it to timestamp.
select scn_to_timestamp(99999999) from dual; *<-- Replace here the SCN value you got above. This needs to be run on the primary database due to standby database in mount mode.*
Alternatively you can also check at the alert.log file to find the last scn which has been applied.
Regards
Edited by: skvaish1 on Jan 19, 2010 11:15 AM -
How to open a standby database for use?
First, let me state that I am not a DBA nor am I a systems guy; I'm a software developer.
At work, we recently built a new virtualized db server by cloning our disaster recovery (DR) database server. The DR database was kept in 'standby' mode (I think that's the correct term) and was synched with production daily via archive logs.
So now, we have this new virtualized server that has a clone of that 'standby' database on it, and I need to 'open' that database so that it's usable (ie, no longer a standby db). How do I do that?? We recently lost our DBA so this has fallen into my lap.
From searching the web, I've found all sorts of instructions. It seems that I need to issue some commands via SQL*Plus? But as what user? From where do I issue these commands (I assume from the virtualized server)? And what are the commands?
This is Oracle 10g v10.2.0.3.0 running on Solaris 10 for x86.
Thanks!
DaveHi Dave, I do this each time we do a DR test. I have 10.2.0.3 in physical standby mode.
First, I make sure I have flashback turned on (here is what I've done):
connect / as sysdba
startup nomount
alter database mount standby database;
alter database flashback on;
alter database recover managed standby database through all switchover disconnect using current logfile;
exit;Activate the physical standby:
alter database recover managed standby database cancel;
alter database activate physical standby database;
alter database open;
exit;When completed with DR test we return the database back to physical standby mode:
Find the SCN when the physical standby was activated (this is so we can flashback to that point in time)
select standby_became_primary_scn from v$database;connect / as sysdba
flashback database to scn <this is the value returned from above>;
alter database convert to physical standby;
shutdown immediate
startup mount
alter database recover managed standby database disconnect from session;
exit;I hope that helps,
Michael Cunningham
Edited by: Michael C on Nov 10, 2011 8:59 AM
Edited by: Michael C on Nov 10, 2011 9:00 AM -
How to remove logical standby database configuration cleanly
Hello,
We are on RHL with 11.2.0.3 DB version. Due to various unknown reasons we would like to recreate logical standby database and for that purpose I would like to cleanly remove/uninstall/drop LOGICAL STANDBY DATABASE from the DATA GUARD configuration we have.
The DG setup already has 1 PHYSICAL STANDBY DATABASE which is working fine. PRIM,PHYSICAL, and LOGICAL all are on different HOSTS. Could you please guide or suggest us exact MOS Doc id regarding this? I have found one MOS Doc id which is close enough but its steps include removing dg configuration completely which I don't want. Only Logical Standby database needs to be remove cleanly so that it can be installed again properly.
We are using GRID CONTROL and DATA GUARD BROKER.
Bundle of thanks in advance.
Best RegardsHello;
I would review this Oracle note:
How to remove a Data Guard Configuration from Primary Database (Doc ID 733794.1)
Best Regards
mseberg -
How to monitor SQL Apply for 10.2.0.3 logical standby database
We have a logical standby database setup for reporting purposes. Users want to monitor whether sql apply is working or failed closely as it has reporting repercations.
In case of 9i databases , there was "Data Not Applied (logs)" metric which we used for alerting and paging, in case a backlog of more than 5 log files developed.
With 10.2.0.3 onwards, the metric no more exists.
I would like to learn from other, how to monitor the setup, so that if the backlog in logs shipping or applying develops, we get page.
Regards.regather the statistics on the table with method_opt=>for all columns or for all indexed columns or whatever size 1
The 'size 1' directive will remove the histogram statistics.
Sorry, didn't read ur post in a hurry. Below article (http://www.freelists.org/post/oracle-l/Any-quick-way-to-remove-histograms,13) removes histogram without re-analyzing the table. Hope that helps!!!
On 3/16/07, Wolfgang Breitling <breitliw@xxxxxxxxxxxxx> wrote:
I also did a quick check and just using
exec
dbms_stats.set_column_stats(user,'table_name',colname=>'column_name',d
istcnt=>
<num_distinct>);
will remove the histogram without removing the low_value andhigh_value.
At 01:40 PM 3/16/2007, Alberto Dell'Era wrote:
On 3/16/07, Allen, Brandon <Brandon.Allen@xxxxxxxxxxx> wrote:
Is there any faster way to remove histograms other than
re-analyzing
>
the table? I want to keep the existing table, index & columnstats,
>
but with only 1 bucket (i.e. no histograms).You might try the attached script, that reads the stats using
dbms_stats.get_column_stats and re-sets them, minus the histogram,
using dbms_stats.set_column_stats.
I haven't fully tested it - it's only 10 minutes old, even if Ihave
slightly modified for you another script I've used for quite some
time - and the spool on 10.2.0.3 seems to confirmthat the histogram
is, indeed, removed, while all the other statistics are preserved.I
have also reset density to 1/num_distinct, that is the value youget
if no histogram is collected.regards,
naren
Edited by: fuzzydba on Oct 25, 2010 10:52 AM -
How to re-synch primary and standby database?
Hello everyone,
Working on 10g R2/windows server 2003, I have configured a physical standby database but, I have an issue, and don't know how to resolve it.
We were making an update that made some DDL and DML on our application, and for security reason we
1. we ensure that primary and standby are in sync
2. We made a cold backup of the primary database
3. We Deferred the redo shipping between primary and standby
4. We applied changes on primary database
But the big issue is that, for any reason my colleague did the following.
a) made above steps 1,2,3,4
b) after the update he kept the resulted archived log files generated during to another location
c) He restore the cold backup before the update(step 2 above)
c) he applied again the update.
Now the issue is
At the first update step(2), the sequence# 553 was applied to the stand by before the update
At the second update step(c) above another sequence# 553 was created but stored localy in the primary database, because the both servers were deverged (step 3 above).
Technically both servers cannot be in sync again,because sequence# 553 at the first update has next_change# 80307804 and sequenc# 553 at the second update has next_change# 80461356.
Question:
How Can I do to rollback the the first sequence# 553 ( before the first update) on the standby database? in order to apply the sequence#553 generated at the second update and then re-sync both servers to roll forward subsequent sequence#? 554,etc...
Thank you for your helpHello,
I have just tried the FLASHBACK DATABASE TO SCN XXXXXXXX;
but it doesn't work.
Here are steps used from my local dev envirronnment
From the stand by I retrieved the following information.
SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# FIRST_TIM NEXT_TIME
95 707168 707906 15-AUG-08 15-AUG-08
96 707906 708653 15-AUG-08 15-AUG-08
97 708653 709359 15-AUG-08 15-AUG-08
100 710951 711794 15-AUG-08 15-AUG-08
98 709359 710179 15-AUG-08 15-AUG-08
99 710179 710951 15-AUG-08 15-AUG-08
101 711794 712762 15-AUG-08 15-AUG-08
102 712762 713720 15-AUG-08 15-AUG-08
103 713720 714748 15-AUG-08 15-AUG-08
104 714748 715920 15-AUG-08 15-AUG-08
105 715920 739430 15-AUG-08 15-AUG-08
106 739430 800525 15-AUG-08 16-AUG-08
107 800525 875810 16-AUG-08 17-AUG-08
108 875810 916527 17-AUG-08 18-AUG-08
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database activate standby database; --> prepare to open stby in R/W mode
Database altered.
SQL> startup mount force;
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 180358020 bytes
Database Buffers 423624704 bytes
Redo Buffers 7135232 bytes
Database mounted.
SQL> alter database set standby database to maximize performance;
Database altered.
SQL> alter database open;
Database altered.
SQL> startup mount force;
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 180358020 bytes
Database Buffers 423624704 bytes
Redo Buffers 7135232 bytes
Database mounted.
Now I tried to mimic the flashback database as in the production, to bring it back to sequence# 105 above
SQL> flashback database to scn 739430;
flashback database to scn 739430
ERROR at line 1:
ORA-38754: FLASHBACK DATABASE not started; required redo log is not available
ORA-38761: redo log sequence 75 in thread 1, incarnation 2 could not be
accessed
I'm reverted back the physical standby to its function
SQL> alter database convert to physical standby;
Database altered.
SQL> startup mount force;
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 180358020 bytes
Database Buffers 423624704 bytes
Redo Buffers 7135232 bytes
Database mounted.
SQL> alter database recover managed standby database using current logfile disconne
Database altered.
Verifying if the MRP is up and running: YES see below
SQL> select message from v$dataguard_status;
MESSAGE
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARC3: Becoming the 'no FAL' ARCH
ARC3: 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 starting Real Time Apply
Clearing online redo logfile 1 C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO11.LOG
11 rows selected.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination C:\local_destination1_orcl
Oldest online log sequence 110
Next log sequence to archive 0
Current log sequence 110
So, how can I reslove this issue? without creating the standby from scratch?
Thanks Again for your help -
How to sync the standby database with the primary?
Hi..We have dataguard setup for our production databases(10.2.0.3).
I need one clarification regarding the standby database sync with primary.We identified one of our databases is not in sync with the primary and for longtime the archives are not getting applied at the secondary.
We decided to take the incremental (from SCN)backup from primary and use that at the standby to resolve the gap as described in the book "Oracle dataguard concepts and administration".
But, before doing that,we observed couple of structural changes were not applied at the standby(ex:some tablespaces were not created in secondary where as they were there in primary).
How to apply these changes at the secondary as the standby is in mount state.(Can I open this database and create those tablespaces ?? or do you suggest any other way.
Thanks for your reply.This points to a setup problem. Something missing, a parameter set wrong etc.
While your question is asking something different - How to correct, I would consider how to prevent. Unless you have a gap or logs not applied you have a deeper issue.
If you have a gap or logs not applied then correct it and check to see if the missing object are present.
The key parameters for Oracle 10 are :
FAL_SERVER=STANDBY
FAL_CLIENT=PRIMARY
STANDBY_FILE_MANAGEMENT=AUTO
DB_FILE_NAME_CONVERT='STANDBY','PRIMARY'
LOG_FILE_NAME_CONVERT='STANDBY','PRIMARY'
log_archive_dest_1='LOCATION=/u01/app/oracle/oradata/PRIMARY/archive VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=PRIMARY'
log_archive_dest_2='SERVICE=STANDBY LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=STANDBY'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
LOG_ARCHIVE_MAX_PROCESSES=30
Check them on both sides for issues.
If your standby is really trashed consider using RMAN to duplicate it. You might end up saving time. I have Oracle 11 short notes on this but it will work on Oracle 10 too.
http://www.visi.com/~mseberg/duprman.html
Otherwise use statements like this to resolve you gap.
ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/STANDBY/archive/PRIMARY_1_20_716110538.arc';
ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/STANDBY/archive/PRIMARY_1_21_716110538.arc';See Section 5.8 Managing Archive Gaps of oracle document B14239-05
Best Regards
mseberg
CKPT is correct, sorry I missed the Welcome to OTN!
Edited by: mseberg on Jul 5, 2011 10:34 AM -
Standby database not working after reinstallation of oracle in primary DB
Hello All,
Initially I had setup primary database (DB1) and Standby database (DB2), for test environment.
In DB1 I had got ORA-600 error. So, after I researched, I came to know that I need to apply some patches. But I reinstalled oracle in DB1. And the problem was solved in DB1.
After that, I issued the following commands in DB2, but I got error
SQL>SHUTDOWN IMMEDIATE;
ORA-01034: Oracle not available
ORA-27101: shared memory realm does not exist
SQL>STARTUP MOUNT;
ORA-27102: out of memoryNow, I mean to say, both DB1 and DB2 are independent.
Also, DB2 is not active since 2 months
DB1 is working fine.
Please guide me with procedure, how to configure DB2 for the current DB1Hello;
After two months I would rebuild.
If you are on Oracle 11 you can use RMAN to do this quickly.
Here's a few short notes :
http://www.visi.com/~mseberg/duprman2.html
http://www.visi.com/~mseberg/standby_creation_from_active_database_using_rman.html
Can you post your full oracle version and Primary database size?
If you rebuild I would remove all the data files from the Standby, recopy the password file from the Primary to the Standby and double my tnsnames.ora and listener.ora on both servers.
Best Regards
mseberg -
Is CDC feature working on the logical standby database
I would like to implement CDC on the standby logical database instead of primary production database. Is CDC working on the logical standby database??
Thanks.Thanks. My database version is: 10.2.0.4.0 and no plan to upgrade to 11g.
Either asyn or syn CDC on logical standby database is ok for me. I searched but couldn't find any docs for how to set CDC for logical standby, they are all for primary database.
Please help. -
How to delete the foreign archivelogs in a Logical Standby database
How do I remove the foreign archive logs that are being sent to my logical standby database. I have files in the FRA of ASM going back weeks ago. I thought RMAN would delete them.
I am doing hot backups of the databases to FRA for both databases. Using ASM, FRA, in a Data Guard environment.
I am not backing up anything to tape yet.
The ASM FRA foreign_archivelog directory on the logical standby FRA keeps growing and nothing is get deleted when
I run the following command every day.
delete expired backup;
delete noprompt force obsolete;
Primary database RMAN settings (Not all of them)
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 9 DAYS;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE DB_UNIQUE_NAME 'WMRTPRD' CONNECT IDENTIFIER 'WMRTPRD_CWY';
CONFIGURE DB_UNIQUE_NAME 'WMRTPRD2' CONNECT IDENTIFIER 'WMRTPRD2_CWY';
CONFIGURE DB_UNIQUE_NAME 'WMRTPRD3' CONNECT IDENTIFIER 'WMRTPRD3_DG';
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
Logical standby database RMAN setting (not all of them)
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 9 DAYS;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
How do I cleanup/delete the old ASM foreign_archivelog files?OK, the default is TRUE which is what it is now
from DBA_LOGSTDBY_PARAMETERS
LOG_AUTO_DELETE TRUE SYSTEM YES
I am not talking about deleting the Archive logs files for the Logical database that it is creating, but the Standby archive log files being sent to the Logical Database after they have been applied.
They are in the alert log as follows under RFS LogMiner: Registered logfile
RFS[1]: Selected log 4 for thread 1 sequence 159 dbid -86802306 branch 763744382
Thu Jan 12 15:44:57 2012
*RFS LogMiner: Registered logfile [+FRA/wmrtprd2/foreign_archivelog/wmrtprd/2012_01_12/thread_1_seq_158.322.772386297] to LogM*
iner session id [1]
Thu Jan 12 15:44:58 2012
LOGMINER: Alternate logfile found. Transition to mining archived logfile for session 1 thread 1 sequence 158, +FRA/wmrtprd2/
foreign_archivelog/wmrtprd/2012_01_12/thread_1_seq_158.322.772386297
LOGMINER: End mining logfile for session 1 thread 1 sequence 158, +FRA/wmrtprd2/foreign_archivelog/wmrtprd/2012_01_12/threa
d_1_seq_158.322.772386297
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 159, +DG1/wmrtprd2/onlinelog/group_4.284.771760923
Maybe you are looking for
-
Hi, a couple of days ago I decided I wanted all of my songs to have an album art. Before I didn't actually care, but since I discovered the view mode with the album arts at the top (the fourth one) I began searching for the right arts, since I like i
-
How do I stop auto sync then sync only one item
I have 5 Macs. They are all set to sync using dot mac. I hadn't used 2 of them lately, the others were being synced. I noticed that mail had 2 of the exact smart folders (with several folders within them). And all of the criteria disappeared from the
-
Moving to the UK from Canada.
I am moving to the UK in a couple of weeks, and I was wondering if my iMac will work over there, because of the voltage difference. I know that the wall chargers for Macbooks covert the voltage for you, but I have no idea if the iMac does the same.
-
I'm trying to figure out the best way of importing a photo library back into iPhoto without eating up too much of my available storage? I'm thinking of compressing the library on my external HD before importing/exporting back onto my iMac for safegua
-
How can I permanently disable Excel's Compatiblity Checker?
We're using the Excel 2003 format with VFP9. On opening Excel 2003 documents in the background Excel 2010 blocks because of its Compatibility Checker requiring an answer from the client which - as in the background - can not be given. So, is there an