The settings for connection encryption or server certificate trust may lead to connection failure if the server is not properly configured.
You may face this error while exporting or importing DB files.
Use command ;
SqlPackage.exe /Action:Import /TargetServerName:"localhost" /TargetDatabaseName:"Testbackup" /TargetTrustServerCertificate:True /SourceFile:"C:\Temp\testbackup.bacpac" /p:CommandTimeout=6200
For export just add at end of your original command: /TargetTrustServerCertificate:True
#export #import #bacpac