Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Troubleshoot Job that continues to run into the next day

Posted on 2011-02-24
8
Medium Priority
?
199 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
[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
  • 2
  • +1
8 Comments
 
LVL 40

Accepted Solution

by:
lcohan earned 1400 total points
ID: 34970470
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
ID: 34977454
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
ID: 34984774
@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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:davidcahan
ID: 34984825
@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
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 600 total points
ID: 34985623
>>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
ID: 34992824
@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 600 total points
ID: 34994122
>> 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 40

Assisted Solution

by:lcohan
lcohan earned 1400 total points
ID: 34997503
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

636 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