April 4, 2007 at 10:54 am
I am plowing through a data warehouse load script, and this statement is executed in a script on SQL Server 2000 #1:
INSERT
INTO LinkedServer2.WAREHOUSE.dbo.Invoice
SELECT
* FROM LinkedServer3.IDX_LIVE.dbo.TEMP_Invoice WHERE GROUP_ZZ IN (4, 24, 16, 18, 24)
Where is the insert logged? My guess would be on Server 1, since that's where it's run. Any ideas?
And Temp_Invoice is a 30 million row table.
April 4, 2007 at 12:14 pm
The INSERT operation will be logged in the transaction log for the database where the data is being INSERTED, in this case LinkedServer2.
April 4, 2007 at 3:10 pm
SELECT statements do not cause activity in the transaction log (it's not a transaction).
INSERT statements do cause activity in the transaction log (it is a transaction).
So, SERVER3 is being used for a SELECT - no tlog usage. SERVER2 is being used for an INSERT - its tlog is being used.
-SQLBill
April 5, 2007 at 9:45 am
OK, that makes sense. Thanks.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply