|
|
 |
|
|
- Nguyễn Mạnh Trường
|
|
- 0988091006
|
|
- www.aivietnam.net
|
|
- truongnm@aivietnam.net
|
|
|
|
|
|
|
| Download: |
|
| Deploy_your_database_src.zip |
|
|
|
|
|
Rate
Admin: |
0/0 |
Rate
Member: |
0/0 |
|
Total
Mark: |
1146 |
Current
Mark: |
5 |
Reply: |
6 |
|
|
How to deploy sql server database when you set up application
Deploy your application and database.
Introduction
This article describes simple way to deploy you application and database. Once the development and testing of application are done, it is necessary to create some script that installs your application to target computer. In VS2003/2005 it can be done by adding setup project to your solution and performing build on it. Get more info about setup projects on MSDN site. But sometimes situation is more complicated.
Database
Usually your application has some storage for saving its data. In my example we are talking about SQL server database. My database is schema (table definitions), stored procedures and some predefined data (like ENUMs, application users and so on, that stored in database). So as you can see, my Setup project is not only script that deploys application's binaries to target computer but also contains some logic for finding local SQL server ( can be modified to find any SQL server in local network ), creating database and inserting all predefined application data. You can download document and demo code to get description how it can be done.
|