add mssql

This commit is contained in:
2021-08-18 01:46:32 -05:00
parent 372c1ad35d
commit 1d808a59b2
5 changed files with 58 additions and 0 deletions

27
db/mssql/init.sql Normal file
View 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;