Solved

Troubleshoot Job that continues to run into the next day

Posted on 2011-02-24
8
191 Views
Last Modified: 2012-05-11
I have a job that references an SSIS package which inserts, from a file, a bunch of data into a table with over 100 million rows.  I've performance tuned the insert statement and watched it take less than 2 seconds to run for each file (sometimes it takes as much as 10 seconds for a file with a large amount of data).

I run the job at 1:00 AM and for the past week I come in the next day and the job is still running.  But when I just run the job manually DURING THE DAY WHEN DB USE IS HIGHER, I watch it complete in about 1-2 hours.  

I don't really have any other jobs running at night (that aren't also running during the day) and none of them are hitting that table.  The only exception to that I can think of is I back up the transaction logs every 2 hours. I also have a scheduled task that moves a back up of the DB and all the transaction log backups to an external drive at 2AM.  Perhaps all the disk I/O is preventing the job from running successfully and then it just gets bogged down until I manually restart it?

Question 1:  should I stop the transaction log backups at night?
Question 2:  where would I begin to try to figure out what could be happening at night to this job.  Is there any history stored somewhere that would show what delays it seems to face at night?

0
Comment
Question by:davidcahan
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 39

Accepted Solution

by:
lcohan earned 350 total points
Comment Utility
Here's what I would do:

1. Don't touch the backup jobs until you wasted all any other options
2. Check physical location of your input file for the job, database T-log, mdf/ndf files, and tempdb location. Ideally they should be all different for best I/O
3. Check the batch size of your import - should be somewhere in the SSIS step properties. Sometimes lower batch size can make it faster sometimes higher but do not go beyond 10.000 rows per batch. All these depend on the constraints/clustered indexes on the destination table.
4. You should add multiple files to tempdb - 1 per socket but no more than 4 to improve SQL performance - I'll try find the Microsoft link to support this statement.
5. Check make sure no viruscan is running against your SQL files and input file ASSUMING all data going into your DB is scanned at the app level and the input file was already checked.
0
 
LVL 6

Expert Comment

by:Rajesh_mj
Comment Utility
It can be a message pop up from the SSIS during the run at night time.It might be accessing some files and getting error and there might be some script to throw the error as a message box. Or a message box due to some other reasons.
0
 

Author Comment

by:davidcahan
Comment Utility
@lcohan

1,2,3,5 are good to go

4 -- I would have to double check

But the strange thing is that when I run it either manually (by right clicking on the job and starting it) or run it via the debugger in VS it runs without any issues.  Granted, I have not tried to run it that at the same time as the job is normally scheduled.  
0
 

Author Comment

by:davidcahan
Comment Utility
@lcohan

also, I only have 2 "drives"  to split between.  Data is on d:, logs on c:.  Does it actually make sense to reverse that for tempdb?  that way primary DB data is on d: except for tempDB which is on c:  and therefore operations on primary DB that need tempDB aren't using the same drive?
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 150 total points
Comment Utility
>>I'll try find the Microsoft link to support this statement.<<
I have got it:
Myth #12: tempdb should always have one data file per processor core.
http://www.sqlskills.com/BLOGS/PAUL/post/A-SQL-Server-DBA-myth-a-day-(1230)-tempdb-should-always-have-one-data-file-per-processor-core.aspx
0
 

Author Comment

by:davidcahan
Comment Utility
@lcohan and @acperkins -- does my theory, that I should actually put the tempdb and my primary DB (the one I'm inserting data into) on different drive letters.   currently all mdf's on are one drive and all ldf's are on another.  i'm thinking that only with tempDB I should switch that.
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 150 total points
Comment Utility
>> currently all mdf's on are one drive and all ldf's are on another. <<
If you are talking about physical drives and not logical drives, I would leave it that way.
0
 
LVL 39

Assisted Solution

by:lcohan
lcohan earned 350 total points
Comment Utility
Only thing I would do as much as possible do NOT put tempdb and T-logs on the same RAID or physical disc. If C:\ and D\ are just logical on the same phisycal DISK or RAID then obviously is not much you could do.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MS SQL - Output to columns equally. 5 45
Group by correlation 4 43
SQL Merige returns error code when updating 15 46
Sql Permission 6 42
Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

17 Experts available now in Live!

Get 1:1 Help Now