Click here to Skip to main content
15,888,733 members
Articles / Database Development / SQL Server

Tip: Run a Transact-SQL Script (.SQL File) From the Command Line

Rate me:
Please Sign up or sign in to vote.
4.75/5 (9 votes)
22 Dec 2010CPOL2 min read 83K   9  
Provides the quick-and-dirty syntax to connect to a given Microsoft SQL Server instance so you can then run a .sql query script against it, e.g., if you are calling this from code as part of a larger pipeline

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

No alternatives have been posted.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
United States United States
Brian C. Hart, Ph.D., is a strategic engagement leader on a mission to leverage space technology to protect U.S. interests and assets against adversaries. Throughout Dr. Hart's career, he has enjoyed: Working closely with business executives to provide strategic direction and leadership, translating customer and competitive intelligence into compelling capture strategies and solutions, and mentoring teams to enhance individual and company capabilities while fostering an engaging and accountable environment, being involved in STEAM initiatives and education to develop greater awareness in the community, and serving the armed forces with the U.S. Navy and U.S. Army National Guard. He is excited to begin developing his career in Jacobs's Critical Mission Systems business unit, supporting NORAD and the U.S. Space Force.

Comments and Discussions