how to run sql script

  • i have an sql script(.sql format) and i want to run it on my remote host which support mssql server..

    sql script includes creating tables and somthng like this..

    how can i do this please show me a way..

    thanks

  • isql -Uusername -Sservername -iscript.sql -oscript.out

    Query Analyzer

  • In addition to those two (and osql), you can also use VBScript which can use SQL-DMO and fire off SQL scripts after getting the input such as instance-name, authentication used (login and password if SQL Server authentication is used), database name etc.

  • Or just open Query Analyzer, connect to the remote server, open the file, select the correct database, and then hit F5.

     

Viewing 4 posts - 1 through 3 (of 3 total)

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