Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..
269 views

UCMDB 10.30 Schema creation failed

Jump to solution

Hello,

We are trying to install a new instance of UCMDb 10.30. When running the server configuration wizard to create a new schema we ran into the following error:

Any idea on how to resolve this or what could cause this? 

SQL Server 2012 SP3 CU2

java.lang.RuntimeException: [mercury][SQLServer JDBC Driver][SQLServer]Conversion failed when converting the nvarchar value 'U7' to data type int.
                at com.hp.config_wizard.backend.api.ConfWizServerAPI.createOrConnectSchemas(ConfWizServerAPI.java:74)
                at com.hp.config_wizard.ui.frame.CreateSchemas.onFinish(CreateSchemas.java:240)
                at com.hp.config_wizard.ui.frame.CreateSchemas.access$800(CreateSchemas.java:29)
                at com.hp.config_wizard.ui.frame.CreateSchemas$3.performFinishActions(CreateSchemas.java:195)
                at com.hp.server_tools.common.components.wizard.WizardDlg.onFinish(WizardDlg.java:222)
                at com.hp.server_tools.common.components.wizard.WizardDlg.access$300(WizardDlg.java:18)
                at com.hp.server_tools.common.components.wizard.WizardDlg$4.actionPerformed(WizardDlg.java:90)
                at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
                at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
                at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
                at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
                at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
                at java.awt.Component.processMouseEvent(Component.java:6533)
                at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
                at java.awt.Component.processEvent(Component.java:6298)
                at java.awt.Container.processEvent(Container.java:2236)
                at java.awt.Component.dispatchEventImpl(Component.java:4889)
                at java.awt.Container.dispatchEventImpl(Container.java:2294)
                at java.awt.Component.dispatchEvent(Component.java:4711)
                at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
                at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
                at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
                at java.awt.Container.dispatchEventImpl(Container.java:2280)
                at java.awt.Window.dispatchEventImpl(Window.java:2746)
                at java.awt.Component.dispatchEvent(Component.java:4711)
                at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
                at java.awt.EventQueue.access$500(EventQueue.java:97)
                at java.awt.EventQueue$3.run(EventQueue.java:709)
                at java.awt.EventQueue$3.run(EventQueue.java:703)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
                at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
                at java.awt.EventQueue$4.run(EventQueue.java:731)
                at java.awt.EventQueue$4.run(EventQueue.java:729)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
                at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
                at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
                at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
                at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
                at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: com.mercury.topaz.cmdb.server.manage.dal.CmdbDalException: [ErrorCode [-2147483648] undefined error code]
