一. rman简介

  RMAN(Recovery Manager)是一种用于备份(backup)、还原(restore)和恢复(recover)数据库的 Oracle 工具。RMAN只能用于ORACLE8或更高的版本中。它能够备份整个数据库或数据库部件,如表空间、数据文件、控制文件、归档文件以及Spfile参数文件。RMAN也允许您进行增量数据块级别的备份,增量RMAN备份是时间和空间有效的,因为他们只备份自上次备份以来有变化的那些数据块。而且,通过RMAN提供的接口,第三方的备份与恢复软件如veritas将提供更强大的备份与恢复的管理功能。通过RMAN,也提供了其它更多功能,如数据库的克隆、采用RMAN建立备用数据库、利用RMAN备份与移动裸设备(RAW)上的文件等工作将变得更方便简单。9i的RMAN通过增强的自动配置与管理功能,以及特有的块级别的恢复,将使备份与恢复工作变得更加快捷与完美。

  RMAN可以用来备份和还原数据库文件、归档日志和控制文件。它也可以用来执行完全或不完全的数据库恢复。与传统工具相比,RMAN具有独特的优势:跳过未使用的数据块。当备份一个RMAN备份集时,RMAN不会备份从未被写入的数据块,而传统的方式无法获知那些是未被使用的数据块。

  本文讲解rman以下内容:

    • rman的备份;包括整个数据库或者表空间、数据文件、控制文件、参数文件、归档文件的示例
    • rman的增量备份
    • rman的备份脚本
    • rman的还原和恢复

本文涉及到是日常工作能涉及到的内容:若要深入学习rman;还请您去撸一撸官方文档或者相关书籍。如数据库的克隆、采用RMAN建立备用数据库这部分内容留在后面章节学习。

在学习之前;先了解下rman如何连接数据库

[oracle@oracle235 ~]$ rman target /

Recovery Manager: Release 11.2.0.4. - Production on Wed Aug  :: 

Copyright (c) , , Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORA235 (DBID=)

RMAN>

二. rman备份

2.1 备份整个数据库

eg: backup database format '/data/backup/db_full_%U';

RMAN> backup database format '/data/backup/db_full_%U';

Starting backup at -AUG-
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number= name=/data/oracle/data/lottu01.dbf
input datafile file number= name=/u01/app/oradata/ora235/system01.dbf
input datafile file number= name=/u01/app/oradata/ora235/sysaux01.dbf
input datafile file number= name=/u01/app/oradata/ora235/undotbs01.dbf
input datafile file number= name=/u01/app/oradata/ora235/users01.dbf
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/data/backup/db_full_03ta2cqc_1_1 tag=TAG20180808T180916 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/data/backup/db_full_04ta2crp_1_1 tag=TAG20180808T180916 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
Finished backup at -AUG-

2.2 备份表空间

eg: backup tablespace lottu format '/data/backup/tsp_lottu_%U';

RMAN>  backup tablespace lottu format '/data/backup/tsp_lottu_%U';

Starting backup at -AUG-
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number= name=/data/oracle/data/lottu01.dbf
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/data/backup/tsp_lottu_05ta2e01_1_1 tag=TAG20180808T182921 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
Finished backup at -AUG-

2.3 备份数据文件

eg: backup datafile 5 format '/data/backup/df_5_%U';

RMAN> backup datafile  format '/data/backup/df_5_%U';

Starting backup at -AUG-
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number= name=/data/oracle/data/lottu01.dbf
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/data/backup/df_5_06ta2e6k_1_1 tag=TAG20180808T183252 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
Finished backup at -AUG-

  在rman中备份数据文件有两种形式;backup datafile file_id 和 backup datafile file_name。根据SQL‘select file_id,file_name from dba_data_files’可得:

SQL> select file_id,file_name from dba_data_files;

   FILE_ID FILE_NAME
