Moving 9i DB to new server(3 Merged) [message #559362] |
Mon, 02 July 2012 16:21 |
fnguy
Messages: 39 Registered: January 2006
|
Member |
|
|
I've inherited a DB where they are going to do a restore this weekend.
The current DB admin is using a db restore (not a duplicate). RMAN with no catalog. The current issue is that the DB restores fine, but when we do a delete obsolete after our backups it's asking if we want to delete the data files....
I'm guessing this has something to do with the DBID...but happy to be wrong.
Can someone assist? Tahnks.
|
|
|
Moving 9i DB to new server [message #559365 is a reply to message #559362] |
Mon, 02 July 2012 16:30 |
fnguy
Messages: 39 Registered: January 2006
|
Member |
|
|
I've inherited a DB where they are going to do a restore this weekend.
The current DB admin is using a db restore (not a duplicate). RMAN with no catalog. The current issue is that the DB restores fine, but when we do a delete obsolete after our backups it's asking if we want to delete the data files....
I'm guessing this has something to do with the DBID...but happy to be wrong.
Can someone assist? Tahnks.
run {
allocate channel Channel1 type disk format 'F:\backup\prd\%d_%T_%s_%U.bak';
allocate channel Channel2 type disk format 'F:\backup\prd\%d_%T_%s_%U.bak';
allocate channel Channel3 type disk format 'F:\backup\prd\%d_%T_%s_%U.bak';
allocate channel Channel4 type disk format 'F:\backup\prd\%d_%T_%s_%U.bak';
backup check logical ( database );
backup check logical ( archivelog all not backed up 2 times );
backup check logical ( current controlfile );
}
allocate channel for maintenance device type disk;
delete archivelog until time 'sysdate - 2' backed up 2 times to disk;
delete obsolete device type disk;
|
|
|
|
Re: Moving 9i DB to new server [message #559369 is a reply to message #559366] |
Mon, 02 July 2012 19:03 |
fnguy
Messages: 39 Registered: January 2006
|
Member |
|
|
I'm not sure what more you're looking for. It's 9i; I don't know how to determine the version to the fourth decimal though I'd suspect it's irrelevant. It's not R2, I believe, since that's what the previous DBA told me. We are running in a Windows 2003 enterprise server, Clustered.
|
|
|
|
Re: Moving 9i DB to new server [message #559371 is a reply to message #559370] |
Mon, 02 July 2012 19:14 |
fnguy
Messages: 39 Registered: January 2006
|
Member |
|
|
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
PL/SQL Release 9.2.0.8.0 - Production
"CORE 9.2.0.8.0 Production"
TNS for 32-bit Windows: Version 9.2.0.8.0 - Production
NLSRTL Version 9.2.0.8.0 - Production
|
|
|
|
Re: Moving 9i DB to new server [message #559373 is a reply to message #559372] |
Mon, 02 July 2012 19:38 |
fnguy
Messages: 39 Registered: January 2006
|
Member |
|
|
I just started at this company and they said this is what they need for a project going live ASAP. The dba has all the restore scripts working, but notified me that the "delete obsolete device type disk;" in the script posted earlier would actually delete the database files. I had a brief window to test and when I did the RMAN prompt notified me that it was going to delete all the database files. So, I'm trying to understand what's going on better and hoping someone can assist. Yes, I googled this for days before coming here. I have access to a 10G rman guide but I'm certainly no oracle DBA so I'm not confident I'm approaching this right, or possibly missing the obvious. The only recollection I have of RMAN is from many years ago.
|
|
|
|
Re: Moving 9i DB to new server [message #559375 is a reply to message #559374] |
Mon, 02 July 2012 19:51 |
fnguy
Messages: 39 Registered: January 2006
|
Member |
|
|
If I comment out the line I believe the script works perfectly. I asked the dba about not running the option with "disk" and he said it would run fine, but if it were ever added then the issue would arise.
|
|
|
Re: Moving 9i DB to new server [message #559389 is a reply to message #559375] |
Tue, 03 July 2012 01:03 |
John Watson
Messages: 8963 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Hi - I'm guessing (I don't have a 9i release 2 installatrion to test) but you could try running the DBNEWID to generate a new DBID. That might invalidate everything in the RMAN repository. c:\users\john\home>
c:\users\john\home>where nid
c:\app\john\product\11.2.0\dbhome_1\BIN\nid.exe
c:\users\john\home>nid
DBNEWID: Release 11.2.0.3.0 - Production on Tue Jul 3 06:52:53 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Keyword Description (Default)
----------------------------------------------------
TARGET Username/Password (NONE)
DBNAME New database name (NONE)
LOGFILE Output Log (NONE)
REVERT Revert failed change NO
SETNAME Set a new database name only NO
APPEND Append to output log NO
HELP Displays these messages NO
c:\users\john\home>
|
|
|
|
Re: Moving 9i DB to new server(3 Merged) [message #559663 is a reply to message #559488] |
Thu, 05 July 2012 07:21 |
fnguy
Messages: 39 Registered: January 2006
|
Member |
|
|
I believe we've found the issue and resolved. Here's what we've discovered:
The source server and the destination server were not the same file structure so we used "set newname" as part of the RMAN restore. When this occurs RMAN stores the name of the datafile as a ~Copy~ (found this in the 10G RMAN advanced documentation here under the "Mechanics of Datafile Restore Operations: http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmconc2.htm#i1006114 ). Thus, later when we ran our delete obsolete command RMAN was thinking the files were copies and could thus be removed.
The solution was to include a "SWITCH DATAFILE ALL" command and RMAN is now a happy camper.
|
|
|
|