SQL error executing statement DECLARE @size int,
@is_read_committed_snapshot_on int,
@snapshot_isolation_state int,
@db_version int,
@replica_id uniqueidentifier = NULL,
@sql_str nvarchar(4000) = ''
SELECT @size = size*8
FROM cmdb_ddmi..sysfiles WHERE name = N'cmdb_ddmi'
SELECT @db_version = SUBSTRING (@@VERSION, CHARINDEX('-', @@VERSION) + 2, 2)
print 'DB version: ' + cast (@db_version as varchar(50))
SELECT
@is_read_committed_snapshot_on = IsNULL(is_read_committed_snapshot_on, 0) ,
@snapshot_isolation_state = IsNULL(snapshot_isolation_state, 0)
FROM sys.databases WHERE name = N'cmdb_ddmi'
IF @db_version > 10
BEGIN
SET @sql_str = 'SELECT @replica_id = replica_id FROM sys.databases WHERE name = N''cmdb_ddmi'' '
print @sql_str
exec sp_executesql @sql_str ,N'@replica_id uniqueidentifier output',@replica_id output
END
IF @size < 5000
BEGIN
ALTER DATABASE [cmdb_ddmi] MODIFY FILE(NAME=N'cmdb_ddmi', SIZE=5MB)
END
ALTER DATABASE [cmdb_ddmi] MODIFY FILE(NAME=N'cmdb_ddmi', FILEGROWTH=5MB)
SELECT @size = size*8
FROM cmdb_ddmi..sysfiles WHERE name = N'cmdb_ddmi_log'
IF @size < 10000
BEGIN
ALTER DATABASE [cmdb_ddmi] MODIFY FILE(NAME=N'cmdb_ddmi_log', SIZE=10MB)
END
ALTER DATABASE [cmdb_ddmi] MODIFY FILE(NAME=N'cmdb_ddmi_log', FILEGROWTH=50MB)
ALTER DATABASE [cmdb_ddmi] ADD FILEGROUP userdata001
DECLARE @FilePath nvarchar(250)
SELECT @FilePath = LEFT(filename, LEN(filename) - CHARINDEX(N'\', REVERSE(filename))) FROM master.dbo.sysdatabases WHERE name = N'cmdb_ddmi'
SET @FilePath = @FilePath+ '\cmdb_ddmi_data001.ndf'
EXEC ('ALTER DATABASE [cmdb_ddmi] ADD FILE (NAME = N''cmdb_ddmi_data001'',FILENAME = '''+@FilePath+''',SIZE = 200MB,FILEGROWTH = 512MB) TO FILEGROUP userdata001')
ALTER DATABASE [cmdb_ddmi] MODIFY FILEGROUP userdata001 DEFAULT
IF @is_read_committed_snapshot_on = 0 and @snapshot_isolation_state = 0
and @replica_id IS NULL
BEGIN
ALTER DATABASE [cmdb_ddmi] SET ALLOW_SNAPSHOT_ISOLATION ON
ALTER DATABASE [cmdb_ddmi] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE [cmdb_ddmi] SET READ_COMMITTED_SNAPSHOT ON
ALTER DATABASE [cmdb_ddmi] SET MULTI_USER
END
                at com.mercury.topaz.cmdb.server.manage.dal.jdbc_template.JDBCTemplate.execute(JDBCTemplate.java:161)
                at com.mercury.topaz.cmdb.server.manage.dal.jdbc_template.JDBCTemplate.execute(JDBCTemplate.java:119)
                at com.mercury.topaz.cmdb.server.manage.dal.CmdbDalConnection.executeAdhocSql(CmdbDalConnection.java:358)
                at com.mercury.topaz.cmdb.server.manage.dal.SqlScriptExecutor.executeSql(SqlScriptExecutor.java:85)
                at com.mercury.topaz.cmdb.server.manage.dal.SqlScriptExecutor.execute(SqlScriptExecutor.java:40)
                at com.mercury.topaz.cmdb.shared.util.dbcreator.CmdbDatabaseCreator.runDBScript(CmdbDatabaseCreator.java:172)
                at com.mercury.topaz.cmdb.shared.util.dbcreator.CmdbDatabaseCreator.createSchema(CmdbDatabaseCreator.java:151)
                at com.mercury.topaz.cmdb.shared.util.dbcreator.CmdbDatabaseCreator.createSchemas(CmdbDatabaseCreator.java:81)
                at com.mercury.topaz.cmdb.shared.util.dbcreator.CmdbDatabaseCreator.create(CmdbDatabaseCreator.java:39)
                at com.hp.ucmdb.management.impl.DatabaseManagementImpl.createCmdbDatabase(DatabaseManagementImpl.java:41)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at com.hp.ucmdb.management.impl.CmdbManagementImpl$ContextClassLoaderInvocationHandler.invoke(CmdbManagementImpl.java:82)
                at com.sun.proxy.$Proxy2.createCmdbDatabase(Unknown Source)
                at com.hp.config_wizard.backend.api.ConfWizServerAPI.createOrConnectSchemas(ConfWizServerAPI.java:68)
                ... 42 more
Caused by: com.mercury.topaz.cmdb.server.manage.dal.CmdbDalException: [ErrorCode [-2147483648] undefined error code]
Can't execute statement [DECLARE @size int,
@is_read_committed_snapshot_on int,
@snapshot_isolation_state int,
@db_version int,
@replica_id uniqueidentifier = NULL,
@sql_str nvarchar(4000) = ''
SELECT @size = size*8
FROM cmdb_ddmi..sysfiles WHERE name = N'cmdb_ddmi'
SELECT @db_version = SUBSTRING (@@VERSION, CHARINDEX('-', @@VERSION) + 2, 2)
print 'DB version: ' + cast (@db_version as varchar(50))
SELECT
@is_read_committed_snapshot_on = IsNULL(is_read_committed_snapshot_on, 0) ,
@snapshot_isolation_state = IsNULL(snapshot_isolation_state, 0)
FROM sys.databases WHERE name = N'cmdb_ddmi'
IF @db_version > 10
BEGIN
SET @sql_str = 'SELECT @replica_id = replica_id FROM sys.databases WHERE name = N''cmdb_ddmi'' '
print @sql_str
exec sp_executesql @sql_str ,N'@replica_id uniqueidentifier output',@replica_id output
END
IF @size < 5000
BEGIN
ALTER DATABASE [cmdb_ddmi] MODIFY FILE(NAME=N'cmdb_ddmi', SIZE=5MB)
END
ALTER DATABASE [cmdb_ddmi] MODIFY FILE(NAME=N'cmdb_ddmi', FILEGROWTH=5MB)
SELECT @size = size*8
FROM cmdb_ddmi..sysfiles WHERE name = N'cmdb_ddmi_log'
IF @size < 10000
BEGIN
ALTER DATABASE [cmdb_ddmi] MODIFY FILE(NAME=N'cmdb_ddmi_log', SIZE=10MB)
END
ALTER DATABASE [cmdb_ddmi] MODIFY FILE(NAME=N'cmdb_ddmi_log', FILEGROWTH=50MB)
ALTER DATABASE [cmdb_ddmi] ADD FILEGROUP userdata001
DECLARE @FilePath nvarchar(250)
SELECT @FilePath = LEFT(filename, LEN(filename) - CHARINDEX(N'\', REVERSE(filename))) FROM master.dbo.sysdatabases WHERE name = N'cmdb_ddmi'
SET @FilePath = @FilePath+ '\cmdb_ddmi_data001.ndf'
EXEC ('ALTER DATABASE [cmdb_ddmi] ADD FILE (NAME = N''cmdb_ddmi_data001'',FILENAME = '''+@FilePath+''',SIZE = 200MB,FILEGROWTH = 512MB) TO FILEGROUP userdata001')
ALTER DATABASE [cmdb_ddmi] MODIFY FILEGROUP userdata001 DEFAULT
IF @is_read_committed_snapshot_on = 0 and @snapshot_isolation_state = 0
and @replica_id IS NULL
BEGIN
ALTER DATABASE [cmdb_ddmi] SET ALLOW_SNAPSHOT_ISOLATION ON
ALTER DATABASE [cmdb_ddmi] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE [cmdb_ddmi] SET READ_COMMITTED_SNAPSHOT ON
ALTER DATABASE [cmdb_ddmi] SET MULTI_USER
END], due to exception: java.sql.SQLDataException: [mercury][SQLServer JDBC Driver][SQLServer]Conversion failed when converting the nvarchar value 'U7' to data type int.
                at com.mercury.topaz.cmdb.server.manage.dal.CmdbDalStatementImpl.executeUpdate(CmdbDalStatementImpl.java:236)
                at com.mercury.topaz.cmdb.server.manage.dal.jdbc_template.JDBCTemplate.execute(JDBCTemplate.java:156)
                ... 58 more
Caused by: java.sql.SQLDataException: [mercury][SQLServer JDBC Driver][SQLServer]Conversion failed when converting the nvarchar value 'U7' to data type int.
                at com.mercury.jdbc.sqlserverbase.ddcw.b(Unknown Source)
                at com.mercury.jdbc.sqlserverbase.ddcw.a(Unknown Source)
                at com.mercury.jdbc.sqlserverbase.ddcv.b(Unknown Source)
                at com.mercury.jdbc.sqlserverbase.ddcv.a(Unknown Source)
                at com.mercury.jdbc.sqlserver.tds.ddr.v(Unknown Source)
                at com.mercury.jdbc.sqlserver.tds.ddr.a(Unknown Source)
                at com.mercury.jdbc.sqlserver.tds.ddr.a(Unknown Source)
                at com.mercury.jdbc.sqlserver.dda3.m(Unknown Source)
                at com.mercury.jdbc.sqlserverbase.dde7.e(Unknown Source)
                at com.mercury.jdbc.sqlserverbase.dde7.a(Unknown Source)
                at com.mercury.jdbc.sqlserverbase.dde7.w(Unknown Source)
                at com.mercury.jdbc.sqlserverbase.dde7.y(Unknown Source)
                at com.mercury.jdbc.sqlserverbase.dde7.executeUpdate(Unknown Source)
                at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
                at com.mercury.topaz.cmdb.server.manage.dal.CmdbDalStatementImpl$FlowControlUpdateExecuter.execute(CmdbDalStatementImpl.java:345)
                at com.mercury.topaz.cmdb.server.manage.dal.CmdbDalStatementImpl$FlowControlUpdateExecuter.execute(CmdbDalStatementImpl.java:334)
                at com.mercury.topaz.cmdb.shared.manage.flowmanagement.api.FlowManager.execute(FlowManager.java:227)
                at com.mercury.topaz.cmdb.server.manage.dal.CmdbDalStatementImpl.executeUpdate(CmdbDalStatementImpl.java:226)
                ... 59 more
0 Likes
1 Solution

Accepted Solutions
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: UCMDB 10.30 Schema creation failed

Jump to solution

This was due to a collation mismatch. We resolved the error by updating the schema to the correct collation

View solution in original post

0 Likes
2 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: UCMDB 10.30 Schema creation failed

Jump to solution

If you want to install Universal CMDB using the installation wizard, you must provide a user account that has database creator privileges. If you are going to create the database manually, supply Universal CMDB with a user account that is a part of db_datareader, db_datawriter and db_ddladmin in the Universal CMDB database. The quick potential fix is confirming your DB User accounts privileges.

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: UCMDB 10.30 Schema creation failed

Jump to solution

This was due to a collation mismatch. We resolved the error by updating the schema to the correct collation

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.