db2关闭下一句sql的日志_DB2_数据库日志管理
1
、
load
方法裝入數(shù)據(jù):
export?to?tempfile?of?del?select?*?from?tablename?where?not
清理條件;
load?from?tempfile?of?del?modified?by?delprioritychar?replace?into?tablenamenonrecoverable
;
說明:
在不相關(guān)的數(shù)據(jù)表
export
數(shù)據(jù)時,可以采取并發(fā)的形式,以提高效率;
tablename
指待清理
table
的名稱;
modified?by?delprioritychar
防止數(shù)據(jù)庫記錄中存在換行符
,
導(dǎo)致數(shù)據(jù)無法裝入的情況
;
replace
into
對現(xiàn)數(shù)據(jù)庫中的內(nèi)容進行替換,即將現(xiàn)行的數(shù)據(jù)記錄清理,替換為數(shù)據(jù)文件內(nèi)
容;
nonrecoverable
無日志方式裝入;
2
、查找當前的應(yīng)用:
db2?list?application?grep?btpdbs;
3
、刪除當前正在使用的
application:
db2?"force?application?(id1,id2,id3)"
id1,id2,id3
是
list
顯示的應(yīng)用號;
4
、查看當前應(yīng)用號的執(zhí)行狀態(tài):
db2?get?snapshot?for?application?agentid?299?grep?row
5
、查看數(shù)據(jù)庫參數(shù):
db2?get?dbcfg?for?//
當前數(shù)據(jù)庫可以省略
6
、修改數(shù)據(jù)庫的
log
數(shù)據(jù):
db2?update?dbcfg?using?<
參數(shù)名
><
參數(shù)值
>
7
、
db2stop?force
的用法:
在進行
bind
的時候出現(xiàn)如下錯誤:
sql0082can?error?has?occurred?which?has?terminated?processing.
sql0092nno?package?was?created?because?of?previous?errors.
sql0091nbinding?was?ended?with?"3"?errors?and?"0"?warnings.
主要是表文件被加鎖,不能繼續(xù)使用;
在進行
stop
的時候報錯:
db2stop
8/03/2005?21:46:530?0?sql1025nthe?database?manager?was?not?stopped?because?databases?are
still?active.
sql1025nthe?database?manager?was?not?stopped?because?databases?are?still?active.
需要使用如下命令可以解決這個問題:
db2stop?force
08/03/2005?21:47:49?0?0?sql1064ndb2stop?processing?was?successful.
sql1064ndb2stop?processing?was?successful.
然后啟動數(shù)據(jù)庫
db2start,
連接數(shù)據(jù)庫
db2s
后,重新進行
bind
即可。
8
、緩沖池參數(shù)修改:
db2?alter?bufferpoolibmdefaultbp?size?10240
查看本表的數(shù)據(jù)內(nèi)容如下:
db2?"select?*?from?syscat.bufferpools";
9
、
db2
日志處理:
db2
日志是以文件的形式存放在文件系統(tǒng)中,分為兩種模式:循環(huán)日志和歸檔日志。當創(chuàng)建
新數(shù)據(jù)庫時,
日志的缺省模式是循環(huán)日志。
在這種模式下,
只能實現(xiàn)數(shù)據(jù)庫的脫機備份和恢
復(fù)。如果要實現(xiàn)聯(lián)機備份和恢復(fù),必須設(shè)為歸檔日志模式。
目前在綜合業(yè)務(wù)系統(tǒng)中,設(shè)置的均是歸檔日志模式;其它系統(tǒng)(如事后監(jiān)督、經(jīng)營決策、中
間業(yè)務(wù)等)
一般都設(shè)置為循環(huán)日志模式。
至于采用何種模式,
可以通過修改數(shù)據(jù)庫配置參數(shù)
總結(jié)
以上是生活随笔為你收集整理的db2关闭下一句sql的日志_DB2_数据库日志管理的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: laravel 5.8 guzzle g
- 下一篇: matlab绘图z=sin(x_「mat