• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Prayer

            在一般中尋求卓越
            posts - 1256, comments - 190, trackbacks - 0, articles - 0
              C++博客 :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理
            于多分區(qū)數(shù)據(jù)庫(kù),脫機(jī)備份數(shù)據(jù)庫(kù)時(shí)需要注意先備份 CATALOG 節(jié)點(diǎn),再備份其它節(jié)點(diǎn),否則下面命令也會(huì)遇到 SQL1035N 錯(cuò)誤(假設(shè)數(shù)據(jù)庫(kù)名為 SAMPLE)。

            db2_all "; db2 backup database sample to ..."

            ......

            SQL1035N The database is currently in use. SQLSTATE=57019

            ......


            在單分區(qū)數(shù)據(jù)庫(kù)下,如果脫機(jī)備份時(shí)遇到 SQL1035N 錯(cuò)誤,說(shuō)明數(shù)據(jù)庫(kù)因?yàn)樘幱诨顒?dòng)( ACTIVATE )狀態(tài)而無(wú)法備份。可以使用 “db2 list active databases” 查詢一下實(shí)例下活動(dòng)的數(shù)據(jù)庫(kù),也可以用 “db2pd -db 數(shù)據(jù)庫(kù)名” 檢查數(shù)據(jù)庫(kù)是否處于活動(dòng)狀態(tài)。

            但多于多分區(qū)數(shù)據(jù)庫(kù),脫機(jī)備份數(shù)據(jù)庫(kù)時(shí)需要注意先備份 CATALOG 節(jié)點(diǎn),再備份其它節(jié)點(diǎn),否則下面命令也會(huì)遇到 SQL1035N 錯(cuò)誤(假設(shè)數(shù)據(jù)庫(kù)名為 SAMPLE)。

            db2_all "; db2 backup database sample to ..."

            ......

            SQL1035N The database is currently in use. SQLSTATE=57019

            ......

            假設(shè) 0 號(hào)節(jié)點(diǎn)就是 CATALOG 節(jié)點(diǎn),下面的命令可以成功地備份數(shù)據(jù)庫(kù):

            db2_all "<<+0<; db2 backup database sample to ..."
            db2_all "<<-0<; db2 backup database sample to ...."

            <<+0< 代表只包括 0 號(hào)節(jié)點(diǎn),<<-0< 代表不包括 0 號(hào)節(jié)點(diǎn)。

            下面引用兩個(gè)技術(shù)文檔的原文:

            1) http://www-1.ibm.com/support/docview.wss?rs=71&context=SSEPGG&q1=problem+determination&q2=backup+%3c%3c%2b0%3c&q3=SQL1035N&uid=swg21224032&loc=en_US&cs=utf-8&lang=en

            SQL1035N during execution of an offline backup

            Problem
            This document provides troubleshooting methods for when you attempt to take an offline backup of a database and encounter the following error: SQL1035N The database is currently in use. SQLSTATE=57019

            Cause
            One cause of this error is that you are attempting to take an offline backup of an activated database. This fails and returns SQL1035N.

            For example, if you're using DB2? Universal Database? (DB2 UDB) Version 8.2, taking a backup of the database fails as follows:

            db2 backup db sample to /home/db2inst1
            SQL1035N The database is currently in use. SQLSTATE=57019

            The following message is also logged in the db2diag.log file:

            2005-11-18-11.29.17.849377-360 I9627A336 LEVEL: Error
            PID : 34980 TID : 1 PROC : db2bp
            INSTANCE: db2inst1 NODE : 000
            FUNCTION: DB2 UDB, database utilities, sqlubConnectDatabase, probe:1259
            DATA #1 : Hexdump, 4 bytes
            0x00000001102842E0 : FFFF FBF5
            ....
            In the above db2diag.log message, the value "FFFF FBF5" translates to -1035 (SQL1035).

            Solution
            You will not be able to determine whether the database is activated via the db2 list applications command, since it only tells you whether or not any applications are active on the database. To determine whether the database has been activated, you can use the following db2pd command:
            db2pd -db sample -app
            ...
            Database Partition 0 -- Database SAMPLE -- Active -- Up 0 days 00:19:42

            Applications:
            Address AppHandl [nod-index] NumAgents CoorPid Status Appid
            ...

            The fact that the database has been activated is indicated by the phrase "-- Active --".

            Alternatively, you can issue the command db2 list active databases.

            Once the database has been deactivated (for example, via the deactivate database command), the offline backup will succeed.

            2) From "DB2 Problem Determination Tutorial Series"

            Version recovery - SQL1035 (database in use) when taking offline backups of all partitions in parallel The version recovery method requires loading a backup copy of the database. The database will be restored to exactly the same state that it was in when it was backed up. Using the version recovery method, you must schedule and perform full backups of the database on a regular basis.

            You may have the following experience:
            All database partitions are inactive at the moment. However, offline backup of all partitions in parallel fails with SQL1035N (The database is currently in use.) on most of the partitions.
            You try to take offline backup of all partitions in parallel as follows:
            % db2 force applications all
            % db2_all ";db2 backup database sample to /database/backup"
            af01n002: SQL1035N The database is currently in use. SQLSTATE=57019
            af01n002: db2 backup database ... completed rc=4
            af01n003: SQL1035N The database is currently in use. SQLSTATE=57019
            af01n003: db2 backup database ... completed rc=4
            af01n003: SQL1035N The database is currently in use. SQLSTATE=57019
            af01n003: db2 backup database ... completed rc=4
            af01n002:
            af01n002: Backup successful. The timestamp for this backup image is :
            20021029190857
            af01n002:
            af01n002: db2 backup database ... completed ok
            You can confirm the error in the db2diag.log file:
            2002-10-29-19.08.58.628733 Instance:db2inst1 Node:001
            PID:41494(db2agent (SAMPLE) 1) Appid:*N1.db2inst1.021030000858
            relation_data_serv sqlrrain Probe:70 Database:SAMPLE
            DIA9999E An internal error occurred. Report the following error code :
            "0xFFFF876D".
            Data Title:SQLCA PID:41494 Node:001
            sqlcaid : SQLCA sqlcabc: 136 sqlcode: -1035 sqlerrml: 0
            sqlerrmc:
            sqlerrp : SQLESRSU
            sqlerrd : (1) 0x00000000 (2) 0x00000000 (3) 0x00000000
            (4) 0x00000000 (5) 0x00000000 (6) 0x00000000
            sqlwarn : (1) (2) (3) (4) (5) (6)
            (7) (8) (9) (10) (11)
            sqlstate:
            ......

            This occurs because the database backup utility requires exclusive access to the catalog partition.
            To properly backup the database in parallel, you may use the following commands:
            % db2_all "<<+0<; db2 backup database sample to /database/backup"
            % db2_all "<<-0<; db2 backup database sample to /database/backup"
            This assumes that CATALOG PARTITION is partition 0. It is also a good illustration of why the CATALOG PARTITION should contain catalog data ONLY.

            久久se精品一区二区影院| 久久精品麻豆日日躁夜夜躁| 精品久久久久成人码免费动漫| 丰满少妇人妻久久久久久| 久久精品国产亚洲AV久| 亚洲精品成人网久久久久久| 国产一区二区精品久久岳| 99久久精品费精品国产一区二区| 日本强好片久久久久久AAA| 无码人妻久久一区二区三区| 亚洲AV成人无码久久精品老人| 亚洲精品无码久久久影院相关影片 | 日韩精品久久久久久久电影蜜臀| 亚洲精品国产综合久久一线| 亚洲一区精品伊人久久伊人| 久久午夜无码鲁丝片秋霞| 久久99精品国产麻豆宅宅| 久久婷婷激情综合色综合俺也去| 欧美va久久久噜噜噜久久| 国产精品久久久久久久久| 国产精品久久久久久久久久免费| 国内精品久久久久影院网站 | 久久香蕉超碰97国产精品| 久久精品国产91久久综合麻豆自制| 欧美伊香蕉久久综合类网站| 久久综合伊人77777| 精品久久久久久中文字幕大豆网| 久久精品a亚洲国产v高清不卡| 国产成人久久久精品二区三区 | 亚洲精品视频久久久| 久久人人爽人人爽人人AV| 亚洲国产天堂久久综合网站| 亚洲国产精品成人AV无码久久综合影院 | 色综合久久中文色婷婷| 久久综合伊人77777麻豆| 粉嫩小泬无遮挡久久久久久| 久久精品这里只有精99品| 久久综合给合久久狠狠狠97色 | 一本久久综合亚洲鲁鲁五月天| 欧美午夜精品久久久久免费视| 精品乱码久久久久久夜夜嗨|