Solved

sql dts hanging during import

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
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…

929 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now