DB_NAME used by the Logical Standby db
Hi all,
It's Oracle 11g R2
I have a general question about converting a Physical standby database to a Logical Standby database.
An important step of the conversion procedure is to issue the following command:
ALTER DATABASE RECOVER TO LOGICAL STANDBY <NEWDBNAME>;
My question is: this statement changes the database name of the Standby database.
How come I still can connect to the new database without having to change the SERVIC_NAME in the tnsnames.ora file?
Here's the connection names used in the file:
db2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oradb2.mydomain.com)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = oradb)
)Here's the new db_name:
SQL> SELECT VALUE FROM V$PARAMETER
WHERE NAME LIKE lower('DB_NAME%')
VALUE
ORADBLS
SQL> conn hr@db2
Enter password:
Connected.
If I understand you correctly, you are asking why changing the database name does not necessitate changing the service name? There is no direct relationship between them, you can define any number of service names to register with the listener. By default, there will be a service that does have the same name as the database (possibly with a domain appended) but you do not have to use that one. Query V$ACTIVE_SERVICES and DBA_SERVICES to see what services are available.
Edited by: JohnWatson on Oct 11, 2012 1:50 PM
Sorry - " a service that does have the same name as the database" should read " a service that does have the same unique name as the database"
Similar Messages
-
When using DataGuard, the logical standby DB is already "OPEN"?
When I was setting up the physical standby DB several years ago no DataGuard got involved), I had the impression that the standby DB is in MOUNT status.
But since when using DataGuard to set up the logical standby DB, the logical standby DB can be used as it is already OPENed.
Is it actually in OPEN status? If so, can the primary and logical standby have the same SID without any trouble?
Please help advise. Thanks a lot!Hello Christy,
yes it is ok that both database are in status OPEN, that is also the main reason for using logical standby databases (you can do changes and queries on standby too).
I hope you don't use a logical standby database in a SAP environment, because of this is NOT supported. Check sapnote #105047 - Point "14. Data Guard". A logical standby database has limitations.
If you just want to use the physical standby database for queries you can open it in read only or you can use flashback technology for read/write. With Oracle 11g you have these features included in data guard itself (Active Data Guard / Snapshot StandBy) to perform such steps automatically.
Regards
Stefan -
Best practice on using Flashback and Logical Standby
Hello,
I'm testing a fail-back scenario where I first need to activate a logical standby, then do some dummy transactions before I flashback this db and resme the redo apply. Here is what the steps look like:
1) Ensure logical standby is in-sync with primary
2) Enable flashback on standby
3) Create a flashback guaranteed restore point
4) Defer log shipping from primary
5) Activate the logical standby so it’s fully open to read-write
6) Dummy activities against the standby (which is now fully open)
7) Flashback the database to the guaranteed checkpoint
8) Resume log shipping on primary
9) Resume redo apply on secondary
In the end, i can see the log shipping is happening but the logical standby does not apply any of these..and there is no error in the alert log on Standby side. But the following query could explains why the standby is idle:
SELECT TYPE, HIGH_SCN, STATUS FROM V$LOGSTDBY;
TYPE HIGH_SCN STATUS
COORDINATOR ORA-16240: Waiting for log file (thread# 2, sequence# 0)
ORA-16240: Waiting for log file (thread# string, sequence# string)
Cause: Process is idle waiting for additional log file to be available.
Action: No action necessary. This informational statement is provided to record the event for diagnostic purposes.
I dont understand why it's looking for sequence #0 after the flashback.
Thanks for the help.Hello;
I hesitate to answer your question because you are not doing a good job of keeping the forum clean :
Total Questions: 13 (13 unresolved)
Please consider closing some of you old answered questions and rewarding those who helped you.
No action necessary.
Do you really have a thread 2? ( Redo thread number )
Quick check
select applied_scn,latest_scn from v$logstdby_progress;Use the DBA_LOGSTDBY_LOG View if you don't have a thread 2 then the sequence# is meaningless.
COLUMN DICT_BEGIN FORMAT A10;
SELECT FILE_NAME, SEQUENCE#, FIRST_CHANGE#, NEXT_CHANGE#,
TIMESTAMP, DICT_BEGIN, DICT_END, THREAD# AS THR# FROM DBA_LOGSTDBY_LOG
ORDER BY SEQUENCE#;Logical Standby questions are difficult, not a lot of them out there I'm thinking.
Check
http://docs.oracle.com/cd/E14072_01/server.112/e10700/manage_ls.htm
"Waiting On Gap State" ( However I still believe you don't have a 2nd thread# )
OR
http://psilt.wordpress.com/2009/04/29/simple-logical-standby/
Best Regards
mseberg
Edited by: mseberg on Apr 26, 2012 5:13 PM -
Using streams or logical standby
We are runing Oracle 9.2.0.3.0 and have a requirement to replicate the production database on another server for query and reporting purpose.
The changes can be applied to the reporting database on a daily basis. Of course, the faster the better if there is no additional overhead added on the production database (performance acceptable on the production database).
Do you recommend using Oracle Streams or the logical standby database and why? which one is more stable now?
Thanks in advance for your help.Hi,
there is no difference on the primary site between ADG and normal DG. And there is also no difference in shipment of the redo logs.
The apply performance on the standby is minimally slower (< 2%) and only recognizable if you already have problems that the standby keeps up to date. But then again this does not effect your DR.
It only means that a switchover/failover will take minimally longer....
On the other side, there is always headroom to optimize apply performance. See here:
http://www.oracle.com/technetwork/database/features/availability/maa-wp-11gr1-activedataguard-1-128199.pdf
Regards
Sebastian -
Why Would The Logical Standby Lag?
Oracle 11.2.0.2
Linux RedHat 5.3+
Logical standby
I have a logical standby that is lagging behind the primary a lot.
The databases have the same amount of data...about 20 million rows.
They have the same indexes.
I am using SQL Apply.
I know that the slow down is that the Logical Standby is doing a full table scan because the update statement contains DECODE statements.
It takes about 19 minutes to process this statement on the Logical Standby.
I know what the offending statement is.
update /*+ streams restrict_all_ref_cons */ "APPLICA"."ARCH" p set "AG_ID"=decode(:1,'N',"AG_ID",:2),
"CREATED_BY"=decode(:3,'N',"CREATED_BY",:4),
"CREATED_ON"=decode(:5,'N',"CREATED_ON",:6),
"DATA_CONTACT_EMAIL"=decode(:7,'N',"DATA_CONTACT_EMAIL",:8),
"DATA_CONTACT_NAME"=decode(:9,'N',"DATA_CONTACT_NAME",:10),
"DATA_CONTACT_PHONE"=decode(:11,'N',"DATA_CONTACT_PHONE",:12),
"DATA_ITEM_ID"=decode(:13,'N',"DATA_ITEM_ID",:14),
"ITEM_ACTION"=decode(:19,'N',"ITEM_ACTION",:20),
"ITEM_DATE"=decode(:21,'N',"ITEM_DATE",:22),
"ITEM_STATUS"=decode(:23,'N',"ITEM_STATUS",:24),
"MESSAGE_TIME"=decode(:25,'N',"MESSAGE_TIME",:26),
"MODIFIED_BY"=decode(:27,'N',"MODIFIED_BY",:28),
"MODIFIED_ON"=decode(:29,'N',"MODIFIED_ON",:30)
where
(:31='N' or
(1=1 and decode(:32,'N','Y',decode(:33,"CREATED_BY",'Y'))='Y'
and decode(:34,'N','Y',decode(:35,"CREATED_ON",'Y'))='Y'
and decode(:36,'N','Y',decode(:37,"DATA_CONTACT_EMAIL",'Y'))='Y'
and decode(:38,'N','Y',decode(:39,"DATA_CONTACT_NAME",'Y'))='Y'
and decode(:40,'N','Y',decode(:41,"DATA_CONTACT_PHONE",'Y'))='Y'
and 1=1 and decode(:46,'N','Y',decode(:47,"ITEM_ACTION",'Y'))='Y'
and decode(:48,'N','Y',decode(:49,"ITEM_DATE",'Y'))='Y'
and decode(:50,'N','Y',decode(:51,"ITEM_STATUS",'Y'))='Y'
and decode(:52,'N','Y',decode(:53,"MESSAGE_TIME",'Y'))='Y'
and decode(:54,'N','Y',decode(:55,"MODIFIED_BY",'Y'))='Y'
and decode(:56,'N','Y',decode(:57,"MODIFIED_ON",'Y'))='Y')) and
(:58="AG_ID") and
(:59="DATA_ITEM_ID")
This table does have indexes but they do not cover the entire table.
Primary Key: AG_ID,DATA_ITEM_ID
Index1 : ITEM_STATUS,AG_ID
I am NOT asking why the statement is doing a full table scan I know that much.
What I am asking is if everthing with the structure, indexes and statistics is the same why is there no problem on the PRIMDB and there is a problem on the STBYDB?Well I found the issue...I should say a co-worker pointed me to the correct solution.
We were talking about the indexes and primary key and still attempting to understand why to SQL Apply was rewriting my update to include DECODE statments when he said.
"You have the same indexes and primary key but are they USABLE."
Well I thought of course they are usable...I just built the one index and the other is the primary key.
After looking a bit further we found that that index for the primary key was marked as unusable. Then I remembered that when we rebuilt the standby database that I had moved that table to reduce space within the tablespace. Moving a table can invalidate the primary key index. We rebuilt the index on the primary key and all is good now.
Regards
Tim -
Has anyone performed a successful upgrade from 10.2.0.4 RAC to 11.2.0.2 RAC using a transient logical standby? I found one reference to this white paper "http://www.oracle.com/technetwork/database/features/availability/maa-wp-10gr2-transrollupg-168590.pdf" that describes steps to us transient logical standby to upgrade to 11.1.0.6 but I wasn't sure if it also works for upgrades to 11.2.0.2.
I have a 3 node 10.2.0.4 RAC cluster running on rhel 4.8 with a 3 node dataguard physical standby (which the customer want to keep as a physical standby after the upgrade) that I need to upgrade to 11.2.0.2 with as little downtime as possible. This approach seems like a possible solution but I want to know if it is proven.Hi,
I have a 3 node 10.2.0.4 RAC cluster running on rhel 4.8 with a 3 node dataguard physical standby (which the customer want to keep as a physical standby after the upgrade) that I need to upgrade to 11.2.0.2 with as little downtime as possible. This approach seems like a possible solution but I want to know if it is proven.I suggest you to log a S.R and confirm the same.
thanks,
X A H E E R -
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. -
Do we have macros which we can use for the Logical Database PCH
Dear Friends
I would like to know when we are using the
Logical Database PCH .....do we have any macros
for getting latest record etc.
i.e i mean to say the macros which we use
Rp-provide-from-last in PNP logical Database
do we have same facility in PCH logical database please let me know
regards
madhuri.hi madhuri,
we use same macro.
instead of get pernr .
in pnp here we give
GET OBJEC.
use this macro
PAP_PROVIDE_FROM_FIRST P0001 SPACE PA$BEGDA PA$ENDDA
PAP_PROVIDE_FROM_LAST P0001 SPACE PA$BEGDA PA$ENDDA.
regards,
sandeep patel
Edited by: Sandeep patel on Jul 4, 2008 1:33 PM -
Converting aiff to caf for use with the logic loop browzer
I've got a bunch of new loops. I would like to batch convert the to caf, and use them in the loop browser. Any know if this is possible????
Thanks,
CByou don't need to convert as .caf
Logic support .aif .wav .sd2 loops and also .caf!
No conversion is required... if they are not already apple loop compatible you need to use Apple Loop Utility to add the Logic tags
G -
Creation of Logical Standby Database Using RMAN ACTIVE DATABASE COMMAND
Hi All,
I am in confusion how to create logical standby database from primary database using rman active database command.
What i did:-
Create primary database on machine 1 on RHEL 5 with Oracle 11gR2
Create standby database on machine 2 on RHEL 5 With Oracle 11gR2 from primary using RMAN active database command
Trying to create logical standby database on machine 3 on RHEL 5 with Oracle 11gR2 using RMAN active database command from primary.
The point which confuse me is to start the logical standby in nomount mode on machine 3 with which pfile like i create the pfile for standby database do i need to create the pfile for logical standby db.
I done the creation of logical standby database by converting physical standby to logical standby database
I am following the below mentioned doc for the same:
Creating a physical and a logical standby database in a DR environment | Chen Guang&#039;s Blog
Kindly guide me how to work over the same or please provide me the steps of the same.
Thanks in advance.Thanks for your reply
I already started the logical standby database with pfile in nomount mode. And successfully completed the duplication of database. by mentioning the DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT parameter.
But i am not able to receive the logs on the above mentioned blog i run the sql command to check the logs but getting "no rows selected"
My primary database pfile is:
pc01prmy.__db_cache_size=83886080
pc01prmy.__java_pool_size=12582912
pc01prmy.__large_pool_size=4194304
pc01prmy.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
pc01prmy.__pga_aggregate_target=79691776
pc01prmy.__sga_target=239075328
pc01prmy.__shared_io_pool_size=0
pc01prmy.__shared_pool_size=134217728
pc01prmy.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/pc01prmy/adump'
*.audit_trail='db'
*.compatible='11.1.0.0.0'
*.control_files='/u01/app/oracle/oradata/PC01PRMY/controlfile/o1_mf_91g3mdtr_.ctl','/u01/app/oracle/flash_recovery_area/PC01PRMY/controlfile/o1_mf_91g3mf6v_.ctl'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle/oradata'
*.db_domain=''
*.db_file_name_convert='/u01/app/oracle/oradata/PC01SBY/datafile','/u01/app/oracle/oradata/PC01PRMY/datafile'
*.db_name='pc01prmy'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=pc01prmyXDB)'
*.fal_client='PC01PRMY'
*.fal_server='PC01SBY'
*.log_archive_config='DG_CONFIG=(pc01prmy,pc01sby,pc01ls)'
*.log_archive_dest_1='LOCATION=/u01/app/oracle/flash_recovery_area/PC01PRMY/ VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pc01prmy'
*.log_archive_dest_2='SERVICE=pc01sby LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pc01sby'
*.log_archive_dest_3='SERVICE=pc01ls LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=pc01ls'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='DEFER'
*.log_archive_dest_state_3='DEFER'
*.log_archive_max_processes=30
*.log_file_name_convert='/u01/app/oracle/oradata/PC01SBY/onlinelog','/u01/app/oracle/oradata/PC01PRMY/onlinelog'
*.open_cursors=300
*.pga_aggregate_target=78643200
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=236978176
*.undo_tablespace='UNDOTBS1'
My logical standby pfile is:-
pc01ls.__db_cache_size=92274688
pc01ls.__java_pool_size=12582912
pc01ls.__large_pool_size=4194304
pc01ls.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
pc01ls.__pga_aggregate_target=79691776
pc01ls.__sga_target=239075328
pc01ls.__shared_io_pool_size=0
pc01ls.__shared_pool_size=125829120
pc01ls.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/pc01ls/adump'
*.audit_trail='db'
*.compatible='11.1.0.0.0'
*.control_files='/u01/app/oracle/oradata/PC01LS/controlfile/o1_mf_91g3mdtr_.ctl','/u01/app/oracle/flash_recovery_area/PC01LS/controlfile/o1_mf_91g3mf6v_.ctl'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle/oradata'
*.db_domain=''
*.db_file_name_convert='/u01/app/oracle/oradata/PC01SBY/datafile','/u01/app/oracle/oradata/PC01PRMY/datafile'
*.db_name='pc01prmy'
*.db_unique_name='pc01ls'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=pc01prmyXDB)'
*.log_archive_config='DG_CONFIG=(pc01prmy,pc01sby,pc01ls)'
*.log_archive_dest_1='LOCATION=/u01/app/oracle/flash_recovery_area/PC01PRMY/ VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pc01prmy'
*.log_archive_dest_2='LOCATION=/u01/app/oracle/flash_recovery_area/PC01LS/ VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=pc01ls'
*.log_archive_dest_3='SERVICE=pc01ls LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=pc01ls'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_max_processes=30
*.log_file_name_convert='/u01/app/oracle/oradata/PC01SBY/onlinelog','/u01/app/oracle/oradata/PC01PRMY/onlinelog'
*.open_cursors=300
*.pga_aggregate_target=78643200
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=236978176
*.undo_tablespace='UNDOTBS1'
Kindly advice over the same -
Logical Standby SQL Apply Using Incorrect Decode Statement
We are seeing statements erroring out on our logical standby that have been rewritten (presumably by sql apply) with decode statements that don't appear to be correct. For example, here is one of the rewritten statements.
update /*+ streams restrict_all_ref_cons */ "CADPROD"."OMS_SQL_STATEMENT" p
set *"APPLICATION"=decode(:1,'N',"APPLICATION",:2)*,
"STATEMENT"=dbms_reputil2.get_final_lob(:3,"STATEMENT",:4)
where (:5='N' or(1=1 and (:6='N' or(dbms_lob.compare(:7,"STATEMENT")=0)or(:7 is null and "STATEMENT" is null)))) and(:8="APPLICATION")
The problem comes in, we believe, with the attempt to write the value "APPLICATION" to the application column which is only a 10 character field. the value for the :1 bind variable is "N" and the value for :2 is null.
We see the following error on the logical standby:
ORA-00600: internal error code, arguments: [kgh_heap_sizes:ds], [0x01FCDBE60], [], [], [], [], [], []
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [kxtoedu+54] [PC:0x2542308] [ADDR:0xFFFFFFFFFFFFFFFF] [UNABLE_TO_READ] []
ORA-12899: value too large for column "CADPROD"."OMS_SQL_STATEMENT"."APPLICATION" (actual: 19576, maximum: 10)
Is this a configuration issue or is it normal for SQL Apply to convert statements from logminer into decode statements?
We have an Oracle 10.2.0.4 database running on windows 2003 R2 64-bit os. We have 3 physical and 2 logical standby's, no problems on the physical standbys.Hello;
I noticed some of your parameters seem to be wrong.
fal_client - This is Obsolete in 11.2
You have db_name='test' on the Standby, it should be 'asadmin'
fal_server=test is set like this on the standby, it should be 'asadmin'
I might consider changing VALID_FOR to this :
VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES)Would review 4.2 Step-by-Step Instructions for Creating a Logical Standby Database of Oracle Document E10700-02
Document 278371.1 is showing its age in my humble opinion.
-----Wait on this until you fix your parameters----------------------
Try restarting the SQL Apply
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATEI don't see the parameter MAX_SERVERS, try setting it to 8 times the number of cores.
Use these statements to trouble shoot :
SELECT NAME, VALUE, UNIT FROM V$DATAGUARD_STATS;
SELECT NAME, VALUE FROM V$LOGSTDBY_STATS WHERE NAME LIKE ;TRANSACTIONS%';
SELECT COUNT(1) AS IDLE_PREPARERS FROM V$LOGSTDBY_PROCESS WHERE
TYPE = 'PREPERER' AND STATUS_CODE = 16166;Best Regards
mseberg
Edited by: mseberg on Feb 14, 2012 7:37 AM -
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 -
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 -
Skip the DELETE command on logical standby
Hi All,
I want to skip the DELETE command on logical standby.
DB Version - 10.2
OS - Linux
Primary DB and logical standby DB .
In our DB schema some transaction tables. We delete data from those tables by delete commands.
Delete command, also delete data from logical standby DB. But we want to skip on logical standby DB .
I use following for that and get error.
ALTER DATABASE STOP LOGICAL STANDBY APPLY;
EXECUTE DBMS_LOGSTDBY.SKIP (stmt =>'DELETE TABLE', schema_name =>'TEST',object_name =>'TRANS',proc_name => null);
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
But I got error
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'SKIP'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
When I change stmt =>'DELETE TABLE' to stmt =>'DML', no error happen
Please help me to solve this issue . This is urgent.
Thanks in advance.
RegardsDear aditi2,
Actually it is so simple to understand the problem. Please read the following documentation and try to understand the SKIP procedure.
http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/d_lsbydb.htm#997290
*SKIP Procedure*
Use the SKIP procedure to define filters that prevent the application of SQL statements on the logical standby database.
By default, all SQL statements executed on a primary database are applied to a logical standby database.
If only a subset of activity on a primary database is of interest for application to the standby database,
you can use the SKIP procedure to define filters that prevent the application of SQL statements on the logical standby database.
While skipping (ignoring) SQL statements is the primary goal of filters,
it is also possible to associate a stored procedure with a DDL filter so that runtime determinations can be made whether to skip the statement,
execute this statement, or execute a replacement statement.
Syntax
DBMS_LOGSTDBY.SKIP (
stmt IN VARCHAR2,
schema_name IN VARCHAR2,
object_name IN VARCHAR2,
proc_name IN VARCHAR2,
use_like IN BOOLEAN,
esc IN CHAR1);Hope That Helps.
Ogan
Edited by: Ogan Ozdogan on 30.Tem.2010 13:03 -
Primary Archivelog Management When Using Logical Standby
I was wondering if anyone has seen or created a script to do archivelog management when using standby databases. We recently had an experience where our standby database and primary database got out of sync and we had to recreate the standby....I had hope to advoid this but it was easier than trying to recall tapes to retrieve the backups of the archivelogs from the primary.
Management on the logical side is fine. I know of the ability to delete log files on the logcial standby after they have been applied to the database. However, this does not address the issue of the management of archivelogs on the primary site. Does anyone have a script that only deletes the archivelogs from the primary site after they have been applied to the logical standby? Now this is a LOGICAL standby not a physical standby....RMAN has the capability of doing this for a physical standby but I don't know of any commands ro setup to allow it to do it for a logical standby.
Regards
TimEven with 1 TB of space I only have room enough for about 3 days worth of archivelogs. Working in the environment that I do, there is another group in charge of the ESAN which serves many different systems. They were wanting detail reasoning and justification why I needed 3 days worth of space when I requested it.
It is not truly a problem, there are always work arounds. I can restore from the backups, I can put in scripts to send out email notification when the standby falls to far behind the OE. However even with all that, I wanted to write a script that someone could run without having to check the system to delete the archivelogs if space becomes an issue on the production side.
I was just hoping to see if anyone had a script to do it already.
Thanks for all the input.
Regards
Tim
Maybe you are looking for
-
Help! Does anyone know how to fix this and still use the Bluetooth? If i turn off the Bluetooth, USB playwork works fine but I need both to work. Thanks, Colin
-
Why won't SKY come up with remote codes for Seiki tv's especially when charging a fortune for SKY
I wish someone could tell me why no remote codes are not available for Seiki tv's instead of coming up with excuses.
-
Hello, We have recently implemented a new Cisco ASA 5512-X firewall replacing and old Cisco ASA 5505 Firewall. We have a number of issues which we are encountering and have so far been unable to rectify. The config was copied visually across to the n
-
PDF Creation - how to return output to user?
I am using PDFLib to create dynamic pdfs. I'm having a hard time trying to return the pdf to the user. I tried using a ServletOutputStream but I keep getting an IllegalStateException. I believe this may be because I am already using a PrintWriter els
-
Urgent : Smartforms: Direct printing from module pool/dialog screen
Hi all, i have a module pool screen where in from a screen i have some inputs from the user and after saving user wud click on a button called print which shud print a slip containing the screen data.now for this purpose i have made a smartform which