add mssql
This commit is contained in:
27
db/mssql/init.sql
Normal file
27
db/mssql/init.sql
Normal file
@@ -0,0 +1,27 @@
|
||||
EXEC sp_configure 'CONTAINED DATABASE AUTHENTICATION', 1
|
||||
GO
|
||||
RECONFIGURE
|
||||
GO
|
||||
|
||||
USE [master]
|
||||
GO
|
||||
|
||||
CREATE DATABASE demo;
|
||||
GO
|
||||
|
||||
ALTER DATABASE [demo] SET CONTAINMENT = PARTIAL
|
||||
GO
|
||||
|
||||
USE [demo];
|
||||
GO
|
||||
|
||||
CREATE USER demo_user WITH PASSWORD = 'pas$w0rd';
|
||||
GO
|
||||
|
||||
CREATE TABLE Products (ID int, ProductName nvarchar(max));
|
||||
GO
|
||||
|
||||
GRANT SELECT ON OBJECT::dbo.Products TO demo_user;
|
||||
GRANT INSERT ON OBJECT::dbo.Products TO demo_user;
|
||||
GRANT UPDATE ON OBJECT::dbo.Products TO demo_user;
|
||||
GRANT DELETE ON OBJECT::dbo.Products TO demo_user;
|
||||
Reference in New Issue
Block a user