Solved

sql dts hanging during import

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Database tuning – How to start and what to tune. This question is frequently asked by many people, both online and offline. There is no hard and fast rule-of-thumb for performance tuning, however, before beginning the tuning process one should a…
In today’s complex data management environments, it is not unusual for UNIX servers to be dedicated to a particular department, purpose, or database.  As a result, a SAS® data analyst often works with multiple servers, each with its own data storage…
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…

706 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

19 Experts available now in Live!

Get 1:1 Help Now