View to Find Primary database name from Standby

Is there any way(view) we can find the primary standby database name and it's host from the standy database.
Thanks,

V$DATABASE holds the Database Name and this would be the same on the Standby as on the Primary -- at least would be the same for a Physical Standby, I haven't done or verified a Logical Standby with a different DB_NAME.
However, the Host name is not a property of the database but of the instance -- an RAC database can have instances running on multiple hosts. Therefore, the HOSTNAME is always in V$INSTANCE only -- and that, of course, is different on the Standby then on the Primary.

Similar Messages

  • Views to check the catalog database name from target database.

    Hi,
    Please help me to find view to check the catalog database name which is connected to my target database because I am new to the current environment where I am working now and the previous DBA have done the set up having 2 catalog database. I want view to check from target database, which can show the catalog database name to which it is connected to.
    We can check the catalog database name from the following ways but I want views to check it from target database.
    1.TNSnames.ora
    2.Any backup script connecting to catalog database.
    3.From catalog database we can use rc_database view to check the databases registered with the catalog database.

    Please help me to find view to check the catalog database name which is connected to my target databaseYou can check for any RMAN backup jobs that been scheduled on the server.
    In the scheduled script check rman command.
    You can then identify the database alias (of the catalog db) that is used in the rman backup script.
    Once you have found the database alias, check for the database alias entry in tnsnames.ora file present in your target database server.
    Once the entry is found, you can find the IP address and catalog db name from the tns entry.
    Edited by: st. osh on Nov 22, 2012 11:38 PM

  • How to find Logical database name using selection view

    Hi Experts,
                      How can we find logical database name using selection view in se36.
    Regards,
    Mani

    Hi,
    If you want to see the logincal database used in the report ( tcode se38) in the intial screen select the attribute tab
    and click display you will bw able to see the logical datbase ysed for the report.
    Thanks.

  • Shrink Log file in log shipping and change the database state from Standby to No recovery mode

    Hello all,
    I have configured sql server 2008 R2 log shipping for some databases and I have two issues:
    can I shrink the log file for these databases: If I change the primary database from full to simple and shrink the log file then change it back to full recovery mode the log shipping will fail, I've seen some answers talked about using "No
    Truncate" option, but as I know this option will not affect the log file and it will shrink the data file only.
          I also can't create maintenance to reconfigure the log shipping every time I want to shrink the log file because the database size is huge and it will take time to restore in the DR site, so the reconfiguration
    is not an option :( 
    how can I change the secondary database state from Standby to No recovery mode? I tried to change it from the wizard and wait until the next restore for the transaction log backup, but the job failed and the error was: "the step failed". I need
    to do this to change the mdf and ldf file location for the secondary databases.
    can any one help?
    Thanks in advance,
    Faris ALMasri
    Database Administrator

    1. can I shrink the log file for these databases: If I change the primary database from full to simple and shrink the log file then change it back to full recovery mode the log shipping will fail, I've seen some answers talked about using "No Truncate"
    option, but as I know this option will not affect the log file and it will shrink the data file only.
          I also can't create maintenance to reconfigure the log shipping every time I want to shrink the log file because the database size is huge
    and it will take time to restore in the DR site, so the reconfiguration is not an option :( 
    2. how can I change the secondary database state from Standby to No recovery mode? I tried to change it from the wizard and wait until the next restore for the transaction log backup, but the job failed and the error was: "the step failed". I need to do
    this to change the mdf and ldf file location for the secondary databases.
    can any one help?
    Thanks in advance,
    Faris ALMasri
    Database Administrator
    1. If you change recovery model of database in logshipping to simple and back to full Logshipping will break and logs wont be resored on Secondary server as log chain will be broken.You can shrink log file of primary database but why would you need that
    what is schedule of log backup. Frequent log backup is already taking care of log files why to shrink it and create performance load on system when log file will ultimately grow and since because instant file initilaization is not for Log files it takes time
    to grow and thus slows performace.
    You said you want to shrink as Database size is huge is it huge or does it have lots of free space. dont worry about data file free space it will eventually be utilized by SQL server when more data comes
    2. You are following wrong method changing state to no recovery would not even allow you to run select queries which you can run in Standby mode. Please refer below link to move Secondary data and log files
    http://www.mssqltips.com/sqlservertip/2836/steps-to-move-sql-server-log-shipping-secondary-database-files/
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • How to find current database name i am using

    what is the command to find current database name i am using

    Dear user!
    SELECT name
    FROM   v$database;Yours sincerely
    Florian W.

  • Discoverer Report: How to find Business Area name from Report Name.

    Hi
    I opened a report in Disco Desktop 4 -> Resonsibiolity --> Report Name.
    So I know Report name but don’t know which Business Area it belongs to.
    How to find Business Area Name from Report Name?
    Cheers
    Vijay

    Hi,
    There is no relationship between reports and business areas. Each report can be built from many folders. Each folder can be in many business areas.
    However you can try the following SQL which may give you the result you want for an v5 EUL. You will have to modify for Discoverer 4 EUL:
    select distinct doc_name, obj.obj_name folder_name, bas.ba_name
    from eul_us.eul5_documents doc
    , eul_us.eul5_elem_xrefs xref
    , eul_us.eul5_expressions exp
    , eul_us.eul5_objs obj
    , eul_us.eul5_ba_obj_links bol
    , eul_us.eul5_bas bas
    where xref.ex_from_id = doc.doc_id
    and doc.doc_name = &your_report
    and xref.ex_to_id = exp.exp_id
    and obj.obj_id = exp.it_obj_id
    and bol.bol_obj_id = obj.obj_id
    and bas.ba_id = bol.bol_ba_id
    Rod West

  • How can I get a list of database names from environment

    Hi,
    How can I get a list of database names from environment.
    I had found a method in JE API Docs named Environment.getDatabaseNames(), and i couldn't found the same method in Berkeley DB.
    I use java interface, is it supported?
    Thanks.

    Hello,
    I don't know if it would work for you, but have you checked the db_archive utility at:
    http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/db_archive.html
    Check the -s option.
    Thanks,
    Sandra

  • How to find the form name  from VA02 T.code

    how to find the form name  from VA02 T.code

    Hi Rajyam,
    I guess you are looking out for the formname which prints sales related documents.
    If this is what you want,then go to the T-code NACE and select the option K1Sales activities and click on the Output Types button on the top.The new window has all the types of Output types listed.Select the most appropriate and double click on the Processing routines button in the left side screen.
    The new window lists the program names and the forms associated with that output type.
    In case you have any further clarifications,do let me know.
    Regards,
    Puneet Jhari.

  • How to remove database name from SQL query

    We have an MS SQL server with several databases that are of the same schema but have different data.  We do this for testing different environments.  We are using Crystal reports for the first time and we are having trouble changing the database location in the designer.  If update the data source location to the same database server, but different database name, the data still comes from the original database used when creating the report.  We look at the SQL query and it contains the database name and does not change when updating the data source.  Therefore the data always comes from the database used when originally creating the report.
    How can I remove the database name from the SQL query so the proper database is used when testing the report?

    Hi C F
    Please ensure you have followed the procedure mentioned below:
    In Crystal Reports, there are two ways to set the location of the data source your report points to, depending on your connection type.
    For ODBC and Native Connections:
    1. On the 'Database' menu, click 'Set Datasource Location'.
    2. In the 'Current Data Source' section, click the data source to be changed. You must click each individual table in the data source one by one. If the data source is a stored procedure you will not see individual tables.
    NOTE     In Crystal Reports 10, XIR1, and XIR2, if you are mapping from a data source such as a stored procedure where the report designer can not determine which fields should be mapped automatically, you will see a 'Mapping' dialog box where you can manually map fields, as in the procedure cited above.
    3. In the 'Replace with' section, click the data source you want the report to use.
    4. Click 'Update'.
    5. Close the 'Set Datasource Location' window.
    The report now points to the new location.
    For Native Connections Only:
    1. On the 'Database' menu, click 'Set Datasource Location'.
    2. In the 'Current Data Source' section, click 'Properties' to expand it and right-click 'Database Name: <path to database>'.
    3. Click 'Edit' and then type the path to the
    new data source location.
    4. Close the 'Set Datasource Location' window.
    The report now points to the new location.
    Regards
    Girish

  • Query to identify the recovery catalog database name from target database

    Hi,
    How to get the recovery catalog database name from the registered target database?
    i dont know my recovery catalog database for my target database.
    I know we can use the query
    select * from rc_database;
    from recovery catalog database to know all the registered database with the recovery catalog but I want to know is there any way or query to identify the recovery catalog database name from target database to which the target database is registered
    With Regards
    Boobathi P

    You can check the backup scripts which you use to backup your target database to get the catalog database name.
    And check the corresponding connect string in TNSNAMES.ORA file or tnsping to get the server details of the catalog database.
    Edited by: gopal on Apr 12, 2013 12:59 PM

  • How to find the dsn name from an *.rpd file provided?

    How to find the dsn name from an *.rpd file provided? All the ODBC details which would require to run your dashboard.

    Hi
    DSN name is not a part of .rpd file. So There is no information about DSN name in .rpd file.
    Thanks
    Siddhartha P

  • How to find a metachain name from local process chain id or name

    how to find a metachain name from local process chain id or name

    Hi Dwarakanath,
    Please post your query in the correct topic space in SCN.  For help, see this document:
    Find Topic Spaces on SCN (Forums)
    Thanks,
    Kristen

  • Restore primary database using physical standby

    hi,
    i am taking rman backup on production database,we have physical standby.coming month i have to take backup from standby instead of prod db.pls advise me, is it possible to restore and recover production database using standby database backup.if production crashed.pls advise me .i am new to dba.if possible pls provide proper steps.
    Regards
    Faruk

    Faruk.m wrote:
    hi,
    i have to take backup on standby instead of production.failover i can do.but i need to know the recovery procedures from standby.and thank u for reply.i want, is it possible to restore my production controlfile with controlfile backup from standby.
    i tested with my local database ,that below:
    1.backup with controlfile from standby (rman>backup current controlfile)
    2.manual deleted my test db controlfile,tried to restore from backup taken from standby(rman>restore controlfile from '*****************';)
    3.rman>restore database
    3.but it shows error (datafile already exists) ,controlfile tried to create datafiles on standby location.
    my conclusion:above my cmds used to create datafiles on standby becoz i restored with standby controlfile.
    my question:what is wrong with my steps? and how to restore my (prod) controlfile from standby.and bring backup my prod db.
    regards
    farukHi Faruk,
    Sorry my late.
    I can share with you my test.
    It is my standby  database, I connecting with RMAN
    SQL> select database_role, db_unique_name, name from  v$database;
    DATABASE_ROLE      DB_UNIQUE_NAME           NAME
    PHYSICAL STANDBY       stldb                    ADMDB
    [oracle@oel62-x64 oradata]$ rman target /
    Recovery Manager: Release 11.2.0.3.0 - Production on Tue Apr 23 12:23:00 2013
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    connected to target database: ADMDB (DBID=4063877183, not open)
    RMAN> backup current controlfile;
    Starting backup at 23-APR-13
    Starting implicit crosscheck backup at 23-APR-13
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=29 device type=DISK
    Finished implicit crosscheck backup at 23-APR-13
    Starting implicit crosscheck copy at 23-APR-13
    using channel ORA_DISK_1
    Finished implicit crosscheck copy at 23-APR-13
    searching for all files in the recovery area
    cataloging files...
    no files cataloged
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    including current control file in backup set
    channel ORA_DISK_1: starting piece 1 at 23-APR-13
    channel ORA_DISK_1: finished piece 1 at 23-APR-13
    piece handle=/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_04_23/o1_mf_ncnnf_TAG20130423T122310_8qdfq19x_.bkp tag=TAG20130423T122310 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 23-APR-13
    RMAN> exit
    Recovery Manager complete.
    [oracle@oel62-x64 oradata]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 23 12:23:26 2013
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> shut immediate;
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup nomount;
    ORACLE instance started.
    Total System Global Area  551165952 bytes
    Fixed Size              2230232 bytes
    Variable Size            167774248 bytes
    Database Buffers       377487360 bytes
    Redo Buffers              3674112 bytes
    SQL>
    SQL>
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@oel62-x64 oradata]$ rman target /
    Recovery Manager: Release 11.2.0.3.0 - Production on Tue Apr 23 12:34:58 2013
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    connected to target database: ADMDB (not mounted)
    RMAN> restore controlfile  from '/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_04_23/o1_mf_ncnnf_TAG20130423T122310_8qdfq19x_.bkp';
    Starting restore at 23-APR-13
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=19 device type=DISK
    channel ORA_DISK_1: restoring control file
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
    output file name=/u01/app/oracle/oradata/stldb/control01.ctl
    Finished restore at 23-APR-13
    RMAN> alter database mount;
    database mounted
    released channel: ORA_DISK_1
    RMAN> exit
    Recovery Manager complete.
    [oracle@oel62-x64 oradata]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 23 12:35:31 2013
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select database_role, db_unique_name, name from  v$database;
    DATABASE_ROLE      DB_UNIQUE_NAME           NAME
    PRIMARY       stldb                    ADMDB
    As show here, you can backup standby control file, and restore as primary .
    Regars
    Mahir M. Quluzade
    http://www.mahir-quluzade.com

  • How to find out database name

    Hi
    can anyone please tell me how i can find out the database name for oracle8i.
    thankyou very much in advance

    I'm not expert in this, but your error has TNS in it which could mean its looking for the tnsnames.ora file which in an oracle client installation contains the mappings from the database name to the server ipaddress and port number for connection to oracle. Its possible you may need an oracle client installation.
    Another way of connecting is via ODBC drivers which are configured in control panel in winnt and under computer managenent in win2000. An installation of Oracle will ususally install ODBC drivers.

  • How to find the database name?

    Hi,
    I have a little problem with my database under DB2.
    I acces this database through the ODBC with the name TESTALIAS, but the real name of the database is TEST. So what I need to find out is if there is a possibility to get the real name of the database.
    I used the com.ibm.db.DatabaseConnection class for the connection, but there seems nothing to indicate me the real name of this database.
    Have you any idea??? maybe another class that do this?
    thanks,
    alina

    if somebody is interested in, the following SQL Statement gets the real database name out and not the alias:
    SELECT CURRENT SERVER FROM one_table_name
    I don't know if the register CURRENT SERVER work for all DB environment, but for DB2 ist does.
    cheers,
    alina

Maybe you are looking for

  • Why is my iTunes gift card not properly activating

    Why won't my iTunes gift card properly activate

  • Problems with Skin Retouching Actions pack

    Hello everyone and sorry for my bad English. I need some help if possible: I bought and downloaded Skin Retouching Actions (I have C6S on Mac) but I can not install it in Photoshop with the Extensions Manager.  When I try to open the action pack I ge

  • Packet Disapears

    Hi, When my arp entery has expired, and I try to send two UDP packets on different sockets to that entry, usually one of the packets doesn't even leave my machine according to Ethereal(Packet Capturing Program). There are no expections thrown or anyt

  • Set Default RSS Reader in Mountain Lion???

    So now that Mail & Safari dont have default RSS readers support, how does one change what was previously set?  Somehow the program "Socialite" has been set as my default RSS Feed reader.  I do NOT want to use this program for RSS feeds but cannot see

  • Cant seem to connect to localhost

    hi yea, I set up my site on localhost, but the connect button in the file panel is greyed out. I usually connect using ftp direct to my hosting company without issue, but my connection for localhost I cannot get it to become active. I have set the fo