Home » RDBMS Server » Backup & Recovery » Backup And Recovery  () 2 Votes
Backup And Recovery [message #257279] Tue, 07 August 2007 23:50 Go to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
hi,

can v able to backup of control file wen the database is not open.
&
if any of my archivelog file is corrupted r lost can i able to take backup of tat file.
Re: backup [message #257280 is a reply to message #257279] Tue, 07 August 2007 23:52 Go to previous messageGo to next message
BlackSwan
Messages: 25039
Registered: January 2009
Location: SoCal
Senior Member
>can v able to backup of control file wen the database is not open.
&
>if any of my archivelog file is corrupted r lost can i able to take backup of tat file.
Please make posts in English so folks might be able to answer.
backup [message #257281 is a reply to message #257279] Wed, 08 August 2007 00:07 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
can i able to take backup of control file,
when the database is not open.
and
is it able to restore the archivelog file after backup had been done,when archivelog file is lost or corrupted.
Re: backup [message #257293 is a reply to message #257281] Wed, 08 August 2007 00:58 Go to previous messageGo to next message
Michel Cadot
Messages: 64117
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
can i able to take backup of control file, when the database is not open

If you mean with "alter database" statement, yes you just need to be in mounted state, open is not mandatory.

Quote:
is it able to restore the archivelog file after backup had been done,when archivelog file is lost or corrupted

If you have a backup, yes, from the backup (if it is not corrupted).
If you have not or a corrupted backup, no.

Regards
Michel
recovery [message #257348 is a reply to message #257279] Wed, 08 August 2007 02:38 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
give me the command for
how to recover archivelog file and control file.
Re: recovery [message #257349 is a reply to message #257348] Wed, 08 August 2007 02:42 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Why you not continue your previous post...

Don't create NEW TOPIC for some type of questions.


Regards
Taj

[Edit: Topic Merged]

[Updated on: Wed, 08 August 2007 02:43]

Report message to a moderator

Re: recovery [message #257351 is a reply to message #257348] Wed, 08 August 2007 02:44 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

http://download-west.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta044.htm#sthref699

To recover archivelog you have to provide in addition with either database/ datafile/tablespace
Re: Backup And Recovery [message #257357 is a reply to message #257279] Wed, 08 August 2007 02:53 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
just post me the command.
Re: Backup And Recovery [message #257359 is a reply to message #257357] Wed, 08 August 2007 02:56 Go to previous messageGo to next message
Michel Cadot
Messages: 64117
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
just post me the command

You don't say how you backup, we can't tell you how to recover.

Regards
Michel
Re: Backup And Recovery [message #257360 is a reply to message #257279] Wed, 08 August 2007 02:57 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
i had taken the backup of controlfile and archivelog file by using the below command.now i lost my control file and archivelog file,can i able to recover from the backup.
if it is what is the command?



RMAN> run { allocate channel t1 type disk;
2> backup current controlfile format '/u01/oracle/archive/controlf_%d_%u_%s';
3> release channel t1;}


RMAN> run { allocate channel t1 type disk;
2> backup archivelog all format '/u01/oracle/archive/archive_%d_%u_%s' delete input;
3> release channel t1;}


Re: Backup And Recovery [message #257361 is a reply to message #257357] Wed, 08 August 2007 02:59 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

ara.oracle wrote on Wed, 08 August 2007 13:53
just post me the command.



I even don't know your requirement. It totally depends on you how you will recover.

from autobackup,
Recover controlfile from autobackup;

From tag,
Recover database archivelog tag <tagname>;

[Updated on: Wed, 08 August 2007 03:05] by Moderator

Report message to a moderator

Re: Backup And Recovery [message #257400 is a reply to message #257279] Wed, 08 August 2007 04:43 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
to create a controlfile what is the command.
Re: Backup And Recovery [message #257403 is a reply to message #257279] Wed, 08 August 2007 04:50 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

This is not a thread related question.
Why you will do that. Before doing that do
backup controlfile to trace.then
in nomount state,

CREATE CONTROLFILE REUSE DATABASE NEW
MAXLOGFILES 8
MAXLOGMEMBERS 2
MAXDATAFILES 32
MAXINSTANCES 1
LOGFILE

/////path

DATAFILE

/////path

;
Re: Backup And Recovery [message #257415 is a reply to message #257400] Wed, 08 August 2007 05:30 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
ara.oracle wrote on Wed, 08 August 2007 03:38
give me the command for
how to recover archivelog file and control file.

ara.oracle wrote on Wed, 08 August 2007 03:53
just post me the command.


ara.oracle wrote on Wed, 08 August 2007 05:43
to create a controlfile what is the command.


Not even a please or thanks anywhere in any of your posts. Amazing!!

Surprised the post didn't have URGENT in it's title.
Re: Backup And Recovery [message #257475 is a reply to message #257279] Wed, 08 August 2007 07:53 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
No Message Body

[Updated on: Wed, 08 August 2007 09:16]

Report message to a moderator

Re: Backup And Recovery [message #257507 is a reply to message #257279] Wed, 08 August 2007 08:56 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member

kindly give a solution for this



RMAN> connect target/

connected to target database: DBSIB (DBID=2610068098)

RMAN> run {
2> allocate channel t1 type disk;
3> backup archivelog all format '/orcl/oracle/product/database/flash_recovery_area/DBSIB/archivelog_%d%u%s' delete input;
4> release channel t1;
5> }

using target database control file instead of recovery catalog
allocated channel: t1
channel t1: sid=141 devtype=DISK

Starting backup at 09-JUL-07
current log archived
released channel: t1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 07/09/2007 03:57:09
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /orcl/oracle/product/database/flash_recovery_area/DBSIB/archivelog/2007_07_09/o1_mf_1_37_392pn13r_.arc
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Re: Backup And Recovery [message #257510 is a reply to message #257507] Wed, 08 August 2007 09:04 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all;
Re: Backup And Recovery [message #257520 is a reply to message #257279] Wed, 08 August 2007 09:24 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
RMAN>crosscheck archivelog all;

kindly say what this command is saying?
Re: Backup And Recovery [message #257528 is a reply to message #257520] Wed, 08 August 2007 10:02 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,

Backup Retention Policies

RMAN considers backups of datafiles and control files as obsolete, that is, no longer needed for recovery, according to criteria that you specify in the CONFIGURE command. You can then use the REPORT OBSOLETE command to view obsolete files and DELETE OBSOLETE to delete them.
RMAN>report obsolete; 
RMAN>delete obsolete;


If you have a flash recovery area configured, however, then the database automatically deletes unnecessary files from the flash recovery area based on its internal disk quota rules. The disk quota rules are distinct from the backup retention policy rules, but the database will never delete files in violation of the retention policy to satisfy the disk quota.

The term obsolete does not mean the same as expired.
RMAN>crosscheck backup;
RMAN> crosscheck archivelog all;


In short, obsolete means "not needed," whereas expired means "not found."
RMAN> delete expired backup;
RMAN> delete expired archivelog all;


The CROSSCHECK command does not delete operating system files or remove repository records. You must use the DELETE command for these operations


[Updated on: Wed, 08 August 2007 10:04]

Report message to a moderator

Re: Backup And Recovery [message #257653 is a reply to message #257279] Wed, 08 August 2007 23:01 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
thanks for the reply
Re: Backup And Recovery [message #257674 is a reply to message #257279] Thu, 09 August 2007 00:17 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
when am taking backup of archivelog am getting the backup of archive log as dbf file like below.
please tell me how it is dbf?



[oracle@infra archivelog]$ ls
1_46_627261832.dbf 1_47_627261832.dbf 1_48_627261832.dbf
Re: Backup And Recovery [message #257677 is a reply to message #257674] Thu, 09 August 2007 00:19 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

please tell me how it is dbf?

show us :sql>show parameter archive


Regards
Taj
Re: Backup And Recovery [message #257685 is a reply to message #257279] Thu, 09 August 2007 00:33 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
this is how i had taken the backup of archive plus datafile.
and am getting archive file as dbf.



SQL> connect sys/sys as sysdba
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.

Total System Global Area 281018368 bytes
Fixed Size 1218968 bytes
Variable Size 113247848 bytes
Database Buffers 163577856 bytes
Redo Buffers 2973696 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /orcl/oracle/product/database/flash_recovery_area/DBSIB/archivelog
Oldest online log sequence 44
Next log sequence to archive 46
Current log sequence 46
SQL>



RMAN> run {
2> allocate channel t1 type disk;
3> backup database plus archivelog;
4> release channel t1;
5> }

released channel: ORA_DISK_1
allocated channel: t1
channel t1: sid=141 devtype=DISK


Starting backup at 09-JUL-07
current log archived
channel t1: starting archive log backupset
channel t1: specifying archive log(s) in backup set
input archive log thread=1 sequence=46 recid=66 stamp=627503181
input archive log thread=1 sequence=47 recid=67 stamp=627503285
channel t1: starting piece 1 at 09-JUL-07
channel t1: finished piece 1 at 09-JUL-07
piece handle=/orcl/oracle/product/database/flash_recovery_area/DBSIB/backupset/2007_07_09/o1_mf_annnn_TAG20070709T182805_394d6yv7_.bkp tag=TAG20070709T182805 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:02
Finished backup at 09-JUL-07

Starting backup at 09-JUL-07
channel t1: starting full datafile backupset
channel t1: specifying datafile(s) in backupset
input datafile fno=00001 name=/orcl/oracle/product/oradata/dbsib/system01.dbf
input datafile fno=00003 name=/orcl/oracle/product/oradata/dbsib/sysaux01.dbf
input datafile fno=00002 name=/orcl/oracle/product/oradata/dbsib/undotbs01.dbf
input datafile fno=00004 name=/orcl/oracle/product/oradata/dbsib/users01.dbf
channel t1: starting piece 1 at 09-JUL-07
channel t1: finished piece 1 at 09-JUL-07
piece handle=/orcl/oracle/product/database/flash_recovery_area/DBSIB/backupset/2007_07_09/o1_mf_nnndf_TAG20070709T182808_394d70v1_.bkp tag=TAG20070709T182808 comment=NONE
channel t1: backup set complete, elapsed time: 00:01:15
channel t1: starting full datafile backupset
channel t1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel t1: starting piece 1 at 09-JUL-07
channel t1: finished piece 1 at 09-JUL-07
piece handle=/orcl/oracle/product/database/flash_recovery_area/DBSIB/backupset/2007_07_09/o1_mf_ncsnf_TAG20070709T182808_394d9fvy_.bkp tag=TAG20070709T182808 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:03
Finished backup at 09-JUL-07

Starting backup at 09-JUL-07
current log archived
channel t1: starting archive log backupset
channel t1: specifying archive log(s) in backup set
input archive log thread=1 sequence=48 recid=68 stamp=627503367
channel t1: starting piece 1 at 09-JUL-07
channel t1: finished piece 1 at 09-JUL-07
piece handle=/orcl/oracle/product/database/flash_recovery_area/DBSIB/backupset/2007_07_09/o1_mf_annnn_TAG20070709T182927_394d9k17_.bkp tag=TAG20070709T182927 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:02
Finished backup at 09-JUL-07

released channel: t1
Re: Backup And Recovery [message #257689 is a reply to message #257685] Thu, 09 August 2007 00:39 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
I think i was not clear in my previous post i want to know about log file format...

first connect to DB through SQL*PLUS
SQL> show parameter log_archive_format



Re: Backup And Recovery [message #257703 is a reply to message #257279] Thu, 09 August 2007 01:01 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member

how to change this value?


SQL> show parameter log_archive_format;

NAME TYPE VALUE
------------------------------------ ----------- ----------------------------
log_archive_format string %t_%s_%r.dbf


thanks
Re: Backup And Recovery [message #257706 is a reply to message #257279] Thu, 09 August 2007 01:04 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
normally when am taking backup am using this command.
and my backup files are stored in a particular location.
plz tell me can i able to change the location?
if it is just give me the command for tat.




RMAN> run {
2> allocate channel t1 type disk;
3> backup database plus archivelog;
4> release channel t1;
5> }
Re: Backup And Recovery [message #257711 is a reply to message #257706] Thu, 09 August 2007 01:21 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
log_archive_format string %t_%s_%r.dbf
Change your archive log format
SQL> alter systems set log_archive_format = 'format[b].arc[/b] SCOPE=spfile
SQL> shutdown immediate;
SQL> startup


Check doc for log archive format.


plz tell me can i able to change the location?
Yes, you can change archive log location for that you have to set LOG_ARCHIVE_DEST_n parameter.

Regards
Taj
Re: Backup And Recovery [message #257725 is a reply to message #257279] Thu, 09 August 2007 01:36 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
ya i know tat i can change the location for archivelog.


i just want to know tat can i able to change the location for datafile?

thanks for reply.
Re: Backup And Recovery [message #257726 is a reply to message #257725] Thu, 09 August 2007 01:37 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

i just want to know tat can i able to change the location for datafile?
Yes,
http://download.oracle.com/docs/cd/B14117_01/server.101/b10739/dfiles.htm#i1006457

[Updated on: Thu, 09 August 2007 01:43]

Report message to a moderator

Re: Backup And Recovery [message #257727 is a reply to message #257279] Thu, 09 August 2007 01:43 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
i had done what u had said ,but i am facing this error
what to do?
plz need a kind reply


SQL> show parameter log_archive_format;

NAME TYPE VALUE
------------------------------------ ----------- ----------------------------
log_archive_format string %t_%s_%r.dbf
SQL> alter system set log_archive_format = 'format.arc' scope=spfile;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> connect sys/sys as sysdba
Connected to an idle instance.
SQL> startup mount
ORA-19905: log_archive_format must contain %s, %t and %r
Re: Backup And Recovery [message #257729 is a reply to message #257727] Thu, 09 August 2007 01:45 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

SQL> alter system set log_archive_format = 'format.arc' scope=spfile;


Please go through below link for "archive log format"

http://download.oracle.com/docs/cd/B14117_01/server.101/b10755/initparams104.htm#REFRN10089


Re: Backup And Recovery [message #257739 is a reply to message #257279] Thu, 09 August 2007 01:57 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
[oracle@infra ~]$ sqlplus /nolog

i cant able to mount into database.
plz need a kind reply




SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 9 21:09:08 2007

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

SQL> connect sys/sys as sysdba
Connected to an idle instance.
SQL> startup mount
ORA-19905: log_archive_format must contain %s, %t and %r
SQL> alter system set log_archive_format='format,arc' scope=spfile;
alter system set log_archive_format='format,arc' scope=spfile
*
ERROR at line 1:
ORA-01034: ORACLE not available


SQL>
Re: Backup And Recovery [message #257746 is a reply to message #257739] Thu, 09 August 2007 02:04 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
Please follow exact below step.

1. connect to sqlplus with SYS user
conn sys as sysdba
password XXXX

Create pfile from spfile
SQL>create PFILE from spfile;

2. Go $ORACLE_HOME/db_1/database/ directory

3. open INIT<SID>.ORA file

4. Add log_archive_format='log%t_%s_%r.arc'

5. SAVE and Exit

6. go again sqlplus prompt

Create SPFILE from pfile
7. create SPFILE from pfile;

Mount your database
8. alter database mount;

Open your database

9. alter database open;



Regards
Taj
Re: Backup And Recovery [message #257775 is a reply to message #257279] Thu, 09 August 2007 02:48 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
RMAN> restore controlfile from autobackup;
i had taken the AUTOBACKUP of controlfile and spfile.
and i wantedly deleted one control file.
then i try to restore my control file by using the below command
but i got the following errors.
plz tell me how to restore my control file
and am not able to mount my database without controlfile


RMAN> restore controlfile from autobackup;

RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows
ORACLE error from target database:
ORA-03135: connection lost contact

Starting restore at 09-JUL-07
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/09/2007 22:01:42
ORA-03114: not connected to ORACLE

RMAN>


thanks for reply.
Re: Backup And Recovery [message #257780 is a reply to message #257775] Thu, 09 August 2007 02:57 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,

ORA-03114: not connected to ORACLE
YOur session has been terminated.

connect again and try.

Regards
Taj
Re: Backup And Recovery [message #257788 is a reply to message #257279] Thu, 09 August 2007 03:07 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
without control file i cant able to mount the database.
plz reply
Re: Backup And Recovery [message #257793 is a reply to message #257279] Thu, 09 August 2007 03:17 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
without control file i cant able to mount the database,it is showing the following error.
plz reply



SQL> connect sys/sys as sysdba
Connected.
SQL> startup mount;
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> startup force mount;
ORACLE instance started.

Total System Global Area 281018368 bytes
Fixed Size 1218968 bytes
Variable Size 113247848 bytes
Database Buffers 163577856 bytes
Redo Buffers 2973696 bytes
ORA-00205: error in identifying control file, check alert log for more info


SQL>

Re: Backup And Recovery [message #257804 is a reply to message #257793] Thu, 09 August 2007 03:36 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
Connect to db through RMAN and try

Regards
Taj

[Updated on: Thu, 09 August 2007 03:36]

Report message to a moderator

Re: Backup And Recovery [message #257815 is a reply to message #257279] Thu, 09 August 2007 04:31 Go to previous messageGo to next message
ara.oracle
Messages: 142
Registered: August 2007
Senior Member
i had taken three backups with different names.
such as bk1, bk2 ,bk3
and i want to restore only the bk2.
how to do that.

plz gv me the command briefly?
Re: Backup And Recovery [message #257816 is a reply to message #257279] Thu, 09 August 2007 04:33 Go to previous messageGo to previous message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Why you are wasting so many times rather than go through oracle documentation?
Previous Topic: Truncate and a complete recovery?
Next Topic: Instance Recovery......
Goto Forum:
  


Current Time: Tue Dec 06 04:36:01 CST 2016

Total time taken to generate the page: 0.14334 seconds