This discussion is archived
5 Replies Latest reply: Mar 25, 2013 7:53 AM by sb92075 RSS

primary database lost

Vikas0204 Newbie
Currently Being Moderated
Hello every one

i have primary and standby databse but due to some reson i have lost my primary database

now i want to use my standby database.

Vikas Sharna
  • 1. Re: primary database lost
    Sunny kichloo Expert
    Currently Being Moderated
    Refer this thread


    http://neeraj-dba.blogspot.in/2011/10/open-standby-in-read-write-mode-when.html
  • 2. Re: primary database lost
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
    as i know someone lost his key but losing database it's not option

    Refer to
    http://osamamustafa.blogspot.com/2012/12/some-command-to-deal-with-standby.html
  • 3. Re: primary database lost
    KR10822864 Pro
    Currently Being Moderated
    >
    i have primary and standby databse but due to some reson i have lost my primary database

    now i want to use my standby database.
    how primary got crashed....any errors please share error details.....

    basic steps has been given below for convert standby to primary ...try it....

    sql>shut immediate at standby side....if
    sql>STARTUP MOUNT
    check the Status
    sql>SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;
    recover if you have logs to apply
    sql>RECOVER STANDBY DATABASE;
    sql>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
    check the new status
    sql>SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;
    open the Database
    sql>ALTER DATABASE OPEN;
    check the status again
    sql>SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;

    above info from oracle.com
  • 4. Re: primary database lost
    user622061 Newbie
    Currently Being Moderated
    Hello,

    By any chance, if your sql_id is in AWR, you can do this :


    define snap1=
    define snap2=
    DECLARE
    a VARCHAR2(100);
    BEGIN
    a:= DBMS_SQLTUNE.create_tuning_task ( begin_snap=> &snap1, end_snap=>&snap2, sql_id=> '&sql_id', scope => 'comprehensive', task_name => 'T_&sql_id', time_limit=>7200);
    END;
    /

    snap1 and snap2 is the snap_id between which the sql_id was executed.

    friendly.
  • 5. Re: primary database lost
    sb92075 Guru
    Currently Being Moderated
    user622061 wrote:
    Hello,

    By any chance, if your sql_id is in AWR, you can do this :
    which SQL_ID & run SQL against which DB?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points