DB2数据库的在线备份步骤

本文详细介绍了DB2数据库进行在线备份的过程,包括修改USEREXIT和LOGRETAIN参数,启用归档日志模式,以及在参数修改后如何进行数据库备份。通过更新数据库配置并确保所有应用程序断开连接,可以进行成功的在线备份。请注意,在线备份前需先执行离线全备,以避免backup pending状态。
摘要由CSDN通过智能技术生成

DB2数据库的在线备份步骤。

如果要做在线的备份,要对两个参数作修改: USEREXIT和LOGRETAIN,将其修改为on,他们默认是off的,默认使用循环日志模式,修改完参数后,可以变为归档日志模式,启用了userexit做数据库日志的归档。

get db cfg   #查看数据库当前的属性。

db2=> get db cfg

 

      数据库  的数据库配置

 

 数据库配置发行版级别                                    = 0x0d00

 数据库发行版级别                                        = 0x0d00

 

 数据库地域                                              =CN

 数据库代码页                                            =1208

 数据库代码集                                            =UTF-8

 数据库国家/地区代码                                    = 86

 数据库整理顺序                                          =SYSTEM_1386

 备用整理顺序                              (ALT_COLLATE) =

 数字兼容性                                              =OFF

 Varchar2 兼容性                                         = OFF

 日期兼容性                                              = OFF

 数据库页大小                                            =4096

 

 动态 SQL 查询管理                      (DYN_QUERY_MGMT) =DISABLE

 

 语句集中器                                  (STMT_CONC) =OFF

 

 对此数据库的发现支持                      (DISCOVER_DB) = ENABLE

 

 限制访问                                               = NO

 缺省查询优化类                           (DFT_QUERYOPT) = 5

 并行度                                    (DFT_DEGREE) = 1

 在算术异常时继续                      (DFT_SQLMATHWARN) = NO

 缺省刷新有效期                        (DFT_REFRESH_AGE) = 0

 缺省维护的选项(DFT_MTTB_TYPES)的表类型                = SYSTEM

 保留的高频值的数目                     (NUM_FREQVALUES) = 10

 保留的分位点数目                        (NUM_QUANTILES) = 20

 

 十进制浮点舍入方式                    (DECFLT_ROUNDING) = ROUND_HALF_EVEN

 

 备份暂挂                                               = NO

 

 已将所有已落实的事务写入磁盘                            = YES

 前滚暂挂                                               = NO

 复原暂挂                                               = NO

 

 启用的多页文件分配                                      = YES

 

 恢复状态的日志保留                                      = NO

 日志记录状态的用户出口                                  = NO

 

 自调整内存                            (SELF_TUNING_MEM) =ON

 数据库共享内存大小(4KB)             (DATABASE_MEMORY) = AUTOMATIC(145360)

 数据库内存阈值                          (DB_MEM_THRESH) = 10

 锁定列表的最大存储量(4KB)                   (LOCKLIST) = AUTOMATIC(6200)

 每个应用程序的锁定百分比列表                 (MAXLOCKS) = AUTOMATIC(60)

 程序包高速缓存大小(4KB)                  (PCKCACHESZ) =AUTOMATIC(1533)

 共享排序的排序堆域值(4KB)            (SHEAPTHRES_SHR) = AUTOMATIC(12218)

 排序列表堆(4KB)                            (SORTHEAP) =AUTOMATIC(610)

 

 数据库堆(4KB)                                (DBHEAP) =AUTOMATIC(1218)

 目录高速缓存大小(4KB)               (CATALOGCACHE_SZ) = 300

 日志缓冲区大小(4KB)                         (LOGBUFSZ) = 256

 实用程序堆大小(4KB)                    (UTIL_HEAP_SZ) = 20865

 缓冲池大小(页)                             (BUFFPAGE) = 250

 SQL 语句堆(4KB)                            (STMTHEAP) =AUTOMATIC(8192)

 缺省应用程序堆(4KB)                      (APPLHEAPSZ) = AUTOMATIC(256)

 应用程序内存大小(4KB)                (APPL_MEMORY) =AUTOMATIC(40000)

 统计信息堆大小(4KB)                    (STAT_HEAP_SZ) =AUTOMATIC(4384)

 

 检查死锁的时间间隔(毫秒)                  (DLCHKTIME) = 10000

 锁定超时(秒)                             (LOCKTIMEOUT) = -1

 

 更改的页阈值                           (CHNGPGS_THRESH) =80

 异步页清除程序的数目                   (NUM_IOCLEANERS) =AUTOMATIC(3)

 I/O 服务器的数目                        (NUM_IOSERVERS) =AUTOMATIC(3)

 索引排序标志                                 (INDEXSORT) =YES

 顺序检测标志                                (SEQDETECT) =YES

 缺省预取大小(页)                    (DFT_PREFETCH_SZ) =AUTOMATIC

 

 跟踪修改的页数                               (TRACKMOD) = OFF

 

 容器的缺省数目                                          = 1

 缺省表空间扩展数据块大小(页)           (DFT_EXTENT_SZ) = 32

 

 最大活动应用程序数                           (MAXAPPLS) =AUTOMATIC(40)

 活动应用程序的平均数目       (AVG_APPLS) = AUTOMATIC(1)

 每个应用程序的最大打开数据库文件数           (MAXFILOP) = 65535

 

 日志文件大小(4KB)                         (LOGFILSIZ) = 1024

 主日志文件的数目                           (LOGPRIMARY) = 13

 辅助日志文件的数目                          (LOGSECOND) = 4

 已更改的至日志文件的路径                   (NEWLOGPATH) =

 日志文件路径                                            =D:\DB2\NODE0000\SQL00005\SQLOGDIR\

 溢出日志路径                          (OVERFLOWLOGPATH) =

 镜像日志路径                            (MIRRORLOGPATH) =

 首个活动日志文件                                        =

 磁盘上已满的块日志                    (BLK_LOG_DSK_FUL) = NO

 非记

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值