Home » RDBMS Server » Backup & Recovery » automatic backup
automatic backup [message #186093] Sat, 05 August 2006 13:25 Go to next message
csharat
Messages: 7
Registered: August 2006
Junior Member

hi all,
i used to take hotbackup everyday & coldbackup at saterday night 12pm by shutting down the database..i want to do it automatic where the database will close & copies all datafiles, redofiles,controlfile files, parameter file & then automatic start the database ..please anyone help me ..
thanks
Re: automatic backup [message #186095 is a reply to message #186093] Sat, 05 August 2006 14:35 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
You don't mention what O/S you are using.

Is RMAN an option for you?
icon14.gif  Re: automatic backup [message #186179 is a reply to message #186095] Sun, 06 August 2006 19:38 Go to previous messageGo to next message
cuisia
Messages: 21
Registered: July 2005
Junior Member
What strategy you want to use on your backup ? If you can use the OS backup, then you need to copy all of your datafiles,redologs and controlfiles into backup drive.

You can run this to your sql.

connect system/manager
alter tablespace system begin backup;
alter tablespace undotbs begin backup;
alter tablespace drsys begin backup;
alter tablespace indx begin backup;
alter tablespace tools begin backup;
alter tablespace temp begin backup;
alter tablespace users begin backup;
alter tablespace oem_repository begin backup;


HOST C:\BUR\BACKUP_6PM.BAT

alter tablespace system end backup;
alter tablespace undotbs end backup;
alter tablespace drsys end backup;
alter tablespace indx end backup;
alter tablespace tools end backup;
alter tablespace temp end backup;
alter tablespace users end backup;
alter tablespace oem_repository end backup;

Note: Backup_6pm.bat

copy C:\ORACLE\ORA90\FBR\SYSTEM01.DBF e:\backup_6pm
copy C:\ORACLE\ORA90\FBR\UNDOTBS01.DBF e:\backup_6pm
copy C:\ORACLE\ORA90\FBR\DRSYS01.DBF e:\backup_6pm
copy C:\ORACLE\ORA90\FBR\INDX01.DBF e:\backup_6pm
copy C:\ORACLE\ORA90\FBR\TOOLS01.DBF e:\backup_6pm
copy C:\ORACLE\ORA90\FBR\TEMP01.DBF e:\backup_6pm
copy C:\ORACLE\ORA90\FBR\USERS01.DBF e:\backup_6pm
copy C:\ORACLE\ORA90\FBR\OEM_REPOSITORY.DBF e:\backup_6pm
copy C:\ORACLE\ORADATA\FBR\CONTROL01.CTL e:\backup_6pm
copy C:\ORACLE\ORADATA\FBR\CONTROL03.CTL e:\backup_6pm
copy C:\ORACLE\ORADATA\FBR\CONTROL02.CTL e:\backup_6pm
copy C:\ORACLE\ORADATA\FBR\REDO01.LOG e:\backup_6pm
copy C:\ORACLE\ORADATA\FBR\REDO02.LOG e:\backup_6pm
copy C:\ORACLE\ORADATA\FBR\REDO03.LOG e:\backup_6pm
copy c:\oracle\ora90\database\initorcl.ora e:\backup_6pm
copy c:\oracle\ora90\database\pwdorcl.ora e:\backup_6pm
copy c:\oracle\admin\fbr\init.ora e:\backup_6pm

You can set the Batch file in Window scheduler in control panel.

Kind Regards,
Mike Cuisia
Oracle DBA
Philippines


Re: automatic backup [message #186180 is a reply to message #186179] Sun, 06 August 2006 19:49 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
With all due respect, whatever you do, DO NOT use the process listed above to conduct a backup of your database. The process listed above is wrong on many levels, so please DO NOT even think about implementing that process for a backup routine.

First off, the OP asked for a cold backup script and the script above is a half-baked hot backup script.

Again, the important questions are:

What O/S is the OP using and is RMAN an option for the OP?

Re: automatic backup [message #186181 is a reply to message #186180] Sun, 06 August 2006 20:12 Go to previous messageGo to next message
cuisia
Messages: 21
Registered: July 2005
Junior Member
Please try this for cold backup.

connect system/manager
shutdown immediate;
HOST C:\BUR\BACKUP_6PM.BAT
startup mount;
alter database open;





Re: automatic backup [message #186321 is a reply to message #186095] Mon, 07 August 2006 08:28 Go to previous messageGo to next message
csharat
Messages: 7
Registered: August 2006
Junior Member

i am using windows 2003server ..there is no RMAN option but if the solution can be done then i can go for RMAN
thanks please help..
Re: automatic backup [message #186323 is a reply to message #186181] Mon, 07 August 2006 08:41 Go to previous messageGo to next message
csharat
Messages: 7
Registered: August 2006
Junior Member

can i put {
connect system/manager
shutdown immediate;
HOST C:\BUR\BACKUP_6PM.BAT
startup mount;
alter database open
}
these queries into a sql file & run it...
can the server automatic login, shutdown & copies all files & again open the database....sorry i dont need login coz its a 24*7 database .,,please help
Re: automatic backup [message #186327 is a reply to message #186323] Mon, 07 August 2006 09:06 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
OK, need a little bit of clarification. In your initial post you said:

csharat wrote on Sat, 05 August 2006 13:25

i want to do it automatic where the database will close & copies all datafiles, redofiles,controlfile files, parameter file & then automatic start the database

but then you just mentioned:
csharat wrote on Mon, 07 August 2006 08:41

its a 24*7 database

So, are you looking to do a cold backup (shutting Oracle down and then backing up) or a hot backup (Oracle remains up and then you backup)?
Re: automatic backup [message #186484 is a reply to message #186327] Tue, 08 August 2006 02:30 Go to previous messageGo to next message
csharat
Messages: 7
Registered: August 2006
Junior Member

hi ebrian,
... i want a coldbackup..please let me know whether i can do it by using windows utility..
thanks
Re: automatic backup [message #186553 is a reply to message #186484] Tue, 08 August 2006 08:19 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Here's a sample cold backup script to get ya going. If you are actually in ARCHIVELOG mode, then you'll want to modify the script to backup you archive logs.

This can be scheduled thru the Windows task scheduler.
Re: automatic backup [message #186650 is a reply to message #186553] Tue, 08 August 2006 20:16 Go to previous messageGo to next message
cuisia
Messages: 21
Registered: July 2005
Junior Member
your sample script is the same like I submitted before. try my script above... almost the same ....
Re: automatic backup [message #186651 is a reply to message #186650] Tue, 08 August 2006 21:39 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
cuisia wrote on Tue, 08 August 2006 20:16

your sample script is the same like I submitted before. try my script above... almost the same ....

Well it's quite evident that you did not review the script or are unaware of it's functionality. Your script is COMPLETELY static. Your script offers NOTHING for the OP if a new file is added to the database.

It will be too late if the OP isn't archiving or has removed the necessary archive logs and he's in a recovery scenario when he remembers, "OH YEAH, I forgot to modify my backup script to include the new datafile I added last week...how can I explain this to management ???"
Re: automatic backup [message #186657 is a reply to message #186651] Tue, 08 August 2006 22:27 Go to previous message
cuisia
Messages: 21
Registered: July 2005
Junior Member
ofcourse the DBA should know what datafile was been added, then he can add it to his backup scripts. SIMPLE.
Previous Topic: cannot register backup on catalog and resync fail
Next Topic: from which point does recovery start ??
Goto Forum:
  


Current Time: Wed Dec 07 04:59:00 CST 2016

Total time taken to generate the page: 0.06764 seconds