Menu

#7 initDB SqlServer

open
nobody
None
5
2010-10-13
2010-10-13
gerhard
No

Problem: Table "User" could not be created.
Cause: The name is not allowed in SQLServer. I think that normaly the prefix "MS" should be added to the table names
Workaround:
DBProvider.java
public static void createTable(DBFactory factory)
throws SQLException, DBException
{
String tableName = factory.getTableName();
...
Changed to
String tableName = factory.getTranslateTableName();

Problem: No table created.
Cause: The connection to SQLServer which is used for creating tables is established with the SQLServer-user defiend in "common.conf".
This user has no rights to create tables
Workaround: Add the user to server role "sysadmin" (remove after the DB is completly created)

Problem: "[WARN_|DBProvider.insertRecordIntoTable:1787] Field does not exist: SystemProps.propertyID [ignored]"
Workaround:
DBFactory.java
public DBField[] getExistingColumns(boolean update)
...
this.existingField = DBProvider.getActualTableFields(this.getTableName());
Changed to
this.existingField = DBProvider.getActualTableFields(this.getTranslateTableName());

Discussion