Hi, I've been creating some applications with SQLExpress and find myself, scripting the database creation, tables and other entities etc. after application installation. Is this the normal way?
Thanks
Hi, I've been creating some applications with SQLExpress and find myself, scripting the database creation, tables and other entities etc. after application installation. Is this the normal way?
Thanks
A faster way would be to make a backup of a template database, and restore that as part of the install.
AFAIK, thats how MS and Orcl (especially) do it.
Making a template database and restoring that works only if you do not need to upgrade your database while keeping (most of) the data.
Even though it is cumbersome, I actually use a few classes that check the database versions and run the necessary scripts (either installation of SQLExpress, installing the database or doing upgrades).