Results 1 to 6 of 6

Thread: generate Script

  1. #1
    Join Date
    Dec 2001
    Location
    Canada
    Posts
    45

    Question Unanswered: generate Script

    I want to generate a script of my database (SQL Server) but with the DATA... when i use the option task|generate script, the result is only the structure!....

    Can someone help me please!


    tanks

    Franky
    franky@boucheros.com

  2. #2
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    Can you give a short example of what your expected script would look like?
    Paul Young
    (Knowledge is power! Get some!)

  3. #3
    Join Date
    Dec 2001
    Location
    Canada
    Posts
    45

    generate script

    CREATE table1...
    CREATE table2...
    ...
    CREATE view1...
    CREATE view2...
    ...

    CREATE PROCEDURE dbo.procs1...
    CREATE PROCEDURE dbo.procs2...
    ...

    INSERT INTO table1 ...
    INSERT INTO table1 ...
    INSERT INTO table1 ...
    ...
    INSERT INTO table2 ...
    INSERT INTO table2 ...
    INSERT INTO table2...

  4. #4
    Join Date
    Aug 2002
    Location
    UK
    Posts
    87
    Unless you don't have much data or want to import into something like MySql i'm not sure why you would want to do this

    You can use the script generator to make you DataBase Structure and then something like a DTS package to dump the data and read it back again ??

  5. #5
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    It is possible to save script with data (using sysobjects, syscolumns,.....) but what if some tables have identity or timestamp columns?
    May be it is good idea to save data in script for particular tables - not for all tables.

    Good luck.

  6. #6
    Join Date
    Jun 2002
    Location
    USA
    Posts
    21
    Hi,

    Wingman is right.

    1. You can Script the Structure of the table then do DTS.

    2. Use DTS to transfer data and save the package for reuse. DTS is a more powerful tool ,very simple and interesting if you know it.
    Instead of using the sysobjects and syscolumns and do research on and make it more complicated, you can design your own DTS package and eliminate the Identity or Timestamp columns if you dont need or you can even modify the data using ActiveXscripts in DTS.
    Everything is possible using DTS. You can tranform the data completely as you desired.

    For more information, Play with DTS using BOL ( For Beginners ) and you will start doing wonders.

    Have fun

    Varad01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •