Table with a column name of 'Column Name' or a name of 'Column 0' causes profile to error
search cancel

Table with a column name of 'Column Name' or a name of 'Column 0' causes profile to error

book

Article ID: 206024

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

2021-01-05 17:47:12.591 UTC [ERROR] [pool-45-thread-1         ] --- [U:][M:][P:]                         c.c.t.p.s.ProfilingEngine:  scanColumn: job: 478: profile.db.table: RRMDM/dbo.xxxxx_app_tbl column: Column Name exception: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'Name'.
2021-01-05 17:47:12.591 UTC [ERROR] [pool-45-thread-1         ] --- [U:][M:][P:]                         c.c.t.p.s.ProfilingEngine:  scanColumn: job: 478:threw exception:
com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'Name'.
 at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)
 at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1621)
 at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:868)
 at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:768)
 at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7194)
 at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2935)
 at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:248)
 at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:223)
 at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQuery(SQLServerStatement.java:693)
 at sun.reflect.GeneratedMethodAccessor1969.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)
 at com.sun.proxy.$Proxy3063.executeQuery(Unknown Source)
 at com.ca.tdm.profiler.service.DataCollectionService.setColumnForSampling(DataCollectionService.java:743)
 at com.ca.tdm.profiler.service.ProfilingEngine.scanColumn(ProfilingEngine.java:929)
 at com.ca.tdm.profiler.service.ProfilingEngine.scanConprof(ProfilingEngine.java:1139)
 at com.ca.tdm.profiler.service.ProfilingEngine$ConprofScanner.call(ProfilingEngine.java:351)
 at com.ca.tdm.profiler.service.ProfilingEngine$ConprofScanner.call(ProfilingEngine.java:298)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)

Environment

Release : 4.9

Component : CA Test Data Manager

Cause

Syntax error for column name

Resolution

The word COLUMN is a reserved word with SQL Server:

https://docs.microsoft.com/en-us/sql/t-sql/language-elements/reserved-keywords-transact-sql?view=sql-server-ver15

If the column name was called Column_Name it would probably be OK.

I suggest changing the name of that column to something different.

or 

If needing to have that column called "Column Name" or "Column 0" download the latest TDMWeb-4.9* patch from this link:

https://support.broadcom.com/web/ecx/support-content-notification/-/external/content/release-announcements/Test-Data-Manager-TDM-Patches/16649#TDM4.9.1

Note, this is for 4.9.1.

All patches are cumulative.