Skip to content

Commit eaeee8f

Browse files
Fix broken database owner for Northwind (#21)
1 parent 2330eb9 commit eaeee8f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

samples/stackoverflow/sql/restore-db.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,10 @@ GO
66
USE [master]
77
RESTORE DATABASE [pubs] FROM DISK = N'/tmp/pubs.bak' WITH FILE = 1, MOVE N'pubs' TO N'/var/opt/mssql/data/pubs.mdf', MOVE N'pubs_log' TO N'/var/opt/mssql/data/pubs_log.ldf', NOUNLOAD, STATS = 5
88

9+
GO
10+
11+
USE [master]
12+
ALTER AUTHORIZATION ON DATABASE::[Northwind] TO [sqladmin]
13+
ALTER AUTHORIZATION ON DATABASE::[pubs] TO [sqladmin]
14+
915
GO

sqlinstance/sql/restore-db.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,10 @@ GO
66
USE [master]
77
RESTORE DATABASE [pubs] FROM DISK = N'/tmp/pubs.bak' WITH FILE = 1, MOVE N'pubs' TO N'/var/opt/mssql/data/pubs.mdf', MOVE N'pubs_log' TO N'/var/opt/mssql/data/pubs_log.ldf', NOUNLOAD, STATS = 5
88

9+
GO
10+
11+
USE [master]
12+
ALTER AUTHORIZATION ON DATABASE::[Northwind] TO [sqladmin]
13+
ALTER AUTHORIZATION ON DATABASE::[pubs] TO [sqladmin]
14+
915
GO

0 commit comments

Comments
 (0)