Skip to content

Instantly share code, notes, and snippets.

@Storager
Created May 15, 2024 13:46
Show Gist options
  • Select an option

  • Save Storager/e3032220c8faecaae6a12e2034b5fc3a to your computer and use it in GitHub Desktop.

Select an option

Save Storager/e3032220c8faecaae6a12e2034b5fc3a to your computer and use it in GitHub Desktop.
CREATE DATABASE ${DB_NAME};
GO
USE ${DB_NAME};
GO
CREATE LOGIN [${DB_USER}] WITH PASSWORD = '${DB_PASSWORD}', CHECK_EXPIRATION = OFF, CHECK_POLICY = OFF;
GO
CREATE USER [${DB_USER}] FROM LOGIN [${DB_USER}];
ALTER SERVER ROLE dbcreator
ADD MEMBER [${DB_USER}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment