Solved

Microsoft SQL server 2005 updating 2.5 million records fails

Posted on 2009-04-13
2
303 Views
Last Modified: 2012-06-21
I am trying to update 2.5 million records and I just time out after about 30 seconds.  I am on the server itself using the management studio I was to update a null field based on another field here is the query.  I am then going to need to loop or use a cursor to iterate over each record and look it up in a table to pull the state and timezone for each area code.  It this a time out issue or on index issue or am I just doing something dumb?


UPDATE    CallRecords
SET              AreaCode = RIGHT(LEFT(PhoneNumber, 4), 3)
WHERE     (AreaCode IS NULL)

Open in new window

0
Comment
Question by:TSN_Admin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
brad2575 earned 250 total points
ID: 24130431
Are you running this in a "New Query" window?  Or using the "Open Table"?  If you use the "New Query" window it should work.

If not then you have to change your timeout.  Do this by going to:
    Tools - Options - Query Execution (select from left side)

Then make sure "Execution Timeout" is set to "0" (unlimited).

You should be able to do your other updates all in the same script as well with joins or user defined functions.
0
 

Author Closing Comment

by:TSN_Admin
ID: 31569526
now I feel real dumb I was doing it in the open table window.
thanks
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question