Share via

sqlpackage publish action permissions issue

arielman2304 676 Reputation points
2021-06-15T08:58:49.917+00:00

Hi,
I'm running the below sqlpackage command against my sqlserver:

sqlpackage /action:Publish /SourceFile:"Database Services\bin\Release\Database Services.dacpac" /TargetConnectionString:"Data Source=${Env};Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=False;Initial catalog=${Target}"  

It contains one predeploy script with one alter.
However, I see in the error it tries to alter the whole DB (one level up) instead just doing the alter. any idea why? does it related to some flags I need to add?
https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-publish?view=sql-server-ver15#properties-specific-to-the-publish-action

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


1 answer

Sort by: Most helpful
  1. Seeya Xi-MSFT 16,756 Reputation points
    2021-06-15T10:57:29.873+00:00

    Hi @arielman2304 ,

    Is there any error detail, please post it.
    Here is a blog of deployment common problems and solutions.
    https://stackoverflow.com/questions/57370013/azuredevops-azure-sql-server-deployment-problems-and-solution

    > Once I tried to deploy it against sqlserver prod server it stuck (the jenkins job is already running 30 minutes) with

    Automatically restart the Jenkins Windows Service if it crashes or is accidentally shut down. Ensure that your integration environment achieves 100% uptime.

    Best regards,
    Seeya


    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.