1

I have a SQLPaaS instance which we have exported into a .bacpac file. When I try and import the .bacpac into my local SQL Server 2017 CU14, I am getting an error on an ExternalDataSource, I do not need this external data source so I am trying to figure out a way to import this .bacpac.

I have tried using sqlpackage.exe (the import action doesn't let you exclude types, and the publish action requires a .dacpac not a .bacpac).

The error is:

Error importing database:Could not import package.

Error SQL72014: .Net SqlClient Data Provider:

Msg 102, Level 15, State 1, Line 3
Incorrect syntax near 'RDBMS'.

Error SQL72045: Script execution error. The executed script: CREATE EXTERNAL DATA SOURCE [LocalLoopBack]
WITH (
TYPE = RDBMS,
LOCATION = N'xxxxxx.database.windows.net',
DATABASE_NAME = N'xxxxxxx',
CREDENTIAL = [xxxxxx]
);

Is there anyway I can get this to import?

0

1 Answer 1

2
Answer recommended by Microsoft Azure Collective

Can you copy that Azure SQL Database with a new name using Azure portal as explained here?

enter image description here

Remove the external data source from the new database and then export it as bacpac. Delete the newly created database with the copy operation. Import the bacpac created to your localDB instance.

Sign up to request clarification or add additional context in comments.

2 Comments

Yes I can and that's our process now, we have found we have to copy the DB first, since the export is not transactionally consistent, so we are already doing that. Its just a pain the amount of steps needed to pull a DB down to do local development. After I posted this I did, do this again and removed the external data source and it works
If you were using SQL Data Sync you may have to do a similar process. It is easy to migrate to Azure but not easy to return back.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.