国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
Db2 日常實(shí)用操作積累-部分
DB2數(shù)據(jù)庫(kù)HNEitug
1、Load 方法裝入數(shù)據(jù):HNEitug
  export to tempfile of del select * from TABLENAME where not 清理?xiàng)l件;HNEitug
  load from tempfile of del modified by delprioritychar replace into TABLENAME nonrecoverable;HNEitug
  說(shuō)明: HNEitug
  在不相關(guān)的數(shù)據(jù)表export數(shù)據(jù)時(shí),可以采取并發(fā)的形式,以提高效率;HNEitug
  TABLENAME指待清理table的名稱(chēng);HNEitug
  modified by delprioritychar防止數(shù)據(jù)庫(kù)記錄中存在換行符,導(dǎo)致數(shù)據(jù)無(wú)法裝入的情況;HNEitug
  replace into對(duì)現(xiàn)數(shù)據(jù)庫(kù)中的內(nèi)容進(jìn)行替換,即將現(xiàn)行的數(shù)據(jù)記錄清理,替換為數(shù)據(jù)文件內(nèi)容;HNEitug
  nonrecoverable無(wú)日志方式裝入;HNEitug
HNEitug
2、查找當(dāng)前的應(yīng)用:HNEitug
  db2 list application |grep BTPDBS;HNEitug
HNEitug
3、刪除當(dāng)前正在使用的application:HNEitug
  db2 "force application (Id1,Id2,Id3)"HNEitug
   Id1,Id2,Id3 是List顯示的應(yīng)用號(hào);HNEitug
HNEitug
4、查看當(dāng)前應(yīng)用號(hào)的執(zhí)行狀態(tài):HNEitug
  db2 get snapshot for application agentid 299 |grep RowHNEitug
HNEitug
5、查看數(shù)據(jù)庫(kù)參數(shù):HNEitug
  db2 get db cfg for <dbsname>  //當(dāng)前數(shù)據(jù)庫(kù)可以省略HNEitug
6、修改數(shù)據(jù)庫(kù)的Log數(shù)據(jù):HNEitug
  db2 update db cfg using <參數(shù)名> <參數(shù)值>HNEitug
HNEitug
7、Db2Stop Force的用法:HNEitug
  在進(jìn)行Bind的時(shí)候出現(xiàn)如下錯(cuò)誤:HNEitug
       SQL0082C  An error has occurred which has terminated processing.HNEitug
       SQL0092N  No package was created because of previous errors.HNEitug
       SQL0091N  Binding was ended with "3" errors and "0" warnings.HNEitug
   主要是表文件被加鎖,不能繼續(xù)使用;HNEitug
在進(jìn)行stop的時(shí)候報(bào)錯(cuò):db2stopHNEitug
   8/03/2005 21:46:53  0 0   SQL1025N  The database manager was not stopped because databases are still active.HNEitug
   SQL1025N  The database manager was not stopped because databases are still active.HNEitug
需要使用如下命令可以解決這個(gè)問(wèn)題: db2stop forceHNEitug
   08/03/2005 21:47:49     0   0   SQL1064N  DB2STOP processing was successful.HNEitug
   SQL1064N  DB2STOP processing was successful.HNEitug
然后啟動(dòng)數(shù)據(jù)庫(kù)db2start,連接數(shù)據(jù)庫(kù)db2s后,重新進(jìn)行bind即可。HNEitug
HNEitug
8、緩沖池參數(shù)修改:HNEitug
   db2 alter bufferpool ibmdefaultbp size 10240HNEitug
  查看本表的數(shù)據(jù)內(nèi)容如下:HNEitug
   db2 "select * from syscat.bufferpools";  HNEitug
