Skip to content
Advertisement

Tag: tsql

Does not detach database by sp_detach_db in pyodbc

I am trying to detach the database, but for some reason it does not detach with no error, am I missing something? SQLServer 2012 version: 11.0.2100 pyodbc version: 4.0.31 Answer Thx for Gord Thompson for the tip. Fixes: SET SINGLE_USER WITH NO_WAIT -> SET TRUSTWORTHY ON Remove from connect params “Trusted_Connection=yes;”, It associates the system user instead of “sa” user.

Advertisement