Publish-Database command takes a dacpac which is the output from an SSDT project and publishes it to a database. Changing the schema to match the dacpac and also to run any scripts in the dacpac (pre /post
Publish-DbaDacpac [[ - SqlInstance] < DbaInstanceParameter >] [[ - SqlCredential] < PSCredential >] [ - Path] <String > [ - PublishXml] <String > [ - Database] <String > [[ - ConnectionString] < String >]
- GenerateDeploymentScript] [ - GenerateDeploymentReport] [ - ScriptOnly] [[ - OutputPath] < String >] [ - IncludeSqlCmdVars] [ - EnableException] [ < CommonParameters >]
Deploying a dacpac uses the DacFx which historically needed to be installed on a machine prior to use.
In 2016 the DacFx was supplied by Microsoft as a nuget package and this uses that nuget package.
//dbatools.io / Publish-DbaDacpac
To see the examples
, type: . "get-help Publish-DbaDacpac -examples "
For more information , type: . "get-help Publish-DbaDacpac -detailed "
For technical information , type: . "get-help Publish-DbaDacpac -full "
For online help , type: "get-help Publish-DbaDacpac -online "
Press h to open a hovercard with more details.