Running a .sql script w/o SQL Query Analyzer

  • Help! I am new to SQL and am trying to use a script that will create tables, etc.. I have an instance of SQL on my desktop, but I don't have SQL Query Analyzer. I did find the osql utility. Is there anyway I can run the script or download a utility that will allow me to run it? It's quite long, so an automated way would be preferred. Thanks!

  • osql will do fine

    Run it on the command line.

    osql -? will give options.

    If your login user has sufficient permissions on SQLServer the following should work:

    osql -E -d database-name -i script-name -o outputfile

Viewing 2 posts - 1 through 1 (of 1 total)

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