Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Managed Standby Database Again

Re: Managed Standby Database Again

From: Joel Garry <joel-garry_at_home.com>
Date: 6 Dec 2002 16:37:35 -0800
Message-ID: <91884734.0212061637.4bc23922@posting.google.com>


"bgt0990" <btighe_at_neometrics.com> wrote in message news:<3df0c2e9$1_1_at_corp-goliath.newsgroups.com>...
> I'm setting up Managed standby database between 2 win 2k Version 8.1.7
> servers. it all seems to be working well, however I was under the
> impression that the primary server would write a copy of the redo logs into
> the destination pointed to by the log_archive_dest_2. I never see the logs
> in the standby directory though the logs are applied and changes are seen if
> I stop recovery and bring up the standby DB in read only mode. The service
> "test2" is valid.

That's kinda interesting, please post your log_archive_dest_2 and standby_arch_dest definitions.

>
> The other question would be, how do I bring the database from "open read
> only" back to "recover standby database" without having to shutdown the DB?
> If I try "alter database close" it says I can't do that while I am
> connected.

See metalink NOTE: 120855.1

...

4 Restart sustained or manual recovery when needed when no active sessions are

   connected. If necessary open a new session as internal and issue shutdown immediate;

   Check part I 4) the part about synchronizing the standby database.

...

When there is a gap in archives produced by primary database and   archives the standby database is waiting for these (check alert files),
  it may be necessary to synchronize the primary and standby database:   first stop the managed standby recovery mode by starting another session
  and issue:

  SQL>alter database recover managed standby database cancel;

  This will give on the former session in 'managed recovery mode':

  SQL> recover managed standby database;  

  ORA-00283: recovery session canceled due to errors   ORA-16037: user requested cancel of sustained recovery operation

  If necessary synchronize the primary database and the standby database:

  Synchronize: first copy the archives of the primary database to the standby database
  standby_archive_dest and after that issue:

  SQL> recover automatic standby database;

  This will show (as example):

  ORA-00279: change 5965147458373 generated at 09/28/2000 12:02:30 needed for
  thread 1
  ORA-00289: suggestion :
  /unix1/app/oracle/oradata/v816/oradata/v816/backup/arch_1_148.arc   ORA-00280: change 5965147458373 for thread 1 is in sequence #148   ORA-00278: log file
'/unix1/app/oracle/oradata/v816/oradata/v816/backup/arch_1_148.arc'   no longer needed for this recovery
  ORA-00308: cannot open archived log
    '/unix1/app/oracle/oradata/v816/oradata/v816/backup/arch_1_148.arc'   ORA-27037: unable to obtain file status   HP-UX Error: 2: No such file or directory   Additional information: 3
  Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  Then issue : CANCEL
  Result:
  Media recovery cancelled.

  Then set the standby database in managed recovery mode again:

  SQL> recover managed standby database;  

  Check the alert files of both primary and standby database and test   by issueing a few alter system switch logfile commands at the primary database,
  the alert files should look something like:

  check alert file primary database:
  Fri Sep 22 11:28:52 2000
  ARC0: Beginning to archive log# 3 seq# 144   ARC0: Completed archiving log# 3 seq# 144   Fri Sep 22 11:29:21 2000
  Thread 1 advanced to log sequence 146
  Current log# 2 seq# 146 mem# 0:
/unix1/app/oracle/oradata/v816/oradata/v816/redo02.log   Fri Sep 22 11:29:21 2000
  ARC0: Beginning to archive log# 1 seq# 145   ARC0: Completed archiving log# 1 seq# 145

  check alert file standby database;
  Media Recovery Start: Managed Standby Recovery   Media Recovery Log
  Media Recovery Waiting for thread 1 seq# 144   Fri Sep 22 11:29:08 2000
  Media Recovery Log
/unix1/app/oracle/oradata/v816/oradata/v816/testsroo/arch_1_144.arc   Media Recovery Waiting for thread 1 seq# 145   Fri Sep 22 11:29:24 2000
  Media Recovery Log
/unix1/app/oracle/oradata/v816/oradata/v816/testsroo/arch_1_145.arc   Media Recovery Waiting for thread 1 seq# 146

>
> Thanks
> Barry
>
> Primary init.ora
> log_archive_start = true
> log_archive_format = %%ORACLE_SID%%%S.001
> log_archive_dest_1 = "LOCATION=D:\oracle\oradata\test1\archive"
> log_archive_dest_2 = "SERVICE=test2 OPTIONAL REOPEN=60"
>
>
> Standby init.ora
> log_archive_dest_1 = "location=C:\oracle\oradata\test1\archive"
> log_archive_format = TEST1%S.001
>
>
>
>
>
> -----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
> http://www.newsfeed.com The #1 Newsgroup Service in the World!
> -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----
jg

--
@home is bogus.
"W.'s family used to laugh about how he would shove a firecracker down
a frog's throat and watch it explode."
Received on Fri Dec 06 2002 - 18:37:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US