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.
| Author |
Topic |
|
robertnzana
Starting Member
42 Posts |
Posted - 2008-05-26 : 23:08:34
|
| I created a bunch of stored procedures on my dev machine using Visual Studio 2008 interface.Now I am using MS SQL Server Mgmt Studio 2005 and looking at the PRODUCTION database online. I tried to create the new stored procedure. But how do I SAVE it to the database? It keeps asking me to save the sql file locally, but I don't know how to do it to the db itself. Please help.Thanks! |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-05-26 : 23:11:42
|
| If you have executed and ran successfully, then it should be saved in database. You can script your Sp from dev to Prod box. |
 |
|
|
robertnzana
Starting Member
42 Posts |
Posted - 2008-05-26 : 23:14:00
|
| thanks - yes, the key was to EXECUTE iti guess i thought that EXECUTE meant to RUN it and i didn't want to do thatthanks sodeep!!!! |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-05-26 : 23:15:23
|
| And you can verify if new sp created or not in sys.objects. |
 |
|
|
mdubey
Posting Yak Master
133 Posts |
Posted - 2008-05-27 : 09:53:59
|
| Stored procedure is having great feature. Once you create a sp it will automatically stored in Compiled form, you do not have Comile it again and again.synt.CREATE PROC [ EDURE ] procedure_name [ ; number ] [ { @parameter data_type } [ VARYING ] [ = default ] [ OUTPUT ] ] [ ,...n ] [ WITH { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ] [ FOR REPLICATION ] AS sql_statement [ ...n ] ManojMCP, MCTS |
 |
|
|
robertnzana
Starting Member
42 Posts |
Posted - 2008-05-27 : 10:08:53
|
| thanks - this forum (and you guys) are awesome! |
 |
|
|
|
|
|