Automatic script out database objects to file

问题 Automatic script out database objects to file

  • mercredi 10 janvier 2007 13:37
     
     

    Hi champs,

    It is possible to script the databases , tables and all other objects, out to a SQL file.

    Is there a way to control this with a script?

    For instance, want to run a script that schripts only all the tables out to a result -SQL script.

    Or a script that scripts out all the constraints and user defined variables to a SQL result script.

     

    Is this possible to do in a SQL script?

     

    /Many thanks

Toutes les réponses

  • mercredi 10 janvier 2007 14:19
    Modérateur
     
     
    YOu can use the SMO classes for that with iterating through the information of the object collections, but you can´t do that in TSQL easily.

    HTH, Jens K. Suessmeyer.

    ---
    http://www.sqlserver2005.de
    ---