Bacpac Error

  • I'm trying to export/import the data with Bacpac. My source database is on Azure SQL MI and target db is Onprem (SQL 2017 version).

    Export data tier works fine, when I try to import, it runs for a while and then fails with below error. Can anyone help me with this.

    Warning SQL72012: The object [DatabaseName] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.

    Warning SQL72012: The object [DatabaseName] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.

    Error SQL72016: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

    Error SQL72045: Script execution error. The executed script:

    /*

    Data is bulk loaded at this point in deployment execution

    */

  • Thinking this link will help:

    https://feedback.azure.com/forums/908035-sql-server/suggestions/32902288-time-out-during-bacpac-import-of-data-tier-applica

    To paraphrase the important part - your execution timeout period is too short.  You will need to specify a longer timeout period.  Depending on the size of the import will help you determine what a suitable timeout period should be.  The example command they recommended running was:

    sqlpackage.exe /Action:Import /tsn:servername /tdn:databasename /tu:adminuser /tp:adminpassword /sf:export.bacpac /p:CommandTimeout=1800

    Where you can see the timeout is set to 1800.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply