DB Load fails with: U00003590 - 'DB ERROR 42501.

book

Article ID: 224854

calendar_today

Updated On:

Products

CA Automic One Automation

Issue/Introduction

Creating a new database aborts with the following error message:

CREATE TABLE MQ1DWP(
	MQDWP_PK int IDENTITY NOT NULL,
	MQDWP_System varchar (8) NULL,
	MQDWP_CAddr varchar (32) NULL,
	MQDWP_CSRName varchar (8) NULL,
	MQDWP_CAcv int NULL,
	MQDWP_BAddr varchar (32) NULL,
	MQDWP_BSRName varchar (8) NULL,
	MQDWP_BAcv int NULL,
	MQDWP_FAddr varchar (32) NULL,
	MQDWP_LogAddr varchar (32) NULL,
	MQDWP_PhysAddr varchar (32) NULL,
	MQDWP_BTable varchar (8) NULL,
	MQDWP_SchedTime datetime NULL,
	MQDWP_Status int NULL,
	MQDWP_Priority int NULL,
	MQDWP_DRole varchar (32) NULL,
	MQDWP_LAddr varchar (32) NULL,
	MQDWP_Len int NULL,
	MQDWP_Msg varbinary(max) NULL,
	CONSTRAINT PK_MQ1DWP PRIMARY KEY (MQDWP_PK)
)
'
20210927/134740.099 - U00003590 UCUDB - DB error: 'SQLExecDirect', 'ERROR   ', '42S01', 'There is already an object named 'MQ1DWP' in the database.'
20210927/134740.099 - U00003590 UCUDB - DB error: 'SQLExecDirect', 'ERROR   ', '42S01', 'There is already an object named 'MQ1DWP' in the database.'
20210927/145139.730 - U00038077 Do you want to ignore this error?

Please note: Do not continue without contacting Automic Support!
20210927/145141.511 - U00038245 If you cancel the Database will probably be in an inconsistent state. Please contact Automic Support to evaluate the best approach. Do you really want to cancel?
20210927/145143.308 - The handle is invalid.

Cause

Configuration.

Environment

Release : 12.1, 12.2, 12.3

Component : AUTOMATION ENGINE

Resolution

The section [MQDB] had the same  sqlDriverConnect string as in the [ODBC] section, therefore table MQ1DWP was already created.

Once this string was commented with ";" in the beginning the DB Load finished as expected.

Before:

[MQDB]
; 
; sqlDriverConnect: Connection String for the database which holds the Message Queue Tables.
; Same format as the connection string (SQLDRIVERCONNECT=) in ODBC Section but applicable for MSSQL Databases only.
; For database software from other vendors it does not make sense to separate the MQ tables into a dedicated database.
;
sqlDriverConnect=ODBCVAR=SNNNNNRN,DSN=UC4;UID=user;PWD=???

After:

[MQDB]
; 
; sqlDriverConnect: Connection String for the database which holds the Message Queue Tables.
; Same format as the connection string (SQLDRIVERCONNECT=) in ODBC Section but applicable for MSSQL Databases only.
; For database software from other vendors it does not make sense to separate the MQ tables into a dedicated database.
;
;sqlDriverConnect=ODBCVAR=SNNNNNRN,DSN=UC4;UID=user;PWD=???