MSSQL Error

This error is displayed when using MSSQL (SQL7 or SQL 2000) as the reporting database where the tables in the reporting database cannot be selected. The error displayed for each reporting table:

02/24 18:33:03 E <ETL_TOOL> ERROR! the number of prepare values in the 
insert statement does not match the number of target table columns.  
Number of prepare values: 5.  
Number of target table columns: 0 target table column names: ()

Two problems can happen in this scenario. These solutions are suggested:

  • This is a known issue. This problem can occur when the reporting tables are created using a system administrator server role. This user is mapped to a special dbo user in the database and the reporting tables created belong to this special dbo user and not the reporting database user that you specified. Hence the reporting tables are qualified as dbo and not the reporting user that you specified in the configuration file. The common solution is to set the reporting user as sa or dbo. To avoid this error, when creating the reporting database initially, create a separate reporting user and ensure that the System Administrator role (in the Server Roles tab of the user property) is not checked and that the tables do not belong to the dbo user.
  • MSSQL Server Service Log On Account

    You can also view similar errors if the MSSQL Server service is not configured with the correct Log On account.

    The error is displayed when the MSSQL Server service is set to log on with a particular account, as against the Local System account. If this error is displayed and the MSSQL Server service is not configured to use the Local System account, set the service to use the Local System account and try again.