---------- ----------------------------------------
/u01/app/oradata/ora235/system01.dbf
/u01/app/oradata/ora235/sysaux01.dbf
/u01/app/oradata/ora235/undotbs01.dbf
/u01/app/oradata/ora235/users01.dbf
/data/oracle/data/lottu01.dbf

  上面等同于:backup datafile '/data/oracle/data/lottu01.dbf' ;

RMAN> backup datafile '/data/oracle/data/lottu01.dbf' format '/data/backup/dfname_5_%U';

Starting backup at -AUG-
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number= name=/data/oracle/data/lottu01.dbf
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/data/backup/dfname_5_07ta2ei5_1_1 tag=TAG20180808T183901 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
Finished backup at -AUG-

2.4 备份控制文件

rman对控制文件备份有特殊保护;一般不需要单独备份控制文件。在备份系统表空间system或者备份数据库。都会自动备份控制文件。在前面备份数据库时;我们可以看到这样的信息

including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/data/backup/db_full_04ta2crp_1_1 tag=TAG20180808T180916 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
Finished backup at -AUG-

  在查看控制文件的备份集;我们可以看到:说明对控制文件已经有备份了。

RMAN> list backup of controlfile;

List of Backup Sets
=================== BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
Full 9.36M DISK :: -AUG-
BP Key: Status: AVAILABLE Compressed: NO Tag: TAG20180808T180916
Piece Name: /data/backup/db_full_04ta2crp_1_1
Control File Included: Ckp SCN: Ckp time: -AUG-

  eg: backup current controlfile format '/data/backup/ct_%U';

RMAN> backup current controlfile format '/data/backup/ct_%U';

Starting backup at -AUG-
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/data/backup/ct_08ta2f97_1_1 tag=TAG20180808T185119 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
Finished backup at -AUG-

2.5 备份归档日志

rman对备份归档日志有两种形式:backup archivelog 和 plus archivelog

  • eg: backup archivelog all format '/data/backup/arch_%U';
  • eg: backup current controlfile format '/data/backup/ct_%U' plus archivelog;
RMAN> backup current controlfile format '/data/backup/ct_%U' plus archivelog;

Starting backup at -AUG-
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread= sequence= RECID= STAMP=
input archived log thread= sequence= RECID= STAMP=
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/u01/app/oracle/dbs/09ta2grj_1_1 tag=TAG20180808T191811 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread= sequence= RECID= STAMP=
input archived log thread= sequence= RECID= STAMP=
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/u01/app/oracle/dbs/0ata2grk_1_1 tag=TAG20180808T191811 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
Finished backup at -AUG- Starting backup at -AUG-
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/data/backup/ct_0bta2grl_1_1 tag=TAG20180808T191813 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
Finished backup at -AUG- Starting backup at -AUG-
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread= sequence= RECID= STAMP=
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/u01/app/oracle/dbs/0cta2grn_1_1 tag=TAG20180808T191815 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
Finished backup at -AUG-

使用plus archivelog时备份数据库完成的动作(backup database plus archivelog)

  1. 首先执行alter system archive log current 命令(对当前日志归档)
  2. 执行backup archivelog all 命令(对所有归档日志进行备份)
  3. 执行backup database命令中指定的数据文件、表空间等
  4. 再次执行alter system archive log current
  5. 备份在备份操作期间产生的新的归档日志

2.6 备份参数文件

eg:backup spfile format 'spfile_%U';

RMAN> backup spfile format 'spfile_%U';

Starting backup at -AUG-
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/u01/app/oracle/dbs/spfile_0dta2h1h_1_1 tag=TAG20180808T192121 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
Finished backup at -AUG-

三. rman增量备份

  rman增量备份就是包含从最近一次备份以来被修改或添加的数据块;rman提供了两种增量备份类型分为差异增量备份(DIFFERENTIAL)和累计增量备份(CUMULATIVE)

  • 差异增量备份仅仅包含n级或n级以下被修改过的数据块。备份数据量小,恢复时间长。

  • 累计增量备份仅仅包含n-1级或n-1级以下被修改过的数据块。备份数据量大,恢复时间短。

  0级增量备份相当于一个完整备份,该备份包含所有已用的数据块文件,与完整备份的差异是完整备份不能用作级增量备份的基础。

四. rman恢复

4.1 rman完全恢复

  场景:当前数据库仅所有归档日志文件和重做日志文件是完整的;参数文件、控制文件、数据文件都丢失。不过幸运的是;丢失之前对整个库都有备份。

  • 备份整个数据库
[oracle@oracle235 ~]$ rman target / 

Recovery Manager: Release 11.2.0.4. - Production on Wed Aug  :: 

Copyright (c) , , Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORA235 (DBID=)

RMAN> backup database format '/data/backup/db_full_%U';

Starting backup at -AUG-
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number= name=/data/oracle/data/lottu01.dbf
input datafile file number= name=/u01/app/oradata/ora235/system01.dbf
input datafile file number= name=/u01/app/oradata/ora235/sysaux01.dbf
input datafile file number= name=/u01/app/oradata/ora235/undotbs01.dbf
input datafile file number= name=/u01/app/oradata/ora235/users01.dbf
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/data/backup/db_full_0gta2p56_1_1 tag=TAG20180808T213950 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece at -AUG-
channel ORA_DISK_1: finished piece at -AUG-
piece handle=/data/backup/db_full_0hta2p6j_1_1 tag=TAG20180808T213950 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: ::
Finished backup at -AUG-
  • 模拟故障;将参数文件、控制文件、数据文件都丢失;
[oracle@oracle235 ora235]$ rm *.dbf
[oracle@oracle235 ora235]$ rm *.ctl
[oracle@oracle235 ora235]$ rm /data/oracle/data/lottu01.dbf
[oracle@oracle235 dbs]$ rm spfile_0dta2h1h_1_1 spfileora235.ora orapwora235 init.ora

  我们现在开始进行数据库恢复:

1. 恢复参数文件;没有参数文件;我们是无法启动数据库的第一步。

[oracle@oracle235 ~]$ rlwrap rman target /

Recovery Manager: Release 11.2.0.4. - Production on Wed Aug  :: 

Copyright (c) , , Oracle and/or its affiliates.  All rights reserved.

connected to target database (not started)

RMAN> set DBID=;

executing command: SET DBID

RMAN> startup nomount;

startup failed: ORA-: failure in processing system parameters
LRM-: could not open parameter file '/u01/app/oracle/dbs/initora235.ora' starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started Total System Global Area bytes Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes RMAN> restore spfile from autobackup; Starting restore at -AUG-
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= device type=DISK channel ORA_DISK_1: looking for AUTOBACKUP on day:
channel ORA_DISK_1: looking for AUTOBACKUP on day:
channel ORA_DISK_1: looking for AUTOBACKUP on day:
channel ORA_DISK_1: looking for AUTOBACKUP on day:
channel ORA_DISK_1: looking for AUTOBACKUP on day:
channel ORA_DISK_1: looking for AUTOBACKUP on day:
channel ORA_DISK_1: looking for AUTOBACKUP on day:
channel ORA_DISK_1: no AUTOBACKUP in days found
RMAN-: ===========================================================
RMAN-: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-: ===========================================================
RMAN-: failure of restore command at // ::
RMAN-: no AUTOBACKUP found or specified handle is not a valid copy or piece RMAN> restore spfile from '/data/backup/db_full_0hta2p6j_1_1'; Starting restore at -AUG-
using channel ORA_DISK_1 channel ORA_DISK_1: restoring spfile from AUTOBACKUP /data/backup/db_full_0hta2p6j_1_1
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at -AUG-

其中的DBID为2047494122;是从rman备份日志查到的。这样参数文件恢复Ok。