HNEitug
9、DB2 日志處理:HNEitug
    DB2日志是以文件的形式存放在文件系統(tǒng)中,分為兩種模式:循環(huán)日志和歸檔日志。當(dāng)創(chuàng)建新數(shù)據(jù)庫(kù)時(shí),日志的缺省模式是循環(huán)日志。在這種模式下,只能實(shí)現(xiàn)數(shù)據(jù)庫(kù)的脫機(jī)備份和恢復(fù)。如果要實(shí)現(xiàn)聯(lián)機(jī)備份和恢復(fù),必須設(shè)為歸檔日志模式。 目前在綜合業(yè)務(wù)系統(tǒng)中,設(shè)置的均是歸檔日志模式;其它系統(tǒng)(如事后監(jiān)督、經(jīng)營(yíng)決策、中間業(yè)務(wù)等)一般都設(shè)置為循環(huán)日志模式。至于采用何種模式,可以通過(guò)修改數(shù)據(jù)庫(kù)配置參數(shù)(LOGRETAIN)來(lái)實(shí)現(xiàn): 歸檔日志模式:db2 update db cfg for <dbname> using logretain on 注:改為on后,查看數(shù)據(jù)庫(kù)配置參數(shù)logretain的值時(shí),實(shí)際顯示的是recovery。改變此參數(shù)后,再次連接數(shù)據(jù)庫(kù)會(huì)顯示數(shù)據(jù)庫(kù)處于備份暫掛(BACKUP PENDING)狀態(tài)。這時(shí),需要做一次對(duì)數(shù)據(jù)庫(kù)的脫機(jī)備份(db2 backup db <dbname>),才能使數(shù)據(jù)庫(kù)狀態(tài)變?yōu)檎!?循環(huán)日志模式:db2 update db cfg for <dbname> using logretain offHNEitug
HNEitug
10、Db2 日志處理:HNEitug
    必須按照以下正確的步驟進(jìn)行操作: 􀁺 要求必須使用DB2命令PRUNE進(jìn)行清理,不建議使用rm命令刪除。 􀁺 刪除前應(yīng)保證應(yīng)用已停止(即聯(lián)機(jī)已下來(lái))。 􀁺 查看當(dāng)前使用的日志文件目錄及第一活動(dòng)日志文件 􀂾 用 “db2 get db cfg for <dbname>”命令查看日志文件目錄(Path to log files)參數(shù),確定數(shù)據(jù)庫(kù)當(dāng)前使用的日志文件目錄。 例如:Path to log files = /db2log/,說(shuō)明DB2日志存放目錄是/db2log 􀂾 用 “db2 get db cfg for <dbname>”命令查看第一活動(dòng)日志文件(First active log file)參數(shù),該參數(shù)對(duì)應(yīng)的日志文件之前的日志文件均為歸檔日志文件,如果確認(rèn)沒(méi)有用,可以刪除。 例如:First active log file = S0015913.LOG,說(shuō)明當(dāng)前第一活動(dòng)日志文件是S0015913.LOG。 􀁺 備份好要?jiǎng)h除的歸檔日志 􀁺 刪除歸檔日志 以應(yīng)用用戶(hù)(如BTP)登錄,執(zhí)行:HNEitug
$ db2 connect to <dbname>HNEitug
$ db2 prune logfile prior to S???????.LOGHNEitug
注:S???????.LOG為查看到的第一活動(dòng)日志文件。此命令可以將當(dāng)前第一活動(dòng)日志文件之前的歸檔日志文件全部刪除。HNEitug
HNEitug
11、如何清理db2diag.log文件 HNEitug
    db2diag.log,是用來(lái)記錄DB2數(shù)據(jù)庫(kù)運(yùn)行中的信息的文件。可以通過(guò)此文件,查看記錄的有關(guān)DB2數(shù)據(jù)庫(kù)詳細(xì)的錯(cuò)誤信息。此文件也是不斷增大的,需要定期進(jìn)行清理。 可以通過(guò)查看實(shí)例的配置參數(shù)DIAGPATH,來(lái)確定db2diag.log文件是放在哪個(gè)目錄下:db2 get dbm cfg 如果Diagnostic data directory path(DIAGPATH) = /home/db2inst1/sqllib/db2dump,則此文件是放在/home/db2inst1/sqllib/db2dump目錄下。當(dāng)文件系統(tǒng)/home的使用率達(dá)到80%-90%左右時(shí),應(yīng)及時(shí)刪除db2diag.log文件。 請(qǐng)按以下正確步驟操作: 􀁺 確認(rèn)應(yīng)用(如BTP)、DB2已經(jīng)停止。 􀁺 將原db2diag.log文件備份到其它文件系統(tǒng)下。 􀁺 刪除db2diag.log文件。刪除后,DB2會(huì)自動(dòng)創(chuàng)建一個(gè)新的文件。HNEitug
