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 2000 Forums
 SQL Server Administration (2000)
 Missing Stored Procedure

Author  Topic 

Cruiser859
Starting Member

45 Posts

Posted - 2007-04-24 : 19:17:17
Hi

I have a database that is all set up with data, but there is a missing SP.

Is there a way to add just that SP?

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-04-24 : 19:27:52
Yes. Do you have the source code for it?

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-24 : 19:28:25
Yes. Just run the create procedure script for that SP


KH

Go to Top of Page

Cruiser859
Starting Member

45 Posts

Posted - 2007-04-24 : 19:32:49
Thanks

I don't have the source.

I'm totally a novice. How do I run the create procedure script for that SP?

thanks
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-04-24 : 19:52:44
Well you need to have the script which you say you don't have. So I'm not sure how we can help you.

Can you contact the person who wrote it?

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-25 : 01:37:37
Was the stored procedure dropped ? Do you have backup copies of the database ?


KH

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-04-25 : 04:21:32
If the SP exists in another database you can Script it from there, and then run that Script on the database where it was dropped.

If you have a backup, even an old one!, which contains the SP you can restore that backup to a brand new, temporary, database - script the SP, and then Drop the temporary database.

Kristen
Go to Top of Page

Cruiser859
Starting Member

45 Posts

Posted - 2007-04-25 : 08:42:38
Thanks to all

I have the part of the db script I need. It start with

CREATE PROCEDURE [dbo].[xxxxxx2006_GetParentPages]

and ends with GO

I know I need to open the DB in QA do I need to do anything other than copy and paste this script into the window, parse it and execute it? (Meaning is there a command I need to type in with the script?)

Thanks.
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-25 : 09:00:57
No. If you have script ready with you, you can just paste it in the QA and press F5 to compile it.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Cruiser859
Starting Member

45 Posts

Posted - 2007-04-25 : 09:01:47
Thanks to everyone who responded. That was all I had to do and I am now back in business.

Thanks a million!!!
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-04-25 : 13:49:33
You might need to check what Permissions the Sproc had on whichever database you "rescued" it from.

(i.e. the EXECUTE permissions on the original Sproc might have been assigned to certain Users/Roles)

Kristen
Go to Top of Page
   

- Advertisement -