cancel
Showing results for 
Search instead for 
Did you mean: 

CLI error between application instance server & database instance server after doing system copy

gongpeilin
Explorer
0 Kudos

Hi,

Recently we try to transfer the DB2 database instance from old host( db 9.1.7 under windows 2003 R2) to new host( DB2 9.7.9 under windows 2008 R2) using the system copy database depending methods.

Currently system is:

* ECC 6.0 under NW 7.0 SR3

* Kernel : 7.20
* Basis: 7.0 with support package level 17

*application instance connecting db instance via DB2 CLI


Every process is ok, database also can be connected when issuing the database connection command in new DB server.

When i start the SAP application instance in application server, the disp+work process will go to be running and stopping..

From the sap dev_w* log file and CLI trace file, i find the below error when connecting to the new DB server:

1) From dev_w* log file

****************************

Wed Aug 20 16:21:16 2014

C  *** ERROR in DB6Connect[dbdb6.c, 1830] CON = 0 (BEGIN)

C  &+     DbSlConnectDB6( SQLConnect 😞 [IBM][CLI Driver] SQL1042C  An unexpected system error occurred.  SQLSTATE=58004   

C  &+                                                                                                                      

C  &+                                                                                                                      

C  *** ERROR in DB6Connect[dbdb6.c, 1830] (END)

C  *** ERROR => DbSlConnect to 'PD1' as 'sappd1' failed

[dbdb6.c      1835]

M  ***LOG R19=> ThInit, db_connect ( DB-Connect 000256) [thxxhead.c   1513]

M  in_ThErrHandle: 1

M  *** ERROR => ThInit: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c   11422]

2) From CL trace file:

***************************

[1408532396.588563 - 08/20/2014 18:59:56.588563] SQLAllocHandle( fHandleType=SQL_HANDLE_ENV, hInput=0:0, phOutput=&00000001877f1c78 )

[1408532396.590595 - 08/20/2014 18:59:56.590595]     ---> Time elapsed - 0 seconds

[1408532396.591740 - 08/20/2014 18:59:56.591740] SQLAllocHandle( phOutput=0:1 )

[1408532396.592854 - 08/20/2014 18:59:56.592854]     <--- SQL_SUCCESS   Time elapsed - +4.291000E-003 seconds

[1408532396.617654 - 08/20/2014 18:59:56.617654] SQLSetEnvAttr( hEnv=0:1, fAttribute=SQL_ATTR_ODBC_VERSION, vParam=3, cbParam=0 )

[1408532396.621969 - 08/20/2014 18:59:56.621969]     ---> Time elapsed - +2.480000E-002 seconds

[1408532396.622093 - 08/20/2014 18:59:56.622093] SQLSetEnvAttr( )

[1408532396.622475 - 08/20/2014 18:59:56.622475]     <--- SQL_SUCCESS   Time elapsed - +4.821000E-003 seconds

[1408532396.623036 - 08/20/2014 18:59:56.623036] SQLSetEnvAttr( hEnv=0:1, fAttribute=SQL_ATTR_OUTPUT_NTS, vParam=0, cbParam=0 )

[1408532396.624576 - 08/20/2014 18:59:56.624576]     ---> Time elapsed - +5.610000E-004 seconds

[1408532396.624933 - 08/20/2014 18:59:56.624933] SQLSetEnvAttr( )

[1408532396.625377 - 08/20/2014 18:59:56.625377]     <--- SQL_SUCCESS   Time elapsed - +2.341000E-003 seconds

[1408532396.625955 - 08/20/2014 18:59:56.625955] SQLGetInfoW( hDbc=0:1, fInfoType=SQL_DB2_DRIVER_TYPE, rgbInfoValue=&00000001877f1c9c, cbInfoValueMax=4, pcbInfoValue=&000000000202e418 )

[1408532396.629866 - 08/20/2014 18:59:56.629866]     ---> Time elapsed - +5.780000E-004 seconds

[1408532396.632778 - 08/20/2014 18:59:56.632778] SQLGetInfoW( rgbInfoValue=2, pcbInfoValue=4 )

[1408532396.636855 - 08/20/2014 18:59:56.636855]     <--- SQL_SUCCESS   Time elapsed - +1.090000E-002 seconds

[1408532396.660523 - 08/20/2014 18:59:56.660523] SQLAllocHandle( fHandleType=SQL_HANDLE_DBC, hInput=0:1, phOutput=&00000001877f2430 )

[1408532396.662755 - 08/20/2014 18:59:56.662755]     ---> Time elapsed - +2.366800E-002 seconds

[1408532396.662878 - 08/20/2014 18:59:56.662878] SQLAllocHandle( phOutput=0:1 )

[1408532396.662962 - 08/20/2014 18:59:56.662962]     <--- SQL_SUCCESS   Time elapsed - +2.439000E-003 seconds

[1408532396.663050 - 08/20/2014 18:59:56.663050] SQLConnectW( hDbc=0:1, szDSN="PD1", cbDSN=-3, szUID="sappd1", cbUID=-3, szAuthStr="*", cbAuthStr=-3 )

[1408532396.664390 - 08/20/2014 18:59:56.664390]     ---> Time elapsed - +8.800000E-005 seconds

[1408532396.882927 - 08/20/2014 18:59:56.882927] SQLConnectW( )

[1408532396.883049 - 08/20/2014 18:59:56.883049]     <--- SQL_ERROR   Time elapsed - +2.199990E-001 seconds

[1408532396.883164 - 08/20/2014 18:59:56.883164] SQLGetDiagFieldW( fHandleType=SQL_HANDLE_DBC, hHandle=0:1, iRecNumber=0, fDiagIdentifier=SQL_DIAG_NUMBER, pDiagInfo=&000000000202e384, cbDiagInfoMax=-4, pcbDiagInfo=<NULL pointer> )