HNEitug
12、Load 操作HNEitug
   在進(jìn)行l(wèi)oad的時(shí)候HNEitug
   db2 "load from acmmst.txt of del modified by coldel| replace into acmmst nonrecoverable ”HNEitug
   由于數(shù)據(jù)不規(guī)范出現(xiàn)錯(cuò)誤,強(qiáng)行中斷以后,進(jìn)行操作的時(shí)候出現(xiàn)如下錯(cuò)誤:HNEitug
     SQL0668N  Operation not allowed for reason code "3" on table "BTP.ACMMST".HNEitug
     SQLSTATE=57016HNEitug
   此時(shí),進(jìn)行反方向操作即可:HNEitug
   db2 "load from /dev/null of del terminate into acmmst nonrecoverable"。HNEitug
HNEitug
   如果沒(méi)有使用參數(shù)nonrecoverable,則會(huì)出現(xiàn)數(shù)據(jù)庫(kù)狀態(tài)不正確的情況,使用:HNEitug
     db2 list tablesapces show detail 查看狀態(tài),如果不是正常狀態(tài),則脫機(jī)狀態(tài)進(jìn)行備份即可。HNEitug
HNEitug
兩個(gè)表文件之間UPDATE的方法:HNEitug
   db2 "update cdmcrd set offset = (select cdmlsl.offset from cdmlsl where cdmlsl.crdno=cdmcrd.crdno) where cdmcrd.crdno in (select cdmlsl.crdno from cdmlsl)HNEitug
HNEitug
HNEitug
13、多字段條件查詢(xún)和修改:HNEitug
    表A中的字段有actno, cnlno,bal,pwd;表B中的字段為Actno,Cnlno,TxnAmt;目的是將A表中的bal修改為B表中的TxnAmt,命令:HNEitug
  db2 "update A set bal=(select txnamt from B where actno=A.actno and cnlno=A.Cnlno) where A.actno||A.cnlno in (select Actno||cnlno from B );HNEitug
HNEitug
14、多條件匹配查詢(xún)HNEitug
   查詢(xún)某個(gè)表中條件是B?AAA的記錄:HNEitug
  db2 "select * from A where actno like 'B_AAA%'".HNEitug
    查詢(xún)數(shù)據(jù)中存在某些字符的記錄:HNEitug
   db2 "select * from A where actno like '%-AAA%".HNEitug
HNEitug
15/數(shù)據(jù)庫(kù)恢復(fù)的處理HNEitug
  進(jìn)行數(shù)據(jù)庫(kù)恢復(fù)的時(shí)候使用以下的命令:HNEitug
     restore db db1 to /tstdb2/catalog  into db newlogpath /tstdb2/db2log buffer 2048HNEitug
     replace existing redirect parallelism  16;HNEitug
     set tablespace containers for 1  using  (path '/tstdb2/db2tmp');HNEitug
     set tablespace containers for 2  usingHNEitug
            (device '/dev/rtstcontlv00' 2621440, device '/dev/rtstcontlv01' 2621440,HNEitug
             device '/dev/rtstcontlv02' 2621440, device '/dev/rtstcontlv03' 2621440 ) ;HNEitug
     restore db db1 continue;HNEitug
HNEitug
恢復(fù)完成以后執(zhí)行命令db2s時(shí)報(bào)如下的錯(cuò)誤:HNEitug
P570:>db2sHNEitug
  SQL1117N  A connection to or activation of database "DB" cannot be madeHNEitug
  because of ROLL-FORWARD PENDING.  SQLSTATE=57019HNEitug
  DB21034E  The command was processed as an SQL statement because it was not aHNEitug
  valid Command Line Processor command.  During SQL processing it returned:HNEitug
  SQL1024N  A database connection does not exist.  SQLSTATE=08003HNEitug
解決辦法如下:HNEitug
P570:>db2 rollforward db db to end of logs and completeHNEitug
HNEitug
                                Rollforward StatusHNEitug
HNEitug
Input database alias                   = dbHNEitug
Number of nodes have returned status   = 1HNEitug
HNEitug
Node number                            = 0HNEitug
Rollforward status                     = not pendingHNEitug
Next log file to be read               =HNEitug
Log files processed                    =  -HNEitug
Last committed transaction             = 2005-11-20-10.59.23.000000HNEitug
HNEitug
DB20000I  The ROLLFORWARD command completed successfully.
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶(hù)發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
db2日志說(shuō)明
log4j日志存儲(chǔ)到數(shù)據(jù)庫(kù)
如何清除SQL server日志
MS Sql Server恢復(fù)技術(shù)
Oracle 重要文件系統(tǒng)解釋 - 爪哇一角 - BlogJava
mysql日志操作
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服