< Back

New-PublishProfile

Mon Jan 13, 2020 8:47 am

NAME New-PublishProfile



SYNOPSIS

The New-PublishProfile CmdLet generates a standard publish profile xml file that can be used by the DacFx (this

and everything else) to control the deployment of your dacpac





SYNTAX

New-PublishProfile -PublishProfilePath <string> -TargetConnectionString <string> -TargetDatabaseName <string>

[<CommonParameters>]





DESCRIPTION

This generates a standard template XML which is enough to dpeloy a dacpac but it is highly recommended that you

add additional options to the publish profile. If you use Visual Studio you can open a publish.xml file and use

the ui to edit the file (right click on an SSDT project, choose "Publish" then "Load Profile" and load your

profile or create a new one. Once you have loaded it in Visual Studio, clicking advanced shows you the list of

options available to you.



For a full list of options that you can add to the profile, google "sqlcmd.exe command line switches" and for each

option in the format /p:Option=Value create a element called <Option>Value</Option>





PARAMETERS

-PublishProfilePath <string>

The path you would like to save the profile xml file



Required? true

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-TargetDatabaseName <string>

The database name you are targetting



Required? true

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-TargetConnectionString <string>

The connection string to the database you are upgrading



Required? true

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String

The path you would like to save the profile xml file



System.String

The database name you are targetting



System.String

The connection string to the database you are upgrading





OUTPUTS





RELATED LINKS