Adding explicit database to sp_msloginmappings call (#2611)

This commit is contained in:
Chris Hoffman
2017-04-18 17:32:08 -04:00
committed by Brian Kassouf
parent 1f6bf2900a
commit 370dd2d2f2

View File

@@ -187,7 +187,7 @@ func (m *MSSQL) RevokeUser(statements dbplugin.Statements, username string) erro
// we need to drop the database users before we can drop the login and the role // we need to drop the database users before we can drop the login and the role
// This isn't done in a transaction because even if we fail along the way, // This isn't done in a transaction because even if we fail along the way,
// we want to remove as much access as possible // we want to remove as much access as possible
stmt, err := db.Prepare(fmt.Sprintf("EXEC sp_msloginmappings '%s';", username)) stmt, err := db.Prepare(fmt.Sprintf("EXEC master.dbo.sp_msloginmappings '%s';", username))
if err != nil { if err != nil {
return err return err
} }