IBM Support

Server RESTORE DB fails with SQL1035N SQLSTATE=57019

Troubleshooting


Problem

Tivoli Storage Manager server database restore fails with SQL1035N SQLSTATE=57019

Symptom

You may see the following errors in the restore db output:


ANR0162W Supplemental database diagnostic information:  -1035:SQLSTATE 57019: The statement was not successful, because of a problem with a resource. :-1035 SQL1035N  The operation failed because the specified database cannot be connected to in the mode requested.  SQLSTATE=57019        

Cause

Database restore was manually cancelled by user before the process complete (i.e. the dsmserv process was killed or the host was forcefully rebooted during the restore process).

Diagnosing The Problem

The db2diag.log may show that restore was terminated as follows:


2015-08-10-11.29.57.315187-240 E1333454A564 LEVEL: Error
PID : 11862218 TID : 9511 PROC : db2sysc 0
INSTANCE: tsmadm NODE : 000 DB : TSMDB1
APPHDL : 0-9 APPID: *LOCAL.tsmadm.150810151300
AUTHID : TSMADM HOSTNAME: usadc8602
EDUID : 9511 EDUNAME: db2med.3343.0 (TSMDB1) 0
FUNCTION: DB2 UDB, database utilities, sqluMCReadFromDevice, probe:1515
MESSAGE : SQL2025N An I/O error occurred. Error code: "". Media on which this error occurred: "".
...
2015-08-10-11.29.57.371622-240 E1335067A466 LEVEL: Severe
PID : 11862218 TID : 3343 PROC : db2sysc 0
INSTANCE: tsmadm NODE : 000 DB : TSMDB1
APPHDL : 0-9 APPID: *LOCAL.tsmadm.150810151300
AUTHID : TSMADM HOSTNAME: usadc8602
EDUID : 3343 EDUNAME: db2agent (TSMDB1) 0
FUNCTION: DB2 UDB, database utilities, sqludrsa, probe:887
MESSAGE : Restore Terminated.


Trying to connect directly to the database using DB2 commands may fail with the following error:

/tsm/inst# db2 connect to tsmdb1
SQL1035N  The operation failed because the specified database cannot be connected to  in the mode requested.  SQLSTATE=57019        

Resolving The Problem

To resolve the problem, dropping the database allowed the restore to run and complete. Here is syntax to drop the database:

.


1) Login as your instance user and issue the following to drop the database manually. IMPORTANT: This will remove the existing Tivoli Storage Manager database! If this is not what you are trying to do, do not issue this command! Use with extreme caution! Additionally, make sure you are logged in with the correct instance user ID before issuing this command to prevent unintended consequences.

Example:

db2start
db2 drop db tsmdb1

2) Restore db should now run to completion.

NOTE: Attempting to use the "dsmserv removedb" utility will fail with an error similar to the below:

ANR0238E A database recovery task is prohibiting activation of TSMDB1 with
sqlcode -1119.
[{"Product":{"code":"SSGSG7","label":"Tivoli Storage Manager"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"--","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF025","label":"Platform Independent"}],"Version":"All Supported Versions","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Document Information

More support for:
Tivoli Storage Manager

Software version:
All Supported Versions

Operating system(s):
Linux

Document number:
535013

Modified date:
17 June 2018

UID

swg21964269