2

I'm executing sql query on my database. I have SQL Server 2008 installed on my D harddrive which has 55 GB free space.

I have also C drive which has sth like 150 MB free (right now).

While executing that query on quite a big table (16 GB) I have an error:

An error occurred while executing batch. Error message is: Not enough disk space.

I would like to know if there is any possibility that I can make SQL Server to use D drive instead of C

Or maybe there is any other problem with what I'm doing ?

Thanks for help

0

3 Answers 3

3

This is likely a logging issue. You can move the log file to a different drive and use a lower level logging.

4
  • Log file is set to be written on D drive, executing this query takes a lot of free space on my C drive dont even know which file is beeing modified, what else can I do ? Commented Jun 16, 2010 at 21:23
  • 3
    What about the TEMPDBs? Commented Jun 16, 2010 at 22:05
  • there are also stored on D drive according to options which are set :/ Commented Jun 16, 2010 at 22:13
  • Wild Guess: Try setting the TEMP and TMP system variables to a directory on the D drive. Commented Jun 17, 2010 at 2:24
1

This is likely to be the TEMPDB, one of SQL Server's System databases. It will have been created in the default database location by the installer.

This article talks about moving the tempdb.

Equally you could add additional (expandable) files on D: to the tempdb database's primary filegroup, then set the default ones to fixed size (and eventually flush, then remove them).

0

Are you running the query using a client application on the SQL server, like SSMS? If so, it could be, probably is, using the C drive to store the output for display, especially if you're running the output to a grid. Try running the query using the SQLCMD command line.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.