Thursday, April 16, 2009

OPEN DATABASE BACKUP BY SCRIPT

OPEN DATABASE BACKUP BY SCRIPT
Step 1
Note: Create a sample.sql file in Notepad and write the following:.
1- Alter tablespace users begin backup;
2- Host copy c:\oracle\oradata\orcl\users01.dbf c:\backup\users01.dbf;
3- Alter tablespace users end backup;
4- Alter system switch logfile ;
5- Exit ;
Step 2
Create another file in notepad with script.bat name and write the following:
1- sqlplus system/manager@orcl @c:\sample.sql
Now double click this file then backup will be started.
USER MANAGED OFFLINE TABLESPACE AND DATAFILES BACKUP
1- Compilation
2- Alter tablespace users offline normal
3- Copy the files of users tablespace and put into the backup folder
4- Alter tablespace users online
5- Alter system archive log current
Manual Control File Backup (Control file is online)
1- Alter database backup controlfile to ‘c:\backup\control1.bkp’;(this is Binary File)
Creating a Trace File
1- Alter database backup contrlfile to trace; (it’ll copy the controlfile in UDump
folder and this file is a text file)
PARALLEL OR MULTI USER MANAGED BACKUP
1- compilation
2- Alter tablespace system begin backup
3- Alter tablespace users begin backup
4- Alter tablespace tools begin backup
5- Copy all tablespaces files and put into backup folder
6- Alter tablespace system end backup
7- Alter tablespace users end backup
8- Alter tablespace tools end backup
9- Alter system Archive log Current;

No comments: