【原】Oracle學習系列—資料庫備份—離線備份

bq_wang發表於2008-02-26

離線備份一般均採用作業系統的物理複製來完成檔案系統的備份。

離線備份的內容包括資料庫物理檔案、聯機日誌檔案、控制檔案。

離線備份對歸檔和非歸檔無特別要求,不需要對歸檔日誌進行備份。

離線備份耗時可能比較長,備份的關閉資料庫的要求,影響使用者的正常使用。不適合做為7×24小時執行的資料庫備份策略


離線備份的操作步驟:

1、 透過資料字典獲取檔案備份列表

2、 Shutdown正常關閉資料庫

3、 透過作業系統複製物理檔案

4、 啟動資料庫。

Microsoft Windows [Version 5.2.3790]

(C) Copyright 1985-2003 Microsoft Corp.

C:/Documents and Settings/Administrator>sqlplus /nolog

SQL*Plus: Release 9.2.0.1.0 - Production on Mon Mar 26 01:23:22 2007

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect sys/change_on_install as sysdba;

Connected.

SQL> select file_name from dba_data_files;

FILE_NAME

--------------------------------------------------------------------

C:/ORACLE/ORADATA/WBQ/SYSTEM01.DBF

C:/ORACLE/ORADATA/WBQ/UNDOTBS01.DBF

C:/ORACLE/ORADATA/WBQ/MYDATABLESPACE01.DBF

C:/ORACLE/ORADATA/WBQ/MYDATABLESPACE02.DBF

C:/ORACLE/ORADATA/WBQ/MYDATABLESPACE03.DBF

SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER

---------- ------- ------- ------------------------------------------

1 ONLINE C:/ORACLE/ORADATA/WBQ/REDO01.LOG

2 ONLINE C:/ORACLE/ORADATA/WBQ/REDO02.LOG

3 ONLINE C:/ORACLE/ORADATA/WBQ/REDO03.LOG

SQL> select * from v$controlfile;

STATUS NAME

---------------------------------------------------------------------

C:/ORACLE/ORADATA/WBQ/CONTROL01.CTL

C:/ORACLE/ORADATA/WBQ/CONTROL02.CTL

C:/ORACLE/ORADATA/WBQ/CONTROL03.CTL

SQL>shutdown immediate

Datebase clodes.

Datebase dismounted.

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

C:/Documents and Settings/Administrator>cd/

C:/>cd C:/oracle/oradata/wbq

C:/oracle/oradata/wbq>md backup

C:/oracle/oradata/wbq>copy control01.ctl backup

1 file(s) copied.

C:/oracle/oradata/wbq>copy control02.ctl backup

1 file(s) copied.

C:/oracle/oradata/wbq>copy control03.ctl backup

1 file(s) copied.

C:/oracle/oradata/wbq>copy REDO01.LOG backup

1 file(s) copied.

C:/oracle/oradata/wbq>copy REDO02.LOG backup

1 file(s) copied.

C:/oracle/oradata/wbq>copy REDO03.LOG backup

1 file(s) copied.

C:/oracle/oradata/wbq>copy SYSTEM01.DBF backup

1 file(s) copied.

C:/oracle/oradata/wbq>copy UNDOTBS01.DBF backup

1 file(s) copied.

C:/oracle/oradata/wbq>copy MYDATABLESPACE01.DBF backup

1 file(s) copied.

C:/oracle/oradata/wbq>copy MYDATABLESPACE02.DBF backup

1 file(s) copied.

C:/oracle/oradata/wbq>copy MYDATABLESPACE03.DBF backup

1 file(s) copied.

C:/oracle/oradata/wbq>sqlplus /nolog

SQL*Plus: Release 9.2.0.1.0 - Production on Mon Mar 26 01:37:07 2007

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect sys/change_on_install as sysdba;

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 105978600 bytes

Fixed Size 453352 bytes

Variable Size 79691776 bytes

Database Buffers 25165824 bytes

Redo Buffers 667648 bytes

Database mounted.

Database opened.

SQL>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/6517/viewspace-145512/,如需轉載,請註明出處,否則將追究法律責任。

相關文章