Home > oracle, tools > Backup methods and tools for Oracle

Backup methods and tools for Oracle

In order for one to get appealing results, they have higher chances of getting positive results in terms of using the best options that enable one to settle with affirmative and timely operational methods

There are different factors that promote backup frequency and they include

The rate of transaction rate

Availability of database

The value of the data company

ARCHIVELOG mode:

SQL> CONNECT sys AS SYSDBA

SQL> STARTUP MOUNT EXCLUSIVE;

SQL> ALTER DATABASE ARCHIVELOG;

SQL> ARCHIVE LOG START;

SQL> ALTER DATABASE OPEN;

 

databases in ARCHIVELOG mode:

log_archive_start         = TRUE

log_archive_dest_1        = ‘LOCATION=/arch_dir_name’

log_archive_dest_state_1  = ENABLE

log_archive_format        = %d_%t_%s.arc

 

difference between restoring and recovering?

SQL> connect SYS as SYSDBA

SQL> RECOVER DATABASE UNTIL TIME ‘2001-03-06:16:00:00’ USING BACKUP CONTROLFILE;

 

RMAN> run {

set until time to_date(’04-Aug-2004 00:00:00′, ‘DD-MON-YYYY HH24:MI:SS’);

  restore database;

  recover database;

online database backups?

ALTER TABLESPACE xyz BEGIN BACKUP;

! cp xyzFile1 /backupDir/

ALTER TABLESPACE xyz END BACKUP;

ALTER SYSTEM SWITCH LOGFILE;   — Force log switch to update control file headers

ALTER DATABASE BACKUP CONTROLFILE TO ‘/backupDir/control.dbf’;

RMAN can be operated from Oracle Enterprise Manager, or from command line. Here are the command line arguments:

 

Argument     Value          Description

—————————————————————————–

target       quoted-string  connect-string for target database

catalog      quoted-string  connect-string for recovery catalog

nocatalog    none           if specified, then no recovery catalog

cmdfile      quoted-string  name of input command file

log          quoted-string  name of output message log file

trace        quoted-string  name of output debugging message log file

append       none           if specified, log is opened in append mode

debug        optional-args  activate debugging

msgno        none           show RMAN-nnnn prefix for all messages

send         quoted-string  send a command to the media manager

pipe         string         building block for pipe names

timeout      integer        number of seconds to wait for pipe input

 

[oracle@localhost oracle]$ rman

Recovery Manager: Release 10.1.0.2.0 – Production

Copyright (c) 1995, 2004, Oracle.  All rights reserved.

 

RMAN> connect target;

 

connected to target database: ORCL (DBID=1058957020)

RMAN> backup database;

backup and restore a database using RMAN?

rman target sys/*** nocatalog

run {

  allocate channel t1 type disk;

  backup

    format ‘/app/oracle/backup/%d_t%t_s%s_p%p’

      (database);

   release channel t1;

}

 

Example RMAN restore:

 

rman target sys/*** nocatalog

run {

  allocate channel t1 type disk;

  # set until time ‘Aug 07 2000 :51’;

  restore tablespace users;  recover tablespace users;

  release channel t1;

Categories: oracle, tools Tags:
  1. No comments yet.
  1. No trackbacks yet.