Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 21st, 2003, 09:37 AM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update - Linked Server

Hi

I am trying to execute an update statement against a table available through linked server

(used sp_addlinkedserver and sp_addlinkedsrvlogin to configure linked server).

But to execute this query it takes more than 30 minutes, where as when executed on the

remote server directly takes only 1 second.

Query :

Update [RemoteServer].DATABASEName.dbo.TableAA
Set Fa_Enigma_Id = Cu_Customer_Id
From TableBB
Where TableAA.Fa_facility_No = TableBB.cu_gatsid
And TableAA.Fa_Enigma_Id IS NULL
And TableAA.ZZ_Location = 'UK'

Please note that TableAA is a table available on remote server and TableBB is a table in

local database where the query is executed.

Further Info, TableAA has 6000 records and TableBB has only 393 records.
Please help to improve the performance.

Thanks & Regards

Venkat

:(
  #2 (permalink)  
Old August 21st, 2003, 10:44 AM
Ned Ned is offline
Authorized User
 
Join Date: Jun 2003
Location: Toronto, ON, Canada.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can run SQL Profiler on both machines and find out which server takes more time to execute the query. In that way you can narrow down your problem.

-Ned
  #3 (permalink)  
Old August 22nd, 2003, 11:47 AM
Ned Ned is offline
Authorized User
 
Join Date: Jun 2003
Location: Toronto, ON, Canada.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Venkat,
Furthermore, the SQL query times are suspect because sometimes, the application will become un-hung if it is left alone for a few minutes. Please review the following info:

271509 INF: How to Monitor SQL Server 2000 Blocking

http://support.microsoft.com/?id=271509



-Ned
  #4 (permalink)  
Old August 25th, 2003, 11:45 AM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Many Thanks Ned for your help,
I tried profilers option and then realised that updating remote tables (even one record) is causing lot of delays.
so we changed the logic to have procedures in remote server to update.

Thanks Once again

Venkat

Venkat Pala


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update Query using inner join with a linked table ceekay Access 3 June 8th, 2007 12:35 PM
Update Data through linked views innmurray SQL Server 2000 7 January 18th, 2005 05:23 PM
Update linked table penta Access 2 September 28th, 2004 07:58 AM
Access and update linked SQL Server 2000 table Lizu Access 9 May 10th, 2004 12:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.