Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 使用powershell修改DacPac_Sql Server_Powershell_Dacpac - Fatal编程技术网

Sql server 使用powershell修改DacPac

Sql server 使用powershell修改DacPac,sql-server,powershell,dacpac,Sql Server,Powershell,Dacpac,我需要使用powershell读取现有的dacpac并更改模式,然后复制数据库。是否可以使用“System.Reflection”有一个完整的公共API,支持加载DACPAC、读取内容(架构中的表、视图等),以及在保存之前添加/更新这些内容。示例项目位于,有一个解释核心概念的教程。还有一些其他的例子,例如和开源贡献,可以帮助您理解该做什么 披露:我在DacFx团队工作,并编写了链接教程。到目前为止您尝试了什么,为什么会对System.Reflection命名空间感兴趣?我尝试使用powershe

我需要使用powershell读取现有的dacpac并更改模式,然后复制数据库。是否可以使用“
System.Reflection

有一个完整的公共API,支持加载DACPAC、读取内容(架构中的表、视图等),以及在保存之前添加/更新这些内容。示例项目位于,有一个解释核心概念的教程。还有一些其他的例子,例如和开源贡献,可以帮助您理解该做什么


披露:我在DacFx团队工作,并编写了链接教程。

到目前为止您尝试了什么,为什么会对
System.Reflection
命名空间感兴趣?我尝试使用powershell创建dacpac。并使用poweshell升级数据库。我有多个模式的数据库。我需要将表、函数、sp…等复制到每个架构。为什么要使用powershell?有没有不使用SqlPackage.exe的原因?@qxg,因为我需要进行自动化。谢谢你的评论这真的很有帮助。无论如何,我需要使用Powershell做同样的事情。您可以在Powershell中使用这些API。要么直接针对这些API编写代码,要么编写命令行包装器,以您喜欢的为准。没有支持这些的内置cmdlet。感谢您的帮助。(Y)