1753469 Members
5157 Online
108794 Solutions
New Discussion юеВ

Re: Oracle Recovery

 
malay boy
Trusted Contributor

Oracle Recovery

I just wonder if this working.
I have online oracle backup.But somehow the controlfile are not backup.(Thanks to the DBA who have left the company).

Could I do something like this :

1) restore the online backup.
2) svrmgrl>connect internal
3) svrmgrl> startup nomount
4) svrmgrl>@rcf01 -- To recreate the control file.
5) svrmgrl> alter database mount
6) svrmgrl>recover database.

This is the content rcf01.sql file :

CREATE CONTROLFILE REUSE DATABASE "P716"
NORESETLOGS NOARCHIVELOG
MAXLOGFILES 50
MAXLOGMEMBERS 3
MAXDATAFILES 300
MAXINSTANCES 8
MAXLOGHISTORY 500
LOGFILE GROUP 1 '/u01/oracle/7.1.6/dbs/log1p716.dbf' SIZE 1M,
GROUP 2 '/u01/oracle/7.1.6/dbs/log2p716.dbf' SIZE 1M,
GROUP 3 '/u01/oracle/7.1.6/dbs/log3p716.dbf' SIZE 1M DATAFILE '/u01/oracle/7.1.6/dbs/systp716.dbf' SIZE 40M,
'/u01/oracle/7.1.6/dbs/tempp716.dbf' SIZE 1M,
'/u01/oracle/7.1.6/dbs/toolp716.dbf' SIZE 15M ;

Do you think this is workable ???

sorry to asked this question because I have no test system and actual system is about 6000KM from my place.

regards
mB
There are three person in my team-Me ,myself and I.
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: Oracle Recovery

The best, most reliable way to back up Oracle is as follows:

Bring down the database.

Copy all the files to another location.

Tar or otherwise transfer them to tapes.

Also very reliable is a hot or cold rman backup. Cold is easier to work with when restoring.

Your rman script can include the control files.

Your methology seems reasonable, but unorthodox.

Omniback also has facilities build into version 4 and up that will let you get solid oracle backups(uses rman) whether the database is up or down.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: Oracle Recovery

mB

Oracle version number would help.

If this system is important, you probably WANT to cut archive logs.

If you suffer a disk crash, this will let you use rman or sqlplus and the logs to roll the database forward to just before the crash point, minimizing data loss.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
malay boy
Trusted Contributor

Re: Oracle Recovery

The version are 8.1.7...:-( well we are ancient history company...we always used outdated not support product by vendor.Even for window, we still have Window 98,95 lying around...Luckly the company put some money on HP....

Back to the question,yap we are running archive log,that's why we could do online backup.

Thanks and appreciate your input SEP...

Hey,is it midnight in US , for AsiaPac this is at 9:00 am.

regards
mB



There are three person in my team-Me ,myself and I.
Steven E. Protter
Exalted Contributor

Re: Oracle Recovery

Currently 10:15 p.m. Central, we got us four time zones in the US mainland.

Do you want to see some actual oracle backups scripts? I can download a few from work, tar them up and post them for you.

I was concerned about the archive log comments in that control file you are creating. Seems incompatible with a real oracle backup.

8.1.7.4.0 is the version to be at for HP-UX. Lots of good bug fixes, thats our production release.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Yogeeraj_1
Honored Contributor

Re: Oracle Recovery

hi,

1. To generate your control file, you can also use:
alter database backup controlfile to trace;


2. For our test recovery, we hired a server for one day from our support provider.

This was quite an easy task using RMAN.
Below an outline of the steps (using RMAN - disk backup).

BACKUP:
=========
rman target sys/manager rcvcat rman/rman@catalog_db msglog backup.log </dev/null
run {
allocate channel fs1 type disk format '/backup/rman/full/fs1/df_%u_%s_$t.%p';
allocate channel fs2 type disk format '/backup/rman/full/fs2/df_%u_%s_$t.%p';
allocate channel fs3 type disk format '/backup/rman/full/fs3/df_%u_%s_$t.%p';

set limit channel fs1 kbytes=750000;
set limit channel fs2 kbytes=750000;
set limit channel fs3 kbytes=750000;

#Backup the whole database
backup
tag Whole_database_hot
database;

#Switch out of the current logfile
sql 'alter system archive log current';

#Backup the archived logs
backup
archivelog all delete input
format '/backup/rman/full/fs1/al_%u.%p';

#Backup a copy of the controlfile that contains records for the
#other backups just made
backup
current controlfile
tag = cf1
format '/backup/rman/full/fs1/cf_%u.%p';
}
exit;
EOF

RESTORE:
=========

Step 1: Start the database nomount (using SQLPLUS - internal)
startup nomount pfile=initmydb.ora

Step 2: Restore the database
rman rcvcat rman/rman@catalog_db target internal/oracle@target_db;

run {
allocate channel fs1 type disk format '/backup/rman/full/fs1/df_%u_%s_$t.%p';
allocate channel fs2 type disk format '/backup/rman/full/fs2/df_%u_%s_$t.%p';
allocate channel fs3 type disk format '/backup/rman/full/fs3/df_%u_%s_$t.%p';
restore controlfile;
sql 'alter database mount';
restore database;
}


hope this helps!

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
malay boy
Trusted Contributor

Re: Oracle Recovery

Cifu Yogeraj,
Do you mean above method will work.With additional to reset the log at the end.

regards
mB
There are three person in my team-Me ,myself and I.
BLADE_1
Frequent Advisor

Re: Oracle Recovery

hi,

Whatever steps u have specified will work. When u recreate the controfile there will be no SCN recorded in it..so the recovery will happen till the last SCN recorded in the datafile..provided u have all the archivelogs till that point.

rgds
BLADE
"Always Sharp"
fortune favours the brave
Yogeeraj_1
Honored Contributor

Re: Oracle Recovery

hi,

Backup and recovery are very serious issues.

i suggest you do the recovery tests properly.

The first test i did was on a Windows 2000 platform with Oracle 8.1.7.4. At that time, we did not have the means to hire a "backup" server from our support provider.

I will also suggest that you perform all the recovery scenarios listed in the Recovery Manager User???s Guide and Reference page 6-34.

maybe you can do the same.

Then, you can try it on your HP-UX platform.

hope this helps too!

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)