DB link for physical standby database

Hi All ,
I'm facing the below error on primary while trying to create a db link pointing to the 10g standby database which is in mount stage.
SQL> create database link synct connect to system identified by 123 using 'stdby';
Database link created.
SQL> select max(sequence#) from v$archived_log@synct where applied='YES';
select max(sequence#) from v$archived_log@synct where applied='YES'
ERROR at line 1:
ORA-02068: following severe error from SYNCT
ORA-01033: ORACLE initialization or shutdown in progress
Database version is 10.2 standard edition
My requirement is i need to get max(sequence#) of standby database from primary database using db link.
what i was trying to do is
on primary get max(sequence#) & get max(sequence#) of standby using db link and compare both if the gap differene is more than 10 send a mail.
Any suggestions will be really helpful

976422 wrote:
Hi All ,
I'm facing the below error on primary while trying to create a db link pointing to the 10g standby database which is in mount stage.
SQL> create database link synct connect to system identified by 123 using 'stdby';
Database link created.
SQL> select max(sequence#) from v$archived_log@synct where applied='YES';
select max(sequence#) from v$archived_log@synct where applied='YES'
ERROR at line 1:
ORA-02068: following severe error from SYNCT
ORA-01033: ORACLE initialization or shutdown in progress
Post Standby/DataGuard/ADG all questions further in Oracle Discussion Forums » High Availability » Data Guard
If you try to connect any users other than SYS in standby the error is very much expected. Of course you can connect with other users if you open database in OPEN READ ONLY mode, from 11gRx you can connect with other users even MRP is running if you are using ADG(active Data Guard licensed) .
I like to know, what you want to achieve by creating DB Link on physical standby database? Which is not allowed.
Database version is 10.2 standard edition
My requirement is i need to get max(sequence#) of standby database from primary database using db link.
what i was trying to do is
on primary get max(sequence#) & get max(sequence#) of standby using db link and compare both if the gap differene is more than 10 send a mail.
Any suggestions will be really helpfulNote:- Standard edition, Data Guard not enabled.
To use this you should use Oracle Net Service, you no need of DB Links.
Ex:- sqlplus sys/****@standby as sysdba
Here standby refers to Oracle net service, Where you will have entries in $ORACLE_HOME/network/admin/tnsnames.ora file.
Edited by: CKPT on Dec 12, 2012 2:01 PM

Similar Messages

  • OEM for physical standby database

    Hello All,
    I am using Oracle 11.2.0.3. My enterprise manager is db console 11.2
    I have Oracle Enterprise manager dbcnsole for my RAC primary database  and I have created through sqlplus command line a physical standby database.
    My questions
    Can I use the RAC primary dbconsole to monitor my physical standby database? if yes what the steps?
    Is it mandatory to use grid control in that case? if yes, what steps are needed to implement grid control ?
    Regards,

    Hi,
    It is not possible to monitor/administer a Logical or Physical Standby database, i.e Data Guard, using Enterprise Manager Database Control.  This is primarily due to the fact that Database Control is designed to monitor 1 database and a Data Guard environment, by definition, includes more than 1 database.
    If you attempt to run emca against a standby Database, you will get an error like (i.e. ORA-01219: database not open).
    Database Control, can, of course, be used to monitor the current Primary database (with no ability to administer or monitor Data Guard related functionality).  In such a case, when failover occurs Database Control must be reconfigured to run on the new Primary database using the commands detailed in Note 278100.1 How To Drop, Create And Recreate DB Control In A 10g Database, section C. Recreate/ReConfig DB Control, Option 2. Recreate the DB Control Configuration Files and Repository.
    Enterprise Manager Grid Control or Cloud Control provides the functionality for viewing, monitoring, and administering primary and standby databases in a Data Guard configuration.
    Reference: Is it Possible to Configure Database Control for a Logical or Physical Standby Database? (Doc ID 315116.1)
    Using EM cloud control 12c is best available option to monitor your standby databases
    For install docs refer to
    http://docs.oracle.com/cd/E24628_01/install.121/e22624/toc.htm
    For Software download link
    http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/index.html
    Regards,
    Rahul

  • Cannot Clear Critical Alert for Physical Standby Databases

    10.2.0.4.0 Grid Control monitoring 10.2.0.4.0 databases and standby databases with 10.2.0.4.0 agents.
    The standby databases are running on Xen guests. The O/S is Red Hat 4 Advanced Server.
    I had a failure of Xen guest on Saturday that caused me to have to rebuild the standby servers. EM Grid Control successfully verifies the configurations and the status is normal for both physical standby databases. (A rebuilt logical standby database shows no alerts.)
    Grid Control database targets page shows a single critical alert for each physical standby database. The alert is for "number of missing media files is 4". The metric graph shows the count as 0 since before the rebuilds. I cannot clear the alerts from the Critical Alerts page. Grid Control reports "The selected alert(s) cannot be manually cleared. They will clear automatically once the metric is no longer in a critical or warning state.".
    Any suggestions?
    Thanks,
    Ray Westphal

    Thanks for the reply Anthony.
    The result of the query on both standby databases is '0'. The metric graph also shows the value at '0' since before rebuilds.
    And the OMS db and agents have been reset several times since I posted this.
    Ray Westphal.

  • Issue on physical standby database

    Hi
    I've a problem on standby database.
    I recently added a datafile on primary database, then I scp'ed the data file to physical standby database.On physical standby database I tried performing recovery.
    I get following message in my alert log
    WARNING! Recovering data file 88 from a fuzzy file. If not the current file
    it might be an online backup taken without entering the begin backup command.
    ORA-279 signalled during: ALTER DATABASE RECOVER standby database ...
    how can I fix this now.
    We keep physical standby database 2 day behind, and apply logs manually.
    Physical standby database is maintained manually.
    Could someone help me in getting out of this problem.
    Oracle 9.2.0.7
    solaris

    Versus keeping it in manual mode, you can specify a time "delay" for the application of the logs:
    From http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/log_apply.htm#i1022811
    6.2.2 Specifying a Time Delay for the Application of Archived Redo Log Files
    In some cases, you may want to create a time lag between the time when redo data is received from the primary site and when it is applied to the standby database. You can specify a time interval (in minutes) to protect against the application of corrupted or erroneous data to the standby database. When you set a DELAY interval, it does not delay the transport of the redo data to the standby database. Instead, the time lag you specify begins when the redo data is completely archived at the standby destination.
    Note:
    If you define a delay for a destination that has real-time apply enabled, the delay is ignored.
    Specifying a Time Delay
    You can set a time delay on primary and standby databases using the DELAY=minutes attribute of the LOG_ARCHIVE_DEST_n initialization parameter to delay applying archived redo log files to the standby database. By default, there is no time delay. If you specify the DELAY attribute without specifying a value, then the default delay interval is 30 minutes.
    Canceling a Time Delay
    You can cancel a specified delay interval as follows:
    For physical standby databases, use the NODELAY keyword of the RECOVER MANAGED STANDBY DATABASE clause:
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE NODELAY;
    For logical standby databases, specify the following SQL statement:
    SQL> ALTER DATABASE START LOGICAL STANDBY APPLY NODELAY;
    These commands result in log apply services immediately beginning to apply archived redo log files to the standby database, before the time interval expires. Also, see:
    Section 12.8, "Using a Physical Standby Database with a Time Lag"
    Oracle Database SQL Reference for the DELAY attribute of the ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement

  • Different archivelog destination on physical standby database

    Hi,
    Can I set different archivelog destination for physical standby database in duplicate command? (Due to space problem ) How can I do it?
    For ex. on primary site archivelogs reside in /u01/ORCL/archivelog, and I want on phy. standby side archive dest. under /u08/ORCL/archivelog.

    Even you can give LOG_ARCHIVE_DEST_1 in standby init file, So whenever you start standby/auxiliary instance automatically the dest_1 will refer to /u08/orcl(whereever you want).  So you can have archive destination any where but should have proper permissions and location should be available.
    If you want to assign one by one destinations, then still you can use "ALTERNATE" clause so that when the primary location unavailable or unable to archive, then of course it writes into alternate location you have specified from pfile.
    You can check this
    http://docs.oracle.com/cd/B28359_01/server.111/b28294/log_arch_dest_param.htm#i91817

  • Downtime for logical or physical standby database

    Hi ,
    Are there any downtime required to refresh the data from the primary database to logical standby or physical standby database. What are the pros and cons of
    using logical and physical standby database approach. which one is advisable to use in production environment.
    Regards,
    Richard

    Hi Richard,
    I'd suggest you read the documentation as a starting point, to answer your questions on here would be quite lengthy,
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/toc.htm
    In a nutshell you dont need downtime to maintain a standby, you can create them from a hot backup of your primary and get them recovering whilst it is open, in terms of which type of standby to use (physical or logical) that depends on your requirements for the use of the standby ... as I said read the doco (chapter 2 has a section on the benefits of each type).
    HTH
    Paul

  • RE logical/physical standby database

    1. Why logical standby database is SQL apply, and Physical standby database is redo apply? What ‘s the meaning/objective for that? (pls don’t tell me what is SQL/redo apply)
    2. As we know, a logical standby database can be used for reporting and querying if primary database is down, why we still need a physical standby database (it can’t do that during recovering process, it just a same copy of primary database)? Why not just go ahead to set up only a perfect logical standby database? (just because logical one can’t accommodate all kinds of data type???)
    3. Combined with Real time Apply and maximum protection, we can achieve a zero data loss, but could we achieve a zero downtime? Why or why not?

    Go Through Below link
    >>>Can you convert a Logical standby to a Physical Standby?

  • About physical standby database

    We have physical standby database(10g). what are steps to put standby database in ready only mode for time being and then put it back in primary-secondary relationship once cheking is done?

    Cancel the redo Apply
    SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;Open The database
    SQL>ALTER DATABASE OPEN;Do your stuff.
    Once done, shut it down, then mount it again and resume the redo apply
    SQL>SHUTDOWN IMMEDIATE;
    SQL>STARTUP NOMOUNT;
    SQL>ALTER DATABASE MOUNT STANDBY DATABASE;
    SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;If you use real-time redo apply, you may want to issue the following command instead of the previous one.
    SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;...and pretty much that is it.
    Be aware that while running it in read-only mode, no logs from the primary are being applied. Also you may hit some bugs when you open your standby database. So if this standby is your production one, make sure you know how to deal in a situation when you need to resolve possible issues.
    Jason Arnell has explained one possible buggy scenario on his blog - LINK.
    --Mihajlo                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to create physical standby database without dataguard

    Hi,
    Can anyone please help me how to create Physical Standby Database without dataguard. As i am using Oracle 10.2.0.1 Standard Edition for production databases.
    Please find the specifications of my server :
    Database : Oracle 10.2.0.1(Standard Edition)
    Server : Linux 4.0(32 bit machine)
    As we know that Dataguard cannot be created in Standard Edition as we dont have that option in this edition. So please help me how to create the physical standby database.
    Thanks in advance.
    Regards,
    Farooq

    Hello,
    I hope this link helps you out...
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/rcmbackp.htm
    http://www.dbasupport.com/oracle/ora10g/manual_standby.shtml
    Thanks & Regards
    Pratik Lakhpatwala
    Jr Oracle DBA
    Edited by: Pratik.L on Dec 31, 2009 12:03 PM

  • Physical standby database, dblinks derived frn schemas help

    I observed that many of the procedure,function,trigger of the database using dblinks which are derived from two schemas within the same database (i.e. eg: DBlink "CIS_TO_HIS" created in CISPROD schema connecting HISPROD schema of the same database). Now Oracle doesn't recommend this type of coding as a suitable.
    But I am more concerned about implementing the same code over data guard in Physical standby database as it will be in read only mode and will have different TNS names entry. Therefore since database link uses TNS entry and physical standby would be using a separate TNS entry from primary, this might be a risk of transaction using those dblinks will fail. Hence can you please let me know the risk areas in physical standby of using dblink within same database?

    The best solution for you is to stop using DB links between different DB schemas in the same DB.
    If you do not use RAC, one workaround would be to use the loopback IP (127.0.0.1) to define your TNS connection over.
    <Your DB>=
    (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)                                                            
      (HOST = 127.0.0.1)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = <Your DB>)))That way, if you hit the production server, the TNS will lead you to the production DB, and if you hit the standby server, you’ll go to the standby DB.
    You would need to create another TNS entry for the production DB on the standby server and use it for standby replication.
    Since this change might affect production operation and failover abilities, you need to thoroughly test it.
    Iordan Iotzov
    http://iiotzov.wordpress.com/

  • Physical standby database fail-over

    Hi,
    I am working on Oracle 10.2.0.3 on Solaris SPARC 64-bit.
    I have a Dataguard configuration with a single Physical standby database that uses real time application. We had a major application upgrade yesterday and before the start of upgrade, we cancelled the media recovery and disabled the log_archive_dest_n so that it doesn't ship the archive logs to standby site. We left the dataguard configuration in this mode incase of a rollback.
    Primary:
    alter system set log_archive_dest_state_2='DEFER';
    alter system switch logfile;
    Standby:
    alter database recover managed standby database cancel;Due to application upgrade induced problems we had to failover to the physical standby, which was not in sync with primary from yesterday. I used the following method to fail-over since i do not want to apply any redo from yesterday.
    Standby:
    alter database activate physical standby database;
    alter database open;
    shutdown immediate;
    startupSo, after this step, the database was a stand alone database, which doesn't have any standby databases yet (but it still has log_archive_config parameter set and log_archive_dest_n parameters set but i have 'DEFER' the log_archive_dest_n pointing to the old primary). I have even changed the "archive log deletion policy to NONE"
    RMAN> configure archivelog deletion policy to none;After the fail-over was completed, the log sequence started from Sequence 1. We cleared the FRA to make space for the new archive logs and started off a FULL database backup (backup incremental level 0 database plus archivelog delete input). The backup succeded but we got these alerts in the backup log that RMAN cannot delete the archivelogs.
    RMAN-08137: WARNING: archive log not deleted as it is still neededMy question here is
    1) Even though i have disabled the log_archive_dest_n parameters, why is RMAN not able to delete the archivelogs after backup when there is no standby database for this failed-over database?
    2) Are all the old backups marked unusable after a fail-over is performed?
    FYI... flashback database was not used in this case as it did not server our purpose.
    Any information or documentation links would be greatly appreciated.
    Thanks,
    Harris.

    Thanks for the reply.
    The FINISH FORCE works in some cases but if there is an archive gap (though it didn't report in our case), it might not work some times (DOCID: 846087.1). So, we followed the Switch-over & Fail-Over best practices where it mentioned about this "ACTIVE PHYSICAL STANDBY" for a fail-over if you intend not to apply any archivelogs. The process we followed is the Right one.
    Anyhow, we got the issue resolved. Below is the resolution path.
    1) Even though if you DEFER the LOG_ARCHIVE_DEST_STATE_N parameter's on the primary, there are some situations where the Primary database in a dataguard configuration where it will not delete the archive logs due to some SCN issues. This issue may or may not arise in all fail-over scenarios. If it does, then do the following checks
    Follow DOCID: 803635.1, which talks about a PLSQL procedure to check for problematic SCN's in a dataguard configuration even though the physical standby databases are no available (i.e., if the dataguard parameters are set, log_archive_config, log_archive_dest_n='SERVICE=..." still set and even though corresponding LOG_ARCHIVE_DEST_STATE_N parameters are DEFERRED).
    If this procedure returns any rows, then the primary database is not able to delete the archivelogs because it is still thinking there is a standby database and trying to save the archive logs because of the SCN conflict.
    So, the best thing to do is, remove the DG related parameters from the spfile (log_archive_config, log_archive_dest_n parameters).
    After i made these changes, i ran a test backup using "backup archivelog all delete input", the archive logs got deleted after backup without any issues.
    Thanks,
    Harris.
    Edited by: user11971589 on Nov 18, 2010 2:55 PM

  • Data Guard - MRP stuck issues on a physical standby database

    Hi,
    Oracle 11.2.0.3 DG running. When i do a switchover the physical standby database has error with following error
    ARC0: LGWR is actively archiving destination LOG_ARCHIVE_DEST_2
    ARCH: Archival stopped, error occurred. Will continue retrying
    ORACLE Instance <primaryDB> - Archival Error
    On standby DB
    SQL>select process, thread#, sequence#, status from v$managed_standby where process='MRP0';
    PROCESS THREAD# SEQUENCE# STATUS
    MRP0 1 548 APPLYING_LOG
    So according to Oracle support link i executed following
    SQL>recover managed standby database cancel;
    SQL>recover automatic standby database;
    The above seems to resolve the issue. What is causing is this?

    Hello again;
    Those both look perfect. I combed through my notes and found nothing like this for your version.
    Yes, I would open an SR since it appears you have done everything correct.
    ORA-600 [3020] "Stuck Recovery" [ID 30866.1]
    The "Known Bugs" section of the above has a few 11.2.0.3 entries.
    Generally the MRP gets stuck because data Guard thinks there's a GAP, you run out of room in the FRA on the Standby, or redo logs are too small and the system is switching very fast.
    Best Regards
    mseberg
    Later
    Never asked you but this "log_archive_max_processes" can be set as high as 30.
    Edited by: mseberg on Jul 16, 2012 8:01 PM
    h2. Still later
    Found this which is closer :
    Bug 13553883 - Archiver stuck but no ORA-19xxx error in alert log (messages need changing) [ID 13553883.8]

  • Creating physical standby databases with DG Broker & OEM

    Hi guys,
    I manage 8i, 9i & 10g databases through OEM 10.2.0.2.
    Today, I would like to create physical standby db for the most important applications. Because I'm a lazy guy, I'd like to do it the easiest way, with GUI and wizzards provided by OEM.
    1. Do you know any tutorial on the Internet that would help to do it easily ? My only source up to now is the official DB broker documentation (http://download.oracle.com/docs/cd/B19306_01/server.102/b14230/toc.htm), which is 300 pages long like every Oracle doc. I'd appreciate any tutorial that could lead me straight to the essential. I've heard that is not so tricky to create a physical standby db
    2. Is the procedure really different to create (and then manage) a physical standby database on Oracle 8i, 9i and 10g ? Is it possible to do it through DB Broker and OEM for every version ?
    thank you for your help
    Antoine

    Antionio,
    Oracle Documentation is the best source of configuring any Oracle component.
    But, If you do not want to read the entire doc, and want to configure Dataguard Broker (without OEM), then here is the Link.
    http://www.oracledba.org/10g/dr/10gR2_dataguard_RAC_to_RAC.html#Configure_Dataguard_Broker:

  • DB Link to Physical Standby

    How can we execute explain plan for queries connecting to Physical standby database over DB link.
    explain plan for select * from test.test_table@stby;
    Getting ORA-16000 when trying to that.
    Tried to set transaction to read only.
    Then tried to run explain plan, that gives error for ora-02047 cannot join the distributed
    Any insight will be appreciated.
    MM

    You cannot use "explain plan" as it means inserting into "plan_table" table. So your standby is in read only mode, isnt it :)
    Activate the sql trace and execute the query
    Best would be convert your standby to snapshot standby :), Use it for any kind of testing like explain plan or even run that query and monitor, when you are satisfied come back to physical standby.
    Perform the following steps to convert a physical standby database into a snapshot standby database:
    Stop Redo Apply, if it is active.
    On an Oracle Real Applications Cluster (RAC) database, shut down all but one instance.
    Ensure that the database is mounted, but not open.
    Issue the following SQL statement to perform the conversion:
    SQL> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
    The database is dismounted after conversion and must be restarted.
    Edited by: Karan on Feb 8, 2013 12:00 AM

  • Recreating Physical Standby Database

    HI
    We have Oracle 11gr2 Primary database 2 node RAC using ASM Shared storage and  physical standby database non rac using asm storage and data broker Unfortunately  the standby site  due to hardware failure  the network link was  down for a long period and huge log of archive waiting ?
    We have required restore database  and sync the  primary to secondary database  using data broker  how  will do it ?
    Any help Highly appreciated
    Thanks

    Hi,
    You can roll-forward you standby using incremental backup from primary .
    If you use 'DataGuard Broker', then it should be stopped before starting with step 1) from below article and then started again when all steps finished.
    Steps to perform for Rolling forward a standby database using RMAN Incremental Backup. (Doc ID 836986.1)
    Thanks,
    Renu

Maybe you are looking for