IBM Support

"Unable to initialize database" error when creating a new SQL Server database

Troubleshooting


Problem

This technote explains why you can get an error when you are trying to create a new production database in Microsoft® SQL Server while using IBM® Rational® ClearQuest®.

Cause

You have moved the schema repository from Microsoft® Access to SQL Server (or Oracle or DB2®), and you are able to connect successfully to the new schema repository database. However, when trying to create a new production (user) database, you receive the following error:

Unable to initialize database "twjcq" with schema "WJCQuest" version 42.   Reason: SQLExecute: RETCODE=-1, State=37000, Native Error=156 SQL statement="create table ....

[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'function'.

NOTE: The SQL statement might be over eight lines in length listing every field in the schema.

The logfile C:\DOCUME~1\RTNL_A~1\LOCALS~1\Temp\copy_twjcq_init.log could be useful in resolving this problem.

One of the fields in the schema repository is applying a word that is reserved in SQL Server. Typically, if the word is reserved in SQL Server, the same will apply in other high-end database systems like Oracle and DB2. In Access, the word is not reserved and never produced any problems. The error above identifies one of the fields is called "function," a reserved word in SQL Server.

Resolving The Problem

Follow these directions to configure the SQL Server:

  1. Back up all databases.
  2. Rename the offending field. This must be done by opening the schema repository database and renaming the field in the "m_fielddef" table as it appears in the "name" and "db_name" columns.
  3. Checkin schema.
  4. Close out of the back-end schema repository database, open ClearQuest Designer, and create a new user database.

Note: See technote 1125945 for an error that can occur when trying to move an old user or test database from Access over to the new schema repository database in a high-end database system that has the reserved word fixed.



[{"Product":{"code":"SSSH5A","label":"Rational ClearQuest"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Database Configuration\/Connectivity - SQL Server","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2002;2002.05.00;2002.05.20;2003;2003.06.00","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

24312

Document Information

Modified date:
16 June 2018

UID

swg21125944