Standby database query
Hi All,
How do i find the standby databases that are available for a primary database?
Suppose i have 2 standby databases for the primary. How do i find out the standby databases from the primary database other than checking the log_archive_dest parameter?
For eg: I have a 2 node rac database and a 2 node rac standby database.
I want to find out the standby node names and instance names from the primary node
OS:AIX
DB:10.2.0.5
Edited by: user13364377 on Oct 7, 2011 8:26 AM
user13364377 wrote:
Hi All,
How do i find the standby databases that are available for a primary database?
Suppose i have 2 standby databases for the primary. How do i find out the standby databases from the primary database other than checking the log_archive_dest parameter?
For eg: I have a 2 node rac database and a 2 node rac standby database.
I want to find out the standby node names and instance names from the primary node
OS:AIX
DB:10.2.0.5
Edited by: user13364377 on Oct 7, 2011 8:26 AM"other than checking the log_archive_dest parameter?"
Why the limitation/restriction from doing the obvious? Is this another "interview" question?
How to change a flat tire without using a jack and lug wrench?
Similar Messages
-
Relocating datafiles on standby database after mount point on stanby is ful
Hi,
We have a physical standby database.
The location of datafiles on primary database are at /oracle/oradata/ and the location of datafiles on standby database are at /oracle/oradata/
Now we are facing a situation of mount mount getting full on standby database so we need to move some tablespaces to another location on standby.
Say old location is /oracle/oradata/ and new location is /oradata_new/ and the tablespaces to be relocated are say tab1 and tab2.
Can anybody tell me whether following steps are correct.
1. Stop managed recovery on standby database
alter database recover managed standby database cancel;
2. Shutdown standby database
shutdown immediate;
3. Open standby database in mount stage
startup mount;
4. Copy the datafiles to new location say /oradata_new/ using os level command
4. Rename the datafile
alter database rename file
'/oracle/oradata/tab1.123451.dbf', '/oracle/oradata/tab1.123452.dbf','/oracle/oradata/tab2.123451.dbf',''/oracle/oradata/tab2.123452.dbf'
to '/oradata_new/tab1.123451.dbf', '/oradata_new/tab1.123452.dbf','/oradata_new/tab2.123451.dbf',''/oradata_new/tab2.123452.dbf';
5. Edit the parameter db_file_name_convert
alter system set db_file_name_convert='/oracle/oradata/tab1','/oradata_new/tab1','/oracle/oradata/tab2','/oradata_new/tab2'
6. Start a managed recovery on standby database
alter database recover managed standby database disconnect from session;
I am littelbit confused in step 5 as we want to relocate only two tablespaces and not all tablespaces so we have used.
Can we use db_file_name_convert like this i.e. does this work for only two tablespaces tab1 and tab2.
Thanks & Regards
GirishAhttp://download.oracle.com/docs/cd/B19306_01/server.102/b14239/manage_ps.htm#i1010428
8.3.4 Renaming a Datafile in the Primary Database
When you rename one or more datafiles in the primary database, the change is not propagated to the standby database. Therefore, if you want to rename the same datafiles on the standby database, you must manually make the equivalent modifications on the standby database because the modifications are not performed automatically, even if the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO.
The following steps describe how to rename a datafile in the primary database and manually propagate the changes to the standby database.
To rename the datafile in the primary database, take the tablespace offline:
SQL> ALTER TABLESPACE tbs_4 OFFLINE;
Exit from the SQL prompt and issue an operating system command, such as the following UNIX mv command, to rename the datafile on the primary system:
% mv /disk1/oracle/oradata/payroll/tbs_4.dbf
/disk1/oracle/oradata/payroll/tbs_x.dbf
Rename the datafile in the primary database and bring the tablespace back online:
SQL> ALTER TABLESPACE tbs_4 RENAME DATAFILE 2> '/disk1/oracle/oradata/payroll/tbs_4.dbf'
3> TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
SQL> ALTER TABLESPACE tbs_4 ONLINE;
Connect to the standby database, query the V$ARCHIVED_LOG view to verify all of the archived redo log files are applied, and then stop Redo Apply:
SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# APP
8 YES
9 YES
10 YES
11 YES
4 rows selected.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Shut down the standby database:
SQL> SHUTDOWN;
Rename the datafile at the standby site using an operating system command, such as the UNIX mv command:
% mv /disk1/oracle/oradata/payroll/tbs_4.dbf /disk1/oracle/oradata/payroll/tbs_x.dbf
Start and mount the standby database:
SQL> STARTUP MOUNT;
Rename the datafile in the standby control file. Note that the STANDBY_FILE_MANAGEMENT initialization parameter must be set to MANUAL.
SQL> ALTER DATABASE RENAME FILE '/disk1/oracle/oradata/payroll/tbs_4.dbf'
2> TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
On the standby database, restart Redo Apply:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
2> DISCONNECT FROM SESSION;
If you do not rename the corresponding datafile at the standby system, and then try to refresh the standby database control file, the standby database will attempt to use the renamed datafile, but it will not find it. Consequently, you will see error messages similar to the following in the alert log:
ORA-00283: recovery session canceled due to errors
ORA-01157: cannot identify/lock datafile 4 - see DBWR trace file
ORA-01110: datafile 4: '/Disk1/oracle/oradata/payroll/tbs_x.dbf' -
How to check data in physical standby database?
Hi!
I'm maintaining physical standby database system. everyday, i must check tranfer and apply progress. I known, it operate very good. No archive gap is found.
But i want to check data in physical standby database that there is consistant with primary database, there isn't? What method do I use? How to do?
thankSI hope the following will help
Verifying the Physical Standby Database
==========================================
Once you create the physical standby database and set up log transport services, you may want verify that database modifications are being successfully shipped from the primary database to the standby database.
To see the new archived redo logs that were received on the standby database, you should first identify the existing archived redo logs on the standby database, archive a few logs on the primary database, and then check the standby database again. The following steps show how to perform these tasks.
Step 1 Identify the existing archived redo logs.
On the standby database, query the V$ARCHIVED_LOG view to identify existing archived redo logs. For example:
SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME
2 FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# FIRST_TIME NEXT_TIME
8 11-JUL-02 17:50:45 11-JUL-02 17:50:53
9 11-JUL-02 17:50:53 11-JUL-02 17:50:58
10 11-JUL-02 17:50:58 11-JUL-02 17:51:03
3 rows selected.
Step 2 Archiving the current log.
On the primary database, archive the current log using the following SQL statement:
SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
Step 3 Verify that the new archived redo log was received.
On the standby database, query the V$ARCHIVED_LOG view to verify the redo log was received:
SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME
2> FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# FIRST_TIME NEXT_TIME
8 11-JUL-02 17:50:45 11-JUL-02 17:50:53
9 11-JUL-02 17:50:53 11-JUL-02 17:50:58
10 11-JUL-02 17:50:58 11-JUL-02 17:51:03
11 11-JUL-02 17:51:03 11-JUL-02 18:34:11
4 rows selected.
The logs are now available for log apply services to apply redo data to the standby database.
Step 4 Verify that the new archived redo log was applied.
On the standby database, query the V$ARCHIVED_LOG view to verify the archived redo log was applied.
SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG
2 ORDER BY SEQUENCE#;
SEQUENCE# APP
8 YES
9 YES
10 YES
11 YES
4 rows selected. -
Standby database is not applying redo logs due to missing archive log
We use 9.2.0.7 Oracle Database. My goal is to create a physical standby database.
I have followed all the steps necessary to fulfill this in Oracle Data Guard Concepts and Administration manual. Archived redo logs are transmitted from primary to standby database regularly. But the logs are not applied due to archive log gap.
SQL> select process, status from v$managed_standby;
PROCESS STATUS
ARCH CONNECTED
ARCH CONNECTED
MRP0 WAIT_FOR_GAP
RFS RECEIVING
RFS ATTACHED
SQL> select * from v$archive_gap;
THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
1 503 677
I have tried to find the missing archives on the primary database, but was unable to. They have been deleted (somehow) regularly by the existing backup policy on the primary database. I have looked up the backups, but these archive logs are too old to be in the backup. Backup retention policy is 1 redundant backup of each file. I didn't save older backups as I didn't really need them from up to this point.
I have cross checked (using rman crosscheck) the archive log copies on the primary database and deleted the "obsolete" copies of archive logs. But, v$archived_log view on the primary database only marked those entries as "deleted". Unfortunately, the standby database is still waiting for those logs to "close the gap" and doesn't apply the redo logs at all. I am reluctant to recreate the control file on the primary database as I'm afraid this occurred through the regular database backup operations, due to current backup retention policy and it probably might happen again.
The standby creation procedure was done by using the data files from 3 days ago. The archive logs which are "producing the gap" are older than a month, and are probably unneeded for standby recovery.
What shall I do?
Kind regards and thanks in advance,
MilivojOn a physical standby database
To determine if there is an archive gap on your physical standby database, query the V$ARCHIVE_GAP view as shown in the following example:
SQL> SELECT * FROM V$ARCHIVE_GAP;
THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
1 7 10
The output from the previous example indicates your physical standby database is currently missing log files from sequence 7 to sequence 10 for thread 1.
After you identify the gap, issue the following SQL statement on the primary database to locate the archived redo log files on your primary
database (assuming the local archive destination on the primary database is LOG_ARCHIVE_DEST_1):
SQL> SELECT NAME FROM V$ARCHIVED_LOG WHERE THREAD#=1 AND DEST_ID=1 AND 2> SEQUENCE# BETWEEN 7 AND 10;
NAME
/primary/thread1_dest/arcr_1_7.arc /primary/thread1_dest/arcr_1_8.arc /primary/thread1_dest/arcr_1_9.arc
Copy these log files to your physical standby database and register them using the ALTER DATABASE REGISTER LOGFILE statement on your physical standby database. For example:
SQL> ALTER DATABASE REGISTER LOGFILE
'/physical_standby1/thread1_dest/arcr_1_7.arc';
SQL> ALTER DATABASE REGISTER LOGFILE
'/physical_standby1/thread1_dest/arcr_1_8.arc';
After you register these log files on the physical standby database, you can restart Redo Apply.
Note:
The V$ARCHIVE_GAP fixed view on a physical standby database only returns the next gap that is currently blocking Redo Apply from continuing. After resolving the gap and starting Redo Apply, query the V$ARCHIVE_GAP fixed view again on the physical standby database to determine the next gap sequence, if there is one. Repeat this process until there are no more gaps.
Restoring the archived logs from the backup set
If the archived logs are not available in the archive destination then at that time we need to restore the required archived logs from the backup step. This task is accomplished in the following way.
To restore range specified archived logs:
Run {
Set archivelog destination to '/oracle/arch/arch_restore'
Restore archivelog from logseq=<xxxxx> until logseq=<xxxxxxx>
To restore all the archived logs:
Run {
Set archivelog destination to '/oracle/arch/arch_restore';
Restore archivelog all;
} -
Need query to find out standby database sync information
Hi All,
Please provide me query which give me information about how many standby database configured .I need to generate report hourly sync information of database in our project. I have more than 120 production db and some db having more than one standby database.some of then at local satndby (some of database (prod) in datacenter and some of database in DR datacenter)
Does it it possible to configure in 12c oem?.If it is possible guide me.How can I create report for all databases sync status within one report?
Thanks
GaneshHello;
I like this one:
Monitor Data Guard Transport
Best Regards
mseberg -
Query regarding standby database state when primary is down or un-reachable
Hi
I want to know if there is any reflection on the standby database states when it's primary is down or not reachable? I want to use this information from standby node to determine if I can programatically execute (dgmgrl) failover operation or not? This is considering that the broker configuration has no fast-startfailover and no observer enabled/configured.
Thanks,
Yojana989192 wrote:
Hi
I want to know if there is any reflection on the standby database states when it's primary is down or not reachable? I want to use this information from standby node to determine if I can programatically execute (dgmgrl) failover operation or not? This is considering that the broker configuration has no fast-startfailover and no observer enabled/configured.
Thanks,
YojanaYou don't have exactly such option,
But you have alternate for it. Whenever standby is unreachable to primary then from standby alert log file you can see informational messages as RFS: Possible network disconnect with primary database , So you can write a script to grep those contents and to mail alert, so that you can sense whether any issue with primary database.
HTH. -
Hi Guys..
I am using oracle 10.2.0.4.0 on windows 2003 server. I created a physical standby database successfully.
On standby database, I fired the following query
SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#
SEQUENCE# FIRST_TIM NEXT_TIME
10715 02-AUG-10 02-AUG-10
10716 02-AUG-10 02-AUG-10
10717 02-AUG-10 03-AUG-10
10718 03-AUG-10 03-AUG-10
10719 03-AUG-10 03-AUG-10
10720 03-AUG-10 03-AUG-10
10721 03-AUG-10 03-AUG-10
10722 03-AUG-10 03-AUG-10
10723 03-AUG-10 03-AUG-10
10724 03-AUG-10 03-AUG-10
10725 03-AUG-10 03-AUG-10
SEQUENCE# FIRST_TIM NEXT_TIME
10726 03-AUG-10 03-AUG-10
10727 03-AUG-10 03-AUG-10
10728 03-AUG-10 03-AUG-10
10729 03-AUG-10 03-AUG-10
I then did alter system switch logfile on primary database
Then on standby I fired the above query
SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#
SEQUENCE# FIRST_TIM NEXT_TIME
10715 02-AUG-10 02-AUG-10
10716 02-AUG-10 02-AUG-10
10717 02-AUG-10 03-AUG-10
10718 03-AUG-10 03-AUG-10
10719 03-AUG-10 03-AUG-10
10720 03-AUG-10 03-AUG-10
10721 03-AUG-10 03-AUG-10
10722 03-AUG-10 03-AUG-10
10723 03-AUG-10 03-AUG-10
10724 03-AUG-10 03-AUG-10
10725 03-AUG-10 03-AUG-10
SEQUENCE# FIRST_TIM NEXT_TIME
10726 03-AUG-10 03-AUG-10
10727 03-AUG-10 03-AUG-10
10728 03-AUG-10 03-AUG-10
10729 03-AUG-10 03-AUG-10
*10730 03-AUG-10 03-AUG-10*
My question is everytime I do alter systyem switch logfile on primary , two trace files are generated on primary database which are:
stutest_lns1_5764.trc
Dump file c:\oracle\admin\stutest\bdump\stutest_lns1_5764.trc
Tue Aug 03 15:50:35 2010
ORACLE V10.2.0.4.0 - 64bit Production vsnsta=0
vsnsql=14 vsnxtr=3
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Windows Server 2003 Version V5.2 Service Pack 2
CPU : 8 - type 8664, 2 Physical Cores
Process Affinity : 0x0000000000000000
Memory (Avail/Total): Ph:8414M/16378M, Ph+PgF:10750M/17814M
Instance name: stutest
Redo thread mounted by this instance: 1
Oracle process number: 43
Windows thread id: 5764, image: ORACLE.EXE (LNS1)
*** SERVICE NAME:(SYS$BACKGROUND) 2010-08-03 15:50:35.996
*** SESSION ID:(213.29604) 2010-08-03 15:50:35.996
*** 2010-08-03 15:50:35.996 60512 kcrr.c
LNS1: initializing for LGWR communication
LNS1: connecting to KSR channel
Success
LNS1: subscribing to KSR channel
Success
*** 2010-08-03 15:50:35.996 60565 kcrr.c
LNS1: initialized successfully ASYNC=1
Destination is specified with ASYNC=61440
Redo shipping client performing standby login
*** 2010-08-03 15:50:36.043 68145 kcrr.c
Logged on to standby successfully
Client logon and security negotiation successful!
Archiving to destination STUSTDBY ASYNC blocks=20480
Allocate ASYNC blocks: Previous blocks=0 New blocks=20480
Log file opened [logno 2]
*** 2010-08-03 16:00:58.344
Archiving to destination STUSTDBY ASYNC blocks=20480
Log file opened [logno 1]
*** 2010-08-03 16:04:44.383
Archiving to destination STUSTDBY ASYNC blocks=20480
Log file opened [logno 3]
*** 2010-08-03 16:07:36.794
Archiving to destination STUSTDBY ASYNC blocks=20480
Log file opened [logno 2]
stutest_lgwr_4092.trc
Dump file c:\oracle\admin\stutest\bdump\stutest_lgwr_4092.trc
Fri Jul 30 17:01:59 2010
ORACLE V10.2.0.4.0 - 64bit Production vsnsta=0
vsnsql=14 vsnxtr=3
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Windows Server 2003 Version V5.2 Service Pack 2
CPU : 8 - type 8664, 2 Physical Cores
Process Affinity : 0x0000000000000000
Memory (Avail/Total): Ph:13601M/16378M, Ph+PgF:10927M/17814M
Instance name: stutest
Redo thread mounted by this instance: 1
Oracle process number: 6
Windows thread id: 4092, image: ORACLE.EXE (LGWR)
*** 2010-07-30 17:01:59.622
*** SERVICE NAME:() 2010-07-30 17:01:59.606
*** SESSION ID:(221.1) 2010-07-30 17:01:59.606
Maximum redo generation record size = 156160 bytes
Maximum redo generation change vector size = 150676 bytes
*** 2010-07-30 22:01:00.446
Warning: log write time 770ms, size 2KB
*** 2010-07-30 22:08:37.586
Warning: log write time 1120ms, size 9KB
*** 2010-07-30 22:08:41.258
Warning: log write time 680ms, size 7KB
*** 2010-07-30 22:09:58.244
Warning: log write time 660ms, size 1KB
*** 2010-07-30 22:11:21.388
Warning: log write time 860ms, size 6KB
*** 2010-07-30 23:42:11.203
Warning: log write time 580ms, size 1KB
*** 2010-07-31 00:04:13.917
Warning: log write time 980ms, size 8KB
*** 2010-07-31 00:06:40.422
Warning: log write time 930ms, size 22KB
*** 2010-07-31 00:08:11.940
Warning: log write time 1800ms, size 23KB
*** 2010-07-31 21:13:33.694
Warning: log write time 1460ms, size 40KB
*** 2010-07-31 21:13:39.522
Warning: log write time 2790ms, size 87KB
*** 2010-07-31 21:13:46.054
Warning: log write time 4940ms, size 69KB
*** 2010-07-31 21:13:50.038
Warning: log write time 3980ms, size 81KB
*** 2010-07-31 21:13:55.616
Warning: log write time 5580ms, size 61KB
*** 2010-07-31 21:14:01.726
Warning: log write time 6110ms, size 77KB
*** 2010-07-31 21:14:08.258
Warning: log write time 3530ms, size 140KB
*** 2010-07-31 21:14:19.508
Warning: log write time 1500ms, size 3KB
*** 2010-07-31 22:07:49.954
Warning: log write time 930ms, size 1KB
*** 2010-07-31 23:16:01.054
Warning: log write time 1080ms, size 103KB
*** 2010-07-31 23:17:52.854
Warning: log write time 1360ms, size 3KB
*** 2010-07-31 23:23:26.631
Warning: log write time 710ms, size 2KB
*** 2010-08-01 00:04:58.476
Warning: log write time 690ms, size 13KB
*** 2010-08-01 00:06:51.980
Warning: log write time 590ms, size 20KB
*** 2010-08-01 00:07:38.153
Warning: log write time 1540ms, size 28KB
*** 2010-08-01 00:08:02.748
Warning: log write time 770ms, size 64KB
*** 2010-08-01 00:11:04.628
Warning: log write time 1140ms, size 43KB
*** 2010-08-01 17:05:49.886
Warning: log write time 780ms, size 3KB
*** 2010-08-01 21:00:46.571
Warning: log write time 910ms, size 365KB
*** 2010-08-01 21:09:22.447
Warning: log write time 2910ms, size 22KB
*** 2010-08-01 21:09:27.932
Warning: log write time 4430ms, size 62KB
*** 2010-08-01 21:09:34.010
Warning: log write time 6060ms, size 74KB
*** 2010-08-01 21:09:40.088
Warning: log write time 3080ms, size 150KB
*** 2010-08-01 21:09:45.495
Warning: log write time 2410ms, size 99KB
*** 2010-08-01 21:09:50.370
Warning: log write time 4870ms, size 40KB
*** 2010-08-01 21:09:55.401
Warning: log write time 5030ms, size 82KB
*** 2010-08-01 21:09:59.151
Warning: log write time 3610ms, size 65KB
*** 2010-08-01 23:05:40.560
Warning: log write time 720ms, size 4KB
*** 2010-08-01 23:06:05.030
Warning: log write time 1670ms, size 21KB
*** 2010-08-01 23:17:55.537
Warning: log write time 1540ms, size 116KB
*** 2010-08-01 23:23:35.891
Warning: log write time 600ms, size 1KB
*** 2010-08-02 00:05:52.363
Warning: log write time 1340ms, size 48KB
*** 2010-08-02 00:06:43.427
Warning: log write time 1060ms, size 24KB
*** 2010-08-02 00:06:50.177
Warning: log write time 1730ms, size 209KB
*** 2010-08-02 00:07:08.256
Warning: log write time 950ms, size 17KB
*** 2010-08-02 00:11:25.436
Warning: log write time 1690ms, size 8KB
*** 2010-08-02 00:12:11.313
Warning: log write time 850ms, size 45KB
*** 2010-08-02 00:13:55.754
Warning: log write time 560ms, size 3KB
*** 2010-08-02 11:27:52.686
Warning: log write time 1440ms, size 46KB
*** 2010-08-02 11:27:58.780
Warning: log write time 3790ms, size 54KB
*** 2010-08-02 11:28:02.546
Warning: log write time 3760ms, size 70KB
*** 2010-08-02 11:28:08.483
Warning: log write time 5940ms, size 74KB
*** 2010-08-02 11:28:13.812
Warning: log write time 2330ms, size 139KB
*** 2010-08-02 11:28:18.796
Warning: log write time 1980ms, size 79KB
*** 2010-08-02 11:28:25.093
Warning: log write time 3360ms, size 88KB
*** 2010-08-02 11:28:29.421
Warning: log write time 4330ms, size 38KB
*** 2010-08-02 16:10:45.927
Warning: log write time 590ms, size 3KB
*** 2010-08-02 22:08:57.806
Warning: log write time 700ms, size 37KB
*** 2010-08-02 23:07:22.262
Warning: log write time 1750ms, size 234KB
*** 2010-08-02 23:13:44.993
Warning: log write time 1410ms, size 17KB
*** 2010-08-03 00:04:08.387
Warning: log write time 670ms, size 6KB
*** 2010-08-03 00:07:44.347
Warning: log write time 1890ms, size 1024KB
*** 2010-08-03 00:08:14.395
Warning: log write time 1680ms, size 1024KB
*** 2010-08-03 00:08:26.817
Warning: log write time 570ms, size 36KB
*** 2010-08-03 00:08:39.427
Warning: log write time 1540ms, size 1024KB
*** 2010-08-03 00:08:50.818
Warning: log write time 1810ms, size 1025KB
*** 2010-08-03 00:08:58.990
Warning: log write time 1640ms, size 942KB
*** 2010-08-03 00:09:21.303
Warning: log write time 1580ms, size 1024KB
*** 2010-08-03 00:09:33.710
Warning: log write time 1790ms, size 1025KB
*** 2010-08-03 00:09:42.382
Warning: log write time 1860ms, size 1024KB
*** 2010-08-03 00:09:50.945
Warning: log write time 1590ms, size 1024KB
*** 2010-08-03 10:28:34.753
Warning: log write time 2330ms, size 47KB
*** 2010-08-03 10:29:44.440
Warning: log write time 810ms, size 1KB
*** 2010-08-03 10:32:27.392
Warning: log write time 890ms, size 1KB
*** 2010-08-03 10:36:02.536
Warning: log write time 2070ms, size 8KB
*** 2010-08-03 10:44:34.174
Warning: log write time 740ms, size 7KB
*** 2010-08-03 12:04:46.687
Warning: log write time 2850ms, size 86KB
*** 2010-08-03 12:04:52.656
Warning: log write time 2970ms, size 85KB
*** 2010-08-03 12:04:54.547
Warning: log write time 1810ms, size 45KB
*** 2010-08-03 14:06:20.827
Warning: log write time 500ms, size 0KB
*** 2010-08-03 14:13:46.404
Warning: log write time 820ms, size 0KB
*** 2010-08-03 15:50:32.996
*** 2010-08-03 15:50:32.996 57052 kcrr.c
Initializing NetServer[LNS1] for dest=STUSTDBY mode ASYNC
Initializing PGA storage for Netserver communication
LNSb is not running anymore.
Check if new Async LNS1 needs to be started..
.. yes it needs to be started
Starting LNS1 ...
Subscribing to KSR Channel [id=1]
success!
Indicating recv buffer for KSR Channel [id=1]
success
Waiting for LNS1 to initialize itself
*** 2010-08-03 15:50:36.012 57343 kcrr.c
Netserver LNS1 [pid 5764] for mode ASYNC has been initialized
Performing a channel reset to ignore previous responses
Connecting as publisher to KSR Channel [id=1]
Successfully started LNS1 [pid 5764] for dest STUSTDBY mode ASYNC ocis=0x00000000144AE5B0
*** 2010-08-03 15:50:36.012 57846 kcrr.c
Making upiahm request to LNS1 [pid 5764]: Begin Time is <08/03/2010 15:50:32>. NET_TIMEOUT = <10> seconds
*** 2010-08-03 16:00:58.266
*** 2010-08-03 16:00:58.266 57052 kcrr.c
Initializing NetServer[LNS1] for dest=STUSTDBY mode ASYNC
LNSb is not running anymore.
Check if new Async LNS1 needs to be started..
Previous Async LNS1 [pid 5764] is running .. no need to start another one
LGWR detected that Async LNS1 [pid 5764] is already running
*** 2010-08-03 16:04:44.289
*** 2010-08-03 16:04:44.289 57052 kcrr.c
Initializing NetServer[LNS1] for dest=STUSTDBY mode ASYNC
LNSb is not running anymore.
Check if new Async LNS1 needs to be started..
Previous Async LNS1 [pid 5764] is running .. no need to start another one
LGWR detected that Async LNS1 [pid 5764] is already running
*** 2010-08-03 16:07:36.747
*** 2010-08-03 16:07:36.747 57052 kcrr.c
Initializing NetServer[LNS1] for dest=STUSTDBY mode ASYNC
LNSb is not running anymore.
Check if new Async LNS1 needs to be started..
Previous Async LNS1 [pid 5764] is running .. no need to start another one
LGWR detected that Async LNS1 [pid 5764] is already running
*** 2010-08-03 16:13:06.633
Warning: log write time 570ms, size 0KB
Did I miss something while creating standby.???
Thanks for the helpare these databases on same server.
BTW These are not errors, they are warning ... I have also seen these kind of warning many times. they can be ignored if ur shipping and recovery on standby is Preperly happening.
Regards
jasbir -
Hi Friends,
I am getting the following exception in logical standby database at the time of Sql Apply.
After run the command alter database start logical standby apply sql apply services start but after few second automatically stop and getting following exception.
alter database start logical standby apply
Tue May 17 06:42:00 2011
No optional part
Attempt to start background Logical Standby process
LOGSTDBY Parameter: MAX_SERVERS = 20
LOGSTDBY Parameter: MAX_SGA = 100
LOGSTDBY Parameter: APPLY_SERVERS = 10
LSP0 started with pid=30, OS id=4988
Tue May 17 06:42:00 2011
Completed: alter database start logical standby apply
Tue May 17 06:42:00 2011
LOGSTDBY status: ORA-16111: log mining and apply setting up
Tue May 17 06:42:00 2011
LOGMINER: Parameters summary for session# = 1
LOGMINER: Number of processes = 4, Transaction Chunk Size = 201
LOGMINER: Memory Size = 100M, Checkpoint interval = 500M
Tue May 17 06:42:00 2011
LOGMINER: krvxpsr summary for session# = 1
LOGMINER: StartScn: 0 (0x0000.00000000)
LOGMINER: EndScn: 0 (0x0000.00000000)
LOGMINER: HighConsumedScn: 2660033 (0x0000.002896c1)
LOGMINER: session_flag 0x1
LOGMINER: session# = 1, preparer process P002 started with pid=35 OS id=4244
LOGSTDBY Apply process P014 started with pid=47 OS id=5456
LOGSTDBY Apply process P010 started with pid=43 OS id=6484
LOGMINER: session# = 1, reader process P000 started with pid=33 OS id=4732
Tue May 17 06:42:01 2011
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 1417, X:\TANVI\ARCHIVE2\ARC01417_0748170313.001
Tue May 17 06:42:01 2011
LOGMINER: Turning ON Log Auto Delete
Tue May 17 06:42:01 2011
LOGMINER: End mining logfile: X:\TANVI\ARCHIVE2\ARC01417_0748170313.001
Tue May 17 06:42:01 2011
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 1418, X:\TANVI\ARCHIVE2\ARC01418_0748170313.001
LOGSTDBY Apply process P008 started with pid=41 OS id=4740
LOGSTDBY Apply process P013 started with pid=46 OS id=7864
LOGSTDBY Apply process P006 started with pid=39 OS id=5500
LOGMINER: session# = 1, builder process P001 started with pid=34 OS id=4796
Tue May 17 06:42:02 2011
LOGMINER: skipped redo. Thread 1, RBA 0x00058a.00000950.0010, nCV 6
LOGMINER: op 4.1 (Control File)
Tue May 17 06:42:02 2011
LOGMINER: End mining logfile: X:\TANVI\ARCHIVE2\ARC01418_0748170313.001
Tue May 17 06:42:03 2011
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 1419, X:\TANVI\ARCHIVE2\ARC01419_0748170313.001
Tue May 17 06:42:03 2011
LOGMINER: End mining logfile: X:\TANVI\ARCHIVE2\ARC01419_0748170313.001
Tue May 17 06:42:03 2011
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 1420, X:\TANVI\ARCHIVE2\ARC01420_0748170313.001
Tue May 17 06:42:03 2011
LOGMINER: End mining logfile: X:\TANVI\ARCHIVE2\ARC01420_0748170313.001
Tue May 17 06:42:03 2011
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 1421, X:\TANVI\ARCHIVE2\ARC01421_0748170313.001
LOGSTDBY Analyzer process P004 started with pid=37 OS id=5096
Tue May 17 06:42:03 2011
LOGMINER: End mining logfile: X:\TANVI\ARCHIVE2\ARC01421_0748170313.001
LOGSTDBY Apply process P007 started with pid=40 OS id=2760
Tue May 17 06:42:03 2011
Errors in file x:\oracle\product\10.2.0\admin\tanvi\bdump\tanvi_p001_4796.trc:
ORA-00600: internal error code, arguments: [krvxbpx20], [1], [1418], [2380], [16], [], [], []
LOGSTDBY Apply process P012 started with pid=45 OS id=7152
Tue May 17 06:42:03 2011
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 1422, X:\TANVI\ARCHIVE2\ARC01422_0748170313.001
Tue May 17 06:42:03 2011
LOGMINER: End mining logfile: X:\TANVI\ARCHIVE2\ARC01422_0748170313.001
Tue May 17 06:42:03 2011
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 1423, X:\TANVI\ARCHIVE2\ARC01423_0748170313.001
Tue May 17 06:42:03 2011
LOGMINER: End mining logfile: X:\TANVI\ARCHIVE2\ARC01423_0748170313.001
Tue May 17 06:42:03 2011
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 1424, X:\TANVI\ARCHIVE2\ARC01424_0748170313.001
LOGMINER: session# = 1, preparer process P003 started with pid=36 OS id=5468
Tue May 17 06:42:03 2011
LOGMINER: End mining logfile: X:\TANVI\ARCHIVE2\ARC01424_0748170313.001
Tue May 17 06:42:04 2011
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 1425, X:\TANVI\ARCHIVE2\ARC01425_0748170313.001
LOGSTDBY Apply process P011 started with pid=44 OS id=6816
LOGSTDBY Apply process P005 started with pid=38 OS id=5792
LOGSTDBY Apply process P009 started with pid=42 OS id=752
Tue May 17 06:42:05 2011
krvxerpt: Errors detected in process 34, role builder.
Tue May 17 06:42:05 2011
krvxmrs: Leaving by exception: 600
Tue May 17 06:42:05 2011
Errors in file x:\oracle\product\10.2.0\admin\tanvi\bdump\tanvi_p001_4796.trc:
ORA-00600: internal error code, arguments: [krvxbpx20], [1], [1418], [2380], [16], [], [], []
LOGSTDBY status: ORA-00600: internal error code, arguments: [krvxbpx20], [1], [1418], [2380], [16], [], [], []
Tue May 17 06:42:06 2011
Errors in file x:\oracle\product\10.2.0\admin\tanvi\bdump\tanvi_lsp0_4988.trc:
ORA-12801: error signaled in parallel query server P001
ORA-00600: internal error code, arguments: [krvxbpx20], [1], [1418], [2380], [16], [], [], []
Tue May 17 06:42:06 2011
LogMiner process death detected
Tue May 17 06:42:06 2011
logminer process death detected, exiting logical standby
LOGSTDBY Analyzer process P004 pid=37 OS id=5096 stopped
LOGSTDBY Apply process P010 pid=43 OS id=6484 stopped
LOGSTDBY Apply process P008 pid=41 OS id=4740 stopped
LOGSTDBY Apply process P012 pid=45 OS id=7152 stopped
LOGSTDBY Apply process P014 pid=47 OS id=5456 stopped
LOGSTDBY Apply process P005 pid=38 OS id=5792 stopped
LOGSTDBY Apply process P006 pid=39 OS id=5500 stopped
LOGSTDBY Apply process P007 pid=40 OS id=2760 stopped
LOGSTDBY Apply process P011 pid=44 OS id=6816 stopped
Tue May 17 06:42:10 2011Errors in file x:\oracle\product\10.2.0\admin\tanvi\bdump\tanvi_p001_4796.trc:
ORA-00600: internal error code, arguments: [krvxbpx20], [1], [1418], [2380], [16], [], [], []submit an SR to ORACLE SUPPORT.
refer these too
*ORA-600/ORA-7445 Error Look-up Tool [ID 153788.1]*
*Bug 6022014: ORA-600 [KRVXBPX20] ON LOGICAL STANDBY* -
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 -
Problem creating physical Standby database with RMAN
Hi All
I am trying to learn oracle dataguard and as part of the process learning creating standby database.
Platform : Sun-Fire-V250 Sparc, Solaris 10
Database Version - Oracle 11R2
I am creating standby database on same server, so directory structure is different.
Following the instructions on Oracle site I managed to create a functional physical standby database. But I am not able to create standby database using RMAN. These are the steps that I followed-
1.Set up all necessary parameters on primary database as done while creating physical standby database manually, eg setting force logging, creating standby logs etc.
2.Edited parameter file on primary database as done while creating manual pysical standby database creation. Some of the changes done are-
On Primary Database:
*.FAL_CLIENT='orcl11020' #Primary database unique name
*.FAL_SERVER='stdby_11' #Standby database unique name
db_file_name_convert='/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020'
log_file_name_convert='/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11/redo_mem','/<dir>/oradata/orcl11020/redo_mem'
standby_file_management=auto
*.log_archive_config='DG_CONFIG=(orcl11020,stdby_11)'
*.log_archive_dest_1='LOCATION=/<dir>/flash_recovery_area/ORCL11020/archivelog
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=orcl11020'
*.log_archive_dest_2='SERVICE=stdby_11 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=stdby_11'
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.LOG_ARCHIVE_FORMAT='%t_%s_%r.arc'
*.LOG_ARCHIVE_MAX_PROCESSES=30
Copied same pfile for standby database and modified following-
*.control_files='/<dir>/oradata/stdby_11/stdby_11.ctl','/<dir>/fra_stdby/stdby_11/stdby_11.ctl'
*.db_name='orcl1102'
*.db_unique_name='stdby_11'
*.FAL_CLIENT='stdby_11'
*.FAL_SERVER='orcl11020'
db_file_name_convert='/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11'
log_file_name_convert='/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020/redo_mem','/<dir>/oradata/stdby_11/redo_mem'
standby_file_management=auto
*.log_archive_dest_1='LOCATION=/<dir>/fra_stdby/STDBY_11/archivelog
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=stdby_11'
*.log_archive_dest_2='SERVICE=orcl11020 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
db_unique_name=orcl11020'
3. Add relevant information in tnsnames.ora and listener.ora files and then restart listener.
3. Created password file with same credential as primary database.
4.Up-to-date RMAN backup of primary database available.
5.Create standby controlfile with rman
While primary database s open (I tried with primary database in mount mode as well)-
$>rman catalog rman/paswd@rman target /
RMAN> BACKUP CURRENT CONTROLFILE FOR STANDBY;
6. Open a new terminal and startup standby database in nomount mode using parameter file created -
$>ORACLE_SID=stdby_11
$>export ORACLE_SID
$>sqlplus / as sysdba
SQL>STARTUP NOMOUNT pfile='<location/initfilename.ora'
SQL>quit
$> rman AUXILIARY / target sys/passwd@orcl11020 catalog rman/passwd@rman
RMAN>DUPLICATE TARGET DATABASE FOR STANDBY DORECOVER;
RMAN finishes without error but archive logs are not being tranported. Looking at the log, following caught my eye-
Error 1017 received logging on to the standby
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
returning error ORA-16191
FAL[client, ARC2]: Error 16191 connecting to orcl11020 for fetching gap sequence
Errors in file /<>dir>/diag/rdbms/stdby_11/stdby_11/trace/stdby_11_arc2_24321.trc:
ORA-16191: Primary log shipping client not logged on standby
Errors in file /<dir>/diag/rdbms/stdby_11/stdby_11/trace/stdby_11_arc2_24321.trc:
ORA-16191: Primary log shipping client not logged on standby
So on both primary and standby I confirmed
SQL> show parameter remote_login_passwordfile
NAME TYPE VALUE
remote_login_passwordfile string EXCLUSIVE
To make double sure that password files are same, I shutdown both databases, delete password files and recreated with same credentials.
Password files are called - orapworcl11020 and orapwstdby_11
Can someone guide me where thisngs are going wrong here please.Not sure if I understood it clearly.
SELECT * FROM V$ARCHIVE_GAP;
returns no rows so there is no gap.
But could you please explain me the result of the previous query. To catch up again, on standby when I check
SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG
SEQUENCE# APPLIED
75 NO
74 NO
76 NO
77 NO
I understand that though archive files have been copied across but they are not applied yet.
On primary when I give your query -
SELECT name as STANDBY,SEQUENCE#,applied, completion_time
2 FROM v$archived_log
3 where dest_id=2
4 and sequence# BETWEEN 74 and 80;
I get -
STANDBY SEQUENCE# APPLIED COMPLETIO
stdby_11 74 YES 28-JUN-11
stdby_11 75 YES 28-JUN-11
stdby_11 76 YES 29-JUN-11
stdby_11 77 YES 29-JUN-11
stdby_11 78 YES 29-JUN-11
stdby_11 79 YES 29-JUN-11
stdby_11 80 YES 29-JUN-11
stdby_11 75 NO 07-JUL-11
stdby_11 74 NO 07-JUL-11
stdby_11 76 NO 07-JUL-11
stdby_11 77 NO 07-JUL-11
stdby_11 78 NO 07-JUL-11
I have intentionally given
sequence# BETWEEN 74 and 80
because I know in the current incarnaion of the database, max sequence is 78.
So my understanding is, the rows between 28-29 June are from previous incarnation, correct me if I am wrong
Archive files of the current incarnation, since I successfully created standby database are shipped but yet to be applied - am I right?
Then my final question is, when will these archives be applied to standby database?
I am sorry to ask too many questions but I am just trying to understand how it all works.
Thanks for your help again -
How to find the timestamp and SCN in the standby database?
Hai,
I have Oracle 9.2.0.4 RAC with 2 nodes in the production. The logs generated at these servers will be manully moved to my standby database and will be applied. To know what isthe maximum log files applied in the standby database, i am using the below mentioned query in the standby database,
Select thread#,max(sequence#) from v$log_history group by thread#
In general i am using "recover standby database until cancel" command and then checking the database with the above mentioned query whether all the logs are applied or not.
If i use time based or scn based recovery in standby database i.e., "recover standby database until time <time>" or "recover standby database until change <scn number>" , after completion of the recovery, apart from the message "Media recovery complete" or by seeing the alert log, is there any way to query the standby database, so that i can identify the time or scn upto which the archived redo log files got applied.Hi Sridhar,
There should be some view which will have applied_scn information. There is one more option i can suggest, you can create a heart beat table in production with 2 column like scn and timestamp. Update this table every minute. From standby db you can query this table and get fair idea on applied_scn and timestamp.
While exporting you can export using flashback_scn by taking the value from heartbeat table of standby.
This heartbeat table is used very common in streams environment. Just see if this helps you.
hth,
http://borndba.com -
Problem Converting standby database from snapshot to physical
Any help willl be greatly appreciated...
I am trying to convert a standby database that is in "snapshot" mode back to "physical" standby and I am encountering problems in the process from the "DGMGRL" command line.
Both instances are on the same physical machine. Everything was working fine untill I tried to change the db from snapshot to physical. The DGMGRL starts the conversion process and is able to shutdown but when trying to restart the instance is fails and reports that the service is not defined.
Here is the issue I am facing:
C:\app\MMJ\product\11.1.0\db_1\BIN>
C:\app\MMJ\product\11.1.0\db_1\BIN>set ORACLE_SID=I11G1 <======= the primary database
C:\app\MMJ\product\11.1.0\db_1\BIN>dgmgrl
DGMGRL for 32-bit Windows: Version 11.1.0.6.0 - Production
Copyright (c) 2000, 2005, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/password@i11g1sb <===== the standby database currently in snapshot mode
Connected.
DGMGRL> connect sys/password@i11g1 <==== the primary database
Connected.
DGMGRL> convert database 'i11g1sb' to physical standby;
Converting database "i11g1sb" to a Physical Standby database, please wait...
Operation requires shutdown of instance "i11g1sb" on database "i11g1sb"
Shutting down instance "i11g1sb"...
Database closed.
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "i11g1sb" on database "i11g1sb"
Starting instance "i11g1sb"...
Unable to connect to database
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Failed.
You are no longer connected to ORACLE
Please connect again.
Unable to start instance "i11g1sb"
You must start instance "i11g1sb" manually
Failed to convert database "i11g1sb"
DGMGRL> show configuration
Configuration
Name: DGConfig1
Enabled: YES
Protection Mode: MaxPerformance
Databases:
i11g1 - Primary database
i11g1sb - Snapshot standby database (disabled)
Fast-Start Failover: DISABLED
Current status for "DGConfig1":
SUCCESS
DGMGRL> exit
C:\app\MMJ\product\11.1.0\db_1\BIN>set ORACLE_SID=I11G1SB
C:\app\MMJ\product\11.1.0\db_1\BIN>sqlplus /nolog
SQL*Plus: Release 11.1.0.6.0 - Production on Wed Mar 25 11:40:16 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 426852352 bytes
Fixed Size 1333648 bytes
Variable Size 369100400 bytes
Database Buffers 50331648 bytes
Redo Buffers 6086656 bytes
Database mounted.
Database opened.
==============>>>> as you can see I can start the standby database without any problems and even query the table in which I made some changes. I had added the record with "Region_ID"=30. I have
SQL> select * from hr.regions;
REGION_ID REGION_NAME
30 JAPAC
1 Europe
2 Americas
3 Asia
4 Middle East and Africa
SQL>
The same table on the primary database has the following records in the same table:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\MMJ>set ORACLE_HOME=c:\app\mmj\product\11.1.0\db_1
C:\Documents and Settings\MMJ>set ORACLE_SID=i11g1
C:\Documents and Settings\MMJ>
C:\Documents and Settings\MMJ>cd %ORACLE_HOME%
C:\app\MMJ\product\11.1.0\db_1>cd bin
C:\app\MMJ\product\11.1.0\db_1\BIN>
C:\app\MMJ\product\11.1.0\db_1\BIN>
C:\app\MMJ\product\11.1.0\db_1\BIN>sqlplus /nolog
SQL*Plus: Release 11.1.0.6.0 - Production on Wed Mar 25 11:43:10 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL>
SQL> select * from hr.regions;
REGION_ID REGION_NAME
1 Europe
2 Americas
3 Asia
4 Middle East and Africa
20 JAPAC
40 JAPAC
6 rows selected.
SQL>
=======> The TNSPING works fine against both the databases.
C:\app\MMJ\product\11.1.0\db_1\BIN>set O
ORACLE_HOME=c:\app\mmj\product\11.1.0\db_1
ORACLE_SID=I11G1SB
OS=Windows_NT
C:\app\MMJ\product\11.1.0\db_1\BIN>
C:\app\MMJ\product\11.1.0\db_1\BIN>tnsping i11g1sb
TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 25-MAR-2009 16:56:42
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
c:\app\mmj\product\11.1.0\db_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = MHost)(PORT = 1523))) (CONNECT_DATA = (SERVICE_NAM
E = I11G1SB)))
OK (230 msec)
C:\app\MMJ\product\11.1.0\db_1\BIN>tnsping i11g1
TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 25-MAR-2009 16:56:47
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
c:\app\mmj\product\11.1.0\db_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = MHost)(PORT = 1523))) (CONNECT_DATA = (SERVICE_NAM
E = I11G1)))
OK (30 msec)
C:\app\MMJ\product\11.1.0\db_1\BIN>lsnrctl
LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 25-MAR-2009 16:57:01
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> set current_listener i11g1
Current Listener is i11g1
LSNRCTL> services
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MHost)(PORT=1523)))
Services Summary...
Service "I11G1" has 1 instance(s).
Instance "I11G1", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:1 refused:0
LOCAL SERVER
Service "I11G1SB" has 1 instance(s).
Instance "I11G1SB", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:55 refused:1
LOCAL SERVER
Service "I11G1SB_DGMGRL" has 1 instance(s).
Instance "I11G1SB", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "i11g1.mhost" has 1 instance(s).
Instance "i11g1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:6 refused:0 state:ready
LOCAL SERVER
Service "i11g1XDB.mhost" has 1 instance(s).
Instance "i11g1", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: MHost, pid: 3944>
(ADDRESS=(PROTOCOL=tcp)(HOST=MHost)(PORT=1430))
Service "i11g1_DGB.mhost" has 1 instance(s).
Instance "i11g1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:6 refused:0 state:ready
LOCAL SERVER
Service "i11g1_XPT.mhost" has 1 instance(s).
Instance "i11g1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:6 refused:0 state:ready
LOCAL SERVER
Service "i11g1sb.mhost" has 1 instance(s).
Instance "i11g1sb", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "i11g1sbXDB.mhost" has 1 instance(s).
Instance "i11g1sb", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: MHost, pid: 7336>
(ADDRESS=(PROTOCOL=tcp)(HOST=MHost)(PORT=1931))
Service "i11g1sb_DGB.MHost" has 1 instance(s).
Instance "i11g1sb", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "i11g1sb_XPT.mhost" has 1 instance(s).
Instance "i11g1sb", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully
LSNRCTL>Thanks for the response.
So, here is the status now....with a little background...
After my original post, I started to read the manuals and I found the sql command to convert the database back from snapshot to physical standby (sb).
That worked fine and I had my snapshot sb back to physical sb.
So when you posted the suggestion, I already had my db in physical sb mode. I said no problem, I will convert it back to snapshot and then back again using dgmgrl instead of sql+
Well here is how my listener is configured now.
SID_LIST_I11G1 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = I11G1.MHOST)
(ORACLE_HOME = c:\app\mmj\product\11.1.0\db_1)
(SID_NAME = I11G1)
(SID_DESC =
(GLOBAL_DBNAME = I11G1SB.MHOST)
(ORACLE_HOME = c:\app\mmj\product\11.1.0\db_1)
(SID_NAME = I11G1SB)
(SID_DESC =
(GLOBAL_DBNAME = I11G1SB_DGMGRL)
(ORACLE_HOME = c:\app\mmj\product\11.1.0\db_1)
(SID_NAME = I11G1SB)
Then using dgmgrl I tried to change the db from p-sb to s-sb and the results are not good....
"i11g1 >"dgmgrl
DGMGRL for 32-bit Windows: Version 11.1.0.6.0 - Production
Copyright (c) 2000, 2005, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL>
DGMGRL> connect sys/[email protected]
Connected.
DGMGRL>
DGMGRL>
DGMGRL> convert database 'i11g1sb' to snapshot standby;
Converting database "i11g1sb" to a Snapshot Standby database, please wait...
Database "i11g1sb" converted successfully
DGMGRL> show configuration
Configuration
Name: DGConfig1
Enabled: YES
Protection Mode: MaxPerformance
Databases:
i11g1 - Primary database
i11g1sb - Snapshot standby database
Fast-Start Failover: DISABLED
Current status for "DGConfig1":
Warning: ORA-16607: one or more databases have failed
DGMGRL> show configuration
Configuration
Name: DGConfig1
Enabled: YES
Protection Mode: MaxPerformance
Databases:
i11g1 - Primary database
i11g1sb - Snapshot standby database
Fast-Start Failover: DISABLED
Current status for "DGConfig1":
Warning: ORA-16607: one or more databases have failed
DGMGRL> show database 'i11g1sb';
Database
Name: i11g1sb
Role: SNAPSHOT STANDBY
Enabled: YES
Intended State: APPLY-OFF
Instance(s):
i11g1sb
Current status for "i11g1sb":
SUCCESS
DGMGRL> show database 'i11g1';
Database
Name: i11g1
Role: PRIMARY
Enabled: YES
Intended State: TRANSPORT-ON
Instance(s):
i11g1
Current status for "i11g1":
Error: ORA-16778: redo transport error for one or more databases
DGMGRL> exit
Not sure if the following (notice the typo in the service name) in the parameter (log_archive_dest_2) definition on the standby d/b has anything to do with this. I did not get this error when I initially converted to s-sb.
also I checked all my session notes, I did not type the command to set this parameter on the standby d/b and so it was not a typo on my part. However, it seems to have come from the rman script supplied with the obe. This script is supposed to clone the primary d/b to a standby db and in the process replace the string /i11g1/ with /i11g1sb/.
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
log_archive_dest_2 string service=i11g1sbsb async valid_
for=(online_logfile,primary_ro
le) db_unique_name=i11g1sb
SQL>
SQL>
SQL> select instance_name from v$instance;
INSTANCE_NAME
i11g1sb
SQL>
Given all this, the archive logs seem to be shipping correctly to the sby d/b.
"i11g1sb >"cd C:\app\MMJ\flash_recovery_area\i11g1sb\ARCHIVELOG\2009_03_30
"i11g1sb >"dir
Volume in drive C is Local Disk
Volume Serial Number is 3189-6472
Directory of C:\app\MMJ\flash_recovery_area\i11g1sb\ARCHIVELOG\2009_03_30
30/03/2009 09:05 PM <DIR> .
30/03/2009 09:05 PM <DIR> ..
30/03/2009 05:41 PM 35,627,008 O1_MF_1_137_4X2H4JJM_.ARC
30/03/2009 05:41 PM 1,910,784 O1_MF_1_138_4X2H4LVC_.ARC
30/03/2009 09:04 PM 10,447,360 O1_MF_1_139_4X2V03RW_.ARC
30/03/2009 09:05 PM 8,654,848 O1_MF_1_140_4X2V3BWB_.ARC
4 File(s) 56,640,000 bytes
2 Dir(s) 39,716,225,024 bytes free
"i11g1sb >"
"i11g1 >"dir
Volume in drive C is Local Disk
Volume Serial Number is 3189-6472
Directory of C:\app\MMJ\flash_recovery_area\I11G1\ARCHIVELOG\2009_03_30
30/03/2009 09:05 PM <DIR> .
30/03/2009 09:05 PM <DIR> ..
30/03/2009 04:09 PM 35,627,008 O1_MF_1_137_4X29QHTV_.ARC
30/03/2009 04:24 PM 1,910,784 O1_MF_1_138_4X2BMOC7_.ARC
30/03/2009 06:32 PM 10,447,360 O1_MF_1_139_4X2L4J3X_.ARC
30/03/2009 09:05 PM 8,654,848 O1_MF_1_140_4X2V37KL_.ARC
4 File(s) 56,640,000 bytes
2 Dir(s) 39,716,229,120 bytes free
I am tempted to start all over again, but I'd rather use this opportunity to debug this issue (as a learning exercise). I can always start from scratch. That brings up another Q: What do I need to do to blow away all traces of the stand by database (including all the archive logs etc...) keeping my primary intact. I'd also like to blow away all snapshot and archive logs for the primary as well. -
Logical Standby Database Not Getting Sync With Primary Database
Hi All,
I am using a Primary DB and Logical Standby DB configuration in Oracle 10g:-
Version Name:-
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Solaris: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
We have build the logical standby last week and till date the Logical DB is not sync. I have checked the init parameters and I wont see any problems with it. Also archive log destinations are also fine enough.
We have a important table named "HPD_HELPDESK" where record count is growing gradually whereas in logical standby it's not growing. There are some 19K record difference in the both the tables.
I have checked the alert log but it is also not giving any error message. Please find the last few lines of the alert log in logical Database:-
RFS LogMiner: Registered logfile [oradata_san1/oradata/remedy/arch/ars1_1703_790996778.arc] to LogMiner session id [1]
Tue Aug 28 14:56:52 GMT 2012
RFS[2853]: Successfully opened standby log 5: '/oracle_data/oradata/remedy/stbyredo01.log'
Tue Aug 28 14:56:58 GMT 2012
RFS LogMiner: Client enabled and ready for notification
Tue Aug 28 14:57:00 GMT 2012
RFS LogMiner: Registered logfile [oradata_san1/oradata/remedy/arch/ars1_1704_790996778.arc] to LogMiner session id [1]
Tue Aug 28 15:06:40 GMT 2012
RFS[2854]: Successfully opened standby log 5: '/oracle_data/oradata/remedy/stbyredo01.log'
Tue Aug 28 15:06:47 GMT 2012
RFS LogMiner: Client enabled and ready for notification
Tue Aug 28 15:06:49 GMT 2012
RFS LogMiner: Registered logfile [oradata_san1/oradata/remedy/arch/ars1_1705_790996778.arc] to LogMiner session id [1]
I am not able to trace the issue that why the records are not growing in logical DB. Please provide your inputs.
Regards,
ArijitHow do you know that there's such a gap between the tables?
If your standby db is a physical standby, then it is not open and you can't query your table without cancelling the recovery of the managed standby database.
What does it say if you execute this sql?
SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;The ARCH processes should be connected and MRP waiting for a file.
If you query for the archive_gaps, do you get any hits?
select * from gv$archive_gapIf you're not working in a RAC environment you need to query v$archive_gap, instead!
Did you check whether the archives generated from the primary instance are transferred and present in the file system of your standby database?
I believe your standby is not in recovery_mode anymore or has an archive_gap, which is the reason why it doesn't catch up anymore.
Hope it helps a little,
Regards,
Sebastian
PS: I'm working on 11g, so unfortunately I'm not quite sure if the views are exist in 10gR2. It's worth a try though!
Edited by: skahlert on 31.08.2012 13:46 -
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 apply the changes in logical standby database
Hi,
I am new to Dataguard. I am now using 10.2.0.3 and followed the steps from Oracle Data Guard Concepts and Administration Guide to setup a logical standby database.
When I insert a record to a table from the primary database side, when i query the same table from the logical standby database, it doesn't show the new records.
Did I miss something? What I want to do is when I insert a record in the primary db, then the corresponding record will be inserted in the standby db.
Or I totally misunderstand what Oracle data guard is? Any help are appreciated.
DenisHi
Can anyone help to answer me is my logical standby db have a archive gap?
SQL> SELECT APPLIED_SCN, APPLIED_TIME, READ_SCN, READ_TIME, NEWEST_SCN, NEWEST_T
IME FROM DBA_LOGSTDBY_PROGRESS;
APPLIED_SCN APPLIED_TIME READ_SCN READ_TIME NEWEST_SCN
NEWEST_TIME
851821 29-JUL -08 17:58:29 851822 29-JUL -08 17:58:29 1551238
08-AUG -08 08:43:29
SQL> select pid, type, status, high_scn from v$logstdby;
no rows selected
SQL> alter database start logical standby apply;
Database altered.
SQL> select pid, type, status, high_scn from v$logstdby;
PID
TYPE
STATUS HIGH_SCN
2472
COORDINATOR
ORA-16116: no work available
3380
READER
ORA-16127: stalled waiting for additiona 852063
l transactions to be applied
2480
BUILDER
ORA-16116: no work available
2492
ANALYZER
ORA-16111: log mining and apply setting
up
2496
APPLIER
ORA-16116: no work available
2500
APPLIER
ORA-16116: no work available
3700
APPLIER
ORA-16116: no work available
940
APPLIER
ORA-16116: no work available
2504
APPLIER
ORA-16116: no work available
9 rows selected.
Thanks a lot.
Message was edited by:
Denis Chan
Maybe you are looking for
-
Config of Goods Receipt indicator specific to individual PO line price
Hello all Is there a way to define Goods Receipt indicator (field WEPOS in EKPO table) to default to either checked or unchecked, for individual PO Lines, based on the price of the material at each PO line ? (ex price beyond a threshold value should
-
Match on Macbook won't play songs on hard drive???
Been browsing this discussion group for a while and can't find a similar case... Here is the setup: My ripped songs, some mp3, some AAC, are on my macbook's hard drive. They have been matched in iTunes Match. When I try to play many of the songs,
-
Article Change Documents for Custom Fields
Hi, We have lot of custom fields defined in the article master. When the custom fields are changed through the online transaction, the changes are recorded in the change document tables (CDHDR / CDPOS). If the changes are made through the "BAPI_MATER
-
Ovi is in Thai language - help
I'm spending a few days in Thailand and thought I'd take advantage of the access to ovi that my country doesn't have. Unfortunately it's all in Thai language. Is there anyway that I can change it? Thnks
-
About a week ago I downloaded ios 7. it is so slow I can't even dowload anything from the app store because when I type it lags! please help!?