tables script genaration

  • How to genarated tables script through programs? The genarated script must be same as script genarated through 'Enterprise Manager'

  • Have not seen any tool that produces the same scripts as EM does, I started work on code to do it but have not finished and don't know when I will.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • hi

    Are there any system SP or tables , that stores all information related to user table? Using this information I can genarate the script. Like using sp_helptext I have genarated script for the SP.

  • Views, triggers and check constraints can also be done that way. But to tie the table together you have to look at sysobjects, sysindexes, syscolumns, and a few other places.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • hi,

    Can u guide me on this line so that using this information I will create a view and from view ..script.

    Thanx for ur reply... I will be back after some time

  • Run a trace on your db using SQL Profiler then create a scipt of your table using EM and view the commands executed in profiler to see where the data is sourced from.

    Regards,

    Andy Jones

    andyj93@hotmail.com

    .

  • DMO has every option you'll need to script stuff out. I've got a couple articles posted that explore different bits of it.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply