You are on page 1of 3

HOT BACKUP(ONLINE BACKUP)

Posted by Narashim Reddy .R on August 16, 2009

1 Votes

[oracle@reddy ~]$ export ORACLE_SID=rub


[oracle@reddy ~]$ sqlplus sys as sysdba
SQL*Plus: Release 10.2.0.1.0 Production on Fri Oct 31 11:45:24 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
Connected to an idle instance.
SQL> startup;
ORACLE instance started.
Total System Global Area 348127232 bytes
Fixed Size 1219328 bytes
Variable Size 289408256 bytes
Database Buffers 50331648 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/rub/archive
Oldest online log sequence 81
Next log sequence to archive 82
Current log sequence 82
SQL> select name from v$datafile;
NAME

/home/oracle/rub/datafiles/system01.dbf
/home/oracle/rub/datafiles/undotbs1.dbf
/home/oracle/rub/datafiles/sysaux01.dbf
/home/oracle/rub/datafiles/users01.dbf

SQL> select name from v$controlfile;


NAME

/home/oracle/rub/control/c1.ctl
SQL> show parameter pfile;
NAME TYPE VALUE

spfile string /home/oracle/oracle/product/10
.2.0/db_1/dbs/spfilerub.ora
SQL> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME

SYSTEM
UNDOTBS1
SYSAUX
TEMP
USERS
SQL> alter tablespace system begin backup;
Tablespace altered.
SQL> alter tablespace undotbs1 begin backup;
Tablespace altered.
SQL> alter tablespace sysaux begin backup;
Tablespace altered.
SQL> alter tablespace users begin backup;
Tablespace altered.
SQL> !
[oracle@reddy ~]$ mkdir backup
[oracle@reddy ~]$ cd rub/
[oracle@reddy rub]$ ls
archive bdump control datafiles dbc.sql udump
[oracle@reddy rub]$ cd archive/
[oracle@reddy archive]$ ls
arch_1_668961233_71.arc arch_1_668961233_75.arc
arch_1_668961233_79.arc
arch_1_668961233_72.arc arch_1_668961233_76.arc
arch_1_668961233_80.arc
arch_1_668961233_73.arc arch_1_668961233_77.arc
arch_1_668961233_81.arc

arch_1_668961233_74.arc arch_1_668961233_78.arc
[oracle@reddy archive]$ cp *.arc /home/oracle/backup/
[oracle@reddy archive]$ cd ..
[oracle@reddy rub]$ cd control/
[oracle@reddy control]$ ls
c1.ctl
[oracle@reddy control]$ cp c1.ctl /home/oracle/backup/
[oracle@reddy control]$ cd ..
[oracle@reddy rub]$ cd datafiles/
[oracle@reddy datafiles]$ ls
redo01.log redo02.log sysaux01.dbf system01.dbf temp01.dbf undotbs1.dbf
users01.dbf
[oracle@reddy datafiles]$ cp *.dbf /home/oracle/backup/
[oracle@reddy datafiles]$ cd $ORACLE_HOME/dbs
[oracle@reddy dbs]$ ls
initrub.ora spfilerub.ora
[oracle@reddy dbs]$ cp initrub.ora /home/oracle/backup
[oracle@reddy dbs]$ cp spfilerub.ora /home/oracle/backup/
[oracle@reddy dbs]$ cd
[oracle@reddy ~]$ cd backup/
[oracle@reddy backup]$ ls
arch_1_668961233_71.arc arch_1_668961233_76.arc
arch_1_668961233_81.arc system01.dbf
arch_1_668961233_72.arc arch_1_668961233_77.arc c1.ctl temp01.dbf
arch_1_668961233_73.arc arch_1_668961233_78.arc initrub.ora undotbs1.dbf
arch_1_668961233_74.arc
arch_1_668961233_79.arc spfilerub.ora users01.dbf
arch_1_668961233_75.arc arch_1_668961233_80.arc sysaux01.dbf
[oracle@reddy backup]$ exit
exit
SQL> alter tablespace system end backup;
Tablespace altered.
SQL> alter tablespace undotbs1 end backup;
Tablespace altered.
SQL> alter tablespace sysaux end backup;
Tablespace altered.
SQL> alter tablespace users end backup;
Tablespace altered

You might also like