Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Own stored procedures - permissions

Author  Topic 

Lauri332
Starting Member

9 Posts

Posted - 2009-02-26 : 07:18:59
Hello,

I've got a little problem:

I've got around 30 own stored procedures in a database. They were created by using my sa account. Now I want to grant access for another user on this database which should get the alter, grant and execute permissions.

Now my question is, if I can set this permission to all the 30 sp's at one time without doing it seperately for each one.

It would be very nice if someone could help me!!

Another short question:

I'm doing an export of a database. After that I want to import it into a new and empty db. My problem is that the primary keys I set are lost and replaced to automatic generated ones after the import.

Is there any solution for this?

Best regards
Lauri

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-26 : 09:13:35
Like this:

1)
Select 'GRANT EXECUTE ON' +' ' + name + ' ' +'TO USER'
from sys.sysobjects
Where type = 'P' and your choice


2)Use Backup/Restore approach.
Go to Top of Page
   

- Advertisement -