Welcome to Dream.In.Code
Become an Expert!

Join 150,138 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,256 people online right now. 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
29 Jul, 2008 - 12: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
+Quote Post

Nolan
RE: How To Change Permissions On A System Stored Procedure?
29 Jul, 2008 - 04: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
+Quote Post

orcasquall
RE: How To Change Permissions On A System Stored Procedure?
30 Jul, 2008 - 05:35 AM
Post #3

D.I.C Head
Group Icon

Joined: 14 Sep, 2007
Posts: 158



Thanked: 3 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
+Quote Post

Nolan
RE: How To Change Permissions On A System Stored Procedure?
30 Jul, 2008 - 09: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
+Quote Post

Trogdor
RE: How To Change Permissions On A System Stored Procedure?
31 Jul, 2008 - 01:36 AM
Post #5

D.I.C Addict
Group Icon

Joined: 6 Oct, 2006
Posts: 549



Thanked: 4 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
+Quote Post

orcasquall
RE: How To Change Permissions On A System Stored Procedure?
31 Jul, 2008 - 04:26 AM
Post #6

D.I.C Head
Group Icon

Joined: 14 Sep, 2007
Posts: 158



Thanked: 3 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
+Quote Post

Nolan
RE: How To Change Permissions On A System Stored Procedure?
31 Jul, 2008 - 09: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
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 02:02AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month