Friday, March 23, 2012

Need Source for Information_Schema Views

You can find the source code for these views in the master database...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Larry" <Larry@.discussions.microsoft.com> wrote in message
news:DD2349E8-3160-478A-9ED5-1E9CB7B37FA0@.microsoft.com...
>I need the source definitions for the Information_Schema.Routines view and
> would probably find a use for other view sources from time to time. Can
> anyone point me to these?
> I am trying to reverse engineer a poorly documented SQL Server 2000 DB wit
h
> EXTENSIVE business logic in hundreds of sometimes large SPs. The
> Information_Schema.Routines view only allows 4000 characters for the routi
ne
> definition column (the source code for the procedure) and I have lots and
> lots of SPs over that limit. I'm trying to create a report containing key
> info about key procedures but I'm having content chopped off.
> Thanks. Larry
> --
> Larry WestHi Larry
Can you clarify?
Is your need actually to get the definition of the
Information_Schema.Routines view, or is to find a way to display the text of
your own procedures that are are more than 4000 characters in length?
You can use sp_helptext 'my_proc_name' to get the full text of any
procedure. You can also use it to get the full text of any view, so you
could go to the master database and do this
exec sp_helptext 'information_schema.routines'
Or, in your own user databases, you could do this:
EXEC sp_helptext 'mybigprocedure'
Also note that in certain tools, like the Query Analyzer, the maximum number
of display characters is by default set to a small number. You would see the
full definition, even if it is available, if you don't go to
Tools|Options|Results and change the value of Maximum characters per column.
HTH
Kalen Delaney, SQL Server MVP
"Larry" <Larry@.discussions.microsoft.com> wrote in message
news:DD2349E8-3160-478A-9ED5-1E9CB7B37FA0@.microsoft.com...
>I need the source definitions for the Information_Schema.Routines view and
> would probably find a use for other view sources from time to time. Can
> anyone point me to these?
> I am trying to reverse engineer a poorly documented SQL Server 2000 DB
> with
> EXTENSIVE business logic in hundreds of sometimes large SPs. The
> Information_Schema.Routines view only allows 4000 characters for the
> routine
> definition column (the source code for the procedure) and I have lots and
> lots of SPs over that limit. I'm trying to create a report containing key
> info about key procedures but I'm having content chopped off.
> Thanks. Larry
> --
> Larry West|||I need the source definitions for the Information_Schema.Routines view and
would probably find a use for other view sources from time to time. Can
anyone point me to these?
I am trying to reverse engineer a poorly documented SQL Server 2000 DB with
EXTENSIVE business logic in hundreds of sometimes large SPs. The
Information_Schema.Routines view only allows 4000 characters for the routine
definition column (the source code for the procedure) and I have lots and
lots of SPs over that limit. I'm trying to create a report containing key
info about key procedures but I'm having content chopped off.
Thanks. Larry
--
Larry West|||You can find the source code for these views in the master database...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Larry" <Larry@.discussions.microsoft.com> wrote in message
news:DD2349E8-3160-478A-9ED5-1E9CB7B37FA0@.microsoft.com...
>I need the source definitions for the Information_Schema.Routines view and
> would probably find a use for other view sources from time to time. Can
> anyone point me to these?
> I am trying to reverse engineer a poorly documented SQL Server 2000 DB wit
h
> EXTENSIVE business logic in hundreds of sometimes large SPs. The
> Information_Schema.Routines view only allows 4000 characters for the routi
ne
> definition column (the source code for the procedure) and I have lots and
> lots of SPs over that limit. I'm trying to create a report containing key
> info about key procedures but I'm having content chopped off.
> Thanks. Larry
> --
> Larry West|||Hi Larry
Can you clarify?
Is your need actually to get the definition of the
Information_Schema.Routines view, or is to find a way to display the text of
your own procedures that are are more than 4000 characters in length?
You can use sp_helptext 'my_proc_name' to get the full text of any
procedure. You can also use it to get the full text of any view, so you
could go to the master database and do this
exec sp_helptext 'information_schema.routines'
Or, in your own user databases, you could do this:
EXEC sp_helptext 'mybigprocedure'
Also note that in certain tools, like the Query Analyzer, the maximum number
of display characters is by default set to a small number. You would see the
full definition, even if it is available, if you don't go to
Tools|Options|Results and change the value of Maximum characters per column.
HTH
Kalen Delaney, SQL Server MVP
"Larry" <Larry@.discussions.microsoft.com> wrote in message
news:DD2349E8-3160-478A-9ED5-1E9CB7B37FA0@.microsoft.com...
>I need the source definitions for the Information_Schema.Routines view and
> would probably find a use for other view sources from time to time. Can
> anyone point me to these?
> I am trying to reverse engineer a poorly documented SQL Server 2000 DB
> with
> EXTENSIVE business logic in hundreds of sometimes large SPs. The
> Information_Schema.Routines view only allows 4000 characters for the
> routine
> definition column (the source code for the procedure) and I have lots and
> lots of SPs over that limit. I'm trying to create a report containing key
> info about key procedures but I'm having content chopped off.
> Thanks. Larry
> --
> Larry West

No comments:

Post a Comment