Results 1 to 2 of 2

Thread: Execote script files

  1. #1
    TomB Guest

    Execote script files


    i have generated sql script (sqlobject.sql example
    mytable.sql), how can i run these at runtime.

    The app has a option to start a new project, which
    creates a new database on the server by usin sql-dmo.
    Now i want to create all tables, sp's etc which i have
    in sql script files.

    What to use, sql-dmo, sqlns, or sp.
    I tried to make dts packs but it dit not work
    with global variables for catalog and server name

    Help ...

    Tom

  2. #2
    Karl Guest

    Execote script files (reply)

    Personally I would do it in an sp.

    Use, xp_cmdshell &#39;osql -E -S <servername> -d <databasename> -i <filename>&#39;.

    Hope that helps,

    Karl


    ------------
    TomB at 6/13/2002 3:46:16 PM


    i have generated sql script (sqlobject.sql example
    mytable.sql), how can i run these at runtime.

    The app has a option to start a new project, which
    creates a new database on the server by usin sql-dmo.
    Now i want to create all tables, sp&#39;s etc which i have
    in sql script files.

    What to use, sql-dmo, sqlns, or sp.
    I tried to make dts packs but it dit not work
    with global variables for catalog and server name

    Help ...

    Tom

Posting Permissions

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