Creation of CDB Failed error during installation attempt
search cancel

Creation of CDB Failed error during installation attempt

book

Article ID: 387312

calendar_today

Updated On:

Products

CA Service Desk Manager CA Service Management - Service Desk Manager

Issue/Introduction

When attempting to install SDM, "Creation of CDB failed" error is encountered. 

Issue occurs for SQL Server remote with a defined instance being unable to connect (invalid URL escape "%5C")

In some cases, the follow errors are seen in the generated logs:

install.log

2025/02/03 05.17.53.882 DEBUG [DeployThread: Configuring CA Service Management common tables] [InstallCDB] 02-03,05:17:53 Checking if mdb already exists...
2025/02/03 05.17.54.385 DEBUG [DeployThread: Configuring CA Service Management common tables] [InstallCDB] 02-03,05:17:54 Failed to determine the collation (errorlevel=1)
2025/02/03 05.17.54.593 DEBUG [DeployThread: Configuring CA Service Management common tables] [InstallCDB] 02-03,05:17:54 Pre-process failed (errorlevel=300)
2025/02/03 05.17.54.997 DEBUG [DeployThread: Configuring CA Service Management common tables] [InstallCDB] 02-03,05:17:54 Setupmdb exit /B return code=110
2025/02/03 05.17.55.010 INFO  [DeployThread: Configuring CA Service Management common tables] [ActiveProcessHolder] Exit Monitor. Process ID (PID): 1504
2025/02/03 05.17.55.011 DEBUG [DeployThread: Configuring CA Service Management common tables] [InstallCDB] Command terminated with error
2025/02/03 05.17.55.011 DEBUG [DeployThread: Configuring CA Service Management common tables] [InstallCDB] Command terminated with exit code: 110
2025/02/03 05.17.55.012 DEBUG [DeployThread: Configuring CA Service Management common tables] [InstallCDB] Exit code of CDB script : 110
2025/02/03 05.17.55.012 DEBUG [DeployThread: Configuring CA Service Management common tables] [ProgressPage] ProgressPage - Task Changed Configuring CA Service Management common tables
2025/02/03 05.17.55.012 DEBUG [DeployThread: Configuring CA Service Management common tables] [ProgressPage] Task State Changed. TaskID: task.install_CDB,Configuring CA Service Management common tables, Old State: running, New State:failed
2025/02/03 05.17.55.013 INFO  [DeployThread: Configuring CA Service Management common tables] [DeployThread] Saving task status to DB for task task.install_CDB
2025/02/03 05.17.55.013 INFO  [DeployThread: Configuring CA Service Management common tables] [DeployThread] Skipping task update to database for CDB. Task state is not complete

install_mdb.log

02-03,05:17:54 Failed to determine the collation (errorlevel=1)                               
02-03,05:17:54 Setupmdb_pre exit /B return code=300   
02-03,05:17:54 Pre-process failed (errorlevel=300) 
02-03,05:17:54 Setupmdb exit /B return code=110 

We have verified that the database is indeed supported by verifying with the latest Supportability Matrix

Check the collation settings by verifying the following

In SQL Server Management Studio: 

  1. Right click the name of the database (mdb by default) and click Properties
  2. General > Maintenance > Collation

Or

Execute the following command against the mdb database:

SELECT name, collation_name FROM sys.all_columns where name LIKE 'collation' 

Verify this setting against other similar working environments

Environment

Release:  17.3 or higher
CA Service Desk Manager

Remote SQL Server with instance defined

Cause

SQLCMD is unable to process the remote instance or collation configuration due to using the Go/sqlcli implementation. 

The version needed is the ODBC version or the one that comes with SQL Server Management Studio

In viewing the download page from this location, there are TWO versions of sqlcmd present, the Go version or the ODBC version

Using the Go or sqlcli version will not work as it will incorrectly parse servername\instance and may also not process collation settings correctly.  Even using incorrect values for servername and instance will result in the same error parsing/escaping the "\" separating servername\instance.  

sqlcmd -S "[SQLSERVER]\[INSTANCE],1234"

The above command should complain that login had failed

sqlcmd -S "[INCORRECT SQLSERVER]\[INSTANCE],1234"

The above command should complain that the host is not known

Both of the above commands will error the same way using the Go/sqlcli download:  invalid URL escape "%5C"

To verify the version of sqlcmd, run the following command in an Administrator Command Prompt

sqlcmd -?

In Service Management 17.4 environments with SQL Server 2019 the expected output is:

Microsoft (R) SQL Server Command Line Tool
Version 15.0.2000.5 NT
Copyright (C) 2019 Microsoft Corporation. All rights reserved.

 

Resolution

In the above scenario, removed the sqlcmd from the sqlcli download to force the SDM instance to use the sqlcmd provided by the SQL Server management studio from within PATH env var.

The recommended approach is to use the sqlcmd that is provided by SQL Server Management Studio. or the ODBC version of sqlcmd from the sqlcmd download location

Additional Information

KB Article 387315 provides additional information on the CDB creation failure, including other possible causes.