Error 622: Unable to get information from the database after renaming the database

  • 3438234
  • 24-Jul-2007
  • 30-Apr-2012

Environment

Novell ZENworks 7 Desktop Management Support Pack 1 - ZDM7 SP1 Inventory

Situation

Inventory service failing on service startup after renaming the database.
On ConsoleOne Status Report Server Status:
Service Manager Error: 622 Unable to get information from the database after renaming the database
From zenworksinvservice*.txt log after ALL debugging is enabled:
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : Trying to check the existance of HKTable........
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : Trying to excute query : SELECT * FROM mw_dba.HouseKeeping
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : Got known errorCode :208
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : queryExecute() returns 'isSuccessfull' : true
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : HKTable present : false
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: HouseKeepingTable doesn't exist. Need to create HKTable
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : Trying to create HK table,grant rights and insert default values.......
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : Trying to excute query : CREATE TABLE mw_dba.t$HouseKeeping ( ProductID INTEGER PRIMARY KEY,Caption NVARCHAR(64) NULL,Description NVARCHAR(254) NULL,Version NVARCHAR(64) NOT NULL,State BIGINT NOT NULL,LastModifiedDate NCHAR(25) NULL) ON CIM1
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : Trying to execute query again : Loop =1
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : Trying to execute query again : Loop =2
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : Trying to execute query again : Loop =3
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : Trying to execute query again : Loop =4
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : Trying to execute query again : Loop =5
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : Trying to execute query again : Loop =6
[7/16/07 08:24:36.275] ZenInv - Upgrade Service: Info : Trying to execute query again : Loop =7
[7/16/07 08:24:36.290] ZenInv - Upgrade Service: Info : Trying to execute query again : Loop =8
[7/16/07 08:24:36.290] ZenInv - Upgrade Service: Info : Trying to execute query again : Loop =9
[7/16/07 08:24:36.290] ZenInv - Upgrade Service: Info : Trying to execute query again : Loop =10
[7/16/07 08:24:36.290] ZenInv - Upgrade Service: Error : Failed to excute query even after trying 10 times
com.microsoft.sqlserver.jdbc.SQLServerException: The server failed to resume the transaction. Desc:6600000001.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.sendExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
at com.novell.zenworks.desktop.inventory.upgradeService.HouseKeepingTable.queryExecute(HouseKeepingTable.java:272)
at com.novell.zenworks.desktop.inventory.upgradeService.HouseKeepingTable.createHKTable(HouseKeepingTable.java:517)
at com.novell.zenworks.desktop.inventory.upgradeService.UpgradeServiceController.getStatusOfServer(UpgradeServiceController.java:1360)
at com.novell.zenworks.desktop.inventory.upgradeService.UpgradeServiceController.aCheckStatus(UpgradeServiceController.java:173)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.novell.zenworks.desktop.inventory.senderreceiver.statemachine.StateMachine.execute(StateMachine.java:68)
at com.novell.zenworks.desktop.inventory.upgradeService.UpgradeServiceController.init(UpgradeServiceController.java:113)
at com.novell.zenworks.desktop.inventory.upgradeService.UpgradeServiceThread.run(UpgradeServiceThread.java:81)

Resolution

These logs are from an installation to Microsoft SQL Server 2005. Regardless of the database, mgmtdb is the default name of the inventory database and should not be renamed. Renaming the inventory database or associated tables is not supported configuration.
To fix the problem:
  1. Stop inventory service on the ZENworks server.
  2. Recreate the mgmtdb database on the SQL server following the ZENworks documentation steps.
  3. Run the required scripts, for example: createloginnames.sql.
  4. Restart the SQL server.
  5. Restart the inventory service.
  6. If problems reading the tables continue, use SQL Trace tool and SQLCMD or SQL Query Editor to explicitly run the query contained in the trace, while logged in as the user contained in the trace, using the password set in ConsoleOne for that user.
  7. Check that the users'default logins database is set to mgmtdb, not master. This might have been switched to master when the mgmtdbs was renamed or deleted.