470,848 Members | 1,829 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

Can you qry sys tbls to find Triggers, Constrants etc?

I have just been handed a HUGE dB with 100's of SP, TBLs UDF etc etc.

I need to add 1000's of records from a flat file accross dozens of
related tbls ASAP! (You know the drill)

The dB was built with a lot of Business Logic, Constraints etc.

I am a Web APP developer and know a lot of TSQL and can also build
basic triggers and some pretty complex SP and have built solid dB from
scratch but I usually handle business logic and data intergrity before
it even gets to the dB (or at least I like to think I do).

With that said there is no documentation (of course)and I need to
reverse engineer this beast ASAP.

I was hoping there is a way to qry the SYS tbls or some tricks to get
all this info I am looking for.

I use the ALT+F1 short cut on tables all the time and am looking for a
solution along those lines.

Any help would be great and whom ever gives me the key(s) to unlocking
this mess I will give them a free access to a New RSS Fantasy Football
site launching this summer! If you're not into FF then you can give it
to a friend or something.

Jul 23 '05 #1
2 1884
Why don't you download an evaluation version of Sybase PowerDesigner or
simular tool and get that to do the work for you.

I am coding a replacement for Enterprise Manager and can tell you that
getting the table schema from the database requires you to build it
yourself by linking to a few system tables.

The syntax for the procedures, views and indexes are found in the
syscomments table.

The sysobjects table contains the objects names and types in it.

--
David Rowland
http://dbmonitor.tripod.com

Jul 23 '05 #2
gmlear (go*********@gmail.com) writes:
I have just been handed a HUGE dB with 100's of SP, TBLs UDF etc etc.
Huge database? Sounds like a small database to me.
I need to add 1000's of records from a flat file accross dozens of
related tbls ASAP! (You know the drill)

The dB was built with a lot of Business Logic, Constraints etc.

I am a Web APP developer and know a lot of TSQL and can also build
basic triggers and some pretty complex SP and have built solid dB from
scratch but I usually handle business logic and data intergrity before
it even gets to the dB (or at least I like to think I do).

With that said there is no documentation (of course)and I need to
reverse engineer this beast ASAP.

I was hoping there is a way to qry the SYS tbls or some tricks to get
all this info I am looking for.


While a crash-course in system tables might help you, it sounds to me
like you need a data-modelling tool with reverse-engineering capabilities.
Enterprise Manager comes with Visual Modeler. That is a light-weight tool,
but it may take some part of the way.

For more heavy duty stuff there is PowerDesigner from Sybase, Erwin
from Computer Associates and ER/Studio from Embrocadero. Of course,
they come with a hefty license, but at least PowerDesigner is availble
for a 15-day trial. (Although using the trial for production things
may violate the license agreement.) You can get PowerDesigner rrom
www.sybase.com.

But you should not really complain about the constraints being io the
database. Those will tell where not to store the data. :-)
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by tim.pascoe | last post: by
debasisdas
reply views Thread by debasisdas | last post: by
4 posts views Thread by --CELKO-- | last post: by
2 posts views Thread by Olumide | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.