Create a SQL Server Login. Note Microsoft states that this stored procedure will be deprecated and replaced by "Create User"
sp_grantdbaccess [ @loginame = ] 'login'
[ , [ @name_in_db = ] 'name_in_db' [ OUTPUT ] ]
GO
--returns 0=ok 1=failed
EXEC sp_grantdbaccess 'SEASVR\ericm', 'ericm' GO
-- sp_grantlogin calls CREATE USER so below is preferred method CREATE USER ericm FOR LOGIN [SEASVR\ericm]; GO