[oracle@oracle235 dbs]$ ll spfileora235.ora
-rw-r-----. oracle oinstall Aug : spfileora235.ora

2. 恢复控制文件

RMAN> shutdown immediate;

Oracle instance shut down

RMAN> startup nomount;

connected to target database (not started)
Oracle instance started Total System Global Area bytes Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes RMAN> restore controlfile to '/u01/app/oradata/ora235/control01.ctl' from '/data/backup/db_full_0hta2p6j_1_1'; Starting restore at -AUG-
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= device type=DISK channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: ::
Finished restore at -AUG- RMAN> restore controlfile to '/u01/app/oradata/ora235/control02.ctl' from '/data/backup/db_full_0hta2p6j_1_1'; Starting restore at -AUG-
using channel ORA_DISK_1 channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: ::
Finished restore at -AUG-

  这样控制文件也恢复OK;

3. 恢复数据文件;控制文件恢复成功;现在数据库可以启动到加载状态

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1 RMAN> restore database; Starting restore at -AUG-
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= device type=DISK channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile to /u01/app/oradata/ora235/system01.dbf
channel ORA_DISK_1: restoring datafile to /u01/app/oradata/ora235/sysaux01.dbf
channel ORA_DISK_1: restoring datafile to /u01/app/oradata/ora235/undotbs01.dbf
channel ORA_DISK_1: restoring datafile to /u01/app/oradata/ora235/users01.dbf
channel ORA_DISK_1: restoring datafile to /data/oracle/data/lottu01.dbf
channel ORA_DISK_1: reading from backup piece /data/backup/db_full_0gta2p56_1_1
channel ORA_DISK_1: piece handle=/data/backup/db_full_0gta2p56_1_1 tag=TAG20180808T213950
channel ORA_DISK_1: restored backup piece
channel ORA_DISK_1: restore complete, elapsed time: ::
Finished restore at -AUG- RMAN> recover database; Starting recover at -AUG-
using channel ORA_DISK_1 starting media recovery archived log for thread with sequence is already on disk as file /u01/app/oradata/ora235/redo01.log
archived log file name=/u01/app/oradata/ora235/redo01.log thread= sequence=
media recovery complete, elapsed time: ::
Finished recover at -AUG- RMAN> alter database open; RMAN-: ===========================================================
RMAN-: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-: ===========================================================
RMAN-: failure of alter db command at // ::
ORA-: must use RESETLOGS or NORESETLOGS option for database open RMAN> alter database open resetlogs; database opened

  到了这步数据库算是成功恢复;再重启数据库。

4.2 rman不完全恢复

场景:出现归档日志文件和重做日志文件不完整或者用户误操作;需要进行不完全恢复。

  不完全恢复有三种方式:

# a、基于TIME 参数不完全恢复
run {
shutdown immediate;
startup mount;
set until time "to_date('20180805 10:09:53','yyyymmdd hh24:mi:ss')";
restore database;
recover database;
alter database open resetlogs;
} # b、基于SCN 参数不完全恢复
run {
shutdown immediate;
startup mount;
set until scn ;
restore database;
recover database;
alter database open resetlogs;
} # c、基于SEQUENCE 参数不完全恢复:
run {
shutdown immediate;
startup mount;
set until sequence ;
restore database;
recover database;
alter database open resetlogs;
}

  按照《4. Oracle数据库用户管理备份与恢复》中的不完全恢复来演示:

  • 误删表t_lottu01
SQL> conn lottu/li0924
Connected.
SQL> create table t_lottu01 as select level id from dual connect by level <= ; Table created. SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual; TO_CHAR(SYSDATE,'YY
-------------------
-- :: SQL> drop table t_lottu01; Table dropped. SQL> conn system/Oracle235
Connected.
SQL> alter system switch logfile; System altered. SQL> alter system switch logfile; System altered.
  • rman执行不完全恢复
[oracle@oracle235 ~]$ rlwrap rman target /

Recovery Manager: Release 11.2.0.4. - Production on Wed Aug  :: 

Copyright (c) , , Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORA235 (DBID=)

run {
> shutdown immediate;
startup mount;
set until time "to_date('20180808 23:00:22','yyyymmdd hh24:mi:ss')";
restore database;
recover database;
alter database open resetlogs;
> }; using target database control file instead of recovery catalog
database closed
database dismounted
Oracle instance shut down connected to target database (not started)
Oracle instance started
database mounted Total System Global Area bytes Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes executing command: SET until clause Starting restore at -AUG-
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= device type=DISK channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile to /u01/app/oradata/ora235/system01.dbf
channel ORA_DISK_1: restoring datafile to /u01/app/oradata/ora235/sysaux01.dbf
channel ORA_DISK_1: restoring datafile to /u01/app/oradata/ora235/undotbs01.dbf
channel ORA_DISK_1: restoring datafile to /u01/app/oradata/ora235/users01.dbf
channel ORA_DISK_1: restoring datafile to /data/oracle/data/lottu01.dbf
channel ORA_DISK_1: reading from backup piece /data/backup/db_full_0gta2p56_1_1
channel ORA_DISK_1: piece handle=/data/backup/db_full_0gta2p56_1_1 tag=TAG20180808T213950
channel ORA_DISK_1: restored backup piece
channel ORA_DISK_1: restore complete, elapsed time: ::
Finished restore at -AUG- Starting recover at -AUG-
using channel ORA_DISK_1 starting media recovery archived log for thread with sequence is already on disk as file /data/arch/1_4_983579059.dbf
archived log for thread with sequence is already on disk as file /data/arch/1_1_983657183.dbf
archived log file name=/data/arch/1_4_983579059.dbf thread= sequence=
archived log file name=/data/arch/1_1_983657183.dbf thread= sequence=
media recovery complete, elapsed time: ::
Finished recover at -AUG- database opene

五. 总结

本文只是简单介绍rman的使用。像rman的命令,rman备份集的保留策略,使用Recovery Catalog,备份加密,以及相关视图都未涉及。

5. RAMN备份与恢复的更多相关文章

  1. Oracle数据备份与恢复

    为了保证数据库的高可用性,Oracle数据库提供了备份和恢复机制,以便在数据库发生故障时完成对数据库的恢复操作,避免损失重要的数据资源 丢失数据分为:物理丢失:操作系统的数据库主键(数据文件.控机文件 ...

  2. MySQL 数据库的备份与恢复

    一.MySQL 常见的备份方式 1. 直接拷贝数据库文件(物理拷贝) 2. 使用 mysqldump 工具备份 3. 使用 mysqlhotcopy 工具备份 4. 使用 mysql 的主从同步复制, ...

  3. ZTE交换路由设备配置的备份与恢复

    一.TFTP服务器搭建 使用用户计算机搭建TFTP服务器,交换路由设备作为TFTP客户端. 运行TFTPServer.exe,该程序所在的目录为TFTP的根目录. 请保证您的TFTP可以Ping通所要 ...

  4. mysql数据库的备份与恢复

    假定我们的目标数据库是 test, 表是 user.假定mysql的用户名和密码均为 root. 备份与恢复所用的程序分别是mysql软件包提供的 mysqldump 命令和 mysql 命令.思想很 ...

  5. Oracle逻辑备份与恢复

      1. 备份的类型 按照备份方式的不同,可以把备份分为两类: 1.1 逻辑备份:指通过逻辑导出对数据进行备份.将数据库中的用户对象导出到一个二进制文件中,逻辑备份使用导入导出工具:EXPDP/IMP ...

  6. RMAN备份与恢复之初入茅庐

    理解数据库备份 所谓备份实际上是把数据库复制到转储设备的过程. 从备份方式来看数据库备份分为物理备份和逻辑备份,物理备份是把构成数据库的所有文件拷贝到指定的位置的过程,而逻辑备份只是利用SQL语言从数 ...

  7. Oracle【IT实验室】数据库备份与恢复之四:RMAN(备份与恢复管理器)

    RMAN是ORACLE提供的一个备份与恢复的工具,可以用来备份和还原数据库文件. 归档日志和控制文件.它也可以用来执行完全或不完全的数据库恢复. RMAN可以由命令行接口或者 OEM的 Backup ...

  8. Oracle【IT实验室】数据库备份与恢复之三:OS备份/用户管理的备份与恢复

    用户管理的备份与恢复也称 OS物理备份,是指通过数据库命令设置数据库为备份 状态,然后用操作系统命令,拷贝需要备份或恢复的文件.这种备份与恢复需要用户的 参与手工或自动完成. 对于使用 OS拷贝备份的 ...

  9. Oracle数据库备份与恢复

    第一章. 理解什么是数据库恢复 当 我们使用一个数据库时,总希望数据库的内容是可靠的.正确的,但由于计算机系统的故障(硬件故障.软件故障.网络故障.进程故障和系统故障)影响数据库系 统的操作,影响数据 ...

随机推荐

  1. 数据结构C语言版--静态顺序表的基本功能实现(一)

    /* * 功能:创建一个线性表,并输出 * 静态分配内存 */ #include<stdio.h> //stdio.h是C的标准I/O库 //#include<iostream> ...

  2. Simple PWM to Analog Circuit (0-10vdc)

    i just finished this simple circuit and am very satisfied with the result. The output is very stable ...

  3. Struts2漏洞拉响网站安全红色警报以及把Struts2更新为最新版本Struts2.3.15.1步骤

    360网站安全检测平台今日发布红色警报称,广泛应用在国内大型网站系统的Struts2框架正在遭到黑客猛烈攻击.利用Struts2“命令执行漏洞”,黑客可轻易获得网站服务器ROOT权限.执行任意命令,从 ...

  4. 读书笔记《疯狂人类进化史》,第五章,关于xing ai这件事

        像人类这样沉迷于交配的却少之又少--传宗接代并不需要无休止的xing ai,这种小事只要在发情期做几次就可以了.在其他动物眼里,人类简直"淫荡至极",他们在床上花费大量时间 ...

  5. MSSQL存储过程

    存储过程的种类:       1.系统存储过程.        以sp_开头      2.扩展存储过程.        以xp_开头      3.用户定义存储过程. --重新编译存储过程 exec ...

  6. 多线程本地图片载入演示样例【OpenCV】【Pthread】

    Pthread barrier的简单使用演示样例: C++代码例如以下: // ThreadingLoadImages.cpp : 定义控制台应用程序的入口点. // #include "s ...

  7. Shell脚本编程基础笔记二

    转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/8177697.html 一:输入 1:运行时参数 可以在启动脚本时,在其后输入参数. ./脚本 参数1 参数2. ...

  8. 浅谈java构建工具的选择

    在学校的时候还总是自己用eclipse自带的jar导出工具,然后人工来给项目打包,那是相当的原始. 而后工作了,项目中都是用ant,慢慢的开始学会使用这个工具.感觉就和脚本一样,很容易读懂,做项目构建 ...

  9. C#-MVC开发微信应用(2)--微信消息的处理和应答

    微信应用使用场景和商机很多,所以这也是一个技术的方向,因此,有空研究下.学习下微信的相关开发,也就成为SNF完善的必要条件了.本系列文章希望从一个循序渐进的角度上,全面介绍微信的相关开发过程和相关经验 ...

  10. Spark 论文篇-论文中英语单词集

    resilient [rɪˈzɪljənt] 能复原的;弹回的;有弹性的;能立刻恢复精神的;社会渣滓 dryad ['draɪæd] 森林女神 树妖 present [ˈprɛznt]  目前的;现在 ...