Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query for Stored procedures with Public Exec Permissions. 2

Status
Not open for further replies.
Apr 27, 2004
1
0
0
US
I need a query that will give me the list of Stored procedures that have public exec permission set on them. By default all of the SP should have it.
 
For starters
select * from sysobjects where type = 'P'
will give you all the SP's in the DB
Then I belive you can add to the where clause
..and uid in (0,1)
These are the UID's from the SysUsers table
0=public
1=DBO

 
That will give the owner of the SP not the users who have been granted execute permissions.
See sysprotects for the permissions.


======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top