db2 online backup 設定
--db2影像安裝基本學會 結構基本瞭解 詳細東西 還需要一步一步學習
--線上備份設定
[db2inst2@localhost ~]$ db2 get db cfg for ts|grep -i log
Log retain for recovery status = NO
User exit for logging status = NO
Catalog cache size (4KB) (CATALOGCACHE_SZ) = 300
Log buffer size (4KB) (LOGBUFSZ) = 256
Log file size (4KB) (LOGFILSIZ) = 1024
Number of primary log files (LOGPRIMARY) = 13
Number of secondary log files (LOGSECOND) = 4
Changed path to log files (NEWLOGPATH) =
Path to log files = /home/db2inst2/db2inst2/NODE0000/SQL00002/SQLOGDIR/
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file =
Block log on disk full (BLK_LOG_DSK_FUL) = NO
Block non logged operations (BLOCKNONLOGGED) = NO
Percent max primary log space by transaction (MAX_LOG) = 0
Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0
Percent log file reclaimed before soft chckpt (SOFTMAX) = 520
Log retain for recovery enabled (LOGRETAIN) = OFF
User exit for logging enabled (USEREXIT) = OFF
HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
First log archive method (LOGARCHMETH1) = OFF
Options for logarchmeth1 (LOGARCHOPT1) =
Second log archive method (LOGARCHMETH2) = OFF
Options for logarchmeth2 (LOGARCHOPT2) =
Failover log archive path (FAILARCHPATH) =
Number of log archive retries on error (NUMARCHRETRY) = 5
Log archive retry Delay (secs) (ARCHRETRYDELAY) = 20
Log pages during index build (LOGINDEXBUILD) = OFF
[db2inst2@localhost ~]$ db2 update db cfg for ts using LOGRETAIN ON
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
[db2inst2@localhost ~]$ db2 update db cfg for ts using LOGARCHMETH1 "disk:/home/db2inst2/arch"
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
[db2inst2@localhost ~]$ db2 update db cfg for ts using USEREXIT on
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
[db2inst2@localhost ~]$ db2 update db cfg for ts using trackmod on
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
[db2inst2@localhost ~]$ db2 update db cfg for ts using mirrorlogpath /home/db2inst2/arch
SQL5099N The value "/home/db2inst2/arch/NODE0000/" indicated by the database
configuration parameter "MIRRORLOGPATH" is not valid, reason code "4".
SQLSTATE=08004
[db2inst2@localhost ~]$ db2stop force
11/28/2011 03:08:45 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
[db2inst2@localhost ~]$ db2start
11/28/2011 03:09:00 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
[db2inst2@localhost ~]$ db2 backup database ts online
SQL2413N Online backup is not allowed because the database is not recoverable
or a backup pending condition is in effect.
[db2inst2@localhost ~]$ db2 backup database ts
Backup successful. The timestamp for this backup image is : 20111128030926
[db2inst2@localhost ~]$ db2 backup database ts online
Backup successful. The timestamp for this backup image is : 20111128030949
[db2inst2@localhost ~]$ db2 connnect to ts
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL1024N A database connection does not exist. SQLSTATE=08003
[db2inst2@localhost ~]$ db2 connect to ts
Database Connection Information
Database server = DB2/LINUX 9.7.4
SQL authorization ID = DB2INST2
Local database alias = TS
[db2inst2@localhost ~]$ db2 backup database ts online
Backup successful. The timestamp for this backup image is : 20111128031033
[db2inst2@localhost ~]$ db2 get db cfg for ts|grep -i log
Log retain for recovery status = RECOVERY
User exit for logging status = YES
Catalog cache size (4KB) (CATALOGCACHE_SZ) = 300
Log buffer size (4KB) (LOGBUFSZ) = 256
Log file size (4KB) (LOGFILSIZ) = 1024
Number of primary log files (LOGPRIMARY) = 13
Number of secondary log files (LOGSECOND) = 4
Changed path to log files (NEWLOGPATH) =
Path to log files = /home/db2inst2/db2inst2/NODE0000/SQL00002/SQLOGDIR/
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file = S0000002.LOG
Block log on disk full (BLK_LOG_DSK_FUL) = NO
Block non logged operations (BLOCKNONLOGGED) = NO
Percent max primary log space by transaction (MAX_LOG) = 0
Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0
Percent log file reclaimed before soft chckpt (SOFTMAX) = 520
Log retain for recovery enabled (LOGRETAIN) = RECOVERY
User exit for logging enabled (USEREXIT) = ON
HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
First log archive method (LOGARCHMETH1) = USEREXIT
Options for logarchmeth1 (LOGARCHOPT1) =
Second log archive method (LOGARCHMETH2) = OFF
Options for logarchmeth2 (LOGARCHOPT2) =
Failover log archive path (FAILARCHPATH) =
Number of log archive retries on error (NUMARCHRETRY) = 5
Log archive retry Delay (secs) (ARCHRETRYDELAY) = 20
Log pages during index build (LOGINDEXBUILD) = OFF
[db2inst2@localhost ~]$[@more@]
--線上備份設定
[db2inst2@localhost ~]$ db2 get db cfg for ts|grep -i log
Log retain for recovery status = NO
User exit for logging status = NO
Catalog cache size (4KB) (CATALOGCACHE_SZ) = 300
Log buffer size (4KB) (LOGBUFSZ) = 256
Log file size (4KB) (LOGFILSIZ) = 1024
Number of primary log files (LOGPRIMARY) = 13
Number of secondary log files (LOGSECOND) = 4
Changed path to log files (NEWLOGPATH) =
Path to log files = /home/db2inst2/db2inst2/NODE0000/SQL00002/SQLOGDIR/
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file =
Block log on disk full (BLK_LOG_DSK_FUL) = NO
Block non logged operations (BLOCKNONLOGGED) = NO
Percent max primary log space by transaction (MAX_LOG) = 0
Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0
Percent log file reclaimed before soft chckpt (SOFTMAX) = 520
Log retain for recovery enabled (LOGRETAIN) = OFF
User exit for logging enabled (USEREXIT) = OFF
HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
First log archive method (LOGARCHMETH1) = OFF
Options for logarchmeth1 (LOGARCHOPT1) =
Second log archive method (LOGARCHMETH2) = OFF
Options for logarchmeth2 (LOGARCHOPT2) =
Failover log archive path (FAILARCHPATH) =
Number of log archive retries on error (NUMARCHRETRY) = 5
Log archive retry Delay (secs) (ARCHRETRYDELAY) = 20
Log pages during index build (LOGINDEXBUILD) = OFF
[db2inst2@localhost ~]$ db2 update db cfg for ts using LOGRETAIN ON
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
[db2inst2@localhost ~]$ db2 update db cfg for ts using LOGARCHMETH1 "disk:/home/db2inst2/arch"
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
[db2inst2@localhost ~]$ db2 update db cfg for ts using USEREXIT on
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
[db2inst2@localhost ~]$ db2 update db cfg for ts using trackmod on
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
[db2inst2@localhost ~]$ db2 update db cfg for ts using mirrorlogpath /home/db2inst2/arch
SQL5099N The value "/home/db2inst2/arch/NODE0000/" indicated by the database
configuration parameter "MIRRORLOGPATH" is not valid, reason code "4".
SQLSTATE=08004
[db2inst2@localhost ~]$ db2stop force
11/28/2011 03:08:45 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
[db2inst2@localhost ~]$ db2start
11/28/2011 03:09:00 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
[db2inst2@localhost ~]$ db2 backup database ts online
SQL2413N Online backup is not allowed because the database is not recoverable
or a backup pending condition is in effect.
[db2inst2@localhost ~]$ db2 backup database ts
Backup successful. The timestamp for this backup image is : 20111128030926
[db2inst2@localhost ~]$ db2 backup database ts online
Backup successful. The timestamp for this backup image is : 20111128030949
[db2inst2@localhost ~]$ db2 connnect to ts
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL1024N A database connection does not exist. SQLSTATE=08003
[db2inst2@localhost ~]$ db2 connect to ts
Database Connection Information
Database server = DB2/LINUX 9.7.4
SQL authorization ID = DB2INST2
Local database alias = TS
[db2inst2@localhost ~]$ db2 backup database ts online
Backup successful. The timestamp for this backup image is : 20111128031033
[db2inst2@localhost ~]$ db2 get db cfg for ts|grep -i log
Log retain for recovery status = RECOVERY
User exit for logging status = YES
Catalog cache size (4KB) (CATALOGCACHE_SZ) = 300
Log buffer size (4KB) (LOGBUFSZ) = 256
Log file size (4KB) (LOGFILSIZ) = 1024
Number of primary log files (LOGPRIMARY) = 13
Number of secondary log files (LOGSECOND) = 4
Changed path to log files (NEWLOGPATH) =
Path to log files = /home/db2inst2/db2inst2/NODE0000/SQL00002/SQLOGDIR/
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file = S0000002.LOG
Block log on disk full (BLK_LOG_DSK_FUL) = NO
Block non logged operations (BLOCKNONLOGGED) = NO
Percent max primary log space by transaction (MAX_LOG) = 0
Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0
Percent log file reclaimed before soft chckpt (SOFTMAX) = 520
Log retain for recovery enabled (LOGRETAIN) = RECOVERY
User exit for logging enabled (USEREXIT) = ON
HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
First log archive method (LOGARCHMETH1) = USEREXIT
Options for logarchmeth1 (LOGARCHOPT1) =
Second log archive method (LOGARCHMETH2) = OFF
Options for logarchmeth2 (LOGARCHOPT2) =
Failover log archive path (FAILARCHPATH) =
Number of log archive retries on error (NUMARCHRETRY) = 5
Log archive retry Delay (secs) (ARCHRETRYDELAY) = 20
Log pages during index build (LOGINDEXBUILD) = OFF
[db2inst2@localhost ~]$[@more@]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9879835/viewspace-1056576/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [ADMIN]Princeple of Online backup
- DB2 backup與resotre,rollforwardDB2Forward
- 設定DB2環境DB2
- DB2 設定歸檔模式DB2模式
- db2備份恢復(backup restore)DB2REST
- 設定db2 的線上備份DB2
- DB2設定語句終止字元DB2字元
- db2 設定語句結束符DB2
- WARNING: datafile #1 was not in online backup mode 出現的原因
- 修改主機名後DB2的設定方法DB2
- DB2 backup fails with SQL2079N return code 30DB2AISQL
- Online Redefinition線上重定義(一)
- SharePoint Online 站點模板中許可權的設定
- DB2 列為null,無法設定該列為主鍵DB2Null
- DB2匯出給定表DB2
- Oracle Online Redefinition線上重定義(上)Oracle
- Oracle Online Redefinition線上重定義(中)Oracle
- Oracle Online Redefinition線上重定義(下)Oracle
- ANR2968E Database backup terminated. DB2 sqlcode: -2033. DB2 sqlerrmc: 106DatabaseDB2SQL
- db2 list history backup輸出資訊中各個型別的解釋DB2型別
- Online Redefinition線上重定義(三)--多表關聯重定義案例
- DB2的兩種日誌模式及備份和歸檔的設定DB2模式
- 線上重定義表(Redefine Tables Online) - dbms_redefinition
- 使用db2 load from時導致DB的tablespace置成backup pending狀態DB2
- Online Redefinition線上重定義(二)--單表複雜案例
- full backup 與 level 0 incremental backupREM
- create index online 與rebuild index onlineIndexRebuild
- create index online 與rebuild index onlineIndexRebuild
- Veritas Backup
- rebuild index online和create index online及沒有online的區別RebuildIndex
- Laravel setting 設定 / 系統設定 / 網站設定Laravel網站
- DB2傻瓜1000問(八)8、DB2資料庫程式設計部分DB2資料庫程式設計
- Online Redefinition
- css/js online online code editor/formator/debugerCSSJSORM
- SQLBackupAndFTP12.0 failed to backup database with full backup typeSQLFTPAIDatabase
- 請求指點:如何設 DB2 的JDBC?DB2JDBC
- DB2:ksh: db2: not found.DB2
- backup site collection