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)
 Missing SP!

Author  Topic 

yankleber
Starting Member

5 Posts

Posted - 2010-01-18 : 14:24:03
I have created a simple SP called 'CatchError' that I use within a TRY..CATCH block to dump error (if applicable) to a table.

The case is that this SP is kind of missing. I can execute it and SQL Management Studio tells me that the SP is there, but I cannot find it anywhere.

By running the following query:


SELECT DISTINCT SO.NAME
FROM SYSOBJECTS SO (NOLOCK)
WHERE SO.TYPE = 'P'
AND SO.NAME LIKE '%CatchError%'
ORDER BY SO.Name


It lists the SP, but doesn't tell me WHERE it is. I need to make a few changes in the SP, but I cannot edit it because I cannot find it.

I have an 'ocean' of SPs along over 20 databases, and I went through one by one looking for it manually, but no success... Any clues about how to find a missing SP?

Thanks!

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-01-18 : 14:31:10
Also asked here: http://www.sqlservercentral.com/Forums/Topic849327-149-1.aspx

--
Gail Shaw
SQL Server MVP
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-01-18 : 14:45:38
You edit it via ALTER PROC. It's in whatever database you are connected to when you run the query you posted.

ALTER PROC SpName
...

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-01-18 : 14:47:41
Is the issue that it was created for a specific User, rather than the more normal "dbo" user?

SYSOBJECTs contains that information, but you'll have to dig a bit deeper to gget it out of your query above!
Go to Top of Page
   

- Advertisement -