Creating an install package

  • Hi,

    Sorry for this simple question, I am looking for information which describes how to create an installer/exe file which when runs creates and populates and database inside a sql server instance that has already been installed.

    For example the installer for Adventureworks, on install file, when run goes and creates a db, and populates it. Whats the easy way to go about setting this up.

    Any pointers to web pages etc would be great.

    Many Thanks for your help,

    Oliver

  • I believe you can use the Taks | Generate Script option when you right-click the database.

    Be sure and click Advanced on the second screen. Then change the Types of data to script option to Schema and data.

    This should create a script, or set of scripts, that you can use in an installation package to recreate the DB and data anywhere.

    Alternatively, you can detach the DB and include it in a package that runs the sp_attach_db proc to attach the DB to the new server.

  • many thanks for the response.

    After generating the scripts do you then use visual studio to create the installation package?

    Many Thanks,

    Oliver

  • you could use SMO calls or build from T-SQL scripts!

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply