My setup: Drupal 7.13 / IIS 7.5 / SQL Server 2008 / PHP 5.3

When I ran the update script for the Feeds module, I received the following error:

Failed: PDOException: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Error: The new name 'state_old' is already in use as a COLUMN name and would cause a duplicate that is not permitted.: EXEC sp_rename :old, :new, :type; Array ( [:old] => feeds_source.state [:new] => state_old [:type] => COLUMN ) in db_change_field() (line 2988 of C:\inetpub\wwwroot\includes\database\database.inc).

All other module updates have been running fine. I'm not sure if this is an issue with the Feeds module or the SQLSrv module, and I didn't see any other issues related to this, so I thought I'd start here.

Comments

katannshaw’s picture

I've received no replies in four days, so I've disabled this module for now. Hopefully someone responds soon.

dgtlmoon’s picture

Status: Active » Postponed (maintainer needs more info)

"state_old" doesnt appear to be a column name in Feeds module, so I think it could be from your SQLSrv module, but try latest dev again

lyricnz’s picture

dgtlmoon: columnname_old is used as an intermediate step during execution of db_change_field(). If that had previously failed, like in #1828950: Update to alpha7 database update fails on MSSQL, then update.php was run again, you would get the error described by this user.

lyricnz’s picture

dgtlmoon’s picture

Status: Postponed (maintainer needs more info) » Active
katannshaw’s picture

Thanks for the replies. I will test out the patch mentioned on #1830024: Cannot execute db_change_field() to convert nvarchar to varbinary. Thanks.

Uncle_Code_Monkey’s picture

Status: Active » Needs review

lyricnz said:

I provided a patch for the SQL Server driver in #1830024: Cannot execute db_change_field() to convert nvarchar to varbinary, but nobody has tested it.

I ran into a similar error converting CTools module and have tested out lyrincz's patch (slightly modified) and found that it fixed the issue quite nicely. Thanks lyricnz!

See my comment for my modified and tested patch.

omegamonk’s picture

The contrib patch for #1830024: Cannot execute db_change_field() to convert nvarchar to varbinary has been committed to the sqlsrv development release. Per the comments, this issue is likely resolved, but since I didn't verify that I am not marking as fixed.

omegamonk’s picture

Issue summary: View changes

Added my setup information

tterranigma’s picture

Issue summary: View changes
Status: Needs review » Fixed

Almost 3 years later with no follow up, it would be safe to assume the issue is fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.