Solved

User to run a stored procedure

Posted on 2012-03-23
6
409 Views
Last Modified: 2012-03-26
MS SQL 2005/2008

Is there a simple way to allow a user to run a predefined stored procedure when they need to without allowing any other interaction with the database.

TIA
0
Comment
Question by:Philip Pinnell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 69

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 167 total points
ID: 37757532
Create a login and user for them.

Grant that login connect (only).

Grant the user EXEC authority on that one stored proc (only).
0
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 37757537
Of course you will need to have created the stored proc not with the default of EXECUTE AS CALLER.  Instead, using EXECUTE AS 'other_user_name' would be easiest, to give the proc sufficient authority without giving it to the calling user.
0
 
LVL 13

Author Comment

by:Philip Pinnell
ID: 37757739
I was thinking more in terms of a front end rather than using Query analyser/SSMS as the users are not technical.

Just a select and click sort of solution.

I could write one myself I guess but wanted to avoid reinventing the wheel.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Assisted Solution

by:sachitjain
sachitjain earned 167 total points
ID: 37761964
What kind of interface do you want to give to your user to run that stored procedure?

If through SQL Server Management Studio then create a login for your user in desired SQL Server instance, create user for that login in desired database and give only execute permission (no other permissions on any other object) to created user over that stored procedure.

If you want to create some sort of app through ASP.Net or something as interface to user for executing stored procedure, that is also possible.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 166 total points
ID: 37762930
I was thinking more in terms of a front end rather than using Query analyser/SSMS as the users are not technical.
You could always write a batch file with SQLCmd.
0
 
LVL 13

Author Comment

by:Philip Pinnell
ID: 37765571
Thanks for your suggestions.

I have decided to do a dotnet console app and if I had decide that to begin with I'd have it implemented by now :-)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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

730 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