Create database user for SCT and DMS

Copy the following SQL script in another New Query window and execute:

**_Script:_**

USE [SampleDB]
DROP USER IF EXISTS [awssct]
GO
USE [master] 
GO 
DROP USER IF EXISTS [awssct]
IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'awssct')
DROP LOGIN [awssct]
CREATE LOGIN [awssct] WITH PASSWORD=N'<specify password here>', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF 
CREATE USER [awssct] FOR LOGIN [awssct]
GRANT VIEW DEFINITION TO [awssct]
GRANT VIEW DATABASE STATE TO [awssct]    
GO 
use [SampleDB];
CREATE USER [awssct] FOR LOGIN [awssct]
GRANT VIEW DEFINITION TO [awssct]
GRANT VIEW DATABASE STATE TO [awssct]
EXEC sp_addrolemember 'db_owner', 'awssct';
GO  

Please take note of the script above, as you will need to specify a password, it’s recommended to use the same password given by the facilitator

This will create a SQL Login with the user name ‘awssct’ and a user-defined password for SCT and DMS

**_Screenshot:_**

Once executed, you should see a new login ‘awssct', as pictured above.

You can rerun the script anytime, especially if you want to change the password