SQLSTATE[42S02]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'watchdog'.

This error occurs right after the following during Drupal 7.21 installation (shown in the error report). It hangs at the start of Install Profile:
Installation tasksChoose profile(done)Choose language(done)Verify requirements(done)Set up database(done)Install profile(active)Configure siteFinished SQLSTATE[42S02]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'watchdog'.

Any clue?

Thx
Steve

Comments

Mickey_Rat’s picture

More information, as I was able to get thru D7 installation finally.

Prior to the SQL error, I had received several warnings related to function removeFieldsInCondition in query.inc. With this issue fixed, the SQL error following database creation did not recur. I made the following code change, per the following support issue, to includes/database/sqlsrv/query.inc
http://drupal.org/node/1635002

/* foreach ($condition->conditions() as $child_condition) {
* if ($child_condition['field'] instanceof QueryConditionInterface) {
* $this->removeFieldsInCondition($fields, $child_condition['field']);
* }
* else {
* unset($fields[$child_condition['field']]);
*/

foreach ($condition->conditions() as $key => $child_condition) {
if ($key !== '#conjunction') {
if ($child_condition['field'] instanceof QueryConditionInterface) {
$this->removeFieldsInCondition($fields, $child_condition['field']);
}
else {
unset($fields[$child_condition['field']]);
}

Norberto Ostallo’s picture

Status: Active » Closed (fixed)

I tested this solution and it works with the latest stable release, but this issue has already been fixed in the latest -dev.
I suggest using it in stead of manually applying this correction.