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
You can rerun the script anytime, especially if you want to change the password