Share via

*** 'DatabaseLockTimeout' is not a valid argument for the 'Publish' action.

Sujatha Navin 21 Reputation points
2020-09-30T20:21:31.603+00:00

When executing a dacpac with SQLPackage.exe and using this additional parameter /p:DatabaseLockTimeout=800, I get this error *** 'Database Lock Timeout' is not a valid argument for the 'Publish' action.

As per documentation, it should be available.

https://learn.microsoft.com/en-us/sql/tools/sqlpackage?view=sql-server-2017#publish-parameters-properties-and-sqlcmd-variables

My full command is here
C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\SqlPackage.exe /Action:publish /SourceFile:C:\xxxx.dacpac /Profile:C:\xxx.publish.xml /TargetConnectionString:"server=localhost;Database=xxx;Trusted_Connection=True;Connection Timeout=600;Pooling=False;MultipleActiveResultSets=False;Application Name='SqlPackage.exe'" /p:IgnorePartitionSchemes=True /p:IgnoreColumnOrder=True /p:CommandTimeout=3600 /p:DatabaseLockTimeout=800

I needed to add the DatabaseLockTimeout because during deployment, the database is in use, and it causing this error "Lock request time out period exceeded. "

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

0 comments No comments

Answer accepted by question author

AmeliaGu-MSFT 14,016 Reputation points Microsoft External Staff
2020-10-01T09:11:07.677+00:00

Hi @Sujatha Navin ,

Based on my test, the parameter /p:DatabaseLockTimeout works fine. Could you please try to install the latest version? It is installed to the C:\Program Files\Microsoft SQL Server\150\DAC\bin folder.
Best Regards,
Amelia


If the answer is helpful, please click "Accept Answer" and upvote it.
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?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.