Hi,
I have a SProc that copies data from a database on a linked server to another database on the current server. The process is only updating/inserting data into the database on the current server. I want to make sure the process - which takes place in the middle of a transaction - does not hold any locks on the database in the linked server. I was thinking of adding WITH (NOLOCK), but I am unsure if that hint will matter across a linked server. Anyone know?
Below is a sample of the insert/select statements I am performing within the transaction in the SProc:
I have a SProc that copies data from a database on a linked server to another database on the current server. The process is only updating/inserting data into the database on the current server. I want to make sure the process - which takes place in the middle of a transaction - does not hold any locks on the database in the linked server. I was thinking of adding WITH (NOLOCK), but I am unsure if that hint will matter across a linked server. Anyone know?
Below is a sample of the insert/select statements I am performing within the transaction in the SProc:
INSERTINTO [Database].dbo.Table(
column list
)
SELECT
column list
FROM [linked server].[Database].dbo.Table AS PROD WITH (NOLOCK)
LEFTOUTERJOIN [Database].dbo.Table AS CP
ON PROD.PKID= CP.PKID
WHERE PROD.FilterByCol = @FilterByColValue
AND CP.PKID ISNULL
TIA,
Dave