Q. How do I execute a SQL script (.sql file) on my MS-SQL database server under Windows Sever 2003?
A. You can easily run any .sql file on MS-SQL database server using the Query Analyzer tool.
How can I execute a SQL script (.sql file) on my SQL Server ?
Open the Query Analyzer by visiting Start → Programs → MS SQL Server → Query Analyzer
Once opened, connect to the database that you are wish running the script on.
Next, open the SQL file using File → Open option. Select .sql file.
Once it is open, you can execute the file by pressing F5.
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- My 10 UNIX Command Line Mistakes
- Linux: 20 Iptables Examples For New SysAdmins

- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Facebook it - Tweet it - Print it -


{ 1 comment… read it below or add one }
H for host ,d for database , U for user and P for password
EXEC master.dbo.xp_cmdshell ‘isql -Hhostname -ddbname -Uusername -Ppassword -i file’
example
EXEC master.dbo.xp_cmdshell ‘isql -H10.203.420.155 -dmdd3 -Umed -Piddmapis -i c:\upgrade110490.sql’