0

I am using VS2010 command line tool (VSDBCMD) to deploy SQL projects to specific environments via batch file.

My batch file first builds the database project using a User ID and Password that the user enters. I then deploy the project using the newly created dbmanifest.

When I purposefully enter a wrong password, I get an error on the screen but vsdbcmd does NOT set the %ERRORLEVEL% to 1. In fact no error message from the deploy set the %ERRORLEVEL%.

How am I to check if the deploy fails?

This is how I am running it:%VS_DEPLOY_PATH% /a:Deploy /manifest:%TAG%\%%a\sql\debug\%%a.deploymanifest /cs:"Persist Security Info=True;User ID=%DB_USER%; Password=%DB_PASS%;Initial Catalog=%%a;Server=%SERVER%" /p:AbortOnFirstError=True /q+ /dsp:SQL /dd+

Any help is appreciated.

Thanks

roonz11
  • 795
  • 1
  • 13
  • 24
  • What error do you see on screen? When I try to use your command with a n invalid credentials, I get the error "The target database schema provider could not be determined. Deployment cannot continue" and indeed I get 1 in %ErrorLevel% – Hamid Shahid May 21 '14 at 08:29
  • Hi Hamid, thanks for your reply. I also get that same error message ("The target database ..") however the %errorlevel% does not change to 1. it remains 0. Thanks – roonz11 May 22 '14 at 16:05

0 Answers0