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
Solved

sql dts hanging during import

Posted on 2006-11-25
5
331 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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

I guess that all of us know that caching the data usually increase the performance, but I worried if all of us are aware about the risk that caching the data provides and how to minimize this.  That’s the reason why I decided to write this short art…
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
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…

792 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