Solved

sql dts hanging during import

Posted on 2006-11-25
5
360 Views
Last Modified: 2011-10-03
Hello all, I am in the middle of copying data from one table to a new table and the DTS job seems to be hanging up after copying 34427000 rows, sql server logs are showing occurenced of IO requests taking longer than 15 seconds to complete but thats all the logging I am seeing at this point, is there a way for me to check if the job is doing anything at this point? looking at my process id the last sql running is the insert. and if I have to stop the job it will take me hours to make it up.

Basically what I am trying to accomplish is a database trim on one of my tables, after scheduling the downtime (No one is accessing the server but me), I renamed the target table, then recreated the original table and am trying to copy the data I want to keep back into the new table.

Appreciate the help.
0
Comment
Question by:camitche
[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
  • 3
  • 2
5 Comments
 

Author Comment

by:camitche
ID: 18012549
fyi this is sql2000 running on windows 2003
0
 
LVL 29

Expert Comment

by:Nightman
ID: 18012586
1. What size is the transaction log file? Is it set to autogrow? Is it growing significantly during this process?
2. What size is the database file? Is it set to autogrow? Is it growing significantly during this process?

Both of these are performance killers. Configure your file sizes before hand to prevent rapid autogrowth (SLOW). Also, a commit of 34 million rows will probably take a while (and may cause locking and blocking). I would suggest that you do this in smaller batches of data (e.g. 100,000 at a time).
0
 

Author Comment

by:camitche
ID: 18012645
I have been monitoring the transaction logs and backing them up periodically during the process and I do show the database is auto growing as well. the db size is currently 54 GB, the last transaction log was around 9mb, I was thinking the same thing about the moving this across in smaller chunks, how do I set how many records to copy at a time?
0
 
LVL 29

Accepted Solution

by:
Nightman earned 500 total points
ID: 18012672
Do you have a row ID or some other counter?

SELECT TOP 100000 * FROM myNewTable WHERE RowID > (SELECT ISNULL(MAX(RowID),0) FROM MyOldEmptyTable) ORDER BY RowID ASC

You could use datetime as well if you have one that you know will be sequentially incremented.
0
 

Author Comment

by:camitche
ID: 18012694
perfect, thanks NM :-D
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

627 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