countrymeister
asked on
How can I find all stored procedures that have a following text - User does not have access
I am using SQL Server 2005, I need to find all procs which have the following string text in the procs
User does not have access
I am getting this message when I run a bat file, whcih calss a procs which in turn calls many other procs
Is there any way I can find this with a query
User does not have access
I am getting this message when I run a bat file, whcih calss a procs which in turn calls many other procs
Is there any way I can find this with a query
ASKER
It gives me foill error, my mistake, I am using sql 2000 and not 2005
Msg 208, Level 16, State 1, Line 1
Invalid object name 'information_schema.routin es'.
Msg 208, Level 16, State 1, Line 1
Invalid object name 'information_schema.routin
the statement works for sql server 2000 as well
what do you get if you run
sp_helptext <with_a_stored_proc_name_h ere>
what do you get if you run
sp_helptext <with_a_stored_proc_name_h
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Left(Routine_Name, 3) NOT IN ('sp_', 'xp_', 'ms_')
and routine_definition like '%User does not have access%'