Re: Backup Database

From: cs <sekhar73us_at_yahoo.com>
Date: 1 Jul 2004 12:10:45 -0700
Message-ID: <d1bacc2d.0407011110.522fb318_at_posting.google.com>


Hi,

There are 2 type of back-ups Physical and logical

Logical backup ---- this is done using tools like export, import.

Physical backups is of two types

  • Hot backup --> backup performed when the database is up and running. steps involved in making hot backup. assumes that you have privileges to perform backups of objects. check to see in which mode the database is in

sys_at_ORCL$ archive log list;

Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/oradata/orcl/archive
Oldest online log sequence     324
Next log sequence to archive   327
Current log sequence           327

Now before performing the hot backup put the tablespaces in backup mode.

sys_at_ORCL$ alter tablespace begin backup;

Now use the copy command to copy the datafile pertaining to that tablespace to a backup location.

if you are using windows you can go to oradata folder and copy the file. or you can also do it from sqlplus

sys_at_ORCL$host /cp C:\ORACLE\ORADATA\SYSTEM01.DBF C:\ORACLE\BACKUP\SYSTEM01.DBF

once the cp command is done

Issue the following command to bring the tablespace out of backup mode. sys_at_ORCL$ alter tablespace end backup;

steps involved in cold backup.

  1. shutdown the database.
  2. go to the oradata folder and copy the datafiles to new location
  3. startup the database.

To perform logical backups
you have to have privileges to export and import the objects

The command to perform export is as follows

$exp scott/tiger_at_orcl

this will generate a dump file expdat.dmp save the expdat.dmp file and when necessary you can import the dump file.

to see more info about export tool
$exp help=y

hope this info helped you

sekhar. Received on Thu Jul 01 2004 - 21:10:45 CEST

Original text of this message