| Author |
Topic |
|
Starlet_GT
Yak Posting Veteran
81 Posts |
Posted - 2007-09-07 : 01:21:33
|
| In SQL Server 2000 when we use to create a new procedure it was saved in Management Consule, but when I create a new procedure and wants to save it SQL Server 2005 (Management Console) ... it saved like a query on my local drive ... I am confused what to do ... if i save it on local drive then how can i call it when required.Thanks in Advance ... |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-09-07 : 04:45:09
|
| stored procedurea are database objects.when you run a Create procedure statement they get created in the database.saving in SSMS is just saving the stored procedure definition in a .sql file.you still have to create it in sql server._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
Starlet_GT
Yak Posting Veteran
81 Posts |
Posted - 2007-09-07 : 07:09:42
|
| how to create it in SQL Server? Please explain Thanks in advance |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-09-07 : 07:21:40
|
| create procedure ProcName-- input parameters hereas-- your procedure body heregolook in books online = BOL = SQL server help for complete syntax_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
Starlet_GT
Yak Posting Veteran
81 Posts |
Posted - 2007-09-07 : 09:05:50
|
| Sorry I asked the wrong question ... I actually wants to know how to save a procedure in SQL Server? after creating it ... |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-09-07 : 09:08:37
|
| stored procedure is created in sql server.i think don't quite understand how this works...can you explain your understanding?_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
Vijaykumar_Patil
Posting Yak Master
121 Posts |
Posted - 2007-09-07 : 09:43:03
|
| Startlet,..if you have created a stored procedure..it is saved also ..you will find under the database you created in and in Programmabilty , under stored procedures. If this is what you want to know.Necessity is the mother of all inventions! |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-09-07 : 22:29:38
|
| It's stored in syscomments table if you like to know more. |
 |
|
|
Starlet_GT
Yak Posting Veteran
81 Posts |
Posted - 2007-09-08 : 02:58:43
|
| When I create a stored procedure and click save button ... it open a dialog box on my local drive and try to save it with *.SQL ...but ideally it should save it under programmability ... thats what I wanna know ... Thx in advance. |
 |
|
|
Zoroaster
Aged Yak Warrior
702 Posts |
Posted - 2007-09-08 : 08:42:40
|
quote: Originally posted by Starlet_GT When I create a stored procedure and click save button ... it open a dialog box on my local drive and try to save it with *.SQL ...but ideally it should save it under programmability ... thats what I wanna know ... Thx in advance.
When you create the stored procedure you use CREATE PROCEDURE right? If you format the CREATE PROCEDURE and then EXECUTE it will save it in programmability in the current or specified database. If you then click on SAVE in the file menu it is going to save the actual SQL script used to create the proc, these are two different things. Future guru in the making. |
 |
|
|
|