[1408532396.885276 - 08/20/2014 18:59:56.885276]     ---> Time elapsed - +1.150000E-004 seconds

[1408532396.885388 - 08/20/2014 18:59:56.885388] SQLGetDiagFieldW( pDiagInfo=1 )

[1408532396.885516 - 08/20/2014 18:59:56.885516]     <--- SQL_SUCCESS   Time elapsed - +2.352000E-003 seconds

[1408532396.885609 - 08/20/2014 18:59:56.885609] SQLGetDiagRecW( fHandleType=SQL_HANDLE_DBC, hHandle=0:1, iRecNumber=1, pszSqlState=&000000000202e3a8, pfNativeError=&000000000202e360, pszErrorMsg=&00000001877ef5dc, cbErrorMsgMax=1024, pcbErrorMsg=&000000000202e364 )

[1408532396.886109 - 08/20/2014 18:59:56.886109]     ---> Time elapsed - +9.300000E-005 seconds

[1408532396.886625 - 08/20/2014 18:59:56.886625] ( iRowNumber=-1, iColumnNumber=-2 )

[1408532396.886843 - 08/20/2014 18:59:56.886843]

[1408532396.886916 - 08/20/2014 18:59:56.886916] SQLGetDiagRecW( pszSqlState="HY000", pfNativeError=-1042, pszErrorMsg="[IBM][CLI Driver] SQL1042C  An unexpected system error occurred.  SQLSTATE=58004

", pcbErrorMsg=82 )

[1408532396.887218 - 08/20/2014 18:59:56.887218]     <--- SQL_SUCCESS   Time elapsed - +1.609000E-003 seconds

[1408532396.887309 - 08/20/2014 18:59:56.887309] SQLGetDiagFieldW( fHandleType=SQL_HANDLE_DBC, hHandle=0:1, iRecNumber=1, fDiagIdentifier=SQL_DIAG_ROW_NUMBER, pDiagInfo=&000000000202e37c, cbDiagInfoMax=-4, pcbDiagInfo=<NULL pointer> )

[1408532396.887758 - 08/20/2014 18:59:56.887758]     ---> Time elapsed - +9.100000E-005 seconds

[1408532396.887841 - 08/20/2014 18:59:56.887841] SQLGetDiagFieldW( pDiagInfo=-1 )

[1408532396.887967 - 08/20/2014 18:59:56.887967]     <--- SQL_SUCCESS   Time elapsed - +6.580000E-004 seconds

[1408532396.888044 - 08/20/2014 18:59:56.888044] SQLGetDiagFieldW( fHandleType=SQL_HANDLE_DBC, hHandle=0:1, iRecNumber=1, fDiagIdentifier=SQL_DIAG_COLUMN_NUMBER, pDiagInfo=&000000000202e37c, cbDiagInfoMax=-4, pcbDiagInfo=<NULL pointer> )

[1408532396.888486 - 08/20/2014 18:59:56.888486]     ---> Time elapsed - +7.700000E-005 seconds

[1408532396.888558 - 08/20/2014 18:59:56.888558] SQLGetDiagFieldW( pDiagInfo=-2 )

[1408532396.888682 - 08/20/2014 18:59:56.888682]     <--- SQL_SUCCESS   Time elapsed - +6.380000E-004 seconds

[1408532396.888922 - 08/20/2014 18:59:56.888922] SQLFreeHandle( fHandleType=SQL_HANDLE_DBC, hHandle=0:1 )

[1408532396.889113 - 08/20/2014 18:59:56.889113]     ---> Time elapsed - +2.400000E-004 seconds

[1408532396.889226 - 08/20/2014 18:59:56.889226] ( Number of allocations left before we freed the Pool=1 )

[1408532396.889353 - 08/20/2014 18:59:56.889353]

[1408532396.889432 - 08/20/2014 18:59:56.889432] SQLFreeHandle( )

[1408532396.889503 - 08/20/2014 18:59:56.889503]     <--- SQL_SUCCESS   Time elapsed - +5.810000E-004 seconds

***********************************

I also attached the dev_w* log file and CLI trace file.

Due to it didn't connect to database via CLI, so i can not find any error in the db2dialg file.

Any suggestion. Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

gongpeilin
Explorer
0 Kudos

Who can help me on this or need me to provide any other info?

maria_shen
Contributor
0 Kudos

Hello Peilin,

Perhaps you can check following points:

1. The database itself is up and running fine

2. Check if "Microsoft Visual C++ 2008 SP1 Redistributable Package" is installed on application server. (suppose the OS type is also windows).

3. If issue persists, reproduce it, then check the event log.

Thanks and kind regards
Maria

gongpeilin
Explorer
0 Kudos

Hi Maria,

thanks. After refer to below link and it is working now.

http://www-01.ibm.com/support/docview.wss?uid=swg1IC79229

Answers (2)

Answers (2)

0 Kudos

Hi Gong,

To recover the above situation :

Make sure DB connection is working fine.
Also check the points mentioned in the note '105418 - SQL1042C on DB2 connect'

Best Regards,
Gunjan

gongpeilin
Explorer
0 Kudos

Hi Gunjan,

When trying to check the note:105418,  the SAP website will indicate: document not released.

Frank-Martin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

did you check if a connection to database PD1 is possible using DB2 CLP ?

Regards

                Frank

gongpeilin
Explorer
0 Kudos

Hi Frank,

After i try to run the below command under CLI driver folder:

db2cli validate -database pd1:sapdata:5912 -connect -user **** -passwd *****

It also will come out the below error:

But if i copy the same CLI driver folder to other server and try to use the same command to connect to new database instance server, it will be successful.

I think it is related to current system issue, but how to troubleshoot it when using the db2 cli driver.