Windows install - Invalid object 'watchdog'

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
erg-web's picture

Hi

After installing Drupal on Windows 2008 r2, IIS7 and SQL Server 2012, we get errors whenever accessing any of the log pages e.g. under /admin/reports/dblog

gives this error:

PDOException: SQLSTATE[42S02]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'watchdog'.: SELECT DISTINCT(type) FROM {watchdog} ORDER BY type; Array ( ) in _dblog_get_message_types() (line 133 of C:\inetpub\wwwroot****\modules\dblog\dblog.module).

and under

/admin/reports/access-denied

gives

PDOException: SQLSTATE[42S02]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'watchdog'.: SELECT COUNT(DISTINCT(message)) AS expression FROM {watchdog} watchdog WHERE ( ([type] = :db_condition_placeholder_0) ); Array ( [:db_condition_placeholder_0] => access denied ) in PagerDefault->execute() (line 74 of C:\inetpub\wwwroot***\includes\pager.inc).

In SQL server there is no table called 'watchdog' - so does the Windows install not create this table hence all the errors?

Comments

I just tested this out and

ben.bunk's picture

I just tested this out and got the same result. It looks like the sqlsrv driver for Drupal doesn't support the 3.0 version of PHP SQL Driver. If you switch to using the PHP SQL Driver 2.0 version it should start working. This does mean however you'll need to install PHP 5.3.X because that is the latest version supported by the PHP SQL Driver 2.0.

Finally working with SQL 2012 and PHP5.5

erg-web's picture

I finally got this to work, I had to reinstall by deleting all the drupal files, wiping the DB tables and checking permissions on all folder.

I am still using the v3 SQL Driver and php_pdo_sqlsrv_55_nts

Before I ran the install I edited the file in this post - includes/database/sqlsrv/query.inc

https://drupal.org/node/1956770

This time install created the watchdog DB table in SQL Server and the install seems to work and has the theme ok for development, cron jobs etc working - fingers crossed

thanks