Login failure for VSTS (localDb)

自古美人都是妖i 提交于 2019-12-12 04:46:16

问题


I am trying to get my integration tests included in my CI build.

I would like to deploy a database project to the VSTS (localDB) instance so I can run my unit tests.

So far I have the SQL local db installed during the build this helped

I also found this PS script to deploy the dacpac to the localDb (works fine locally).

However the login is failing when I run the script.

I tried changing the connection string to IntegratedSecurity=True - but that didn't work.

How do I go about adding the login for the test database?


回答1:


I ended up figuring this out. Turns out my error was in the last part of the PS script that I found.

I simply removed it (it only surfaces the details of the table created).

Bottom line is I get the (localDb)\v12.0 created and the database project deployed (dacpac) during the build process so all of my integration tests can run in VSTS CI.

One last note to anyone who trips up on this - remove the Integrated Security=True from the dac service connection:

you connection should read "Data Source=(localDb)\v12.0;Pooling=False;"



来源:https://stackoverflow.com/questions/44724118/login-failure-for-vsts-localdb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!