Re-deploying the database

Discussion in 'ASP.NET 4.0 RC Beta [Closed]' started by ldumond, Dec 8, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. It seems once the db has been deployed the first time, you're stuck. Since the Deploy SQL default behavior is to NOT deploy over an existing db, I'm not sure how you can update the remote db with changes you've made locally.

    I understand there is a way to force MSDeploy to delete the database and recreate it from the local data/schema. I've seen this mentioned elsewhere, but with no instructions on how to do that.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    what error are you getting?
     
  3. No error. It just doesn't deploy the script if there is already an existing database attached to the server at the given connection string.

    Fresh deployment, no database present: deploys local database to remote.

    Subsequent deployments, existing database present: nothing.

    Again, as I recall reading somewhere, this behavior is by design. However, there is supposed to be a way to override it for testing scenarios. I just don't know what that is.
     
  4. Seeing same problem - failure on 2nd, 3rd deploy of DB

    I'm using one-click out of VS 2010 Beta 2 and seeing same behavior of database deployment working first time, but not on 2nd, 3rd deploys of the database portion. Errors reported in VS 2010 are pretty nebulous:

    Updating dbFullSql (data source=netfx4lab.discountasp.net;initial catalog=DB_userNNN;integrated security=False;user id=userNNN;pooling=False).
    Adding child sqlScript (sitemanifest/dbFullSql[@path='data source=netfx4lab.discountasp.net;initial catalog=DB_userNNN;integrated security=False;user id=userNNN;pooling=False']/sqlScript).
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2660,5): Error : VsMsdeploy failed.((12/10/2009 9:11:53 PM) An error occurred when the request was processed on the remote computer.)
    Error detail:
    (12/10/2009 9:11:53 PM) An error occurred when the request was processed on the remote computer.
    The server experienced an issue processing the request. Contact the server administrator for more information.
    Publish failed to deploy.
    ========== Build: 10 succeeded or up-to-date, 0 failed, 0 skipped ==========
    ========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

    I've got dbFullSql ScriptDropsFirst="True" set in my MSDeploy per http://vishaljoshi.blogspot.com/2009/08/replacing-your-old-db-with-new-one.html and maybe this is messing up my 2nd, 3rd database deploys to DiscountASP.NET 4.0 sandbox??

    In my experiences with my local IIS 7.5 server, SQL Server 2008, Windows 2008 R2, I know I had to grant pretty extensive SQL Server permissions to allow the MSDeploy to do things like drop tables (and on my personal server, drop databases which you probably don't want to do in the sandbox). I turned on full tracing (level 4, all) on server side per http://technet.microsoft.com/en-us/library/ee461173(WS.10).aspx and then would grant more and more permissions until I stopped getting errors in MSDeploy like the ones above.

    Hope this helps.

    -Andy
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    this issue has been forwarded to the MSDeploy / VS.NET team. Have not heard back yet.
     
  6. Any movement on this issue

    I have the same problem. Anything happening with getting us the permissions required?
     
  7. you can generate a script of all the objects in your db you want to use

    then connect to the online db and run the SQL script you generated from your db on your dev machine

    is a very simple/basic way to update your db online in the lab account
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page