现在有本地视图,视图里基表是远程表
这个视图主要是用来操作那个基表的,
现在假如有如下的更新
本地视图的定义create view 本地视图
as
select * from 远程数据库服链接别名.远程数据库.dbo.远程表列a 是远程表的聚集索引。
当我在本地执行下面的语句的存储过程时update 远程表 set b ='dfsdfsd' where a = 7508原本应该是锁定表的某一行,可我在监测到远程数据库服上却是表锁。或者页锁。监测到的结果如下。
declare @P1 int
set @P1=1
declare @P2 bigint
set @P2=87010106428922621
exec sp_getschemalock @P1 output, @P2 output, N'"远程数据库"."dbo"."远程表"'
select @P1, @P2
然后下一条语句是
declare @P1 int
set @P1=180150000
declare @P2 int
set @P2=1
declare @P3 int
set @P3=16388
declare @P4 int
set @P4=1010612
exec sp_cursoropen @P1 output, N'select * from "远程数据库"."dbo"."远程表"', @P2 output, @P3 output, @P4 output
select @P1, @P2, @P3, @P4
接下来是一些提交事务,释放锁的一些语句。请问大虾们这是怎么回事?寻求解决方法。
这个视图主要是用来操作那个基表的,
现在假如有如下的更新
本地视图的定义create view 本地视图
as
select * from 远程数据库服链接别名.远程数据库.dbo.远程表列a 是远程表的聚集索引。
当我在本地执行下面的语句的存储过程时update 远程表 set b ='dfsdfsd' where a = 7508原本应该是锁定表的某一行,可我在监测到远程数据库服上却是表锁。或者页锁。监测到的结果如下。
declare @P1 int
set @P1=1
declare @P2 bigint
set @P2=87010106428922621
exec sp_getschemalock @P1 output, @P2 output, N'"远程数据库"."dbo"."远程表"'
select @P1, @P2
然后下一条语句是
declare @P1 int
set @P1=180150000
declare @P2 int
set @P2=1
declare @P3 int
set @P3=16388
declare @P4 int
set @P4=1010612
exec sp_cursoropen @P1 output, N'select * from "远程数据库"."dbo"."远程表"', @P2 output, @P3 output, @P4 output
select @P1, @P2, @P3, @P4
接下来是一些提交事务,释放锁的一些语句。请问大虾们这是怎么回事?寻求解决方法。
select @P1, @P2
go
declare @P1 int
set @P1=2
declare @P2 bigint
set @P2=84248088931770238
exec sp_getschemalock @P1 output, @P2 output, N'""库1"."dbo"."表1"'请问sp_getschemalock这是什么语句。