Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Restore files to a new database?

Posted on 2004-09-08
3
Medium Priority
?
630 Views
Last Modified: 2007-12-19
Hi,

I am trying to restore data and redo log files (about a week ago full backup) of DB1 (noarchivelog mode) into a new database DB2 because the boss doesn't want to shut down DB1. Is this possible? Usually you do cloning or restoring to a new location instead of a new database.

I restored all the data files and online redo log files (no archived log files because this is a noarchivelog mode db) to the new location. Run backup controlfile to trace to get a createdb.sql script, then run the script. Then I run:
recover database until time '2004-8-29:00:06:35' using backup controlfile

(using backup controlfile is required, otherwise I got an error message)

But the server prompt me for archive log files:
ORA-00279: change 122574831 generated at 08/29/04 00:00:22 needed for thread 1
ORA-00289: suggestion : /u03/oracle/product/805/dbs/arch/1_1425.dbf
ORA-00280: change 122574831 for thread 1 is in sequence #1425
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

I certainly don't have any archived logs. If I go ahead open the database instead of running a recover command, I get:

ORA-00344: unable to recreate online log '/red02/TEST/redo02.log'
ORA-27040: skgfrcre: create error, unable to create file
SVR4 Error: 2: No such file or directory

Could anyone give me some clues? Thanks
0
Comment
Question by:ebi168
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 23

Accepted Solution

by:
seazodiac earned 2000 total points
ID: 12009402
Since you have a FULL database backup,

you don't need to recover the database ,


SO your second approach bring you to the right track.

this error message: "ORA-00344: unable to recreate online log '/red02/TEST/redo02.log'
ORA-27040: skgfrcre: create error, unable to create file
SVR4 Error: 2: No such file or directory"


You need to make sure the REDO log files restored from backup are in this directory: '/red02/TEST/redo02.log'


Or you could startup the database in MOUNT mode:

SQL>startup mount;


then rename the log file into the right directory:

SQL>alter database rename file '<the old directory path from DB1>' to '<the new directory path for db2>';

0
 
LVL 12

Expert Comment

by:geotiger
ID: 12009487

It seems that the redo log file path is mismatched. You need to make sure the redo log restored exists in the indicated path or change the redo log file path to the indicated path.
0
 

Author Comment

by:ebi168
ID: 12010273
Good clue! I mistyped redo01 into red01. The problem is fixed. Thanks guys.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question