|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
modifying stored procedure with SSMSEI have a MSSQL 2000 db that was imported into SQL2005.
I use the Management Studio to administer the database. When I modify a stored procedure and hit "save" I'm asked to save a file called something like "SQLQuery10.sql" to a place on my own harddrive!? I wan't to save the sp on the server for immediate use just like MSSQL2000 did. What am I missing here? Thanks. Jesper Um....hope about executing the code in your query window?
Show quote "Jesper F" <askfortheem***@ask.com> wrote in message news:eVt4XdVDGHA.1180@TK2MSFTNGP09.phx.gbl... >I have a MSSQL 2000 db that was imported into SQL2005. > I use the Management Studio to administer the database. > When I modify a stored procedure and hit "save" I'm asked to save a file > called something like "SQLQuery10.sql" to a place on my own harddrive!? I > wan't to save the sp on the server for immediate use just like MSSQL2000 > did. > What am I missing here? > > Thanks. > > Jesper > If you right-clicked the stored procedure and then clicked modifiy, then you
will see the script in the Query Editior window is an ALTER PROC statement. Instead of hitting Save, click Execute. That will alter the procedure. -- Show quoteRick Byham MCDBA, MCSE, MCSA Lead Technical Writer, Microsoft, SQL Server Books Online This posting is provided "as is" with no warranties, and confers no rights. "Jesper F" <askfortheem***@ask.com> wrote in message news:eVt4XdVDGHA.1180@TK2MSFTNGP09.phx.gbl... >I have a MSSQL 2000 db that was imported into SQL2005. > I use the Management Studio to administer the database. > When I modify a stored procedure and hit "save" I'm asked to save a file > called something like "SQLQuery10.sql" to a place on my own harddrive!? I > wan't to save the sp on the server for immediate use just like MSSQL2000 > did. > What am I missing here? > > Thanks. > > Jesper > > If you right-clicked the stored procedure and then clicked modifiy, then I was wondering about the "ALTER" part.> you will see the script in the Query Editior window is an ALTER PROC > statement. Instead of hitting Save, click Execute. That will alter the > procedure. Getting used to the new functions I guess. Thanks a lot! Jesper > If you right-clicked the stored procedure and then clicked modifiy, then Is there a way to just open up the the sp for modyfication and saving it > you will see the script in the Query Editior window is an ALTER PROC > statement. Instead of hitting Save, click Execute. That will alter the > procedure. back to the database or is using the ALTER command the only way to modify sp's? Hello
Good question and what is the answer ? Was it too simple ? "Jesper F" <askfortheem***@ask.com> a écrit dans le message de news: uavDjyYDGHA.3***@TK2MSFTNGP12.phx.gbl...Show quote >> If you right-clicked the stored procedure and then clicked modifiy, then >> you will see the script in the Query Editior window is an ALTER PROC >> statement. Instead of hitting Save, click Execute. That will alter the >> procedure. > > Is there a way to just open up the the sp for modyfication and saving it > back to the database or is using the ALTER command the only way to modify > sp's? > > > > Good question and what is the answer ? It is actually very simple, I just needed help from the guys in here to > > Was it too simple ? figure it out. What's different i SQL2005 is that when you open a stored procedure, it doesn't open up the way you created it. That is - it doesn't say "create procedure....." anywhere in it. Instead it says "alter procedure....". You make your changes and you hit the button "execute" in the toolbar. That automatically saves the procedure to the database. So in effect you're using the SQL command "ALTER" to change your stored procedure. This works just like hitting "save" in MSSQL2000. It's cool, but it took me a while to get the difference. Let me know if this is enough to get you going. Jesper well, it is clear now...
I really appreciate your answer, which is better than clear amicalement Jacques "Jesper F" <askfortheem***@ask.com> a écrit dans le message de news: ezqEnyaHGHA.2***@TK2MSFTNGP15.phx.gbl...Show quote >> Good question and what is the answer ? >> >> Was it too simple ? > > It is actually very simple, I just needed help from the guys in here to > figure it out. > > What's different i SQL2005 is that when you open a stored procedure, it > doesn't open up the way you created it. > That is - it doesn't say "create procedure....." anywhere in it. > > Instead it says "alter procedure....". > > You make your changes and you hit the button "execute" in the toolbar. > That automatically saves the procedure to the database. > So in effect you're using the SQL command "ALTER" to change your stored > procedure. > This works just like hitting "save" in MSSQL2000. > It's cool, but it took me a while to get the difference. > Let me know if this is enough to get you going. > > Jesper > Jesper F (askfortheem***@ask.com) writes:
> I have a MSSQL 2000 db that was imported into SQL2005. You don't save the procedure to the database. You should view a database> I use the Management Studio to administer the database. > When I modify a stored procedure and hit "save" I'm asked to save a file > called something like "SQLQuery10.sql" to a place on my own harddrive!? I > wan't to save the sp on the server for immediate use just like MSSQL2000 > did. > What am I missing here? a repository for binaries. Source code should be stored on disk, preferrably in a source-code control system. No, this was no the way that Enterprise Manager in SQL 2000 worked, but then again, that was a tool with many problem, including a flaw model for handelling source code. Mgmt Studio is certainly a leap forward in this regard. -- Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx |
|||||||||||||||||||||||