如何更改 sqlpackage.exe?
让我以我不熟悉命令行/powershell 的事实来介绍我的问题。我面临的是我的部署由于可能的数据丢失而失败。根据我的阅读,我可以将变量从 TRUE 更改为 FALSE,但我不知道如何访问 SQLPackage.exe 文件。它是 DevOps 构建服务器上的文件吗?我尝试在本地计算机上创建系统变量但失败了。它没有被识别出来。我需要找到一种方法来解决自动化构建中可能出现的数据丢失问题。 谢谢您的帮助!
Let me preface my problem with the fact that I am not familiar with command line/powershell. What I am up against is that my deployments are failing due to possible data loss. From what I read, I can change a variable from TRUE TO FALSE but I have no idea on how to get to the SQLPackage.exe file. Is it the file on the BUILD SERVER for DevOps? I tried to create a system variable on my local machine and failed. It wasn't recognized. I need to figure out a way to work around the possible data loss issue on automated builds.
Thank you for any help!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不会在 exe 中更改类似的内容,而是将应用程序配置为按照您希望的方式运行。
有几个选项可以让发布不会因可能的数据丢失而被阻止。例如,如果您要创建 dacpac,则可以在那里指定它。
从命令行运行应用程序时,您可以设置一个命令行参数:
详细信息:SqlPackage 发布参数、属性和 SQLCMD 变量 - 发布操作的参数
You don't change something like this in the exe, but configure the application to behave the way you want it to behave.
There are a couple of options to have the publish not block on possible data loss. For instance, if you're creating a dacpac you can specify it there.
When running the application from the command line, there's a command line parameter you can set:
More information: SqlPackage Publish parameters, properties, and SQLCMD variables - Parameters for the publish action