[dba-SQLServer] Viewing and Modifying stored procedures

Jennifer Gross jengross at gte.net
Tue Jun 26 11:44:48 CDT 2007


Thanks Robert.  It is sinking in that this is the way it works in SQL
Server.  Even if I just want to see the stored procedure so that I can
understand what it does (since I inherited this database), I have to
generate this ALTER PROC template and then close the window without
saving.  Seems strange that I just can't take a look at the stored
procedure code, but I guess that's the way it is.

Jennifer

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Robert
Sent: Tuesday, June 26, 2007 9:36 AM
To: dba-sqlserver at databaseadvisors.com
Subject: Re: [dba-SQLServer] Viewing and Modifying stored procedures


Jennifer,

That is the "editing" window.
Not sure what you expected.

If you were expecting a grid view,
then you are not going to get it.
Stored procs are not views, but
can be anything from a simple SQL
statement to hundreds of lines
of code to do complex things.

If the stored proc is a simple
select statement and you are not
comfortable writing SQL, use the
view to create the SQL for you.
Then copy and paste it into the
stored proc.

The ALTER statement is how the
code for the stored proc is saved
when you change it. What it is doing
is making a copy of your SP then
allowing you to change it. If you
goof up, you just close the window
and don't save or execute it. Then
open the SP again to get the original
ad start your editing again.

Robert


At 11:26 AM 6/26/2007, you wrote:
>Date: Tue, 26 Jun 2007 09:16:55 -0700
>From: "Jennifer Gross" <jengross at gte.net>
>Subject: Re: [dba-SQLServer] Viewing and Modifying stored procedures
>To: "SQL Server List" <dba-sqlserver at databaseadvisors.com>
>Message-ID: <00d701c7b80d$6d78afe0$6501a8c0 at jefferson>
>Content-Type: text/plain; charset=us-ascii
>
>Hi Elizabeth,
>
>Yes, I have modify.  What it does is set up a template T-SQL script to 
>modify the stored procedure.  If that is the only way to do it, then 
>that is how I will have to work with it.  I was hoping for just an 
>editing window.  Since I inherited this database what I really want to 
>do is poke around and look at the code and I can't seem to find any way

>to just look at the code without generating one of these T-SQL 
>templates.
>
>I hope that makes sense.
>
>Jennifer


_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com






More information about the dba-SQLServer mailing list