From 370dd2d2f20d53b26d5e098e9e0cd3724d1b2fe0 Mon Sep 17 00:00:00 2001 From: Chris Hoffman Date: Tue, 18 Apr 2017 17:32:08 -0400 Subject: [PATCH] Adding explicit database to sp_msloginmappings call (#2611) --- plugins/database/mssql/mssql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/database/mssql/mssql.go b/plugins/database/mssql/mssql.go index 567a095b66..b0e0ab6d41 100644 --- a/plugins/database/mssql/mssql.go +++ b/plugins/database/mssql/mssql.go @@ -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 // This isn't done in a transaction because even if we fail along the way, // 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 { return err }