Deploying ASP.NET MVC Database to Production?

You can use aspnet_regsql. Exe, located under C:\Windows\Microsoft. NET\Frameworkyour framework to generate the schema in your db Run: aspnet_regsql.

Exe /? And you will see all of the command-line options this executable takes A lets you specify what features (i.e. , tables) will get created.

If you do not use roles, for example, you may just use A mp You can choose to have it modify your database directly, or instead create a script that you can run. Some details here: weblogs.asp.net/lhunt/archive/2005/09/26....

You can use aspnet_regsql. Exe, located under C:\Windows\Microsoft. NET\Frameworkyour framework to generate the schema in your db.

Run: aspnet_regsql. Exe /? And you will see all of the command-line options this executable takes.

-A lets you specify what features (i.e. , tables) will get created. If you do not use roles, for example, you may just use -A mp.

You can choose to have it modify your database directly, or instead create a script that you can run. Some details here: weblogs.asp.net/lhunt/archive/2005/09/26....

Thanks. Is this typical of an ASP. NET MVC deployment to production?

– ashes999 May 17 at 15:47 1 Many people use tools like RedGate SQL Compare to migrate schema (or data) changes) – RedFilter May 17 at 16:20 This also generates the stored procedures, right? – ashes999 May 17 at 16:45 @ashes999 yes, it does – RedFilter May 17 at 16:49 how do I execute it from code? I'm using ActiveRecord right now, and doing everything through ActiveRecordStarter.

CreateSchemaFromFile(...). But this has stored procedure creation, too. – ashes999 May 17 at 23:56.

You could run aspnet_regsql utility on your (empty) production database to generate the aspnet_* tables. Check out the MSDN article on the utility.

You can also deploy the db using Visual Studio. In VS, open the database explorer window Add a connection to your local db Right-click on the database and choose 'Publish to Provider' The db publishing wizard will open The wizard lets you select which db objects you want to deploy (tables, stored procedures, etc. ) Select the 'Script to file' option, which will create a script that you can run on your prod db Open SQL Server Management Studio Connect to your prod db Open the script file you created with the wizard and execute the script.

1 good solution. But I'd much rather have everything in scripts which I can run to populate my DB. Plus, that's how migrations essentially work, and a solution in line with that is what I'm looking for.

– ashes999 May 17 at 22:48.

You can choose to have it modify your database directly, or instead create a script that you can run.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions