gpt4 book ai didi

sql-server - 错误 : The reference to external elements from the source named 'master.dacpac' could not be resolved

转载 作者:IT老高 更新时间:2023-10-28 21:23:52 26 4
gpt4 key购买 nike

我正在 Windows 机器上使用 sqlpackage 构建数据库 dacpac。该项目包含对 master.dacpac

的引用

我将 dacpac 移动到 linux 机器(mssql-server-linux docker 镜像)并恢复数据库。

deploy-database.sh

# publish dacpac using sqlpackage
./sqlpackage/sqlpackage /Action:Publish /sf:"/MyDb.dacpac" /tu:sa /tp:Password1 /tdn:MyDb /tsn:localhost

错误:

No file was supplied for reference master.dacpac; deployment might fail. When package was created, the original referenced file was located C:$(windows machine path)\MASTER.DACPAC. Initializing deployment (Failed) An error occurred during deployment plan generation. Deployment cannot continue. Error SQL0: The reference to external elements from the source named 'master.dacpac' could not be resolved, because no such source is loaded. Warning SQL72025: No file was supplied for reference master.dacpac; deployment might fail. When package was created, the original referenced file was located C:$(windows machine path)\MASTER.DACPAC.

An error occurred while adding references. Deployment cannot continue. The command '/bin/sh -c sh /deploy-database.sh' returned a non-zero code: 1

我尝试将 master.dacpac 直接添加到项目中,并将其复制到 docker 镜像中,但出现相同的错误。

如何在 linux 环境中恢复引用 master.dacpac 的 dapac?

最佳答案

我遇到了类似的问题,我的解决方案是将 dacpac 文件重命名为大写,(例如:MASTER.DACPAC)对我有用,以及使包含 dacpac 文件的目录正常工作目录。

关于sql-server - 错误 : The reference to external elements from the source named 'master.dacpac' could not be resolved,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52110557/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com