January 10, 2023

[Solved] Issue with Database import in Dev Box

[Updated on 19 Oct, 2023]
Hi Folks, 

While trying to import the UAT database into the dev box or any other tier-1 box (You might have tried this MS document), 

*** Changes to connection setting default values were incorporated in a recent release.  More information is available at https://aka.ms/dacfx-connection
*** Error importing database: Could not import package.
Changes to connection setting default values were incorporated in a recent release.  More information is available at https://aka.ms/dacfx-connection
Unable to connect to target server 'localhost'. Please verify the connection information such as the server name, login credentials, and firewall rules for the target server.
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
The certificate chain was issued by an authority that is not trusted.
*** The settings for connection encryption or server certificate trust may lead to connection failure if the server is not properly configured.













That's because of recent changes in encryption policies on SQL. To fix this issue you need to update the import SQL command below

SqlPackage.exe /a:import /sf:J:\MSSQL_BACKUP\UATbackup.bacpac /tsn:localhost /tdn:AXDB_UAT /p:CommandTimeout=1200 /TargetEncryptConnection:False

Update on 19 Oct, 2023:

Now you have to use the new parameters below 

SqlPackage.exe /a:import /sf:J:\MSSQL_BACKUP\UATbackup.bacpac /tsn:localhost /tdn:AxDb_UAT /p:CommandTimeout=1200 /TargetUser:"axdbadmin" /TargetPassword:"<DB adm pwd>" /TargetTrustServerCertificate:True

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

No comments:

Post a Comment

Thanks

Note: Only a member of this blog may post a comment.