Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deploying SQL Express Databases
Message
From
13/10/2010 23:58:02
 
 
General information
Forum:
ASP.NET
Category:
Installation, Setup and Configuration
Environment versions
Environment:
C# 4.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01484908
Message ID:
01485419
Views:
42
>>I'll fill this in as I work it out. I did find this this morning:
>>
>>http://www.codeproject.com/KB/database/Deploy_your_database.aspx
>>
>>But I'm not sure I like the idea of installing from a backup, and for security reasons since this app accesses the users twitter account it probably should be a per user installation.
>
>Only had time for a quick look at the main link.
>I'd also be worried about getting the right user/login permissions transferred.
>
>This might be worth some investigation: http://msdn.microsoft.com/en-us/library/bb907585.aspx
>
>Also (I just remembered) we looked briefly at RedGate products ('SQL Compare' and 'SQL Data Compare' ) for this. Also pretty clever at updating database structures for newer versions. But not free :-{

Good article thanks, actually off the top of my head I can think of four ways to generate the scripts.

- The one in that article
- In the Entity Framework edmx viewer you can right click and select generate database from model.
- You can also use script database as... in Server Management Studio Express.
- And you can also create a database project.

I wanted to look into the database project option a bit more when I get some time. It appears to be able to do some version tracking stuff, but I'm not sure if that capability is in all versions of vs2010 or just in the ultimate versions.

The rest of that is article is mostly for publishing to a website, which won't help me here.

Scripting the database seems a better option to me than restoring or attaching the database. So that will probably be the way I go with this.

For my in house projects, after they go live I always start a script file for each new version. Any changes I make to the database are done in that script. I make them -- run the script -- and then comment them off. When I go live with the next version I remove the comments and run the whole script on the master database, that works pretty good. I expect I will do something similar with this. (I do use backup and restore but only to refresh the dev database with fresh data from the live database. I have a batch file I use for that.)

I wonder if anyone here has played with the database projects.
Previous
Reply
Map
View

Click here to load this message in the networking platform