Wednesday, February 01, 2006

isqlw.exe replaced in Sql Server 2005

In all of our development projects, we have a batch script which concatenates all of the Sql scripts so the we can recreate the database with all the tables, default data and testing data in a single click.

The script file usually looks something like this:

set OUT=MASTER.SQL
del %OUT%
type Drop.sql Delimiter.txt >> %OUT%
type CreateTypes.sql Delimiter.txt >> %OUT%
type Create.sql Delimiter.txt >> %OUT%
type Procedures.sql Delimiter.txt >> %OUT%
type StartupData.sql Delimiter.txt >> %OUT%
type DefaultData.sql Delimiter.txt >> %OUT%
type TestData.sql Delimiter.txt >> %OUT%

isqlw.exe -dDbName -E -f %OUT%

In Sql Server 2005, the isqlw.exe command is replaced with the Sql Management Studio. The isqlw.exe line now looks like:

sqlwb -nosplash -d DbName %OUT%

Note that there must a space between the -d and the database name.