Solved

sp_grantlogin vs sp_addlogin

Posted on 2010-09-03
3
1,135 Views
Last Modified: 2012-08-13
what is the difference between the two options? can they be used interchangeably?

thanks
0
Comment
Question by:anushahanna
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
Mohit Vijay earned 500 total points
ID: 33601676
Use sp_grantlogin to reverse the effects of a previous sp_denylogin that has been executed for a Windows NT user.

Use sp_addlogin to allow a SQL Server login to connect to SQL Server.

Although a login can connect to SQL Server after sp_grantlogin has been executed, access to user databases is denied until a user account for the login is created in each database that the login must access. Use sp_grantdbaccess to create a user account in each user database.

sp_grantlogin cannot be executed within a user-defined transaction.
Permissions

Only members of the sysadmin or securityadmin fixed server roles can execute sp_grantlogin
0
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33601681
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33619730
Thank you.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Query Syntax 17 36
T-SQL: Do I need CLUSTERED here? 13 45
Loops and updating in SQL Query 9 29
Correct an issue with a where clause with calculation 2 31
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question