SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)


By Clinton Herring,

Executes a file containing T-SQL code without using OSQL. The file can be up to 80,000 characters. Each line in the file should be no more than 256 characters. (Customize the code as needed.) The DOS Type command is used to retrieve the code. Embedded "go"s are removed so don't expect termination behavior. The only parameter is a fully qualified file path passed as a 256 varchar string. Uses dynamic SQL to run the file. Runs in the context of the database your connected to when you call the proc unless the file code redirects it. Holding tables are real tables created in Tempdb and then dropped at the end of execution. This could cause problems in code that repeatedly calls the proc. Use at your on risk.

Total article views: 510 | Views in the last 30 days: 4