dg备份 oracle_oracle dg备份 - CSDN
精华内容
参与话题
  • DataGuard 是Oracle自带的数据库同步技术,基本原理为将日志文件(Redo)从源数据库传输到目标数据库,然后再目标数据库上应用(apply)这些日志文件,从而使目标数据库和源数据库保持同步。 提供三种模式可选: (1...
    1. 什么是dataguard?
      DataGuard 是Oracle自带的数据库同步技术,基本原理为将日志文件(Redo)从源数据库传输到目标数据库,然后再目标数据库上应用(apply)这些日志文件,从而使目标数据库和源数据库保持同步。
    2. 提供三种模式可选:
      (1) 最大性能模式:不影响源数据库的性能,在这种模式下,一旦数据库写到源数据库的联机日志文件中,事务即可提交,不必等到了日志写到目标数据库。
      (2) 最大保护模式:日志数据必须同时写到源数据库的联机日志文件和一个目标库的备用日志文件,事务才能提交。可确保数据零丢失,当目标数据库数据不可写时,关闭源数据库。
      (3) 最大可用模式:正常处于最大保护模式,当目标数据库不能写日志时,则源数据库不关闭,改为最大性能模式,当目标数据库可写后,转化为最大保护模式。
    3. 根据目标数据库上Apply方式不同:
      (1) Physical Standby(Redo Apply):通过介质恢复的方法与Oracle保持同步,优点是DDL操作也可以同步包括数据文件的创建等。数据库不可用。或者在间歇过程中以只读方式打开,进行数据查询,然后恢复到日志应用模式下。
      (2) Logical Standby(SQL Apply):数据库处于打开模式,通过LogMiner挖掘传输过来的日志,构造成Sql语句,然后再目标库执行,从而与源数据库保持同步。
    4. DataGuard的缺点:
      (1) 传输整个日志,因此需要很大的带宽,可能浪费三倍以上的带宽。
      (2) Physical Standby 使数据库不可用,即使可以查询但是会使Oracle的同步停止。
      (3) Logical Standby 不能支持DDL操作。
      (4) 不支持一对多复制,不支持双向复制。
      (5) 只能复制整个数据库,不能选择某个schema或表空间单独复制。
      (6) 不支持异构的环境,必须是相同的操作系统以及相同的数据库版本。
    5. 主要用于高可用灾难恢复环境

     

     

    1、打开主库DB系统强制归档

     

    Shutdown immediate;

    startup mount;

    alter database forcelogging;

    alter database open;

     

    selectforce_logging,guard_status from V$database;

     

    2、在备库上安装与主库一样版本Oracle Software

    opatch lsinventory

     

                                 

    3、在备库上使用NETCA配置好监听

     

     

    4、在主备库上配置TNSNAMES.ORA

    PRDBCSP =

      (DESCRIPTION =

        (ADDRESS = (PROTOCOL = TCP)(HOST =prdbcsp)(PORT = 1521))

        (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME = prdbcsp)

        )

      )

     

    STBBCSP =

      (DESCRIPTION =

        (ADDRESS = (PROTOCOL = TCP)(HOST =stbbcsp)(PORT = 1521))

        (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME = stbbcsp)

        )

      )

     

    5、修改主备DB上parameter参数

    主库创建pfile后拷贝到备库,然后分别修改:

    主库增加:

    *.db_unique_name='prdbcsp'

    *.log_archive_config='dg_config=(prdbcsp,stbbcsp)'

    *.log_archive_dest_1='location=/dbfile/archive/prdbcspvalid_for=(all_logfiles,all_roles) db_unique_name=prdbcsp'

    *.log_archive_dest_2='service=stbbcspoptional lgwr async valid_for=(online_logfiles,primary_role)db_unique_name=stbbcsp compression=enable'

    *.log_archive_dest_state_2='ENABLE'

    *.log_file_name_convert='/dbfile/oradata/stbbcsp','/dbfile/oradata/prdbcsp'

    *.db_file_name_convert='/dbfile/oradata/stbbcsp','/dbfile/oradata/ prdbcsp'

    standby_file_management='AUTO'

    *.fal_client='prdbcsp'

    *.fal_server='stbbcsp'

     

    备库增加:

    *.db_unique_name='stbbcsp'

    *.log_archive_config='dg_config=(stbbcsp,prdbcsp)'

    *.log_archive_dest_1='location=/dbfile/archive/stbbcspvalid_for=(all_logfiles,all_roles) db_unique_name=stbbcsp'

    *.log_archive_dest_2='service=prdbcspoptional lgwr async valid_for=(online_logfiles,primary_role)db_unique_name=prdbcsp compression=enable'

    *.log_archive_dest_state_2='ENABLE'

    *.log_file_name_convert='/dbfile/oradata/prdbcsp','/dbfile/oradata/stbbcsp'

    *.db_file_name_convert='/dbfile/oradata/prdbcsp','/dbfile/oradata/ stbbcsp'

    standby_file_management='AUTO'

    *.fal_client='stbbcsp'

    *.fal_server='prdbcsp'

     

    6、Copy database orapw口令文件

    拷贝后重命名

     

    7、Create the standby controlfile

    主库执行:

    Shutdown immediate

    startup mount;

    alter databasecreate standby controlfile as '/home/oracle/stdby_controlfile.ctl';

     

    拷贝到备库

     

     

    8、停止主库,完成数据文件迁移

    有两种方式:

    (1)利用RMAN导出,然后恢复

    (2)直接拷贝文件

     

    rman target /

    run{

    allocate channel c3type disk;

    copy datafile'/dev/vg_iora01/redo_256m_02.dbf' to '/dev/vg_iora03/rdata_512m_001';

    copy datafile'/dev/vg_iora01/redo_256m_03.dbf' to '/dev/vg_iora03/rdata_512m_002';

    }

     

    最好用asm拷贝

     

    利用RMAN导出,然后恢复

    Startup nomountpfile=’/home/oracle/pfile.ora

    Alter databasemount;

    Select name fromv$datafile;

    Select name fromv$tempfile;

    然后恢复:

    RMAN> restore controlfile to '/dbfile1/database/prdfrdb1/control1.ctl'from '/dbfile2/backupprdfrdb1/prdfrdb1_1_6100.ctb';

    RMAN> alter database mount;

    RMAN> RUN {

    set command id to'123';

    allocate channel d1type disk ;

    allocate channel d2type disk ;

    allocate channel d3type disk ;

    allocate channel d4type disk ;

    SET NEWNAME FORDATAFILE '/dbfile/oradata/prdbcsp/system01.dbf' to'/dbfile/oradata/stbbcsp/system01.dbf';

    SET NEWNAME FORDATAFILE '/dbfile/oradata/prdbcsp/sysaux01.dbf' to'/dbfile/oradata/stbbcsp/sysaux01.dbf';

    SET NEWNAME FORDATAFILE '/dbfile/oradata/prdbcsp/undotbs01.dbf' to'/dbfile/oradata/stbbcsp/undotbs01.dbf';

    SET NEWNAME FORDATAFILE '/dbfile/oradata/prdbcsp/users01.dbf' to'/dbfile/oradata/stbbcsp/users01.dbf';

    SET NEWNAME FORDATAFILE '/dbfile/oradata/prdbcsp/temp01.dbf' to'/dbfile/oradata/stbbcsp/temp01.dbf';

    restore database;

    SWITCH DATAFILE ALL;

    release channel d1;

    release channel d2;

    release channel d3;

    release channel d4;

    }exit                     

     

     

    直接拷贝文件:

    拷贝dbfile下数据文件到备库,更改文件夹名称

    拷贝之前的控制文件替换dbfile内的控制文件

     

    Startup nomountpfile=’/home/oracle/pfile.ora

    Alter databasemount;

    Select name fromv$datafile;

    Select name fromv$tempfile;

    重命名:

    alter datbase renamefile '/dbfile/oradata/prdbcsp/system01.dbf' to'/dbfile/oradata/stbbcsp/system01.dbf';

    alter datbase renamefile '/dbfile/oradata/prdbcsp/sysaux01.dbf' to'/dbfile/oradata/stbbcsp/sysaux01.dbf';

    alter datbase renamefile '/dbfile/oradata/prdbcsp/undotbs01.dbf' to'/dbfile/oradata/stbbcsp/undotbs01.dbf';

    alter datbase renamefile '/dbfile/oradata/prdbcsp/users01.dbf' to '/dbfile/oradata/stbbcsp/users01.dbf';

    alter datbase renamefile '/dbfile/oradata/prdbcsp/temp01.dbf' to'/dbfile/oradata/stbbcsp/temp01.dbf';

      

     9、检查并修改数据文件名称和路径

    select name fromV$datafile;

    select name fromV$tempfile;

    单机环境:

    select member fromV$logfile;

    RAC环境:

    select a.group#,A.MEMBERfrom V$logfile a, V$log b where A.GROUP#=B.GROUP#  and B.THREAD#=1;

    selecta.group#,A.MEMBER from V$logfile a, V$log b where A.GROUP#=B.GROUP#  and B.THREAD#=2;

     

    修改logfile文件(不一定需要)

    alter database renamefile '/dbfile/database/stbecif/stbecif-redoa1.rdo' to'/dbfile/database/stbecif/thread1-redoa1.rdo';

     

     

    10、配置完成Standby redo logfile

    主库:

    alter database addstandby logfile group 6 ('/dbfile/oradata/prdbcsp/stbredoa.rdo') size 1024m;

    alter database addstandby logfile group 7 ('/dbfile/oradata/prdbcsp/stbredob.rdo') size 1024m;

    alter database addstandby logfile group 8 ('/dbfile/oradata/prdbcsp/stbredoc.rdo') size 1024m;

    alter database addstandby logfile group 9 ('/dbfile/oradata/prdbcsp/stbredod.rdo') size 1024m;

    alter database addstandby logfile group 10 ('/dbfile/oradata/prdbcsp/stbredoe.rdo') size 1024m;

    alter database addstandby logfile group 11 ('/dbfile/oradata/prdbcsp/stbredof.rdo') size 1024m;

     

    备库:

    alter database addstandby logfile group 6 ('/dbfile/oradata/stbbcsp/stbredoa.rdo') size 1024m;

    alter database addstandby logfile group 7 ('/dbfile/oradata/stbbcsp/stbredob.rdo') size 1024m;

    alter database addstandby logfile group 8 ('/dbfile/oradata/stbbcsp/stbredoc.rdo') size 1024m;

    alter database addstandby logfile group 9 ('/dbfile/oradata/stbbcsp/stbredod.rdo') size 1024m;

    alter database addstandby logfile group 10 ('/dbfile/oradata/stbbcsp/stbredoe.rdo') size 1024m;

    alter database addstandby logfile group 11 ('/dbfile/oradata/stbbcsp/stbredof.rdo') size 1024m;

     

     

    11. 开启同步,查看状态

     

    alter databaserecover managed standby database using current logfile disconnect from session;

    alter databaserecover managed standby database cancel;

     

    col open_mode fora25

    col database_rolefor a30

    col db_unique_namefor a20

    selectopen_mode,database_role,db_unique_name from v$database;

     

    col name format a30

    col value format a30

    col time_computedformat a30

    set linesize 200

    selectname,value,time_computed from V$dataguard_stats;

     

    展开全文
  • 常用的在线备库搭建有Rman auxiliary 和Rman备份集恢复两种方式。(一)在环境配置OK的问题下,使用一条...rman target sys/Oracle123@orcl_pri auxiliary sys/Oracle123@orcl_dg # 开始搭建辅助数据库 RMAN>du...

    常用的在线备库搭建有Rman auxiliary 和Rman备份集恢复两种方式。
    (一)
    在环境配置OK的问题下,使用一条Rman命令就可以完成备库初始化同步,比较简单。

    # 登陆
    rman target sys/Oracle123@orcl_pri auxiliary sys/Oracle123@orcl_dg
    # 开始搭建辅助数据库
    RMAN>duplicate target database for standby nofilenamecheck from active database;

    (二)
    Rman备份集恢复的步骤相对多一些,但也不是很复杂。
    (1)规划数据库参数

    DB db_name db_unique_name tnsname
    primary orcl orcl orcl_pri
    standby orcl orcl_s orcl_dg
    DB db_file_base log_file_base
    primary /oradata/orcl /oradata/log
    standby /oradata/orcl_dg /oradata/log_dg

    (2)主库参数配置(不考虑failover,只配置最少的参数)

    alter system set log_archive_config = 'dg_config=(orcl,orcl_s)';
    alter system set log_archive_dest_2 = 'SERVICE=orcl_dg ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl_s' scope=both;
    alter system set log_archive_dest_state_2 = ENABLE;
    alter system set standby_file_management = auto;
    # 生成pfile,作为备库启动的参数文件
    create pfile=/home/oracle/pfile.ora' from spfile;

    (3)备库直接修改pfile.ora参数,并启动至nomount状态

    *.db_unique_name='center_s'
    *.log_archive_dest_1='location=/oradata/log_dg'
    *.log_archive_dest_2='SERVICE=orcl_pri ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl'
    *.db_file_name_convert='/oradata/orcl','/oradata/orcl_dg'
    *.log_file_name_convert='/oradata/log','/oradata/log_dg'
    #  启动数据库
    create spfile from pfile='/home/oracle/pfile.ora'
    startup nomount

    (4)tnsnames.ora 和 listener.ora配置
    (5)主库备份,上传至备库

    # 全备库
    RMAN> run {
     allocate channel t1 type disk;
     backup database FORMAT '/oradata/backup/data_%T_%s'; 
     release channel t1;
    }
    # 控制文件备份
    RMAN> backup current controlfile for standby format '/oradata/backup/control.bak';

    (5)备库恢复数据库

    # 恢复控制文件
    RMAN> RESTORE STANDBY CONTROLFILE FROM '/oradata/backup/control.bak';
    
    # 启动数据库到mount状态
    RMAN> sql 'alter database mount'
    
    # 恢复数据库
    RMAN> catalog start with '/oradata/backup/';
    RMAN> restore database;
    RMAN> recover database;
    # 恢复有报错,可以忽略
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 10/17/2017 09:33:30
    RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence xx  and starting SCN of xxxx

    (6)创建备库standby日志文件,用于实时同步数据

    alter system set standby_file_management = manual;
    ALTER DATABASE ADD standby LOGFILE group  11 '/oradata/log_dg/std11.log' size 500m ;
    ALTER DATABASE ADD standby LOGFILE group  12 '/oradata/log_dg/std12.log' size 500m ;
    ALTER DATABASE ADD standby LOGFILE group  13 '/oradata/log_dg/std13.log' size 500m ;
    ALTER DATABASE ADD standby LOGFILE group  14 '/oradata/log_dg/std14.log' size 500m ;

    (7)开始实时日志应用并打开数据库

    select open_mode ,flashback_on,current_scn from v$database;
    # 应用日志
    alter database recover managed standby database disconnect from session;
    # 查看应用状态,并在主库切换日志,查看序列变化
    select max(sequence#),applied,archived from v$archived_log group by applied,archived;
    # 打开数据库
    alter database recover managed standby database cancel;
    alter database open;
    alter database recover managed standby database disconnect from session using current logfile;

    Oracle DG是数据库架构中最常用的一种,一定要能熟练搭建DG环境和掌握DG failover /switchover 、recovery的方式。

    展开全文
  • DG环境的搭建必须要把数据库启动到归档模式,并且为了避免开发人员使用nologging语句,我们还要把数据库设置为force logging。 查看数据库是否运行在归档模式: #su - oracle $sqlplus / as sysdba SQL>...

    1.设置归档模式

    DG环境的搭建必须要把数据库启动到归档模式,并且为了避免开发人员使用nologging语句,我们还要把数据库设置为force logging。
    查看数据库是否运行在归档模式:

    #su  - oracle
    $sqlplus / as sysdba
    SQL>archive log list;

    数据库运行在非归档模式,下面我们开始操作,把数据库修改为归档模式:首先关闭数据库

    命令如下:

    SQL>shutdown immediate;

    启动数据库到mount状态下

    命令如下:

    SQL>startup mount;

    查询结果必须是MOUNTED哦,如果输出的是其它方式,证明操作有误,请重新关闭数据库进行操作

    SQL>select open_mode from v$database;

    把数据库修改为归档模式并打开数据库:

    命令如下:

    SQL>alter database archivelog;
    SQL>alter database open;
    SQL>archive log list;

    数据库打开后,我们需要把数据库设为force logging

    命令如下:

    SQL>alter database force logging;
    SQL>select name,log_mode,force_logging from v$database;

    2.添加standby 日志

     standby logfile的数量和大小均要与redo logfile相同

    查询主库当前redo logfile的数量,命令如下:

    SQL> select thread#,group#,members,bytes/1024/1024 from v$log;

    我们主库有三组大小为50M的redo logfile,故我们也需要创建同样数量和大小的standby logfile:

    SQL>alter database add standby logfile group 11('/data/oracle/app/oracle/oradata/orcl/redo01_stb.log') size 50M;
    SQL>alter database add standby logfile group 12('/data/oracle/app/oracle/oradata/orcl/redo02_stb.log') size 50M;
    SQL>alter database add standby logfile group 13('/data/oracle/app/oracle/oradata/orcl/redo03_stb.log') size 50M;
    SQL>select group#,thread#,sequence#,archived,status from v$standby_log;
    

    3.设置数据库口令文件的使用模式

     执行以下命令查看remote_login_passwordfile的值是否EXCLUSIVE

    SQL>show parameter remote_login_passwordfile
    

    如果不是,执行以下命令进行设置,并且重启数据库,使其生效:

    SQL>alter system set remote_login_passwordfile=EXCLUSIVE scope=spfile;
    SQL>shutdown immediate;
    SQL>startup;

    4.参数设置

     a)主库参数设置:

    SQL>show parameter db_unique_name
    SQL>alter system set log_archive_config='dg_config=(orcl,orcls)' scope=spfile;
    

    设置归档日志的存放位置:

    alter system set LOG_ARCHIVE_DEST_1='LOCATION=/data/oracle/app/oracle/oradata/orcl/archivelog VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=orcl';
    alter system set log_archive_dest_2='SERVICE=orcls ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcls';

    启用设置的日志路径:

    SQL>alter system set log_archive_dest_state_1=enable scope=spfile;
    SQL>alter system set log_archive_dest_state_2=enable scope=spfile;
    

    设置归档日志进程的最大数量(视实际情况调整):

    SQL>alter system set log_archive_max_processes=30 scope=both;
    

    设置standby库从哪个数据库获取归档日志(只对standby库有效,在主库上设置是为了在故障切换后,主库可以成为备库使用):

    alter system set fal_server=orcls scope=both;

    设置文件管理模式,此项设置为自动,不然在主库创建数据文件后,备库不会自动创建:

    SQL>alter system set standby_file_management=auto scope=spfile;
    

    启用OMF功能:

    SQL> alter system set db_create_file_dest='/data//oracle/app/oracle/oradata/orcl/archivelog' scope=spfile;

    设置主备文件存放路径:

    SQL>alter system set db_file_name_convert='/data/oracle/app/oracle/oradata/orcls','/data/oracle/app/oracle/oradata/orcl' scope=spfile;
    SQL>alter system set log_file_name_convert='/data/oracle/app/oracle/oradata/orcls','/data/oracle/app/oracle/oradata/orcl' scope=spfile;

    完成了以上步骤后

    通过以下命令生成一个pfile文件给备库使用:

    SQL>create pfile  from spfile;

    备库操作:

    SQL>shutdown immediate;
    SQL>startup nomount pfile='/data/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/initorcls.ora' ;
    SQL>create spfile from pfile;
    SQL>shutdown immediate;
    SQL>exit;
    
    sqlplus / as sysdba
    SQL>startup nomount

    进行rman :

    rman target sys/xxzgs123@orcl auxiliary sys/xxzgs123@orcls nocatalog
    RMAN>duplicate target database for standby from active database;
    

    复制完成后,打开数据库开启实时同步:

    sqlplus / as sysdba
    SQL>alter database archivelog;
    SQL>alter database open;
    SQL>archive log list;
    SQL>alter database recover managed standby database using current logfile disconnect from session;

    5.查看数据库状态

     1.登陆到主库和备库

    sqlplus / as sysdba 
    
    SQL>conn sys/123456 as sysdba

    2,查看状态:

    SQL>select database_role from v$database;
    
    SQL>select SEQUENCE#, FIRST_TIME, NEXT_TIME, APPLIED, ARCHIVED from V$ARCHIVED_LOG;
    
    

    3,查询所有表空间

    select file_name,tablespace_name,bytes from dba_data_files;

    主:                                                                                                     

    从:

    4.查看表空间的名称及大小:

    SELECT T.TABLESPACE_NAME, ROUND(SUM(BYTES/(1024 * 1024)), 0) TS_SIZE
    FROM DBA_TABLESPACES T, DBA_DATA_FILES D
    WHERE T.TABLESPACE_NAME = D.TABLESPACE_NAME
    GROUP BY T.TABLESPACE_NAME;

    5.查看表空间物理文件的名称及大小: 

    SELECT TABLESPACE_NAME,FILE_ID,FILE_NAME,ROUND(BYTES / (1024 * 1024), 0) TOTAL_SPACE
    FROM DBA_DATA_FILES
    ORDER BY TABLESPACE_NAME;

    6.查看所有表空间对应的数据文件名:

    SQL>SELECT DISTINCT FILE_NAME,TABLESPACE_NAME,AUTOEXTENSIBLE FROM DBA_DATA_FILES;

    7.查看表空间的使用情况:

    SELECT SUM(BYTES)/(1024*1024) AS FREE_SPACE,TABLESPACE_NAME 
    FROM DBA_FREE_SPACE GROUP BY TABLESPACE_NAME;

    SELECT A.TABLESPACE_NAME,A.BYTES TOTAL,B.BYTES USED, C.BYTES FREE,
    (B.BYTES*100)/A.BYTES "% USED",(C.BYTES*100)/A.BYTES "% FREE"
    FROM SYS.SM$TS_AVAIL A,SYS.SM$TS_USED B,SYS.SM$TS_FREE C
    WHERE A.TABLESPACE_NAME=B.TABLESPACE_NAME AND A.TABLESPACE_NAME=C.TABLESPACE_NAME;

    COLUMN TABLESPACE_NAME FORMAT A18; 
    COLUMN SUM_M FORMAT A12; 
    COLUMN USED_M FORMAT A12; 
    COLUMN FREE_M FORMAT A12; 
    COLUMN PTO_M FORMAT 9.99; 

    SELECT S.TABLESPACE_NAME,CEIL(SUM(S.BYTES/1024/1024))||'M' SUM_M,CEIL(SUM(S.USEDSPACE/1024/1024))||'M' USED_M,CEIL(SUM(S.FREESPACE/1024/1024))||'M' FREE_M, SUM(S.USEDSPACE)/SUM(S.BYTES) PTUSED FROM (SELECT B.FILE_ID,B.TABLESPACE_NAME,B.BYTES, (B.BYTES-SUM(NVL(A.BYTES,0))) USEDSPACE, SUM(NVL(A.BYTES,0)) FREESPACE,(SUM(NVL(A.BYTES,0))/(B.BYTES)) * 100 FREEPERCENTRATIO FROM SYS.DBA_FREE_SPACE A,SYS.DBA_DATA_FILES B WHERE A.FILE_ID(+)=B.FILE_ID GROUP BY B.FILE_ID,B.TABLESPACE_NAME,B.BYTES ORDER BY B.TABLESPACE_NAME) S GROUP BY S.TABLESPACE_NAME ORDER BY SUM(S.FREESPACE)/SUM(S.BYTES) DESC;

    8.查看数据文件的hwm(可以resize的最小空间)和文件头大小:

    SELECT V1.FILE_NAME,V1.FILE_ID,NUM1 TOTLE_SPACE,NUM3 FREE_SPACE,
    NUM1-NUM3 "USED_SPACE(HWM)",NVL(NUM2,0) DATA_SPACE,NUM1-NUM3-NVL(NUM2,0) FILE_HEAD 
    FROM 
    (SELECT FILE_NAME,FILE_ID,SUM(BYTES) NUM1 FROM DBA_DATA_FILES GROUP BY FILE_NAME,FILE_ID) V1,
    (SELECT FILE_ID,SUM(BYTES) NUM2 FROM DBA_EXTENTS GROUP BY FILE_ID) V2,
    (SELECT FILE_ID,SUM(BYTES) NUM3 FROM DBA_FREE_SPACE GROUP BY FILE_ID) V3
    WHERE V1.FILE_ID=V2.FILE_ID(+) AND V1.FILE_ID=V3.FILE_ID(+);

    数据文件大小及头大小:

    SELECT V1.FILE_NAME,V1.FILE_ID, 
    NUM1 TOTLE_SPACE, 
    NUM3 FREE_SPACE, 
    NUM1-NUM3 USED_SPACE, 
    NVL(NUM2,0) DATA_SPACE, 
    NUM1-NUM3-NVL(NUM2,0) FILE_HEAD 
    FROM 
    (SELECT FILE_NAME,FILE_ID,SUM(BYTES) NUM1 FROM DBA_DATA_FILES GROUP BY FILE_NAME,FILE_ID) V1, 
    (SELECT FILE_ID,SUM(BYTES) NUM2 FROM DBA_EXTENTS GROUP BY FILE_ID) V2, 
    (SELECT FILE_ID,SUM(BYTES) NUM3 FROM DBA_FREE_SPACE GROUP BY FILE_ID) V3 
    WHERE V1.FILE_ID=V2.FILE_ID(+) 
    AND V1.FILE_ID=V3.FILE_ID(+);

    (运行以上查询,我们可以如下信息: 
    Totle_pace:该数据文件的总大小,字节为单位 
    Free_space:该数据文件的剩于大小,字节为单位 
    Used_space:该数据文件的已用空间,字节为单位 
    Data_space:该数据文件中段数据占用空间,也就是数据空间,字节为单位 
    File_Head:该数据文件头部占用空间,字节为单位)

    6.一些常用的sql命令:

    --查看临时表空间文件
    select name from v$tempfile;
    --查看用户和表空间的关系
    select USERNAME,TEMPORARY_TABLESPACE from DBA_USERS;
    --如果有用户的默认临时表空间是NOTIFYDB_TEMP的话,建议进行更改
    alter user xxx temporary tablespace tempdefault;
    ---设置tempdefault为默认临时表空间
    alter database default temporary tablespace tempdefault;
    --删除表空间NOTIFYDB_TEMP及其包含数据对象以及数据文件
    drop tablespace NOTIFYDB_TEMP including contents and datafiles; 

     

     

    --查看表空间文件
    select name from v$datafile;
    --停止表空间的在线使用
    alter tablespace 表空间名称 offline;
    --删除表空间NOTIFYDB_TEMP及其包含数据对象以及数据文件
    drop tablespace NOTIFYDB_TEMP including contents and datafiles; 

     

    --查看所有的用户
    select * from all_users;
    --查看当前用户信息
    select * from user_users;
    --查看当前用户的角色
    select * from user_role_privs;
    --查看当前用户的权限
    select * from user_sys_privs;
    --查看当前用户的表可操作权限
    select * from user_tab_privs;
    
    --查看某一个表的约束,注意表名要 大写
    select * from user_constraints where table_name='TBL_XXX';
    --查看某一个表的所有索引,注意表名要 大写
    select index_name,index_type,status,blevel from user_indexes where table_name = 'TBL_XXX';
    --查看索引的构成,注意表名要 大写
    select table_name,index_name,column_name, column_position FROM user_ind_columns WHERE table_name='TBL_XXX';
    
    --系统数据字典 DBA_TABLESPACES 中记录了关于表空间的详细信息
    select * from sys.dba_tablespaces;
    
    --查看用户序列
    select * from user_sequences;
    --查看数据库序列
    select * from dba_sequences;

     

    展开全文
  • 公司Oracle备份策略是10G采用DG主库每天Rman一全备份+expdp备份,11g采用的是DG从库每天rman一全备份。最近在做恢复演练测试,在从库备份恢复时,由于控制文件是standby类型,无法直接打开数据库,也...

    公司Oracle备份策略是10G采用DG主库每天Rman一全备份+expdp备份,11g采用的是DG从库每天rman一全备份。最近在做恢复演练测试,在从库备份恢复时,由于控制文件是standby类型,无法直接打开数据库,也没有找到standby controlfile ——>primary controlfile转换的方法,这里是通过控制文件重建的方式做的备库备份恢复,仅供有需要的同仁参考。如有其他方法,欢迎在评论区回复。

    1.系统初始化和数据库安装

    2.参数文件恢复

     

    RMAN> startup nomount ;     

     

    startup failed: ORA-01078: failure in processing system parameters

    LRM-00109: could not open parameter file '/U01/app/oracle/product/11.2.0.4/dbs/inittest.ora'

     

    starting Oracle instance without parameter file for retrieval of spfile

    Oracle instance started

     

    Total System Global Area    1068937216 bytes

     

    Fixed Size                     2260088 bytes

    Variable Size                301990792 bytes

    Database Buffers             754974720 bytes

    Redo Buffers                   9711616 bytes

     

    RMAN> restore spfile from '/U01/tools/20170310/full_TEST_20170310_3839';

     

    Starting restore at 2017-03-10 15:14:11

    allocated channel: ORA_DISK_1

    channel ORA_DISK_1: SID=1345 device type=DISK

     

    channel ORA_DISK_1: restoring spfile from AUTOBACKUP /U01/tools/20170310/full_TEST_20170310_3839

    channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete

    Finished restore at 2017-03-10 15:14:12

     

    SQL> shutdown immediate;

     

    [oracle@DB_TEST dbs]$ cd $ORACLE_HOME/dbs

    [oracle@DB_TEST dbs]$ strings spfiletest.ora > inittest.ora

    [oracle@DB_TEST dbs]$ mkdir -p /U01/app/oracle/oradata/test/

    [oracle@DB_TEST dbs]$ mkdir -p /U01/app/oracle/fast_recovery_area/test/

    [oracle@DB_TEST dbs]$ mkdir -p /U01/app/oracle/fast_recovery_area/TEST/arch

    [oracle@DB_TEST dbs]$ mv spfiletest.ora  spfiletest.ora_bak

    SQL> !mkdir -p /U01/app/oracle/admin/test/adump

    SQL> startup nomount;

    ORACLE instance started.

     

    Total System Global Area 2.0310E+10 bytes

    Fixed Size                  2262008 bytes

    Variable Size            3355446280 bytes

    Database Buffers         1.6911E+10 bytes

    Redo Buffers               40865792 bytes

    SQL> create spfile from pfile;

     

    File created.

     

    SQL> shutdown immediate;

    ORA-01507: database not mounted

     

     

    ORACLE instance shut down.

    SQL> startup nomount;

    ORACLE instance started.

     

    Total System Global Area 2.0310E+10 bytes

    Fixed Size                  2262008 bytes

    Variable Size            3355446280 bytes

    Database Buffers         1.6911E+10 bytes

    Redo Buffers               40865792 bytes

     

     

    3. 控制文件恢复

    通过备份恢复standby控制文件,然后创建新的控制文件做不完全恢复

    RMAN> restore standby controlfile from '/U01/tools/20170310/full_TEST_20170310_3838';

     

    Starting restore at 2017-03-10 15:29:28

    allocated channel: ORA_DISK_1

    channel ORA_DISK_1: SID=96 device type=DISK

     

    channel ORA_DISK_1: restoring control file

    channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

    output file name=/U01/app/oracle/oradata/test/control01.ctl

    output file name=/U01/app/oracle/fast_recovery_area/test/control02.ctl

    Finished restore at 2017-03-10 15:29:29

     

    RMAN> alter database mount;

     

    database mounted

    released channel: ORA_DISK_1

     

    SQL> select open_mode from v$database;

     

    OPEN_MODE

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

    MOUNTED

     

    4.数据文件恢复

     

    RMAN> catalog start with '/U01/tools/20170310';

     

    searching for all files that match the pattern /U01/tools/20170310

     

    List of Files Unknown to the Database

    =====================================

    File Name: /U01/tools/20170310/arch_TEST_20170310_3835

    File Name: /U01/tools/20170310/full_TEST_20170310_3836

    File Name: /U01/tools/20170310/full_TEST_20170310_3839

    File Name: /U01/tools/20170310/full_TEST_20170310_3837

    File Name: /U01/tools/20170310/full_TEST_20170310_3838

     

    Do you really want to catalog the above files (enter YES or NO)? yes

    cataloging files...

    cataloging done

     

    List of Cataloged Files

    =======================

    File Name: /U01/tools/20170310/arch_TEST_20170310_3835

    File Name: /U01/tools/20170310/full_TEST_20170310_3836

    File Name: /U01/tools/20170310/full_TEST_20170310_3839

    File Name: /U01/tools/20170310/full_TEST_20170310_3837

    File Name: /U01/tools/20170310/full_TEST_20170310_3838

     

    RMAN> restore database;

     

    恢复到指定的sequence

    RMAN> recover database until sequence 5545;

     

    Starting recover at 2017-03-10 15:34:27

    using channel ORA_DISK_1

     

    starting media recovery

    Oracle Error:

    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

    ORA-01194: file 1 needs more recovery to be consistent

    ORA-01110: data file 1: '/U01/app/oracle/oradata/test/system01.dbf'

     

    media recovery complete, elapsed time: 00:00:01

     

    Finished recover at 2017-03-10 15:34:28

     

    5.重建控制文件

     

    SQL> alter database backup controlfile to trace as '/U01/tools/20170310/control.trc';

     

    SQL> shutdown immediate;

    SQL> startup nomount;

    [oracle@DB_TEST 20170310]$ rm -rf /U01/app/oracle/oradata/test/control01.ctl

    [oracle@DB_TEST 20170310]$ rm -rf /U01/app/oracle/fast_recovery_area/test/control02.ctl

    SQL> @create_controlfile.sql

    SQL> select open_mode from v$database;

     

    OPEN_MODE

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

    MOUNTED

     

    重建控制文件:

    STARTUP NOMOUNT

    CREATE CONTROLFILE REUSE DATABASE "TEST" RESETLOGS FORCE LOGGING ARCHIVELOG

        MAXLOGFILES 40

        MAXLOGMEMBERS 3

        MAXDATAFILES 100

        MAXINSTANCES 8

        MAXLOGHISTORY 292

    LOGFILE

      GROUP 1 '/U01/app/oracle/fast_recovery_area/TEST02/onlinelog/o1_mf_1_bjzdlzks_.log'  SIZE 100M BLOCKSIZE 512,

      GROUP 2 '/U01/app/oracle/fast_recovery_area/TEST02/onlinelog/o1_mf_2_bjzdlzy4_.log'  SIZE 100M BLOCKSIZE 512,

      GROUP 3 '/U01/app/oracle/fast_recovery_area/TEST02/onlinelog/o1_mf_3_bjzdm0c7_.log'  SIZE 100M BLOCKSIZE 512,

      GROUP 4 '/U01/app/oracle/fast_recovery_area/TEST02/onlinelog/o1_mf_4_bjzdm0qj_.log'  SIZE 100M BLOCKSIZE 512,

      GROUP 5 '/U01/app/oracle/fast_recovery_area/TEST02/onlinelog/o1_mf_5_bjzdm14j_.log'  SIZE 100M BLOCKSIZE 512,

      GROUP 6 '/U01/app/oracle/fast_recovery_area/TEST02/onlinelog/o1_mf_6_bjzdm1js_.log'  SIZE 100M BLOCKSIZE 512,

      GROUP 7 '/U01/app/oracle/fast_recovery_area/TEST02/onlinelog/o1_mf_7_bjzdm1wz_.log'  SIZE 100M BLOCKSIZE 512,

      GROUP 8 '/U01/app/oracle/fast_recovery_area/TEST02/onlinelog/o1_mf_8_bjzdm29z_.log'  SIZE 100M BLOCKSIZE 512,

      GROUP 9 '/U01/app/oracle/fast_recovery_area/TEST02/onlinelog/o1_mf_9_bjzdm2p8_.log'  SIZE 100M BLOCKSIZE 512,

      GROUP 10 '/U01/app/oracle/fast_recovery_area/TEST02/onlinelog/o1_mf_10_bjzdm338_.log'  SIZE 100M BLOCKSIZE 512,

      GROUP 11 '/U01/app/oracle/fast_recovery_area/TEST02/onlinelog/o1_mf_11_bjzdm3hk_.log'  SIZE 100M BLOCKSIZE 512,

      GROUP 12 '/U01/app/oracle/fast_recovery_area/TEST02/onlinelog/o1_mf_12_bjzdm3vt_.log'  SIZE 100M BLOCKSIZE 512

    ,

    DATAFILE

      '/U01/app/oracle/oradata/test/system01.dbf',

      '/U01/app/oracle/oradata/test/sysaux01.dbf',

      '/U01/app/oracle/oradata/test/undotbs01.dbf',

      '/U01/app/oracle/oradata/test/users01.dbf',

      '/U01/app/oracle/oradata/test/test_data01.dbf',

      '/U01/app/oracle/oradata/test/test_index01.dbf',

      '/U01/app/oracle/oradata/test/test_data02.dbf',

      '/U01/app/oracle/oradata/test/test_data03.dbf',

      '/U01/app/oracle/oradata/test/test_index02.dbf',

      '/U01/app/oracle/oradata/test/test_index03.dbf'

    CHARACTER SET ZHS16GBK

    ;

     

    6.不完全恢复数据库

    select file#,checkpoint_change# from v$datafile;

    select checkpoint_change# from v$database;

     

    查看隐藏参数值:_allow_resetlogs_corruption (整个调整的目标是强制启动数据库,设置此参数之后,在数据库Open过程中,Oracle会跳过某些一致性检查,从而使数据库可能跳过不一致状态,Open打开)

    col KSPPINM for a30;

    col KSPPSTVL for a30;

    col KSPPDESC for a30;

    set line 200;

    SELECT   ksppinm, ksppstvl, ksppdesc

    FROM   x$ksppi x, x$ksppcv y

    WHERE   x.indx = y.indx AND  ksppinm = '_allow_resetlogs_corruption';

     

     

    SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile;

    SQL> shutdown immediate;

    SQL> startup mount;

    SQL> alter database open resetlogs;

    Database altered.

     

    SQL> alter system set "_allow_resetlogs_corruption"=FALSE scope=spfile;

    SQL> shutdown immediate;

    SQL> startup ;

    ORACLE instance started.

     

    Total System Global Area 2.0310E+10 bytes

    Fixed Size                  2262008 bytes

    Variable Size            3355446280 bytes

    Database Buffers         1.6911E+10 bytes

    Redo Buffers               40865792 bytes

    Database mounted.

    Database opened.

    SQL>

     

    至此数据恢复过程完成。

     

    7.监听和tnsnames.ora配置文件恢复

     

    Listener.ora

    LISTENER =

      (DESCRIPTION_LIST =

        (DESCRIPTION =

          (ADDRESS_LIST =

            (ADDRESS = (PROTOCOL = TCP)(HOST = DB_TEST)(PORT = 1521))

          )

        )

      )

     

    SID_LIST_LISTENER =

      (SID_LIST =

        (SID_DESC =

          (GLOBAL_DBNAME = test)

          (ORACLE_HOME = /U01/app/oracle/product/11.2.0.4)

          (SID_NAME = test)

        )

        (SID_DESC =

          (GLOBAL_DBNAME = test00_DGMGRL)

          (ORACLE_HOME = /U01/app/oracle/product/11.2.0.4)

          (SID_NAME = test)

       )

      )

     

     

    LISTENER1532 =

      (DESCRIPTION_LIST =

        (DESCRIPTION =

          (ADDRESS_LIST =

            (ADDRESS = (PROTOCOL = TCP)(HOST = DB_TEST)(PORT = 1532))

          )

        )

      )

    SID_LIST_LISTENER1532 =

      (SID_LIST =

        (SID_DESC =

          (GLOBAL_DBNAME = test)

          (ORACLE_HOME = /U01/app/oracle/product/11.2.0.4)

          (SID_NAME = test)

        )

       (SID_DESC =

          (GLOBAL_DBNAME = test00_DGMGRL)

          (ORACLE_HOME = /U01/app/oracle/product/11.2.0.4)

          (SID_NAME = test)

        )

      )

     

    LISTENER1522 =

      (DESCRIPTION_LIST =

        (DESCRIPTION =

          (ADDRESS_LIST =

            (ADDRESS = (PROTOCOL = TCP)(HOST = DB_TEST)(PORT = 1522))

          )

        )

      )

    SID_LIST_LISTENER1522 =

      (SID_LIST =

        (SID_DESC =

          (GLOBAL_DBNAME = test)

          (ORACLE_HOME = /U01/app/oracle/product/11.2.0.4)

          (SID_NAME = test)

        )

      )

     

    LISTENER1523 =

      (DESCRIPTION_LIST =

        (DESCRIPTION =

          (ADDRESS_LIST =

            (ADDRESS = (PROTOCOL = TCP)(HOST = DB_TEST)(PORT = 1523))

          )

        )

      )

    SID_LIST_LISTENER1523 =

      (SID_LIST =

        (SID_DESC =

          (GLOBAL_DBNAME = test)

          (ORACLE_HOME = /U01/app/oracle/product/11.2.0.4)

          (SID_NAME = test)

        )

      )

     

    LISTENER1525 =

      (DESCRIPTION_LIST =

        (DESCRIPTION =

          (ADDRESS_LIST =

            (ADDRESS = (PROTOCOL = TCP)(HOST = DB_TEST)(PORT = 1525))

          )

        )

      )

    SID_LIST_LISTENER1525 =

      (SID_LIST =

        (SID_DESC =

          (GLOBAL_DBNAME = test)

          (ORACLE_HOME = /U01/app/oracle/product/11.2.0.4)

          (SID_NAME = test)

        )

      )

     

     

    LISTENER1528 =

      (DESCRIPTION_LIST =

        (DESCRIPTION =

          (ADDRESS_LIST =

            (ADDRESS = (PROTOCOL = TCP)(HOST = DB_TEST)(PORT = 1528))

          )

        )

      )

    SID_LIST_LISTENER1528 =

      (SID_LIST =

        (SID_DESC =

          (GLOBAL_DBNAME = test)

          (ORACLE_HOME = /U01/app/oracle/product/11.2.0.4)

          (SID_NAME = test)

        )

      )

    LISTENER1526 =

      (DESCRIPTION_LIST =

        (DESCRIPTION =

          (ADDRESS_LIST =

            (ADDRESS = (PROTOCOL = TCP)(HOST = DB_TEST)(PORT = 1526))

          )

        )

      )

    SID_LIST_LISTENER1526 =

      (SID_LIST =

        (SID_DESC =

          (GLOBAL_DBNAME = test)

          (ORACLE_HOME = /U01/app/oracle/product/11.2.0.4)

          (SID_NAME = test)

        )

      )

    SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF

     

    tnsnames.ora

    # tnsnames.ora Network Configuration File: /U01/app/oracle/product/11.2.0.4/network/admin/tnsnames.ora

    # Generated by Oracle configuration tools.

     

    TEST01 =

      (DESCRIPTION =

        (ADDRESS = (PROTOCOL = TCP)(HOST = DB_TEST)(PORT = 1521))

        (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME = test)

        )

      )

     

    可通过lsnrctl start /lsnrctl start LISTENER1522/lsnrctl start LISTENER1523/lsnrctl start LISTENER1525启动监听,可通过tnsping test01测试服务名连通性,可通过netstat luntp查看启动监听端口。

     

    8. 数据验证

     

    SQL> alter session set current_schema=TEST;

     

    SQL> select UPDATE_TIME   from table_name where rownum<=10 order by UPDATE_TIME  desc;

     

    UPDATE_TIME

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

    2017-03-10 02:00:05

    2017-03-10 01:59:48

    2016-03-17 16:06:22

    2016-03-17 14:43:47

    2015-05-14 12:12:32

     



    来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27067062/viewspace-2135152/,如需转载,请注明出处,否则将追究法律责任。

    转载于:http://blog.itpub.net/27067062/viewspace-2135152/

    展开全文
  • Oracle之ADG与DG的区别?

    千次阅读 2019-07-20 20:07:05
    在上云后的Oracle数据灾备场景中,我们经常听到DBA迁移工程师讲到“在这个项目中用ADG进行数据实时备份,ADG比DG更好!”。究竟ADG作Oracle数据灾备的优势在什么地方? 一、ADG主要解决了DG时代读写不能并行的...
  • Oracle DG环境如何正确地删除Archivelog

    万次阅读 2016-07-31 16:07:05
    清理归档日志最稳妥的原则: ...主库才用备份归档并清理。 备库应该是直接清理! Archivelog并不能直接得从OS层直接物理删除,因为archivelog的相关信息是记录在controlfile中的,当物理删除后不会改变contr
  • 今天帮一朋友检查主库alter日志的时候,
  • Oracle修改spfile文件的路径

    千次阅读 2013-04-02 10:27:40
    问题背景:今天同事在做DB双机切换的时候发现oracle的spfile文件作为+DG_DATA 下的一个资源,本意是在+DG_ORA下  后来发现spfile的路径建错了,但是重建带来一个问题启动的时候使用默认启动方式spfile,在此场景下...
  • 备份还原oracle数据库的方式有很多种,本文只讲解使用expdp、impdp数据泵方式备份与还原(恢复)数据库,此种方式可以导出/导入数据库表以及表中的数据。 请自行修改目录路径,否则出现错误别怪我哦~ 一、备份 ...
  • Oracle数据库迁移的几种方式

    万次阅读 2016-08-08 22:26:38
    Oracle数据库迁移的几种方式 我们常常需要对数据进行迁移,迁移到更性能配置更高级的主机OS上、迁移到远程的机房、迁移到不同的平台下,以下介绍ORACLE的几种数据库迁移方案:    一、exp/imp逻辑备份...
  • dg和ogg的区别--oracle数据库

    万次阅读 2018-12-04 15:42:21
    ADG和OGG的新特性,目前越来越多的客户重视灾备数据站点的建设,由于存储级灾备和操作系统级灾备的局限性(主要是带宽高及事务完整性不容易保证),因此在选择甲骨文的应用...Oracle DataGuard 11g的新特性 ~~~~~~ ...
  • 1 背景说明 正常情况下,我们在安装Oracle数据库的时候,都会创建一个oracle的用户。 其根目录就是/home/oracle.  并且根据Oracle 的OFA的架构,也是建议使用/u01 这样的目录来单独安装oracle的软件,包括存放数据...
  • Migrate database from single instance to Oracle RAC # Preparation before restore# Backup database# check listener# check ASM disk group free space is sufficient.# the following steps was completed suc
  • 如何中途停止RMAN备份任务

    千次阅读 2013-07-29 19:44:36
    如果,你负责的数据库服务器,在RMAN进行全备时,业务又有大量数据要处理,一时间,系统资源直接被耗尽,影响到了业务的正常,你准备怎么处理?
  • Oracle 11g RAC+DG项目实战-视频分享

    千次阅读 2013-10-28 10:45:25
    在15集视频中详细阐述了Oracle RAC的安装,RAC如何配置Active Data Guard,DG如何切换!绝对重量级的视频。掌握这个技术,资深Oracle DBA的岗位你也轻松秒杀! 实验手册在最后一集视频中! 概述: 本系列视频是...
  • Oracle11G数据泵expdp/impdp使用并行与压缩技术备份与恢复 环境准备 创建directory对象 create or replace directory expdp_dir as '/expdp'; 读写权限授权给user用户 grant read,write on directory expdp_dir to...
  • ORACLE RAC+DG(单实例)

    万次阅读 2019-07-02 14:55:43
    ORACLE RAC+DG(单实例) 前提条件: 1.主库RAC已经成功安装,数据库也已经创建。 2.DG备库已经安装完相同版本的oracle软件,无需创建数据库。 1、RAC开启归档。 任意节点: alter system set log_archive_format='%t_%s...
  • 最近的RAC环境中遭遇ORA-00254,ORA-15173,即无法进行归档。通常情况下归档失败我们考虑更多的是归档路径的不可达,或归档所在的磁盘空间不足造成的。在使用 ASM 存放归档日志的情形...Errors in file /u01/oracle/adm
  • 1.1 Oracle DataGuard技术 注:因为Logical Standby受支持数据类型,以及日志分析效率等影响很少用于实际应用,所以这里不做比较。以下比较的均为Physical Standby(1)DataGuard 的异步模式是将Archived Redo Log...
  • 使用 ASMCMD 工具管理ASM目录及文件

    千次阅读 2012-06-04 12:30:01
    在ASM实例中,所有的存储于ASM磁盘组中的文件对于操作系统命令而言是不可访问的,因此也无法使用常规的命令来操纵ASM磁盘中的文 件。所幸的是,我们有ASMCMD工具来代替操作系统命令来完成这部分工作。...
1 2 3 4 5 ... 20
收藏数 5,535
精华内容 2,214
关键字:

dg备份 oracle