SQLCMD Login/User create template February 7, 2008 11:03 am \ by John Perry USE master CREATE LOGIN [$(UserName)] FROM WINDOWS WITH DEFAULT_DATABASE=[$(DatabaseName)] GO USE [$(DatabaseName)] GO CREATE USER [$(UserName)] FOR LOGIN [$(UserName)] GO EXEC sp_addrolemember N'$(RoleName)', N'$(UserName)' GO Posted in: Uncategorized