Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Creating a data...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 11181 of 11517
Post > Topic >>

Creating a database from set of TSQLl files

by Annonymous Coward <me@[EMAIL PROTECTED] > Jun 26, 2008 at 10:31 AM

I have written a set of sql files that make my entire database schema. I 
  have divided the schema into seperate files mostly for "manageability" 
(for example, I can check error codes as I go along, and terminate the 
process as soon as an error occurs).

I have several tsql files in a directory, and I want to be able to write 
a batch script (or something similar), which allows me to:

1). Process each of the individual files (i.e. execute the commands in 
the file)
2). re****t succes or failure for the file
3). Abort the entire process if a command in one of the files failed

The batch part I can largely figure out myself. So my question basically 
  can be simplified as:

How can I read and execute TSQL commands from a file - AND return an 
success/error code ?
 




 2 Posts in Topic:
Creating a database from set of TSQLl files
Annonymous Coward <me@  2008-06-26 10:31:22 
Re: Creating a database from set of TSQLl files
"Dan Guzman" &l  2008-06-26 07:44:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 0:44:36 CST 2008.