The following will deploy Sql database with sqlpackage.exe. This does not require use of Publish Profile Xml. Is there a way to add simple post-deployment script inline, without having external post-deployment file?
Eg: will publish database inline, without a publish profile xml.
SqlPackage.exe
/Action:Publish
/SourceFile:TestDatabase.dacpac
/TargetDatabaseName:TestDb
/TargetServerName:localhost
Now, goal to add post deployment script in command line, eg insert value in sample table.
Intended Goal:
SqlPackage.exe
/Action:Publish
/SourceFile:TestDatabase.dacpac
/TargetDatabaseName:TestDb
/TargetServerName:localhost
/PostDeploymentScript:"insert into dbo.SampleTable (SampleColumn) values ('1')"
Cannot find Post Deployment script inline option in Microsoft website. Maybe it doesn't exist.
https://learn.microsoft.com/en-us/sql/tools/sqlpackage?view=sql-server-2017
SQLPackage Post Deployment Script not running
Update (Steve Ford answer below may not work):
Want to conduct this from command prompt without any External files. Steve answer may not work for my situation/question.