How to deploy database in production server

  • Hi i need to deploy my final database from staging server to production

    How to deploy database in production server

  • Few ways ....

    1) If you have all the scripts for all objects.. then create new db run the scripts.

    2) Backup database and restore on to production

    3) Deattach-reattach to production.

    If this is new application most likely #2 will work just fine for you :). You'll have to do security bit after that .. that would go for each case :).

    Mohit.

    [font="Arial"]---

    Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
    Microsoft FTE - SQL Server PFE

    * Some time its the search that counts, not the finding...
    * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]

    How to ask for help .. Read Best Practices here[/url].

  • karan457 (3/11/2009)


    Hi i need to deploy my final database from staging server to production

    How to deploy database in production server

    The fastest operation is to detach it and attach on your production server.

  • Krishna (3/11/2009)


    karan457 (3/11/2009)


    Hi i need to deploy my final database from staging server to production

    How to deploy database in production server

    The fastest operation is to detach it and attach on your production server.

    If you are going to use this method or backup/restore then make sure you have cleaned out any test data that may be in the database first..

  • Yep, that's true sorry did not mention it.

  • Hope the staging and production servers both are SQL Server 2005.

    Use backup and restore if you want to keep database in staging server.

  • and in case you have trouble with orphaned users, this link may come in handy

    http://support.microsoft.com/kb/918992

  • Another suggestion or two:

    Think about the future, after the initial backup/restore, detach/attach; updating production can be tricky. Make plans on how changes will be performed to production. (approval process, logical steps, physical steps, etc.) "If you fail to plan, then you plan to fail." Trust me on this, spend some time thinking and documenting this.

    In addition, get a third party tool that can compare two databases (security settings, users, structure, etc. etc.); and can generate scripts that will get the databases in sync. Since many production database are directly related to the bottom line ($$$), it should be easy to justify the expense.

    $0.02

  • You might try the SQL Server Publishing Wizard. Works with SQL Server 2000 & 2005. Integrated into Visual Studio 2010 for SQL Server 2008.

  • Please note: 2 year old thread.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply