存储 频道

NBU6.5备份恢复DB2数据库常用方式对比

配置db2.conf参数文件

    4.配置db2.conf参数文件
    将示例 db2.conf 文件从其所在的示例文件夹位置复制到活动位置。
    从install_path\NetBackup\dbext\db2\samples\db2.conf复制到
    Install_path\NetBackup\dbext\db2\db2.conf
    修改如下项:
    DATABASE SAMPLE
    OBJECTTYPE DATABASE
    POLICY DB2_DB_Policy
    SCHEDULE Default-Application-Backup
    ENDOPER

    DATABASE SAMPLE
    OBJECTTYPE ARCHIVE
    POLICY DB2_Log_Policy
    SCHEDULE User
    ARCFUNC SAVE
    #ARCFUNC COPY
    #ARCDIR /home/db2inst1/arcdir
    #RETDIR /home/db2inst1/arcdir
    ENDOPER

    DATABASE SAMPLE
    OBJECTTYPE ARCHIVE
    POLICY DB2_ARCH_Policy
    SCHEDULE Default-Application-Backup
    ENDOPER

    为下面的配置:
    DATABASE NBU
    OBJECTTYPE DATABASE
    POLICY DB2_DB
    SCHEDULE Default-Application-Backup-DB
    ENDOPER
   
    #DATABASE SAMPLE
    #OBJECTTYPE ARCHIVE
    #POLICY DB2_Log_Policy
    #SCHEDULE User
    #ARCFUNC SAVE
    #ARCFUNC COPY
    #ARCDIR /home/db2inst1/arcdir
    #RETDIR /home/db2inst1/arcdir
    #ENDOPER

    DATABASE NBU
    OBJECTTYPE ARCHIVE
    POLICY DB2_LOG
    SCHEDULE Default-Application-Backup-LOG
    ENDOPER

    注意:配置中红色部份与策略中对应

    5.创建备份脚本文件
    将备份示例脚本从install_path\NetBackup\ DbExt\sample\     db2_backup_db_online.cmd复制到D盘
    D:\db2_backup_nbu_online.cmd
    并修改以下项:
    @REM Example: @set db2_nblib=C:\progra~1\veritas\netbackup\bin\nbdb2.dll
    @set db2_nblib=C:\progra~1\veritas\netbackup\bin\nbdb2.dll
    @echo db2_nblib = %db2_nblib%

    @REM Example: @set db2_home=D:\sqllib
    @set db2_home=D:\sqllib
    @echo db2_home = %db2_home%

    @REM Example: @set db2_name=SAMPLE       
    @set db2_name=NBU
    @echo db2_name = %db2_name%

    6.确认db2uext2.exe
    确认DB2安装目径的bin下有db2uext2.exe,如果没有
    将C:\Program Files\Veritas\NetBackup\DbExt\DB2\db2uext2.exe复制到D:\SQLLIB\BIN
    此情况一般出现在先安装了NBU后安装DB2

0
相关文章