web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

RestoreDB error: connection successfully established with the server, error occurred

(0) ShareShare
ReportReport
Posted on by 195
Hi guys,
 
I want to restore UAT database to my own DevBox, but I have strange message while doing the import extraction using SqlPackage.
So when I run this command : 
SqlPackage.exe /a:Import /sf:C://Temp//MYuatbackup.bacpac /tsn:FODEV /tdn:AxDB_UAT /p:CommandTimeout=1200
 
I'm hit this error :
 
Importing to database 'AxDB_UAT' on server 'FODEV'.
Creating deployment plan
Initializing deployment
*** 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.
Unable to connect to target server 'FODEV'. 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.
 
May I know what's wrong and how to resolve it ? 
I'm trying to google it, and found this Microsoft docs -> https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/connect/error-message-when-you-connect But to be honest I'm confuse what to do. Because when it is said I need to Export Certificate from Personal, I didn't find the menu All task > Export. Also it is talking about obtain certificate from the server, what server does it mean because this is my DevBox which the server also in this VM.
But there is a note there : 

 

 Note

If you are using SQL Server Management Studio, select the Options tab, and select the Trust Server certificate option in the Connection Properties tab.

 
I tried to open my SSMS, but could not find the Connection Properties, could be different version, so I would like where exactly.
 
But most importantly is how to restore the database ? is my approach correct ?
 
Thanks.
 
I have the same question (0)
  • Suggested answer
    Voltes Profile Picture
    195 on at
    Ok,
    I added this command while running SqlPackage -> 
    /TargetTrustServerCertificate:True
    And it works.
     
    Solved.
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans