Data backup and Database Replication in Oracle user management mode

Source: Internet
Author: User

Data backup and Database Replication in Oracle user management mode

The first thing to note is that Oracle Database Backup can be divided into logical backup and physical backup.

Logical backup backs up data through data export, mainly through the old IMP/EXP and Data Pump lamp mode. It is suitable for databases with fewer changes. For high-availability databases, data backed up in this way can only be recovered to the backup time point, so it is not applicable. However, because logical backup is platform-independent, it is more common for data migration and data movement;

Physical backup backs up data files, parameter files, and other database physical files. Physical backup can be divided into cold backup and hot backup. Cold backup must be backed up after the database is shut down. Currently, this mode is rarely used in high-availability production environments. Hot Backup can be restored by backing up data files and archiving logs while the system is running. Therefore, hot backup is widely used.

Hot backup can be divided into user-managed backup and recovery) and oracle-managed (RMAN) Hot backup. Note that, the database must be in archive mode for hot backup.

RMAN: Configure an archive log deletion policy

Basic Oracle tutorial-copying a database through RMAN

Reference for RMAN backup policy formulation

RMAN backup learning notes

Oracle Database Backup encryption RMAN Encryption

1. User-managed backup:

First, back up the data file:

1) query data files:

SQL> select name from v $ datafile;

2) Place the database in backup mode:

SQL> alter database begin backup;

3) backup data files:

SQL> host copy D: \ ORACLE \ ORCDATA \ TIOD \ SYSTEM01.DBF C: \ oracle \ backup;

SQL> host copy D: \ ORACLE \ ORCDATA \ TIOD \ SYSAUX01.DBF C: \ oracle \ backup;

SQL> host copy D: \ ORACLE \ ORCDATA \ TIOD \ UNDOTBS01.DBF C: \ oracle \ backup;

SQL> host copy D: \ ORACLE \ ORCDATA \ TIOD \ USERS01.DBF C: \ oracle \ backup;

SQL> host copy E: \ ORACLE \ ORCL \ ODS \ HH_TBS.DBF C: \ oracle \ backup;

4) end data file backup and archive logs:

SQL> alter database end backup;

SQL> alter system archive log current;

Second, back up the control file. Here we use the backup method to trace the file:

1) record the command information of the control file to the trace file:

SQL> alter database backup controlfile to trace;

2) determine the location and name of the tracking file:

SQL> select a. spid from v $ process a, v $ session B where a. addr = B. PADDR and B. USERNAME = 'sys'

SQL> show parameter user_dump_dest;

The trail file is named <SID> _ ora _ <SPID>. trc.

3) Open vidi_ora_1260.trc and confirm to create the control file;

Create controlfile reuse database "TIOD" NORESETLOGS ARCHIVELOG

MAXLOGFILES 16

MAXLOGMEMBERS 3

MAXDATAFILES 100

MAXINSTANCES 8

# MAXLOGHISTORY 292

LOGFILE

GROUP 1 'd: \ ORACLE \ ORCDATA \ TIOD \ REDO01.LOG 'size 50 m blocksize 512,

GROUP 2 'd: \ ORACLE \ ORCDATA \ TIOD \ REDO02.LOG 'size 50 m blocksize 512,

GROUP 3 'd: \ ORACLE \ ORCDATA \ TIOD \ REDO03.LOG 'size 50 m blocksize 512

-- STANDBY LOGFILE

DATAFILE

'D: \ ORACLE \ ORCDATA \ TIOD \ SYSTEM01.DBF ',

'D: \ ORACLE \ ORCDATA \ TIOD \ SYSAUX01.DBF ',

'D: \ ORACLE \ ORCDATA \ TIOD \ UNDOTBS01.DBF ',

'D: \ ORACLE \ ORCDATA \ TIOD \ USERS01.DBF ',

'E: \ ORACLE \ ORCL \ ODS \ hh_tbs.dbf'

Character set ZHS16GBK

;

3. Back up archived logs:

Determine the archive log to be backed up:

SQL> select name from v $ archived_log where dest_id = 1 and first_time> = sysdate-1;

Use the copy command to back up data to the backup folder.

4. Backup parameter files:

SQL> CREATE PFILE = 'C: \ oracle \ backup \ initelse. ora 'from spfile;

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.