Skip to main content

D365 Database import - Unable to connect to target server localhost - Error occurred during the login process

I was facing an error when trying to import my D365 UAT .bacpac (database backup) file to my cloud-hosted develpment environment.
*** 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.
Time elapsed 0:00:16.30

In order to fix that, you need to add the "TargetTrustServerCertificate" and set it to Yes. Since we are using the sqlpackage here, therefore we have to add the parameter /ttsc:True. (See SqlPackage parameters here).
Your database import command will look like this:

SqlPackage.exe /a:import /sf:C:\Users\Admin7f04592810\Downloads\uatbackup.bacpac /tsn:localhost /tdn:AxDB_fromProd /p:CommandTimeout=50000 /ttsc:True

Comments

Popular posts from this blog

Types of Lookups

Lookup Types: Following are the types of lookups in Dynamics AX 2012. EDT based: Creating the EDT directly and using it Lookup/relation based (the one we made): Creating a RefRecID and creating a relation with master field Code based: Creating the lookup using code