Ask a questionAsk a question
 

Answerdeploy database project to the database on a different server

  • Monday, November 02, 2009 7:54 PMLGodwin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     I am unable to deploy the database project to the database on a different server. Here is the error:


    Testing_Database.dbschema(0,0)Error TSD01268: .Net SqlClient Data Provider: Msg 5133, Level 16, State 1, Line 1 Directory lookup for the file "c:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\TestingDB_1.ldf" failed with the operating system error 2(The system cannot find the file specified.).
    CDB_Database.dbschema(0,0)Error TSD01268: .Net SqlClient Data Provider: Msg 5009, Level 16, State 8, Line 1 One or more files listed in the statement could not be found or could not be initialized.


    Testing_Database is my database project name, and TestingDB is actual Database name on the server, I want to deploy changes made in the database project to the actual database (TestingDB) on a different server. I have tested connection, remote server is connected.


    Please Help! Thank You!


Answers

  • Tuesday, November 10, 2009 8:00 PMDuke KamstraMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Yes, you can take the deployment script created during deployment and run it on a different server, assuming that different server has a copy of the database that is precisely the same as the one on the first server. The error you are getting does not imply that there is a syntax error in the deploy script. It is telling you that the validation at the beginning of the deployment script failed so the deploy operation is being canceled.

    I recommend you use the vsdbcmd.exe utility to deploy your project to the second server. Documentation is here: http://msdn.microsoft.com/en-us/library/dd193283.aspx

    Duke Kamstra - Program Manager - VSTS Database Edition (Data Dude, DBPro)

All Replies

  • Monday, November 02, 2009 7:59 PMDevelop Well Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Please verify that your database file directory ("C:\Program Files\Microsoft SQL Serer\MSSQL.2\MSSQL\" exists on your target server.
  • Monday, November 02, 2009 8:14 PMLGodwin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I only have C:\Program Files\Microsoft SQL Serer\MSSQL.2\OLAP  , do not have MSSQL under MSSQL.2. What did I miss?
     Thank  you.

  • Tuesday, November 03, 2009 4:31 PMLGodwin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I am able to deploy to the database on a different server in the same domain, but when deploy to a remote server in a different domain, got error:

    Database2.dbschema(0,0)Error TSD01234: Plan verification encountered errors; deployment cannot continue.
       Done executing task "SqlDeployTask" -- FAILED.
      Done building target "DspDeploy" in project "Database2.dbproj" -- FAILED.
     Done executing task "CallTarget" -- FAILED.
    Done building target "DBDeploy" in project "Database2.dbproj" -- FAILED.
    Done building project "Database2.dbproj" -- FAILED.

    Build FAILED.
    ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

    Please Help !  Thank you!

  • Tuesday, November 03, 2009 4:39 PMLGodwin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

      Can I take Deployment Script created during deployment  to run it on the server to create a new DB that has all schema changes? It seems it has syntax errors at the very beginning.

  • Tuesday, November 10, 2009 8:00 PMDuke KamstraMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Yes, you can take the deployment script created during deployment and run it on a different server, assuming that different server has a copy of the database that is precisely the same as the one on the first server. The error you are getting does not imply that there is a syntax error in the deploy script. It is telling you that the validation at the beginning of the deployment script failed so the deploy operation is being canceled.

    I recommend you use the vsdbcmd.exe utility to deploy your project to the second server. Documentation is here: http://msdn.microsoft.com/en-us/library/dd193283.aspx

    Duke Kamstra - Program Manager - VSTS Database Edition (Data Dude, DBPro)