SQL Server Administration - User/Login Admin

Grant Login

Create a SQL Server Login. Note Microsoft states that this stored procedure will be deprecated and replaced by "Create Login"

Syntax - SQL Server 2005/2008

sp_grantlogin [@loginame=] 'login'
GO

--returns 0=ok 1=failed

Example - SQL Server 2005/2008

sp_grantlogin 'SEASVR\ericm';
GO

Example - SQL Server 2008

-- sp_grantlogin calls CREATE LOGIN so below is preferred method
CREATE LOGIN [SEASVR\ericm] FROM WINDOWS;
GO
 Collapse All    Expand All
Custom Search

SQL Server Information and Resources