endrec
asked on
How to allow SQL Server 2005 and/or TempDB to use multiple disk drives for storage space?
I am running SQL Server 2005 Developer edition on my home machine and i'm trying to execute a query that takes up most of the available space when I try to run it. I have some other drives other than C on the computer that have 250+ GB available. Is there any way to tell SQL Server it can use that space to expand into?
Msg 1105, Level 17, State 2, Line 1
Could not allocate space for object 'dbo.SORT temporary run storage: 172560247422976' in database 'tempdb' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
Msg 9002, Level 17, State 4, Line 1
The transaction log for database 'tempdb' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
If it helps the log_reuse_wait_desc column says nothing.
Msg 1105, Level 17, State 2, Line 1
Could not allocate space for object 'dbo.SORT temporary run storage: 172560247422976' in database 'tempdb' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
Msg 9002, Level 17, State 4, Line 1
The transaction log for database 'tempdb' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
If it helps the log_reuse_wait_desc column says nothing.
Oh, missed out, the obvious bit doh, set the path of the new file in the filegroup to the appropriate drive that has the space.
ASKER
I am new to this. Do you have an example of how to set multiple file(s) filegroups? Do I need to do this through SQL Server Management Studio, through Alter statements to the DB?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Is there anything I can do about the following error. I have added an additional file for both the log and the PRIMARY file group (with the method described above). I reduced the table i'm trying to run a query on to 1/10 of it's original size and I have alloted for over 300GB of disk space but I am still getting the error below.
Msg 1105, Level 17, State 2, Line 1
Could not allocate space for object 'dbo.SORT temporary run storage: 190272201031680' in database 'tempdb' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
Msg 1105, Level 17, State 2, Line 1
Could not allocate space for object 'dbo.SORT temporary run storage: 190272201031680' in database 'tempdb' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
go to the files option shown on the left and that will display the current files held for tempdb.
hit add, a new line will appear, name the file (logical name) type data, filegroup primary (this will be the default) initial size (what you wish to allocate to it) and the growth options.
hit ok and you should be set.