diff --git a/builtin/logical/mssql/backend.go b/builtin/logical/mssql/backend.go index 2a7689f17f..61afe75d9c 100644 --- a/builtin/logical/mssql/backend.go +++ b/builtin/logical/mssql/backend.go @@ -78,7 +78,7 @@ func (b *backend) DB(s logical.Storage) (*sql.DB, error) { } connString := connConfig.ConnectionString - db, err := sql.Open("mssql", connString) + db, err := sql.Open("sqlserver", connString) if err != nil { return nil, err } diff --git a/builtin/logical/mssql/secret_creds.go b/builtin/logical/mssql/secret_creds.go index 9e7048ab5f..b870c59a90 100644 --- a/builtin/logical/mssql/secret_creds.go +++ b/builtin/logical/mssql/secret_creds.go @@ -102,7 +102,7 @@ func (b *backend) secretCredsRevoke( // 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 nil, err }