HOW TO CREATE A DATABASE INSTALLER

  • I need to create a database installer for SQL Server 2000. I need to create the installer for a database, tables and  stored procedures in the database, indexes....

    Can anyone please suggest me an appropriate tool for creating a database installer, I would be really grateful.

    Thank You,

    Ron.

  • The way that I do it is to create a standard batch file that contains a bunch of OSQL scripts.

    All my objects are generated in scripts which I break down into

    00_CreateDatabase.SQL

    01_Defaults.SQL

    02_Rules.SQL

    03_DataTypes.SQL

    04_Tables.SQL

    05_Triggers.SQL

    06_Views.SQL

    07_IndexesAndConstraints.SQL

    08_Functions.SQL

    09a_Procedures_Get.SQL

    09b_Procedures_Add.SQL

    09c_Procedures_Set.SQL

    09d_Procedures_Del.SQL

    10_BaseData.SQL

    My batch file has environment variables so that I can amend the batch batch file as and when I need it to carry out different install behaviour.

  • On a number of applications, I have just distributed the MDF file. Especially if this is for a database used by just your application, this may be appropriate.  For a couple of applications that were distributed to my client's customers, I setup an application to create a customized database for the customer, then detach it and wrap it in a setup program that attaches it at the installation site.  This is much easier than trying to script out the schema and sprocs, and fill in the data for the lookup tables.



    Mark

  • What about Triggers on Views?

    What about Constraints using Functions (same for Rules)?

    What about computed columns in Tables using Functions?

    What about Views using Functions?

    What about data processing SP, not only interacting with application?

    What about Triggers calling Procedures?

    etc.

    You are using really simplified model, it's far away from universal.

    It cannot be used for the most of real databases.

     

    _____________
    Code for TallyGenerator

  • I have done like this .

    From the development database once everything is tetsed and certified. I will generate script for the database and run it on the other testing server to create the database, from there i will take full backup and BURN it on CD. One small batch file we do the restore of the datase on the production system using osql and restore with move asking client place where the primary,secondary and transactional files hase to be saved on their system.

    Any other suggestions ?

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

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