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