-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Labels
bugSomething isn't workingSomething isn't workingfixed-pending-releaseFix in upcoming releaseFix in upcoming releaseregression
Milestone
Description
Here are the steps to reproduce the problem I met:
-
Run SQL Server Container for Linux
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Ver7CompleXPW" -p 1433:1433 --name sql1 -d mcr.microsoft.com/mssql/server:2019-latest
-
Deploy ContosoUniversity.dacpac as data-tier application
sqlpackage /Action:Publish /SourceFile:"ContosoUniversity.dacpac" /TargetDatabaseName:"ContosoUniversity" /TargetServerName:"." /TargetUser:sa /TargetPassword:Ver7CompleXPW /p:RegisterDataTierApplication=true /p:BlockWhenDriftDetected=true /TargetTrustServerCertificate:true
-
Deploy again using the exact same above command.
sqlpackage /Action:Publish /SourceFile:"ContosoUniversity.dacpac" /TargetDatabaseName:"ContosoUniversity" /TargetServerName:"." /TargetUser:sa /TargetPassword:Ver7CompleXPW /p:RegisterDataTierApplication=true /p:BlockWhenDriftDetected=true /TargetTrustServerCertificate:true
Here is the output:
Publishing to database 'ContosoUniversity' on server '.'. Initializing deployment (Start) Initializing deployment (Failed) *** Could not deploy package. Unable to read data-tier application registration. Time elapsed 0:00:10.68 -
I'm trying to create a DriftReport
sqlpackage /Action:DriftReport /TargetDatabaseName:"ContosoUniversity" /TargetServerName:"." /TargetUser:sa /TargetPassword:Ver7CompleXPW /OutputPath:DriftReport.xml
Here is the output:
Generating drift report for database 'ContosoUniversity' on server '.'. *** Could not generate drift report. Unable to read data-tier application registration. Time elapsed 0:00:00.64 -
If I delete the data-tier application and register it from SSMS. Then the above commands are all works.
-
If I use the following command to publish again.
sqlpackage /Action:Publish /SourceFile:"ContosoUniversity.dacpac" /TargetDatabaseName:"ContosoUniversity" /TargetServerName:"." /TargetUser:sa /TargetPassword:Ver7CompleXPW /p:RegisterDataTierApplication=true /p:BlockWhenDriftDetected=false
Note: the
/p:BlockWhenDriftDetectedisfalsewhich means this don't read the data-tier application registration. -
Then the
/Action:DriftReportstill showing Unable to read data-tier application registration.* error message.sqlpackage /Action:DriftReport /TargetDatabaseName:"ContosoUniversity" /TargetServerName:"." /TargetUser:sa /TargetPassword:Ver7CompleXPW /OutputPath:DriftReport.xml
logs:
Generating drift report for database 'ContosoUniversity' on server '.'. *** Could not generate drift report. Unable to read data-tier application registration. Time elapsed 0:00:00.64
Is this a bug?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixed-pending-releaseFix in upcoming releaseFix in upcoming releaseregression