DB2数据库日志调整
更新时间:2023-12-29 23:03:01 阅读量: 教育文库 文档下载
[db2inst3@CentOS5 ~]$ db2 get db cfg |grep LOGFI
Log file size (4KB) (LOGFILSIZ) = 1000 [db2inst3@CentOS5 ~]$ db2 get db cfg |grep LOGPR
Number of primary log files (LOGPRIMARY) = 3 [db2inst3@CentOS5 ~]$ db2 get db cfg |grep LOGS
Number of secondary log files (LOGSECOND) = 10
Path to log files = /db2data/db2inst3/NODE0000/SQL00001/LOGSTREAM0000/
[db2inst3@CentOS5 ~]$ db2 \DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully. SQL1363W One or more of the parameters submitted for immediate modification were not changed dynamically. For these configuration parameters, the database must be shutdown and reactivated before the configuration parameter changes become effective.
[db2inst3@CentOS5 ~]$ db2 get db cfg |grep LOGAR
First log archive method (LOGARCHMETH1) = OFF Archive compression for logarchmeth1 (LOGARCHCOMPR1) = OFF Options for logarchmeth1 (LOGARCHOPT1) = Second log archive method (LOGARCHMETH2) = OFF Archive compression for logarchmeth2 (LOGARCHCOMPR2) = OFF Options for logarchmeth2 (LOGARCHOPT2) = [db2inst3@CentOS5 ~]$ cd /db2data [db2inst3@CentOS5 db2data]$ ls db2inst3
[db2inst3@CentOS5 db2data]$ mkdir db2archlog [db2inst3@CentOS5 db2data]$ disk:/db2data/db2archlog\
db2
\
db
cfg
using
logarchmeth1
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully. SQL1363W One or more of the parameters submitted for immediate modification were not changed dynamically. For these configuration parameters, the database must be shutdown and reactivated before the configuration parameter changes become effective.
[db2inst3@CentOS5 db2data]$ db2 terminate
DB20000I The TERMINATE command completed successfully. [db2inst3@CentOS5 db2data]$ db2 \
Backup successful. The timestamp for this backup image is : 20141111144643
[db2inst3@CentOS5 db2data]$ db2 connect to testdb
Database Connection Information
Database server = DB2/LINUXX8664 10.1.4 SQL authorization ID = DB2INST3
Local database alias = TESTDB
[db2inst3@CentOS5 db2data]$ pwd /db2data
[db2inst3@CentOS5 db2data]$ db2 get db cfg |grep LOG
Catalog cache size (4KB) (CATALOGCACHE_SZ) = (MAXAPPLS*5) Log buffer size (4KB) (LOGBUFSZ) = 256 Log file size (4KB) (LOGFILSIZ) = 25000 Number of primary log files (LOGPRIMARY) = 5 Number of secondary log files (LOGSECOND) = 1 Changed path to log files (NEWLOGPATH) =
Path to log files = /db2data/db2inst3/NODE0000/SQL00001/LOGSTREAM0000/
Overflow log path (OVERFLOWLOGPATH) = Mirror log path (MIRRORLOGPATH) =
First active log file = S0000000.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
First log archive method (LOGARCHMETH1) = DISK:/db2data/db2archlog/ Archive compression for logarchmeth1 (LOGARCHCOMPR1) = OFF Options for logarchmeth1 (LOGARCHOPT1) = Second log archive method (LOGARCHMETH2) = OFF Archive compression for logarchmeth2 (LOGARCHCOMPR2) = OFF Options for logarchmeth2 (LOGARCHOPT2) = Log pages during index build (LOGINDEXBUILD) = OFF Log DDL Statements (LOG_DDL_STMTS) = NO Log Application Information (LOG_APPL_INFO) = NO [db2inst3@CentOS5 db2data]$ cd /db2data/db2inst3 [db2inst3@CentOS5 db2inst3]$ cd *
[db2inst3@CentOS5 NODE0000]$ cd SQ*1 [db2inst3@CentOS5 SQL00001]$ cd LOG* [db2inst3@CentOS5 LOGSTREAM0000]$ ls -l
total 500044
-rw------- 1 db2inst3 db2grp 102408192 Nov 11 14:46 S0000000.LOG -rw------- 1 db2inst3 db2grp 102408192 Nov 11 14:46 S0000001.LOG -rw------- 1 db2inst3 db2grp 102408192 Nov 11 14:46 S0000002.LOG -rw------- 1 db2inst3 db2grp 102408192 Nov 11 14:46 S0000003.LOG -rw------- 1 db2inst3 db2grp 102408192 Nov 11 14:46 S0000004.LOG [db2inst3@CentOS5 LOGSTREAM0000]$
[db2inst3@CentOS5 LOGSTREAM0000]$ [db2inst3@CentOS5 LOGSTREAM0000]$ pwd
/db2data/db2inst3/NODE0000/SQL00001/LOGSTREAM0000
[db2inst3@CentOS5 LOGSTREAM0000]$ [db2inst3@CentOS5 LOGSTREAM0000]$ [db2inst3@CentOS5 LOGSTREAM0000]$ cd [db2inst3@CentOS5 ~]$ db2 list db directory
System Database Directory
Number of entries in the directory = 1
Database 1 entry:
Database alias = TESTDB Database name = TESTDB Local database directory = /db2data Database release level = f.00 Comment = Directory entry type = Indirect Catalog database partition number = 0 Alternate server hostname = Alternate server port number =
[db2inst3@CentOS5 ~]$ db2 get db cfg |grep LOGAR
First log archive method (LOGARCHMETH1) = DISK:/db2data/db2archlog/ Archive compression for logarchmeth1 (LOGARCHCOMPR1) = OFF Options for logarchmeth1 (LOGARCHOPT1) = Second log archive method (LOGARCHMETH2) = OFF Archive compression for logarchmeth2 (LOGARCHCOMPR2) = OFF Options for logarchmeth2 (LOGARCHOPT2) = [db2inst3@CentOS5 ~]$ db2 terminate
DB20000I The TERMINATE command completed successfully.
[db2inst3@CentOS5 ~]$ db2 \
SQL0104N An unexpected token \ Expected tokens may include: \ SQLSTATE=42601 [db2inst3@CentOS5 ~]$ db2 \
[db2inst3@CentOS5 ~]$ db2 \
ARCHIVE LOG FOR DATABASE database-alias [USER username [USING password]] [On-DbPartitionNum-Clause]
On-DbPartitionNum-Clause:
ON {{DBPARTITIONNUM | DBPARTITIONNUMS} (db-partition-number [TO db-partition-number] , ... ) | ALL DBPARTITIONNUMS [EXCEPT {DBPARTITIONNUM | DBPARTITIONNUMS} (db-partition-number [TO db-partition-number] , ...)]}
NOTE: From the operating system prompt, prefix commands with 'db2'. Special characters MAY require an escape sequence (\\), for example: db2 \\? change database
db2 ? change database xxx comment with \\\[db2inst3@CentOS5 ~]$ db2 \DB20000I The ARCHIVE LOG command completed successfully. [db2inst3@CentOS5 ~]$ cd /db2data/db2archlog [db2inst3@CentOS5 db2archlog]$ ls db2inst3
[db2inst3@CentOS5 db2archlog]$ cd * [db2inst3@CentOS5 db2inst3]$ cd * [db2inst3@CentOS5 TESTDB]$ ls NODE0000
[db2inst3@CentOS5 TESTDB]$ cd * [db2inst3@CentOS5 NODE0000]$ ls LOGSTREAM0000
[db2inst3@CentOS5 NODE0000]$ cd * [db2inst3@CentOS5 LOGSTREAM0000]$ ll total 4
drwxr-x--- 2 db2inst3 db2grp 4096 Nov 11 14:46 C0000000 [db2inst3@CentOS5 LOGSTREAM0000]$ cd *
[db2inst3@CentOS5 C0000000]$ ll total 0
[db2inst3@CentOS5 C0000000]$ pwd
/db2data/db2archlog/db2inst3/TESTDB/NODE0000/LOGSTREAM0000/C0000000 [db2inst3@CentOS5 C0000000]$ db2 \
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 [db2inst3@CentOS5 C0000000]$ db2 connect to testdb
Database Connection Information
Database server = DB2/LINUXX8664 10.1.4 SQL authorization ID = DB2INST3 Local database alias = TESTDB
[db2inst3@CentOS5 C0000000]$
[db2inst3@CentOS5 C0000000]$ db2 \dbDB20000I The SQL command completed successfully.
[db2inst3@CentOS5 C0000000]$ db2 \
DB20000I The SQL command completed successfully. [db2inst3@CentOS5 C0000000]$ pwd
/db2data/db2archlog/db2inst3/TESTDB/NODE0000/LOGSTREAM0000/C0000000
[db2inst3@CentOS5 C0000000]$ db2 terminate
^[/DB20000I The TERMINATE command completed successfully. [db2inst3@CentOS5 C0000000]$
[db2inst3@CentOS5 C0000000]$ db2 \ DB20000I The ARCHIVE LOG command completed successfully. [db2inst3@CentOS5 C0000000]$ ll total 44
-rw-r----- 1 db2inst3 db2grp 12288 Nov 11 14:49 S0000000.LOG -rw-r----- 1 db2inst3 db2grp 12288 Nov 11 14:49 S0000001.LOG -rw-r----- 1 db2inst3 db2grp 20480 Nov 11 14:49 S0000002.LOG
正在阅读:
DB2数据库日志调整12-29
叶德磊《微观经济学》习题09-21
美食02-13
都城光学仪器厂组织结构设计04-21
家庭生活作文300字02-06
《生物化学》习题册11-16
“用百分数解决问题”教学设计及反思12-01
iPad,Air(iPad5)屏幕尺寸是多少?iPad,Air(iPad5)分辨率是多...02-10
名家对联录05-03
忌讳_崇拜与谐音05-25
- exercise2
- 铅锌矿详查地质设计 - 图文
- 厨余垃圾、餐厨垃圾堆肥系统设计方案
- 陈明珠开题报告
- 化工原理精选例题
- 政府形象宣传册营销案例
- 小学一至三年级语文阅读专项练习题
- 2014.民诉 期末考试 复习题
- 巅峰智业 - 做好顶层设计对建设城市的重要意义
- (三起)冀教版三年级英语上册Unit4 Lesson24练习题及答案
- 2017年实心轮胎现状及发展趋势分析(目录)
- 基于GIS的农用地定级技术研究定稿
- 2017-2022年中国医疗保健市场调查与市场前景预测报告(目录) - 图文
- 作业
- OFDM技术仿真(MATLAB代码) - 图文
- Android工程师笔试题及答案
- 生命密码联合密码
- 空间地上权若干法律问题探究
- 江苏学业水平测试《机械基础》模拟试题
- 选课走班实施方案
- 调整
- 数据库
- 日志
- DB2