after restore when trying to recover database.. it gives error [message #615334] |
Mon, 02 June 2014 11:20 |
cakeday
Messages: 31 Registered: May 2010
|
Member |
|
|
i am refreshing a test environment from a produciton environment.
I am doing it in 3 steps. i am getting an error when trying to recover the database. PLEASE HELP.
Step 1:Restore control file.
THIS RUNS SUCCESSFUL.
Step 2:Restore the Database.
I am using the following script to do so..
rman target / << EOF
run
{
allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/p076/admin/adsmagent/tdpo.opt)';
set until time "to_date('28-may-2014 18:31:00','dd-mon-yyyy hh24:mi:ss')";
SET NEWNAME FOR DATAFILE '/p089/data001/itas001_data_001.dbf' TO '/p076/data001/itas001_data_001.dbf';
SET NEWNAME FOR DATAFILE '/p089/data001/patrolkm_data_00.dbf' TO '/p076/data001/patrolkm_data_00.dbf';
SQL "ALTER DATABASE RENAME FILE ''/p089/redob/redob_009.log'' TO ''/p076/redob/redob_009.log'' ";
SQL "ALTER DATABASE RENAME FILE ''/p089/redoa/redoa_010.log'' TO ''/p076/redoa/redoa_010.log'' ";
SQL "ALTER DATABASE RENAME FILE ''/p089/redob/redob_010.log'' TO ''/p076/redob/redob_010.log'' ";
restore database;
release channel t1;
}
EOF
THIS RUNS SUCCESSFUL TOO!
Step 3:recover the database.
Script:
rman target / << EOF
run
{
allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/p076/admin/adsmagent/tdpo.opt)';
set until time "to_date('28-may-2014 18:31:00','dd-mon-yyyy hh24:mi:ss')";
recover database;
release channel t1;
}
EOF
ERROR:I am getting the following error when i run this,
Database dismounted.
ORACLE instance shut down.
SQL> ORACLE instance started.
Total System Global Area 1.3362E+10 bytes
Fixed Size 2234120 bytes
Variable Size 4395632888 bytes
Database Buffers 8925478912 bytes
Redo Buffers 38498304 bytes
Database mounted.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Start of RMAN script.
Recovery Manager: Release 11.2.0.3.0 - Production on Mon Jun 2 09:10:50 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: P089 (DBID=4262525727, not open)
RMAN>
RMAN> 2> 3> 4> 5> 6> 7>
using target database control file instead of recovery catalog
allocated channel: t1
channel t1: SID=2091 device type=SBT_TAPE
channel t1: Data Protection for Oracle: version 7.1.0.0
Starting recover at 02-JUN-14
released channel: t1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 06/02/2014 09:10:55
RMAN-06094: datafile 1 must be restored
RMAN>
Recovery Manager complete.
end Mon Jun 2 09:10:56 PDT 2014
|
|
|
|
|
Re: after restore when trying to recover database.. it gives error [message #615350 is a reply to message #615334] |
Mon, 02 June 2014 15:13 |
cakeday
Messages: 31 Registered: May 2010
|
Member |
|
|
ok, so i was able to recover the database.
what i did was, i ran the following query..
select error from v$datafile_header;
And it came back saying, NO FILE FOUND.
SO i had to run a rename of the datafile again before i issued recover database. And it worked.
So now the DB is restored as well as recovered.
= = =
NOW comes teh ONILNE REDOLOGS.
when i look at v$logfile, i see that the online redologs entry is there.
BUT when i look at the physical location, i don't see them??
= = =
Also, TempFiles: do i need to create tempfiles before i open the db with resetlogs??
|
|
|
Re: after restore when trying to recover database.. it gives error [message #615352 is a reply to message #615350] |
Mon, 02 June 2014 15:42 |
cakeday
Messages: 31 Registered: May 2010
|
Member |
|
|
TEMPORARY TABLESPACE:
What should i do about the temporary tablespace situation? i don't seem to have a valid temporary tablespace and when i try to create one, it says DB NOT OPEN.
SQL> CREATE TEMPORARY TABLESPACE TEMP1 TEMPFILE '/p076/tmp001/temp001_data.dbf' SIZE 200M AUTOEXTEND OFF;
CREATE TEMPORARY TABLESPACE TEMP1 TEMPFILE '/p076/tmp001/temp001_data.dbf' SIZE 200M AUTOEXTEND OFF
*
ERROR at line 1:
ORA-01109: database not open
= = = =
when i look at v$tempfile, the tempfiles are from the source database.. PLEASE HELP!SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
/p089/tmp001/tmp001_data.dbf
|
|
|
|
Re: after restore when trying to recover database.. it gives error [message #615355 is a reply to message #615353] |
Mon, 02 June 2014 16:10 |
cakeday
Messages: 31 Registered: May 2010
|
Member |
|
|
i know about the open resetlogs..
But since this DB was restored in a different location (e.g. from Prod to the Dev environment) -- do i need to do a RENAME on the tempfiles?
because what i see in the database and what i see on the physical server -- THE FILENAMES AND THE LOCATION does not match.
physical is under /p076/tmp001 (Target)
a52ulppci01:/p076/tmp001> ls -ltr
total 101386384
drwxr-xr-x 2 root system 256 Jun 26 2009 lost+found
-rw-r----- 1 oracle oradba 17301512192 May 30 12:24 tmp001_data_002.dbf
-rw-r----- 1 oracle oradba 17301512192 May 30 13:25 tmp001_data_003.dbf
-rw-r----- 1 oracle oradba 17301512192 May 30 13:26 tmp001_data.dbf
in the database i see he source location,
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
/p089/tmp001/tmp001_data.dbf
/p089/tmp001/tmp002_data.dbf
/p089/tmp001/tmp003_data.dbf
will the database OPEN without a temporary tablespace??
|
|
|
Re: after restore when trying to recover database.. it gives error [message #615356 is a reply to message #615355] |
Mon, 02 June 2014 16:32 |
John Watson
Messages: 8963 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
If you know about resetlogs, why do you ask this,Quote:when i look at v$logfile, i see that the online redologs entry is there.
BUT when i look at the physical location, i don't see them?? However, it would seem from your lack of gratitude for my attempts to assist are valueless to you. Perhaps someone else will give you better advice.
|
|
|