Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running a .sql file 1

Status
Not open for further replies.

killglance

Technical User
Jan 9, 2004
3
GB
Hi all,

I am a complete virgin at SQL and need some advice. I am running SQL2000 and someone has provided me with a .sql file that creates a database. Can anyone point me at how to run this file? I have hunted around in the settings but to no avail.

Your help is appreciated.
 
Run it from Query Analyzer

Open Query Analyzer (Start>Programs>Microsoft SQL Server>Query Analyzer or from Enterprise Manager, click on Tools, select Query Analyzer).

Once you make the connection (log on to the server via QA), right click on the 'open folder' icon. Browse to the script you want to run. Double click on the script and it will appear in the QA window. Click on the Green Arrow (execute).

-SQLBill
 
Thanks, Bill, that was outstanding. I would never have found that on my own or rampaging around the Internet...nice one.
 
By the way, the best tool for help (besides this forum) is the BOL. That's short for Books OnLine which is MS SQL Server's Help. The BOL is installed as part of SQL Server's Client Tools. You can get to it via Query Analyzer's Help, Enterprise Manager's Help or Start>Programs>Microsoft SQL Server>Books OnLine.

Also, if you aren't already aware, there is a MS SQL Server PROGRAMMING forum at FORUM183.

-SQLBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top