Home » RDBMS Server » Backup & Recovery » How to recover with archive logs when I create a new tablespace after full backcup.
How to recover with archive logs when I create a new tablespace after full backcup. [message #217364] Thu, 01 February 2007 18:58 Go to next message
xyz_hh
Messages: 11
Registered: February 2007
Junior Member
step 1. Make a full backup in Rman.
step 2. Make a new tablespace.
step 3. alter system archive log current

Now, I deleted all the controlfiles,dataflies,redologs, executed "restore controlfile" "restore database".
But ,when I executed "recover database",I see the follow errors:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 01/29/2007 17:44:57
ORA-01245: offline file 5 will be lost if RESETLOGS is done
ORA-01111: name for data file 5 is unknown - rename to correct file
ORA-01110: data file 5: '/opt/oracle/product/10.2.0/db_1/dbs/UNNAMED00005'



In the above case ,how can I rebuild the database using backup and archive log.

Please ,Thanks!
Re: How to recover with archive logs when I create a new tablespace after full backcup. [message #217465 is a reply to message #217364] Fri, 02 February 2007 06:21 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
YOu have to restore the database prior to STEP1.
By default recover will try to restore and recover everything upto the point of failure. If your archivelogs are missing, you cannot do it.
Search this forum/documenation for TSPITR(tablespace point in time recovery)
Re: How to recover with archive logs when I create a new tablespace after full backcup. [message #217692 is a reply to message #217364] Sun, 04 February 2007 18:37 Go to previous messageGo to next message
xyz_hh
Messages: 11
Registered: February 2007
Junior Member
I have restore the database prior step 1 ,and have all the archive logs.These error message is shown where I excute 'recover databases'
Re: How to recover with archive logs when I create a new tablespace after full backcup. [message #217695 is a reply to message #217692] Sun, 04 February 2007 20:11 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
As Mahesh indicated, RMAN will try to recover everything up to the point of failure, therefore you will need the archivelogs for this process to succeed.

After you MOUNT the database during the RMAN recovery, you could add the datafile(s) associated with the "new" tablespace with:
RMAN> sql "alter database create datafile ''<direcotry_path/file_name>''";

At this point, you can restore all the other datafiles that existed when the backup was taken:
RMAN> restore datafile 1, 2, 3, ..., n;

Then you can perform recovery and open with resetlogs:
RMAN> recover database;
RMAN> alter database open resetlogs;


Re: How to recover with archive logs when I create a new tablespace after full backcup. [message #217915 is a reply to message #217695] Tue, 06 February 2007 01:35 Go to previous messageGo to next message
xyz_hh
Messages: 11
Registered: February 2007
Junior Member
to ebrian:
Thanks ,but I get the message:
ERROR at line 1:
ORA-01516: nonexistent log file, datafile, or tempfile
"/opt/oracle/oradata/TEST.dbf"

when I alter database create datafile '..'
Re: How to recover with archive logs when I create a new tablespace after full backcup. [message #217983 is a reply to message #217915] Tue, 06 February 2007 04:51 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Are you using TWO single-quotes (in red below) around the datafile name?

RMAN> sql "alter database create datafile ''<direcotry_path/file_name>'' ";

The quotes in blue are double-quotes.
Re: How to recover with archive logs when I create a new tablespace after full backcup. [message #218385 is a reply to message #217983] Wed, 07 February 2007 23:48 Go to previous messageGo to next message
xyz_hh
Messages: 11
Registered: February 2007
Junior Member
Thanks for your replying,But it's in sqlplus that I executed.
I got the same message in rman also.
Re: How to recover with archive logs when I create a new tablespace after full backcup. [message #218493 is a reply to message #218385] Thu, 08 February 2007 07:40 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
The commands worked for me on 9i. I don't have the output from my session, but I can provide that once I have access to my system.

Check Recovering a Lost Datafile Without a Backup for additional details.
Previous Topic: RMAN - Naming convetion & Retension queries
Next Topic: DELETE backup job failing
Goto Forum:
  


Current Time: Thu May 02 17:11:11 CDT 2024