Solved

SQL Server 2008 restricted user access

Posted on 2013-05-27
3
594 Views
Last Modified: 2013-05-28
I have a working database but have had request to provide access for a third party application.

I have created a series of SPs to do this, but now I would like to create a user, VhcUser, which can only execute SPs and can only "see" the ones for the application. I would then build a connectionstring with these credentials and give it to the third party.

I believe that the best way to do this woul be to use SQL Server authentication, but I have never done aniything like this before.

Can anyone help?
0
Comment
Question by:grwallace
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 39199798
1. Create the Login on the server
2. Create the user (UserName) in the database.
3. GRANT EXECUTE ON usp_YourStoredProcedureNameGoesHere TO UserName
4. GRANT VIEW DEFINITION ON dbo.usp_YourStoredProcedureNameGoesHere TO UserName
5. Repeat 3 and 4 for the rest of the Stored Procedures.
0
 

Author Comment

by:grwallace
ID: 39200542
Thank you for this

I created the user - VhcUser - in the database and it shows up under logins

I then created the user in the database. While I counldn't see the user on re-trying it said that the user existed.

I then ran the Grants for the first SP and they went through OK.
Ithen tried to create a connection to it using Sql Server authentication,. I got the error message Login Failed for VhcUser.

Is this possibly a password issue, and if so how do I assign a password?
0
 

Author Closing Comment

by:grwallace
ID: 39200852
I got it to work once I sorted out the password issue

Thanks
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

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
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
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

776 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