Toad World® Forums

Error creating tables for the repository


#1

I’m trying to set up repository server on SQL Server 2005 SP2 and getting an error from the Repository Manager that it “could not create repository tables.”

The test connection button within the ODBC Administration screen and the one on the Repository manager screen both report that there are no problems with the database connection. I also do not see any events in the SQL Server log or the Event log to describe what is going on.

Has anyone seen this behavior before? What am I missing?

Thanks.

John

PS. I’ve also checked that a different message is received if you intentionally give it incorrect login information; and that the user account I am connecting with owns the database in question.


#2

I figured this one out. The database instance I was trying to use was not using the default collation. In that collation the column headers are case sensitive so when the repository creation script changed case in the middle of the run it took an error. Here is a truncated ODBC trace file showing the specific problem:

BMFRepositoryMa df0-e64 ENTER SQLExecDirectW
HSTMT 011B2380
WCHAR * 0x00EF4898 [ -3] “CREATE TABLE bf_predefined_su_benchmarks (\ 9benchmark_id integer NOT NULL,predefined_su_id \ 9integer NOT NULL,name varchar(255) NOT NULL,\ 9bf_comment varchar(2000) NULL,\ 9test_guid char(40) NOT NULL, PRIMARY KEY (benchmark_id, predefined_su_id))\ 0”
SDWORD -3
BMFRepositoryMa df0-e64 EXIT SQLExecDirectW with return code 0 (SQL_SUCCESS)
HSTMT 011B2380
WCHAR * 0x00EF4898 [ -3] “CREATE TABLE bf_predefined_su_benchmarks (\ 9benchmark_id integer NOT NULL,predefined_su_id \ 9integer NOT NULL,name varchar(255) NOT NULL,\ 9bf_comment varchar(2000) NULL,\ 9test_guid char(40) NOT NULL, PRIMARY KEY (benchmark_id, predefined_su_id))\ 0”
SDWORD -3

You can see that the column name here is “test_guid”

BMFRepositoryMa df0-e64 ENTER SQLExecDirectW
HSTMT 011B2870
WCHAR * 0x00FBD960 [ -3] “INSERT INTO bf_predefined_su_benchmarks (benchmark_id, predefined_su_id, name, bf_comment, test_GUID) VALUES (2,0,?,?, ‘{BB36AE6C-034F-4AC1-899B-BCB165F938D0}’)\ 0”
SDWORD -3
BMFRepositoryMa df0-e64 EXIT SQLExecDirectW with return code -1 (SQL_ERROR)
HSTMT 011B2870
WCHAR * 0x00FBD960 [ -3] “INSERT INTO bf_predefined_su_benchmarks (benchmark_id, predefined_su_id, name, bf_comment, test_GUID) VALUES (2,0,?,?, ‘{BB36AE6C-034F-4AC1-899B-BCB165F938D0}’)\ 0”
SDWORD -3
DIAG [S0022] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name ‘test_GUID’. (207)

But now the column name is test_GUID. This seems to be a bug in the BMF Repository Manager that only shows up if your column names are case sensitive.

After I switched to an instance with the default collation option I was able to create the repository tables with no trouble.

Hope this helps someone else.

John