Home » RDBMS Server » Backup & Recovery » ORA-16004: backup database requires recovery (Oracle,10.2.0,Redhat5)
ORA-16004: backup database requires recovery [message #527749] Thu, 20 October 2011 01:33 Go to next message
kailas
Messages: 21
Registered: September 2011
Location: pune
Junior Member
Here is the details
[oracle@localhost dbs]$ export ORACLE_SID=stby
[oracle@localhost dbs]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 20 09:47:34 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> !               
[oracle@localhost dbs]$ pwd
/oraeng/app/oracle/product/10.2.0/dbs
[oracle@localhost dbs]$ exit
exit

SQL> startup pfile='/oraeng/app/oracle/product/10.2.0/dbs/initstby.ora' nomount;
ORA-32006: LOG_ARCHIVE_START initialization parameter has been deprecated
ORACLE instance started.

Total System Global Area  100663296 bytes
Fixed Size                  1217884 bytes
Variable Size              88083108 bytes
Database Buffers            8388608 bytes
Redo Buffers                2973696 bytes
SQL> alter database mount standby database;

Database altered.

SQL> alter system set log_archive_dest_2='service=stby' scope=both;
alter system set log_archive_dest_2='service=stby' scope=both
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup


SQL> create spfile from pfile='/oraeng/app/oracle/product/10.2.0/dbs/initstby.ora';

File created.

SQL> !     

[oracle@localhost dbs]$ exit
exit

SQL> shut immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area  100663296 bytes
Fixed Size                  1217884 bytes
Variable Size              88083108 bytes
Database Buffers            8388608 bytes
Redo Buffers                2973696 bytes
SQL> alter database mount standby database;

Database altered.

SQL> alter system set log_archive_dest_2='service=stby' scope=both;
alter system set log_archive_dest_2='service=stby' scope=both
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16019: cannot use LOG_ARCHIVE_DEST_2 with LOG_ARCHIVE_DEST or
LOG_ARCHIVE_DUPLEX_DEST


SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> alter database open read only;
alter database open read only
*
ERROR at line 1:
ORA-01154: database busy. Open, close, mount, and dismount not allowed now


SQL> recover managed standby database cancel;
Media recovery complete.
SQL> alter database open read only;
alter database open read only
*
ERROR at line 1:
ORA-16006: audit_trail destination incompatible with database open mode


SQL> show parameter audit_trail;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
audit_trail                          string      TRUE
SQL> alter system set audit_trail=false scope=both;
alter system set audit_trail=false scope=both
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified


SQL> alter system set audit_trail='FALSE' scope=both;
alter system set audit_trail='FALSE' scope=both
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified


SQL> shut immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> 
SQL> !

[oracle@localhost dbs]$ exit
exit

SQL> startup nomount
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area  100663296 bytes
Fixed Size                  1217884 bytes
Variable Size              88083108 bytes
Database Buffers            8388608 bytes
Redo Buffers                2973696 bytes
SQL> shut immediate  
;
\
ORA-01507: database not mounted


ORACLE instance shut down.
SQL>   1* alter system set audit_trail='FALSE' scope=both
SQL> SP2-0042: unknown command "\" - rest of line ignored.
SQL> ! 

[oracle@localhost dbs]$ exit
exit

SQL> !               
[oracle@localhost dbs]$ pwd
/oraeng/app/oracle/product/10.2.0/dbs
[oracle@localhost dbs]$ exit
exit

SQL> startup pfile='/oraeng/app/oracle/product/10.2.0/dbs/initstby.ora' nomount;
ORA-32006: LOG_ARCHIVE_START initialization parameter has been deprecated
ORACLE instance started.

Total System Global Area  100663296 bytes
Fixed Size                  1217884 bytes
Variable Size              88083108 bytes
Database Buffers            8388608 bytes
Redo Buffers                2973696 bytes
SQL> alter database open read only;
alter database open read only
*
ERROR at line 1:
ORA-01507: database not mounted


SQL> alter database mount standby database;

Database altered.

SQL> alter database open read only;
alter database open read only
*
ERROR at line 1:
ORA-16004: backup database requires recovery
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/disk1/oradata/school/system.dbf'


SQL> alter database recover managed standby database discoonect from session;
alter database recover managed standby database discoonect from session
*
ERROR at line 1:
ORA-00274: illegal recovery option DISCOONECT


SQL> shut immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> starup pfile='/oraeng/app/oracle/product/10.2.0/dbs/initstby.ora' nomount;
SP2-0734: unknown command beginning "starup pfi..." - rest of line ignored.
SQL> startup pfile='/oraeng/app/oracle/product/10.2.0/dbs/initstby.ora' nomount;
ORA-32006: LOG_ARCHIVE_START initialization parameter has been deprecated
ORACLE instance started.

Total System Global Area  100663296 bytes
Fixed Size                  1217884 bytes
Variable Size              88083108 bytes
Database Buffers            8388608 bytes
Redo Buffers                2973696 bytes
SQL> alter database mount standby database;

Database altered.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;


Database altered.

SQL> SQL> 
SQL> alter database open read only;
alter database open read only
*
ERROR at line 1:
ORA-01154: database busy. Open, close, mount, and dismount not allowed now


SQL> recover managed standby database cancel;
Media recovery complete.
SQL> alter database open read only;
alter database open read only
*
ERROR at line 1:
ORA-16004: backup database requires recovery
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/disk1/oradata/school/system.dbf'


SQL> select * from tab;
select * from tab
              *
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only


SQL> !



Here is the document which i followed when creating a stby database.

http://www.dbapool.com/articles/043005.html
Re: ORA-16004: backup database requires recovery [message #527790 is a reply to message #527749] Thu, 20 October 2011 03:30 Go to previous message
John Watson
Messages: 4479
Registered: January 2010
Location: Global Village
Senior Member
Kailas, you have so many problems here. If you want to ask about ONE of them, perhaps I can help. But really, I think you should forget that document you are working from, and start again. This tiome, follows the official documentation:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/toc.htm
Previous Topic: Why does v$datafile not show temp01.dbf ?
Next Topic: Missing some tables after recover to a new host
Goto Forum:
  


Current Time: Wed Aug 20 23:24:22 CDT 2014

Total time taken to generate the page: 0.07883 seconds