日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

db2关闭下一句sql的日志_DB2_数据库日志管理

發(fā)布時(shí)間:2025/3/20 45 豆豆
生活随笔 收集整理的這篇文章主要介紹了 db2关闭下一句sql的日志_DB2_数据库日志管理 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1

load

方法裝入數(shù)據(jù):

export?to?tempfile?of?del?select?*?from?tablename?where?not

清理?xiàng)l件;

load?from?tempfile?of?del?modified?by?delprioritychar?replace?into?tablenamenonrecoverable

說明:

在不相關(guān)的數(shù)據(jù)表

export

數(shù)據(jù)時(shí),可以采取并發(fā)的形式,以提高效率;

tablename

指待清理

table

的名稱;

modified?by?delprioritychar

防止數(shù)據(jù)庫記錄中存在換行符

,

導(dǎo)致數(shù)據(jù)無法裝入的情況

;

replace

into

對現(xiàn)數(shù)據(jù)庫中的內(nèi)容進(jìn)行替換,即將現(xiàn)行的數(shù)據(jù)記錄清理,替換為數(shù)據(jù)文件內(nèi)

容;

nonrecoverable

無日志方式裝入;

2

、查找當(dāng)前的應(yīng)用:

db2?list?application?grep?btpdbs;

3

、刪除當(dāng)前正在使用的

application:

db2?"force?application?(id1,id2,id3)"

id1,id2,id3

list

顯示的應(yīng)用號;

4

、查看當(dāng)前應(yīng)用號的執(zhí)行狀態(tài):

db2?get?snapshot?for?application?agentid?299?grep?row

5

、查看數(shù)據(jù)庫參數(shù):

db2?get?dbcfg?for?//

當(dāng)前數(shù)據(jù)庫可以省略

6

、修改數(shù)據(jù)庫的

log

數(shù)據(jù):

db2?update?dbcfg?using?<

參數(shù)名

><

參數(shù)值

>

7

db2stop?force

的用法:

在進(jìn)行

bind

的時(shí)候出現(xiàn)如下錯(cuò)誤:

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ù)使用;

在進(jìn)行

stop

的時(shí)候報(bào)錯(cuò):

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.

需要使用如下命令可以解決這個(gè)問題:

db2stop?force

08/03/2005?21:47:49?0?0?sql1064ndb2stop?processing?was?successful.

sql1064ndb2stop?processing?was?successful.

然后啟動數(shù)據(jù)庫

db2start,

連接數(shù)據(jù)庫

db2s

后,重新進(jìn)行

bind

即可。

8

、緩沖池參數(shù)修改:

db2?alter?bufferpoolibmdefaultbp?size?10240

查看本表的數(shù)據(jù)內(nèi)容如下:

db2?"select?*?from?syscat.bufferpools";

9

db2

日志處理:

db2

日志是以文件的形式存放在文件系統(tǒng)中,分為兩種模式:循環(huán)日志和歸檔日志。當(dāng)創(chuàng)建

新數(shù)據(jù)庫時(shí),

日志的缺省模式是循環(huán)日志。

在這種模式下,

只能實(shí)現(xiàn)數(shù)據(jù)庫的脫機(jī)備份和恢

復(fù)。如果要實(shí)現(xiàn)聯(lián)機(jī)備份和恢復(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)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。