Mega Code Archive

 
Categories / MSSQL Tutorial / User Role
 

Creates a new Windows login and then maps that login to a new database user

USE Master GO CREATE LOGIN Adventureworks\Paul  --USE AdventureWorks2000 GO CREATE USER WindowsPaul FOR Login AdventureWorks\Paul SQL Server 2000 SQL Server login: