Wednesday, March 21, 2012

How to run .SQL script file

hello all,
I have the .sql script file that I need to run to update
the SQL 2000 database. How do I run the script file?
thanks.You can run "Query Analyzer" application or go to command prompt and then
run osql.exe
M.
"Ken" <knguyen@.phsnet.org> wrote in message
news:03ad01c36107$a581d300$a301280a@.phx.gbl...
> hello all,
> I have the .sql script file that I need to run to update
> the SQL 2000 database. How do I run the script file?
> thanks.|||Assuming you have Query Analyzer you can just open the file in that and run
it. If not then all versions come with the command line tool osql and so you
would need a command like below if you saved the script as c:\proc.sql
osql -E -S<servername> -d<databasename> -ic:\proc.sql
See the link below for syntax
http://msdn.microsoft.com/library/en-us/coprompt/cp_osql_1wxl.asp
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Ken" <knguyen@.phsnet.org> wrote in message
news:03ad01c36107$a581d300$a301280a@.phx.gbl...
hello all,
I have the .sql script file that I need to run to update
the SQL 2000 database. How do I run the script file?
thanks.sql

No comments:

Post a Comment