Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

SQL Server 2008 R2 Changing defaul location for query results

Posted on 2012-04-11
9
Medium Priority
?
199 Views
Last Modified: 2012-07-16
Whenever I run a query with a large result the C drive on my server fills up.  I have changed the location of query results under tools, options, query results, sql server, general to the desired location and restarted the database services.  New queries are still creating their temp files in the old location.  How do I enact this change?
0
Comment
Question by:pgreetisada
[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
  • 5
  • 3
9 Comments
 
LVL 40

Expert Comment

by:lcohan
ID: 37834132
"Whenever I run a query with a large result the C drive on my server fills up."

what "query" you run and is the SQL Server running on your computer as well? Or you run the query directly ON the SQL Server box?

Did you checked tempdb and any other DB files location and size? Maybe tempdb or one of the transaction logs that is growing due to the "query" you run and you will need to move that file(s) as well.
0
 

Author Comment

by:pgreetisada
ID: 37834977
A sample query is something that returns all of the records like select * from ...  It is run directly on the server from Microsoft SQL Mgmt. Studio.  The tempdb has been moved to the E drive, which is where the transaction logs are stored as well.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 37840857
So what is left on C: that it is eating up your space?
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:pgreetisada
ID: 37853097
The query is creating a .tmp file in C:documents and settings/administrator/local settings/temp/4/tmp26.tmp   It grows until the C drive is filled and then errors out.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 37853947
So let me see if I understand, you are stating that:
When you run a query from SSMS, the query create a .tmp file?  Is that correct?  If that is the case, I have to state I have never heard of that.
0
 

Author Comment

by:pgreetisada
ID: 37857603
I attached a file with 2 screen shots of the folder which fills up the c drive.  It will keep going if the results are big enough.
tmpsqlscreenshot.jpg
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 37858784
I am afraid I have never seen this.  Hopefully someone can step up to the plate.
0
 

Accepted Solution

by:
pgreetisada earned 0 total points
ID: 38175855
No answer was found.
0
 

Author Closing Comment

by:pgreetisada
ID: 38189177
No one was able to determine the cause of the behavior.
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
In this article I will describe the Detach & Attach 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.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

647 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