Home » RDBMS Server » Backup & Recovery » Script for Cold Backup
icon7.gif  Script for Cold Backup [message #241054] Mon, 28 May 2007 04:41 Go to next message
prlzuby
Messages: 35
Registered: June 2006
Location: Pakistan
Member
Hi....
I need script of cold backup which simply shutdown the database, copy the files and startup.

Thnx


Zaheer
Re: Script for Cold Backup [message #241065 is a reply to message #241054] Mon, 28 May 2007 04:53 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
OS?
Oracle version?

Regards
Michel
Re: Script for Cold Backup [message #241071 is a reply to message #241065] Mon, 28 May 2007 04:57 Go to previous messageGo to next message
prlzuby
Messages: 35
Registered: June 2006
Location: Pakistan
Member
Its 8i, running on windows 2000 server
Re: Script for Cold Backup [message #241076 is a reply to message #241071] Mon, 28 May 2007 05:05 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
OS or RMAN backup?

Regards
Michel
Re: Script for Cold Backup [message #241089 is a reply to message #241076] Mon, 28 May 2007 05:29 Go to previous messageGo to next message
prlzuby
Messages: 35
Registered: June 2006
Location: Pakistan
Member
Dear Michael

Its Os level
Re: Script for Cold Backup [message #241092 is a reply to message #241089] Mon, 28 May 2007 05:38 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Do you have any script language?

Regards
Michel
Re: Script for Cold Backup [message #241096 is a reply to message #241092] Mon, 28 May 2007 05:47 Go to previous messageGo to next message
prlzuby
Messages: 35
Registered: June 2006
Location: Pakistan
Member
Dear simply send me a script in notepad editor, which could be run on dos prompt
Re: Script for Cold Backup [message #241105 is a reply to message #241096] Mon, 28 May 2007 06:02 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
All these questions are mandatory.
If I gave you a script in ksh, it'd be useless.
If I gave you a script in Perl, it'd be useless.
If I gave you a script in wsh, it'd work but will be useless as you don't know Windows scripting.
Etc.

You should give all these informations in your first post.
Now such scripts exist since 20 years, what did you already search on Google or forum?

Regards
Michel
Re: Script for Cold Backup [message #241204 is a reply to message #241105] Mon, 28 May 2007 17:12 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
set heading off

select 'hosT copy '||file_name||'   c:\backup\datafiles\
 ' from dba_data_files;



select 'host copy '||name||' c:\backup\datafiles\controlfiles\ ' from v$controlfile;


select 'host copy '||member||'  c:\backup\datafiles\redologs\ ' from v$logile;




copy all the output in the file AND SAVE IT WITH .BAT and schedule it with window scdeullar according to your requirments like every day ,weekly or monthly.


i didnt run these scripts may be it not 100 accurate coz i dont have oracle installed on mine pc.

[Updated on: Mon, 28 May 2007 17:40]

Report message to a moderator

Re: Script for Cold Backup [message #241418 is a reply to message #241204] Tue, 29 May 2007 09:25 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

i didnt run these scripts may be it not 100 accurate coz i dont have oracle installed on mine pc.

And for shutdown and startup ?

Please Don't use IM SPEAK !!!

@OP
http://dbataj.blogspot.com/2007/01/coldbackupscripts.html

example on 10g but it is also working for oracle 8i.

regards
Taj
Re: Script for Cold Backup [message #241551 is a reply to message #241418] Wed, 30 May 2007 00:16 Go to previous messageGo to next message
atif_arl
Messages: 15
Registered: May 2007
Junior Member
Is this the right way to take Backup through RMAN?

Is this Script takes Backup of whole Database ?

Also want to know that do we restore RMAN Backup on another machine.

Regards,

Atif Mahmood







CREATE TABLESPACE RMAN_DATA
DATAFILE 'D:\ORACLE\ORADATA\PTCL\RMANDF.DBF' SIZE 500M;

CREATE USER RMAN IDENTIFIED BY RMAN
DEFAULT TABLESPACE RMAN_DATA
QUOTA UNLIMITED ON RMAN_DATA
TEMPORARY TABLESPACE TEMP;

GRANT RESOURCE,CONNECT,RECOVERY_CATALOG_OWNER TO RMAN;

CONNECT RMAN/RMAN


C:\>RMAN TARGET SYS/ORACLE RCVCAT RMAN/RMAN

RMAN>CREATE CATALOG;

RMAN>REGISTER DATABASE;

RMAN>RESYNC CATALOG;

RMAN> RUN {
ALLOCATE CHANNEL c1 TYPE disk
FORMAT = 'E:/RMAN_BACKUP/usr0520.bak';
BACKUP DATAFILE 'D:\ORACLE\ORADATA\PTCL\USERS01.DBF';
}

RMAN>RUN {
backup
incremental level 0
format 'E:/RMAN_BACKUP/F_BACKUP/%d_%s_%p'
filesperset 3
(database include current controlfile);
sql 'alter system archive log current';
}



BACKUP
FORMAT 'E:/RMAN_BACKUP/F_BACKUP/df_%d_%s_%p.bus'
DATABASE filesperset = 1;


BACKUP
FORMAT 'E:/RMAN_BACKUP/ARCHIVE_BACKUP/ar_%t_%s_%p'
ARCHIVELOG ALL DELETE ALL INPUT;




Re: Script for Cold Backup [message #241759 is a reply to message #241551] Wed, 30 May 2007 10:09 Go to previous message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
yes recovery catalog is good approch for hot backups.
Quote:
RMAN>RUN {
backup
incremental level 0
format 'E:/RMAN_BACKUP/F_BACKUP/%d_%s_%p'
filesperset 3
(database include current controlfile);
sql 'alter system archive log current';
}


level 0 always take full backup of database.
yes you can restore your rman backup on any other machine.
Previous Topic: export user's structure
Next Topic: Complete Recovery through RMAN
Goto Forum:
  


Current Time: Sat Dec 03 21:56:52 CST 2016

Total time taken to generate the page: 0.11908 seconds