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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Issue with Importing Database(.bacpac)

(1) ShareShare
ReportReport
Posted on by 4
Hello Community, 
I'm trying to import the database(.bacpac)  file to the cloud hosted environment (LCS) in SSMS(.bak), but it is failing with the error shown below:
we tried to search the column in both source and destination databases but there is no such column called 'plan_forcing_type_desc'.
 Below are the source and destination SQL version details :
Source version(SANDBOX)  is Microsoft SQL Azure (RTM)-12.0.2000.8
Destination version (CLOUD HOSTED VM) is Microsoft SQL server 2016 (SP2-CU17-GDR)(KB5014351)-13.0.5893.48(X64)
Can you please confirm if this is a SQL compatibility issue or any other issue ?
 
Error which I got :
 
//
 
 
*** Error importing database:Could not import package.

Error SQL72014: Core Microsoft SqlClient Data Provider: Msg 207, Level 16, State 1, Procedure AutotuneEvictPlansFromCach

e, Line 24 Invalid column name 'plan_forcing_type_desc'.

Error SQL72045: Script execution error.  The executed script:

CREATE PROCEDURE [dbo].[AutotuneEvictPlansFromCache]

@QUERY_ID BIGINT, @EVICTED_PLANS NVARCHAR (MAX) OUTPUT, @CLEARED_QUERY_HINT NVARCHAR (MAX) OUTPUT

AS

BEGIN

    DECLARE @PLAN_ID AS NVARCHAR (20), @PLAN_HANDLE AS NVARCHAR (MAX), @PLAN_GUIDE_NAME AS NVARCHAR (128), @UNFORCE_SQL

AS NVARCHAR (MAX);

    SET @CLEARED_QUERY_HINT = '';

    DECLARE @recent_start_time AS DATETIMEOFFSET (7) = dateadd(mi, -15, getdate());

    DECLARE PLAN_HANDLE_CURSOR CURSOR LOCAL FAST_FORWARD

        FOR SELECT CAST (qsp.plan_id AS NVARCHAR (16)) AS PlanId,

                   '0x' + CONVERT (NVARCHAR (MAX), deqs.plan_handle, 2) AS PlanHandle

            FROM   sys.query_store_plan AS qsp WITH (NOLOCK)

                   INNER JOIN

                   sys.dm_exec_query_stats AS deqs WITH (NOLOCK)

                   ON (qsp.query_plan_hash = deqs.query_plan_hash)

            WHERE  qsp.query_id = @QUERY_ID

                   AND qsp.last_execution_time > DATEADD(MINUTE, -15, GETUTCDATE())

                   AND plan_for

Error SQL72014: Core Microsoft SqlClient Data Provider: Msg 207, Level 16, State 1, Procedure AutotuneEvictPlansFromCach

e, Line 32 Invalid column name 'plan_forcing_type_desc'.

Error SQL72045: Script execution error.  The executed script:

CREATE PROCEDURE [dbo].[AutotuneEvictPlansFromCache]

@QUERY_ID BIGINT, @EVICTED_PLANS NVARCHAR (MAX) OUTPUT, @CLEARED_QUERY_HINT NVARCHAR (MAX) OUTPUT

AS

BEGIN

    DECLARE @PLAN_ID AS NVARCHAR (20), @PLAN_HANDLE AS NVARCHAR (MAX), @PLAN_GUIDE_NAME AS NVARCHAR (128), @UNFORCE_SQL

AS NVARCHAR (MAX);

    SET @CLEARED_QUERY_HINT = '';

    DECLARE @recent_start_time AS DATETIMEOFFSET (7) = dateadd(mi, -15, getdate());

    DECLARE PLAN_HANDLE_CURSOR CURSOR LOCAL FAST_FORWARD

        FOR SELECT CAST (qsp.plan_id AS NVARCHAR (16)) AS PlanId,

                   '0x' + CONVERT (NVARCHAR (MAX), deqs.plan_handle, 2) AS PlanHandle

            FROM   sys.query_store_plan AS qsp WITH (NOLOCK)

                   INNER JOIN

                   sys.dm_exec_query_stats AS deqs WITH (NOLOCK)

                   ON (qsp.query_plan_hash = deqs.query_plan_hash)

            WHERE  qsp.query_id = @QUERY_ID

                   AND qsp.last_execution_time > DATEADD(MINUTE, -15, GETUTCDATE())

                   AND plan_for
 
I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    238,922 Most Valuable Professional on at
    Use SqlPackage.exe to import .bacpac files, as documented in Import a database.
  • Community member Profile Picture
    4 on at
    Thanks Martin for the response, we tried these two versions already as per the import database documentation
     
    162.1.167 SqlPackage
    162.0.52 SqlPackage
     
    we tried through visual studio 14 as well , 
    still the error is same , is there any other solution? 
  • Hana Xue Profile Picture
    Microsoft Employee on at
    Hi,
    Not sure what the cause is, maybe you can check out similar questions about database import errors:
    sql - Msg 207, Level 16, State 1 "Invalid column name 'Name'" - Stack Overflow
    sql - Error Importing Azure bacpac file to local db error incorrect syntax near EXTERNAL - Stack Overflow
    Best Regards,
    Hana

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 528 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 444

#3
Adis Profile Picture

Adis 220 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans