Solved

sp_grantlogin vs sp_addlogin

Posted on 2010-09-03
3
1,128 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

912 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now