ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【原】Oracle学习系列—数据库备份—脱机备份

【原】Oracle学习系列—数据库备份—脱机备份

原创 Linux操作系统 作者:bq_wang 时间:2008-02-26 23:24:27 0 删除 编辑

脱机备份一般均采用操作系统的物理拷贝来完成文件系统的备份。

脱机备份的内容包括数据库物理文件、联机日志文件、控制文件。

脱机备份对归档和非归档无特别要求,不需要对归档日志进行备份。

脱机备份耗时可能比较长,备份的关闭数据库的要求,影响用户的正常使用。不适合做为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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-07

  • 博文量
    412
  • 访问量
    1104450