Author |
Topic |
Cruiser859
Starting Member
45 Posts |
Posted - 2007-04-24 : 19:17:17
|
HiI 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 Kizerhttp://weblogs.sqlteam.com/tarad/ |
 |
|
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 |
 |
|
Cruiser859
Starting Member
45 Posts |
Posted - 2007-04-24 : 19:32:49
|
ThanksI don't have the source.I'm totally a novice. How do I run the create procedure script for that SP?thanks |
 |
|
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 Kizerhttp://weblogs.sqlteam.com/tarad/ |
 |
|
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 |
 |
|
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 |
 |
|
Cruiser859
Starting Member
45 Posts |
Posted - 2007-04-25 : 08:42:38
|
Thanks to allI have the part of the db script I need. It start with CREATE PROCEDURE [dbo].[xxxxxx2006_GetParentPages] and ends with GOI 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. |
 |
|
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 AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
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!!! |
 |
|
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 |
 |
|
|