Welcome to Dream.In.Code
Click Here
Getting Help is Easy!

Join 118,310 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,691 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



How to change permissions on a system stored procedure?

 
Reply to this topicStart new topic

How to change permissions on a system stored procedure?

Nolan
post 29 Jul, 2008 - 01:01 PM
Post #1


New D.I.C Head

*
Joined: 12 Sep, 2007
Posts: 47


My Contributions


I am buildiing a SQL Server 2005 Express backend and using MS Access for the front end.
When trying to create a "view" in Access I get the error regarding:
"This version of Microsoft Access doesn't support design changes to the
version of Microsoft SQL Server your project is connected to. See the
Microsoft Office Update Web site for the latest information and downloads
(on the Help menu, click Office on the Web). Your design changes will not be
saved."

After reading the MS solution it recommends to:
"Grant the user (or the Public database role) EXECUTE permission on the dt_verstamp007 system stored procedure in the database. "

I did find some VERY cryptic code given for an example but could not really decipher it.

Has ANYONE gone through this process (successfully) and would you mind sharing your experience (or code)?
Thanks!
Nolan
User is offlineProfile CardPM

Go to the top of the page


Nolan
post 29 Jul, 2008 - 05:43 PM
Post #2


New D.I.C Head

*
Joined: 12 Sep, 2007
Posts: 47


My Contributions


Have I stumped the gurus???
User is offlineProfile CardPM

Go to the top of the page

orcasquall
post 30 Jul, 2008 - 06:35 AM
Post #3


D.I.C Head

Group Icon
Joined: 14 Sep, 2007
Posts: 155



Thanked 1 times

Dream Kudos: 50
My Contributions


Have you tried granting the execute permission?
CODE
grant exec on dt_verstamp007 to public

Make sure you're logged in as the database administrator.

Was the Microsoft solution on this page? It will help if you provide the cryptic code you found too.
User is offlineProfile CardPM

Go to the top of the page

Nolan
post 30 Jul, 2008 - 10:18 AM
Post #4


New D.I.C Head

*
Joined: 12 Sep, 2007
Posts: 47


My Contributions


Thanks I think this helped - kind of.
What I was looking for were 2 things I guess:
1 - HOW to actually execute a stored procedure (i.e.; where do you start typing?)
2 - The code itself - which you provided. Thanks

The real problem here lies in the fact that I'm using an Access 2002 Project (.adp) to connect to SQL Server 2005.

The word on the street is that in order to modify SQL objects from earlier versions you'd need to grant these permissions to the dt_verstamp007 sys. sp.

After several failed attempts I managed to get MY stored procedure to work ( I think, as there were no errors finally).
CODE

Create Procedure SP_ModPerms
AS
grant exec on dbo.dt_verstamp007 to public


HOWEVER, upon opening the Access Data Project again and trying to create a query through Access, I get the SAME error message.
Frustrating.

Is this solution SUPPOSED to work? Has anyone MADE it work with older versions of Access and SQL 2005?

I have tested with Access 2007 and there are no issues at all (for obvious reasons).
I would like to stay away from upgrading the office though... so any ideas are welcome.

Thanks again.
User is offlineProfile CardPM

Go to the top of the page

Trogdor
post 31 Jul, 2008 - 02:36 AM
Post #5


D.I.C Regular

Group Icon
Joined: 6 Oct, 2006
Posts: 487



Thanked 2 times

Dream Kudos: 125
My Contributions


You dont need to make a stored procedure to grant rights. You only need to execute that grant code once, the database will then store the new rights-settings for that object.
So just go into the query analyser of sqlserver and run the query that orcasquall provided.
User is offlineProfile CardPM

Go to the top of the page

orcasquall
post 31 Jul, 2008 - 05:26 AM
Post #6


D.I.C Head

Group Icon
Joined: 14 Sep, 2007
Posts: 155



Thanked 1 times

Dream Kudos: 50
My Contributions


If you can't find the query analyzer, it's renamed "Management Studio Express" for SQL Server 2005 Express version. Then run the grant statement there.

If you're still not sure what we're referring to, then where did you create "SP_ModPerms"? Do the grant statement in that same application.

You execute a stored procedure in either query analyzer or the studio express with something like this
CODE
exec dt_verstamp007

User is offlineProfile CardPM

Go to the top of the page

Nolan
post 31 Jul, 2008 - 10:22 AM
Post #7


New D.I.C Head

*
Joined: 12 Sep, 2007
Posts: 47


My Contributions


Thanks guys.

I made the SP to grant the rights because those were some instructions I found online.
You're right I really only had to enter it into the analyser.

The REAL issue is that even after granting the public rights to the system sp, the error remains when I try to modify a SQL object from earlier versions of Access.

This "solution" does not appear to be working, and I'm just curious if anyone has had success with it in the past? It is VERY POSSIBLE I am doing something wrong....

Thanks again.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/10/08 11:54AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month