Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Scheduled Tasks

Posted on 2009-07-06
4
Medium Priority
?
279 Views
Last Modified: 2012-05-07
We're experiencing an issue where our TEMP.DB in SQL 2005 is growing and thus taking up most if not all of the disk space where it resides.  Our DBA states that we must restart the SQL server service to purge that DB.  This question is 2-fold: first, our DBA is inexperienced and doesn't know what's causing this problem so if anyone is aware of a cool tool that will allow us to find queries or background processess that are running, the links or info would be greatly appreciated.  Second, our SQL systems are running as a mirrored system (with 2 servers) set for automatic failover if a problem occurs on one of the servers.  When the SQL server service is restarted, this causes a failover to occur.  I'd like to create a scheduled task to restart the service, but included in the batch job will need to be the commands to failover the server.  Has anyone ever done that?  Sample code or commands that have worked in your situation again would be greatly appreciated.
0
Comment
Question by:skbarnard
[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
  • 2
4 Comments
 
LVL 5

Expert Comment

by:rgc6789
ID: 24786959
Can you tell us if it is the mdf or ldf file that is large? Are you running any maintenance jobs on the db?
0
 

Author Comment

by:skbarnard
ID: 24787253
It's the MDF file that is getting that large and no backup jobs are running because none are allowed to run on the TEMPDB that I have found.  I just tried to create a maintenance plan to backup all system databases (the TEMPDB is a system DB) and when I looked at the T-SQL the Master, Model and MSDB are the only system databases that are backed up.
0
 
LVL 2

Accepted Solution

by:
corptech earned 1500 total points
ID: 24791178
Make sure you have simple recovery model on tempdb and it is set to autogrow.  The next step would be to make sure database access from programs are as concise as possible (ie - indexed tables with primary keys, limited use of temp tables, limited use of nested cursors, etc. ) and transactions are commited regularly.  

In sql server you can look at the activity monitor under the Management folder.  That lists all of the current processing running.
0
 

Author Closing Comment

by:skbarnard
ID: 31600222
I gave this solution to our acting DBA but he didn't give me feed back as to whether this solved the issue but I don't want to keep the question open any longer.  Thanks to all who responded
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
In this article I will describe the Backup & Restore 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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

722 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