os:suse11
db:db2v9.7
求助各位,在同一台机器上将实例commusr下的数据库comm备份并重定向恢复到实例db2inst1,现在就卡在第一步
db2inst1@DSRDBA1:~> db2 "restore db comm taken at 20160928105044 into test logtarget /home/db2inst1/comm redirect"
SQL0970N The system attempted to write to a read-only file. SQLSTATE=55009
不明白为什么还没执行定义表空间就会报这个错,难道重定向会先检索备份里的表空间路径可不可用?
日志截取
2016-09-28-16.22.38.975783+480 I284128E665 LEVEL: Warning
PID : 5625 TID : 140002363664160PROC : db2bp
INSTANCE: db2inst1 NODE : 000
FUNCTION: DB2 UDB, Connection Manager, sqleUCgetDirInfo, probe:1012
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -1013 sqlerrml: 4
sqlerrmc: TEST
sqlerrp : SQLEUCCM
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:
2016-09-28-16.22.38.988631+480 I284794E489 LEVEL: Event
PID : 16674 TID : 139873268786944PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB :
APPHDL : 0-102 APPID: *LOCAL.db2inst1.160928071730
AUTHID : DB2INST1
EDUID : 1768 EDUNAME: db2agent (instance) 0
FUNCTION: DB2 UDB, config/install, sqlfLogUpdateCfgParam, probe:20
CHANGE : CFG DB TEST: "Num_ioservers" From: "3"
2016-09-28-16.22.38.989534+480 I285284E482 LEVEL: Event
PID : 16674 TID : 139873268786944PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB :
APPHDL : 0-102 APPID: *LOCAL.db2inst1.160928071730
AUTHID : DB2INST1
EDUID : 1768 EDUNAME: db2agent (instance) 0
FUNCTION: DB2 UDB, config/install, sqlfLogUpdateCfgParam, probe:20
CHANGE : CFG DB TEST: "Util_heap_sz" From: "5000" To: "131072"
2016-09-28-16.22.38.996224+480 I285767E503 LEVEL: Event
PID : 16674 TID : 139871293269760PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : TEST
APPHDL : 0-129 APPID: *LOCAL.db2inst1.160928082239
AUTHID : DB2INST1
EDUID : 5272 EDUNAME: db2agent (TEST) 0
FUNCTION: DB2 UDB, config/install, sqlfLogUpdateCfgParam, probe:20
CHANGE : CFG DB TEST : "Database_memory" From: "20"
2016-09-28-16.22.39.185701+480 E286271E468 LEVEL: Event
PID : 16674 TID : 139871293269760PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : TEST
APPHDL : 0-129 APPID: *LOCAL.db2inst1.160928082239
AUTHID : DB2INST1
EDUID : 5272 EDUNAME: db2agent (TEST) 0
FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::FirstConnect, probe:1000
START : DATABASE: TEST : ACTIVATED: NO
2016-09-28-16.22.39.187644+480 E286740E480 LEVEL: Info
PID : 16674 TID : 139871293269760PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : TEST
APPHDL : 0-129 APPID: *LOCAL.db2inst1.160928082239
AUTHID : DB2INST1
EDUID : 5272 EDUNAME: db2agent (TEST) 0
FUNCTION: DB2 UDB, database utilities, sqluxGetDegreeParallelism, probe:774
DATA #1 :
Autonomic BAR - using parallelism = 2.
2016-09-28-16.22.39.190279+480 E287221E491 LEVEL: Info
PID : 16674 TID : 139871293269760PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : TEST
APPHDL : 0-129 APPID: *LOCAL.db2inst1.160928082239
AUTHID : DB2INST1
EDUID : 5272 EDUNAME: db2agent (TEST) 0
FUNCTION: DB2 UDB, database utilities, sqludPrintStartingMsg, probe:1338
DATA #1 :
Starting a full database restore.
Agent EDU ID: 5272
2016-09-28-16.22.39.192179+480 E287713E519 LEVEL: Info
PID : 16674 TID : 139871293269760PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : TEST
APPHDL : 0-129 APPID: *LOCAL.db2inst1.160928082239
AUTHID : DB2INST1
EDUID : 5272 EDUNAME: db2agent (TEST) 0
FUNCTION: DB2 UDB, database utilities, sqluxGetAvailableHeapPages, probe:888
DATA #1 :
Autonomic BAR - heap consumption.
Targetting (90%) - 117921 of 131024 pages.
2016-09-28-16.22.39.192279+480 E288233E507 LEVEL: Info
PID : 16674 TID : 139871293269760PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : TEST
APPHDL : 0-129 APPID: *LOCAL.db2inst1.160928082239
AUTHID : DB2INST1
EDUID : 5272 EDUNAME: db2agent (TEST) 0
FUNCTION: DB2 UDB, database utilities, sqludTuneBuffers, probe:1139
DATA #1 :
Autonomic restore - tuning enabled.
Using buffer size = 4097, number = 2.
2016-09-28-16.22.39.234696+480 I288741E450 LEVEL: Warning
PID : 16674 TID : 139871100331776PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 5562 EDUNAME: db2bm.5272.0 (TEST) 0
FUNCTION: DB2 UDB, database utilities, sqludProcessHistoryFile, probe:2945
DATA #1 : String, 107 bytes
An empty database history has been detected.
The database history will be overwritten by the backup image.
2016-09-28-16.22.39.250012+480 E289192E800 LEVEL: Error (OS)
PID : 16674 TID : 139871100331776PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 5562 EDUNAME: db2bm.5272.0 (TEST) 0
FUNCTION: DB2 UDB, oper system services, sqlomkdirp, probe:10
MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
DIA8701C Access denied for resource "", operating system return code
was "".
CALLED : OS, -, mkdir OSERR: EACCES (13)
DATA #1 : File name, 24 bytes
/db2data/commdb/db2inst1
DATA #2 : signed integer, 4 bytes
457
DATA #3 : signed integer, 4 bytes
457
DATA #4 : String, 105 bytes
Search for ossError*Analysis probe point after this log entry for further
self-diagnosis of this problem.
2016-09-28-16.22.39.250286+480 I289993E1976 LEVEL: Error (OS)
PID : 16674 TID : 139871100331776PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 5562 EDUNAME: db2bm.5272.0 (TEST) 0
FUNCTION: DB2 Common, OSSe, ossErrorIOAnalysis, probe:100
CALLED : OS, -, mkdir OSERR: EACCES (13)
DATA #1 : String, 122 bytes
A total of 2 analysis will be performed :
- User info
- Path access permission
Target file = /db2data/commdb/db2inst1
DATA #2 : String, 186 bytes
Real user ID of current process = 1002
Effective user ID of current process = 1002
Real group ID of current process = 501
Effective group ID of current process = 501
DATA #3 : String, 41 bytes
current sbrk(0) value: 0x00000000006c0000
DATA #4 : String, 254 bytes
Information of each subdirectory leading up to the first inaccessible one is shown in the format below :
0:0:755 (db2data)
506:501:755 (commdb)
Cannot descend any further than the above subdirectory.
CALLSTCK: (Static functions may not be resolved correctly, as they are resolved to the nearest symbol)
[0] 0x00007F36D9B101D8 pdOSSeLoggingCallback + 0x20C
[1] 0x00007F36D88D51F6 /home/db2inst1/sqllib/lib64/libdb2osse.so.1 + 0x1D91F6
[2] 0x00007F36D88D50ED ossLogSysRC + 0xBF
[3] 0x00007F36D88CA210 /home/db2inst1/sqllib/lib64/libdb2osse.so.1 + 0x1CE210
[4] 0x00007F36D88C74ED ossErrorAnalysis + 0x2D
[5] 0x00007F36DB69965F sqloSystemErrorHandler + 0x6D7
[6] 0x00007F36DA0505E7 sqlomkdirp + 0x237
[7] 0x00007F36D9B7797D _Z23sqlbCreateAndLockParentPKciP16SQLO_NLCK_HANDLEtP12SQLB_GLOBALS + 0x13B
[8] 0x00007F36DA87AF44 _Z26sqlbDMSAddContainerRequestP12SQLB_POOL_CBP16SQLB_POOLCONT_CBP12SQLB_GLOBALSP14SQLB_pfParIoCbbm + 0x1C5A
[9] 0x00007F36DA88D9B9 _Z29sqlbDoDMSAddContainerRequestsP12SQLB_POOL_CBP16SQLB_POOLCONT_CBjP26SQLB_AS_CONT_AND_PATH_INFOP12SQLB_GLOBALS + 0x2E1
2016-09-28-16.22.39.256161+480 I291970E546 LEVEL: Error
PID : 16674 TID : 139871100331776PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 5562 EDUNAME: db2bm.5272.0 (TEST) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbCreateAndLockParent, probe:920
MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
DIA8701C Access denied for resource "", operating system return code
was "".
DATA #1 :
Failed at directory /db2data/commdb/db2inst1.
2016-09-28-16.22.39.256285+480 I292517E621 LEVEL: Error
PID : 16674 TID : 139871100331776PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 5562 EDUNAME: db2bm.5272.0 (TEST) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbDMSAddContainerRequest, probe:805
MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
DIA8701C Access denied for resource "", operating system return code
was "".
DATA #1 :
Error acquiring container 0 (/db2data/commdb/db2inst1/NODE0000/TEST/T0000000/C0000000.CAT) for tbsp 0. Rc = 840F0001
2016-09-28-16.22.39.256398+480 I293139E603 LEVEL: Error
PID : 16674 TID : 139871100331776PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 5562 EDUNAME: db2bm.5272.0 (TEST) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbASSetPoolContsForDMS, probe:70
MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
DIA8701C Access denied for resource "", operating system return code
was "".
DATA #1 : String, 11 bytes
SYSCATSPACE
DATA #2 : Pool ID, PD_TYPE_SQLB_POOL_ID, 2 bytes
0
DATA #3 : unsigned integer, 8 bytes
1
2016-09-28-16.22.39.256646+480 I293743E758 LEVEL: Error
PID : 16674 TID : 139871100331776PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 5562 EDUNAME: db2bm.5272.0 (TEST) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbASDefineContainersForDMS, probe:20
MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
DIA8701C Access denied for resource "", operating system return code
was "".
DATA #1 : String, 11 bytes
SYSCATSPACE
DATA #2 : Pool ID, PD_TYPE_SQLB_POOL_ID, 2 bytes
0
DATA #3 : unsigned integer, 8 bytes
1
DATA #4 : unsigned integer, 8 bytes
0
DATA #5 : unsigned integer, 8 bytes
32764
DATA #6 : unsigned integer, 1 bytes
1
DATA #7 : Boolean, 1 bytes
false
2016-09-28-16.22.39.256774+480 I294502E629 LEVEL: Severe
PID : 16674 TID : 139871100331776PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 5562 EDUNAME: db2bm.5272.0 (TEST) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbRestoreASContainers, probe:40
MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
DIA8701C Access denied for resource "", operating system return code
was "".
DATA #1 : Pool ID, PD_TYPE_SQLB_POOL_ID, 2 bytes
0
DATA #2 : Pool flags, PD_TYPE_SQLB_POOL_FLAGS, 4 bytes
12546
DATA #3 : unsigned integer, 8 bytes
28104
2016-09-28-16.22.39.258047+480 E295132E440 LEVEL: Error
PID : 16674 TID : 139871100331776PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 5562 EDUNAME: db2bm.5272.0 (TEST) 0
FUNCTION: DB2 UDB, database utilities, sqludProcessSPCS, probe:3785
DATA #1 :
Problem restoring table space SYSCATSPACE (0).
Function return code: 0, container return code = -2079391743.
2016-09-28-16.22.39.258133+480 E295573E456 LEVEL: Severe
PID : 16674 TID : 139871100331776PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 5562 EDUNAME: db2bm.5272.0 (TEST) 0
FUNCTION: DB2 UDB, database utilities, sqludProcessSPCS, probe:3809
DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes
-970
DATA #2 : Hexdump, 8 bytes
0x00007F36AE67C298 : 0100 0F84 0100 0000 ........
2016-09-28-16.22.39.258201+480 E296030E797 LEVEL: Severe
PID : 16674 TID : 139871100331776PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 5562 EDUNAME: db2bm.5272.0 (TEST) 0
FUNCTION: DB2 UDB, database utilities, sqludProcessSPCS, probe:3809
MESSAGE : SQL0970N The system attempted to write to a read-only file.
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -970 sqlerrml: 1
sqlerrmc: 1
sqlerrp : sqludPro
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:
2016-09-28-16.22.39.258325+480 E296828E448 LEVEL: Severe
PID : 16674 TID : 139871100331776PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 5562 EDUNAME: db2bm.5272.0 (TEST) 0
FUNCTION: DB2 UDB, database utilities, sqludbuf, probe:721
DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes
-2044
DATA #2 : Hexdump, 8 bytes
0x00007F36AE67C298 : 04F8 FFFF 0200 0000 ........
2016-09-28-16.22.39.261968+480 E297277E431 LEVEL: Severe
PID : 16674 TID : 139871293269760PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : TEST
APPHDL : 0-129 APPID: *LOCAL.db2inst1.160928082239
AUTHID : DB2INST1
EDUID : 5272 EDUNAME: db2agent (TEST) 0
FUNCTION: DB2 UDB, database utilities, sqludrsa, probe:800
MESSAGE : Restore Terminated.
2016-09-28-16.22.39.321760+480 E297709E471 LEVEL: Event
PID : 16674 TID : 139871293269760PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : TEST
APPHDL : 0-129 APPID: *LOCAL.db2inst1.160928082239
AUTHID : DB2INST1
EDUID : 5272 EDUNAME: db2agent (idle) 0
FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::TermDbConnect, probe:2000
STOP : DATABASE: TEST : DEACTIVATED: NO
2016-09-28-16.22.39.341464+480 E298181E1190 LEVEL: Error (OS)
PID : 16674 TID : 139873268786944PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB :
APPHDL : 0-102 APPID: *LOCAL.db2inst1.160928071730
AUTHID : DB2INST1
EDUID : 1768 EDUNAME: db2agent (instance) 0
FUNCTION: DB2 UDB, oper system services, sqloopenp, probe:80
MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
DIA8701C Access denied for resource "", operating system return code
was "".
CALLED : OS, -, open OSERR: EACCES (13)
DATA #1 : Codepath, 8 bytes
4:11:18:20:22:37
DATA #2 : File name, 59 bytes
/db2data/commdb/commusr/NODE0000/COMM/T0000000/C0000000.CAT
DATA #3 : SQO Open File Options, PD_TYPE_SQO_FILE_OPEN_OPTIONS, 4 bytes
SQLO_REVISE, SQLO_READWRITE, SQLO_SHAREWRITE, SQLO_FORCE_NON_BUFFERED, SQLO_WRITETHRU
DATA #4 : Hex integer, 4 bytes
0x00000180
DATA #5 : signed integer, 4 bytes
0
DATA #6 : signed integer, 4 bytes
16384
DATA #7 : String, 105 bytes
Search for ossError*Analysis probe point after this log entry for further
self-diagnosis of this problem.
2016-09-28-16.22.39.341772+480 I299372E2156 LEVEL: Error (OS)
PID : 16674 TID : 139873268786944PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB :
APPHDL : 0-102 APPID: *LOCAL.db2inst1.160928071730
AUTHID : DB2INST1
EDUID : 1768 EDUNAME: db2agent (instance) 0
FUNCTION: DB2 Common, OSSe, ossErrorIOAnalysis, probe:100
CALLED : OS, -, open OSERR: EACCES (13)
DATA #1 : String, 157 bytes
A total of 2 analysis will be performed :
- User info
- Path access permission
Target file = /db2data/commdb/commusr/NODE0000/COMM/T0000000/C0000000.CAT
DATA #2 : String, 186 bytes
Real user ID of current process = 1002
Effective user ID of current process = 1002
Real group ID of current process = 501
Effective group ID of current process = 501
DATA #3 : String, 41 bytes
current sbrk(0) value: 0x00000000006c0000
DATA #4 : String, 326 bytes
Information of each subdirectory leading up to the first inaccessible one is shown in the format below :
0:0:755 (db2data)
506:501:755 (commdb)
506:503:775 (commusr)
506:503:775 (NODE0000)
506:503:711 (COMM)
506:503:711 (T0000000)
506:503:600 (C0000000.CAT)
CALLSTCK: (Static functions may not be resolved correctly, as they are resolved to the nearest symbol)
[0] 0x00007F36D9B101D8 pdOSSeLoggingCallback + 0x20C
[1] 0x00007F36D88D51F6 /home/db2inst1/sqllib/lib64/libdb2osse.so.1 + 0x1D91F6
[2] 0x00007F36D88D50ED ossLogSysRC + 0xBF
[3] 0x00007F36D88CA210 /home/db2inst1/sqllib/lib64/libdb2osse.so.1 + 0x1CE210
[4] 0x00007F36D88C74ED ossErrorAnalysis + 0x2D
[5] 0x00007F36DB69965F sqloSystemErrorHandler + 0x6D7
[6] 0x00007F36DA09F473 sqloopenp + 0x10F5
[7] 0x00007F36D9B9D1B5 _Z20sqlbDMSDoContainerOpiPK9SQLP_LSN8iP16SQLB_POOLCONT_CB12SQLB_CONT_OPjS1_P12SQLB_GLOBALSb + 0x1F7
[8] 0x00007F36D9B4F7F8 _Z20sqlbDMSDoContainerOpiPK9SQLP_LSN8iP16SQLB_POOLCONT_CB12SQLB_CONT_OPjP12SQLB_GLOBALSb + 0x30
[9] 0x00007F36DA878F76 _Z25sqlbDMSFreePoolContainersP12SQLB_POOL_CBiijP12SQLB_GLOBALS + 0x32E
收起