在SQL Server 2016中,我无法使用本机编译的存储过程进行远程插入。
FactInventory_Hot =内存中表
[ 10.10.10.109] .AzureContosoDB.dbo.FactInventory_Hot =远程内存表
CREATE PROCEDURE [dbo].[usp_dataInsert]
WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS OWNER
AS
BEGIN ATOMIC WITH
(TRANSACTION ISOLATION LEVEL = SNAPSHOT, LANGUAGE = N'us_english')
insert into FactInventory_Hot
select
[InventoryKey]
,[DateKey]
,[StoreKey]
,[ProductKey]
,[CurrencyKey]
,[OnHandQuantity]
,[OnOrderQuantity]
,[SafetyStockQuantity]
,[UnitCost]
,[DaysInStock]
,[MinDayInStock]
,[MaxDayInStock]
,[Aging]
,[ETLLoadID]
,[LoadDate]
,[UpdateDate]
from [10.10.10.109].AzureContosoDB.dbo.FactInventory_Hot
END
这是错误:
Msg 2014,Level 16,State 1,Procedure usp_dataInsert,Line 6 [Batch Start Line 0] 在架构绑定对象中不允许远程访问。