Showing posts with label tempdb. Show all posts
Showing posts with label tempdb. Show all posts

Wednesday, March 7, 2012

Could not find database table ID 2, name tempdb..

On startup of my SQL Server 2000 Ent Edition service, I see the following logged:

Error: 615, Severity: 21, State: 1
Could not find database table ID 2, name 'tempdb'..

I am running on W2K3, SQL 2000 Dev Edition, 8 CPU, 16GB, -g512

Any ideas would be appreciatedhttp://support.microsoft.com/kb/158586/EN-US/|||Harshal

The referred KBA is applicable to SQL 6.5 not for SQL 2K.

Dbengineer, check event viewer logs and sql server error logs for more information whether tempdb located hard drive has got any issues.

Saturday, February 25, 2012

Could not create tempdb - SQL Server 2005 with SP1

I am receiving the following message within the Application Event Log on one
of my servers.
Could not create tempdb. You may not have enough disk space available. Free
additional disk space by deleting other files on the tempdb drive and then
restart SQL Server. Check for additional errors in the event log that may
indicate why the tempdb files could not be initialized.
I am also receiving this error:
The database 'model' is marked RESTORING and is in a state that does not
allow recovery to be run.
The strange thing about this message is that the server was working
correctly yesterday. The only thing that changed: The server was shut down
and moved to a new data center. Connectivity is in place because I can
connect to the box via Remote Desktop from work and from home.
This error is ONLYhappening on the default instance. There are two other
instances on the server (all three SQL Server installs are running under the
same network account).
There is enough free space on the volumes.
OS: 24GB free
internal array: 650 GB free
external array (MSA 500 G2): 900GB free
I even tried starting that instance in single user mode from the command
prompt via:
sqlservr -smssqlserver -c -f -m -T3608
This worked and I tried moving tempdb to the different volumes that are
available on the box. When I try to start SQL Server I receive the same
errors about model and tempdb and this instance fails to start.
I appreciate any assistance you can provide!
--
Keith KratochvilKeith Kratochvil wrote:
> I am receiving the following message within the Application Event Log on one
> of my servers.
> Could not create tempdb. You may not have enough disk space available. Free
> additional disk space by deleting other files on the tempdb drive and then
> restart SQL Server. Check for additional errors in the event log that may
> indicate why the tempdb files could not be initialized.
> I am also receiving this error:
> The database 'model' is marked RESTORING and is in a state that does not
> allow recovery to be run.
> The strange thing about this message is that the server was working
> correctly yesterday. The only thing that changed: The server was shut down
> and moved to a new data center. Connectivity is in place because I can
> connect to the box via Remote Desktop from work and from home.
>
> This error is ONLYhappening on the default instance. There are two other
> instances on the server (all three SQL Server installs are running under the
> same network account).
>
> There is enough free space on the volumes.
> OS: 24GB free
> internal array: 650 GB free
> external array (MSA 500 G2): 900GB free
> I even tried starting that instance in single user mode from the command
> prompt via:
> sqlservr -smssqlserver -c -f -m -T3608
> This worked and I tried moving tempdb to the different volumes that are
> available on the box. When I try to start SQL Server I receive the same
> errors about model and tempdb and this instance fails to start.
>
> I appreciate any assistance you can provide!
>
Hi
Check your logs(ldf) file size
regards
SW|||In addition to the errors that I mentioned (recorded within the Application
log), this error is within the System log:
The SQL Server (MSSQLSERVER) service terminated with service-specific error
1814 (0x716).
The error is written right after the entry that states:
The SQL Server (MSSQLSERVER) service entered the stopped state.
I tried starting SQL Server normally after telling it where to create tempdb
(via ALTER DATABASE ... MODIFY FILE...).
It would not start -- the same errors on model and tempdb are written to the
log.
Then I started SQL Server via the command line again
(sqlservr -smssqlserver -c -f -m -T3608).
It started (as before).
SQL crashes if I execute these commands:
sp_helpdb tempdb
select * From tempdb..sysfiles
I can execute these commands, however:
select * From master..sysdatabases where name = 'tempdb'
select * From master..sysaltfiles where name like 'temp%'
Here are the results:
name dbid sid mode status status2 crdate reserved category cmptlevel
filename version
tempdb 2 0x01 0 8 1090520064 2006-10-26 09:26:35.027 1900-01-01 00:00:00.000
0 90 E:\mssql\data\tempdb.mdf NULL
fileid groupid size maxsize growth status perf dbid name filename
1 1 1024 -1 10 1048578 0 2 tempdev E:\mssql\data\tempdb.mdf
2 0 64 -1 10 1048642 0 2 templog E:\mssql\data\templog.ldf
However tempdb's data and log files are are not on the disk. I searched for
them using Agent Ransack (as well as Windows Explorer).
--
Keith Kratochvil
"Sebastian" <sebastian@.waksmundzcy.com.pl> wrote in message
news:%23Bnb$FJGHHA.2456@.TK2MSFTNGP06.phx.gbl...
> Keith Kratochvil wrote:
>> I am receiving the following message within the Application Event Log on
>> one of my servers.
>> Could not create tempdb. You may not have enough disk space available.
>> Free additional disk space by deleting other files on the tempdb drive
>> and then restart SQL Server. Check for additional errors in the event log
>> that may indicate why the tempdb files could not be initialized.
>> I am also receiving this error:
>> The database 'model' is marked RESTORING and is in a state that does not
>> allow recovery to be run.
>> The strange thing about this message is that the server was working
>> correctly yesterday. The only thing that changed: The server was shut
>> down and moved to a new data center. Connectivity is in place because I
>> can connect to the box via Remote Desktop from work and from home.
>>
>> This error is ONLYhappening on the default instance. There are two other
>> instances on the server (all three SQL Server installs are running under
>> the same network account).
>>
>> There is enough free space on the volumes.
>> OS: 24GB free
>> internal array: 650 GB free
>> external array (MSA 500 G2): 900GB free
>> I even tried starting that instance in single user mode from the command
>> prompt via:
>> sqlservr -smssqlserver -c -f -m -T3608
>> This worked and I tried moving tempdb to the different volumes that are
>> available on the box. When I try to start SQL Server I receive the same
>> errors about model and tempdb and this instance fails to start.
>>
>> I appreciate any assistance you can provide!
> Hi
> Check your logs(ldf) file size
> regards
> SW|||Does that directory structure exist on the E Drive? Does the E: Drive
even exist'
What other databases were supposed to be on your E Drive?
Keith Kratochvil wrote:
> In addition to the errors that I mentioned (recorded within the Application
> log), this error is within the System log:
> The SQL Server (MSSQLSERVER) service terminated with service-specific error
> 1814 (0x716).
> The error is written right after the entry that states:
> The SQL Server (MSSQLSERVER) service entered the stopped state.
>
> I tried starting SQL Server normally after telling it where to create tempdb
> (via ALTER DATABASE ... MODIFY FILE...).
> It would not start -- the same errors on model and tempdb are written to the
> log.
> Then I started SQL Server via the command line again
> (sqlservr -smssqlserver -c -f -m -T3608).
> It started (as before).
> SQL crashes if I execute these commands:
> sp_helpdb tempdb
> select * From tempdb..sysfiles
>
> I can execute these commands, however:
> select * From master..sysdatabases where name = 'tempdb'
> select * From master..sysaltfiles where name like 'temp%'
> Here are the results:
> name dbid sid mode status status2 crdate reserved category cmptlevel
> filename version
> tempdb 2 0x01 0 8 1090520064 2006-10-26 09:26:35.027 1900-01-01 00:00:00.000
> 0 90 E:\mssql\data\tempdb.mdf NULL
>
> fileid groupid size maxsize growth status perf dbid name filename
> 1 1 1024 -1 10 1048578 0 2 tempdev E:\mssql\data\tempdb.mdf
> 2 0 64 -1 10 1048642 0 2 templog E:\mssql\data\templog.ldf
>
> However tempdb's data and log files are are not on the disk. I searched for
> them using Agent Ransack (as well as Windows Explorer).
> --
> Keith Kratochvil
>
> "Sebastian" <sebastian@.waksmundzcy.com.pl> wrote in message
> news:%23Bnb$FJGHHA.2456@.TK2MSFTNGP06.phx.gbl...
> > Keith Kratochvil wrote:
> >> I am receiving the following message within the Application Event Log on
> >> one of my servers.
> >> Could not create tempdb. You may not have enough disk space available.
> >> Free additional disk space by deleting other files on the tempdb drive
> >> and then restart SQL Server. Check for additional errors in the event log
> >> that may indicate why the tempdb files could not be initialized.
> >>
> >> I am also receiving this error:
> >> The database 'model' is marked RESTORING and is in a state that does not
> >> allow recovery to be run.
> >>
> >> The strange thing about this message is that the server was working
> >> correctly yesterday. The only thing that changed: The server was shut
> >> down and moved to a new data center. Connectivity is in place because I
> >> can connect to the box via Remote Desktop from work and from home.
> >>
> >>
> >>
> >> This error is ONLYhappening on the default instance. There are two other
> >> instances on the server (all three SQL Server installs are running under
> >> the same network account).
> >>
> >>
> >> There is enough free space on the volumes.
> >> OS: 24GB free
> >> internal array: 650 GB free
> >> external array (MSA 500 G2): 900GB free
> >>
> >> I even tried starting that instance in single user mode from the command
> >> prompt via:
> >> sqlservr -smssqlserver -c -f -m -T3608
> >> This worked and I tried moving tempdb to the different volumes that are
> >> available on the box. When I try to start SQL Server I receive the same
> >> errors about model and tempdb and this instance fails to start.
> >>
> >>
> >> I appreciate any assistance you can provide!
> >>
> >
> > Hi
> >
> > Check your logs(ldf) file size
> >
> > regards
> > SW

Could not create tempdb - SQL Server 2005 with SP1

I am receiving the following message within the Application Event Log on one
of my servers.
Could not create tempdb. You may not have enough disk space available. Free
additional disk space by deleting other files on the tempdb drive and then
restart SQL Server. Check for additional errors in the event log that may
indicate why the tempdb files could not be initialized.
I am also receiving this error:
The database 'model' is marked RESTORING and is in a state that does not
allow recovery to be run.
The strange thing about this message is that the server was working
correctly yesterday. The only thing that changed: The server was shut down
and moved to a new data center. Connectivity is in place because I can
connect to the box via Remote Desktop from work and from home.
This error is ONLYhappening on the default instance. There are two other
instances on the server (all three SQL Server installs are running under the
same network account).
There is enough free space on the volumes.
OS: 24GB free
internal array: 650 GB free
external array (MSA 500 G2): 900GB free
I even tried starting that instance in single user mode from the command
prompt via:
sqlservr -smssqlserver -c -f -m -T3608
This worked and I tried moving tempdb to the different volumes that are
available on the box. When I try to start SQL Server I receive the same
errors about model and tempdb and this instance fails to start.
I appreciate any assistance you can provide!
Keith KratochvilKeith Kratochvil wrote:
> I am receiving the following message within the Application Event Log on o
ne
> of my servers.
> Could not create tempdb. You may not have enough disk space available. Fre
e
> additional disk space by deleting other files on the tempdb drive and then
> restart SQL Server. Check for additional errors in the event log that may
> indicate why the tempdb files could not be initialized.
> I am also receiving this error:
> The database 'model' is marked RESTORING and is in a state that does not
> allow recovery to be run.
> The strange thing about this message is that the server was working
> correctly yesterday. The only thing that changed: The server was shut dow
n
> and moved to a new data center. Connectivity is in place because I can
> connect to the box via Remote Desktop from work and from home.
>
> This error is ONLYhappening on the default instance. There are two other
> instances on the server (all three SQL Server installs are running under t
he
> same network account).
>
> There is enough free space on the volumes.
> OS: 24GB free
> internal array: 650 GB free
> external array (MSA 500 G2): 900GB free
> I even tried starting that instance in single user mode from the command
> prompt via:
> sqlservr -smssqlserver -c -f -m -T3608
> This worked and I tried moving tempdb to the different volumes that are
> available on the box. When I try to start SQL Server I receive the same
> errors about model and tempdb and this instance fails to start.
>
> I appreciate any assistance you can provide!
>
Hi
Check your logs(ldf) file size
regards
SW|||In addition to the errors that I mentioned (recorded within the Application
log), this error is within the System log:
The SQL Server (MSSQLSERVER) service terminated with service-specific error
1814 (0x716).
The error is written right after the entry that states:
The SQL Server (MSSQLSERVER) service entered the stopped state.
I tried starting SQL Server normally after telling it where to create tempdb
(via ALTER DATABASE ... MODIFY FILE...).
It would not start -- the same errors on model and tempdb are written to the
log.
Then I started SQL Server via the command line again
(sqlservr -smssqlserver -c -f -m -T3608).
It started (as before).
SQL crashes if I execute these commands:
sp_helpdb tempdb
select * From tempdb..sysfiles
I can execute these commands, however:
select * From master..sysdatabases where name = 'tempdb'
select * From master..sysaltfiles where name like 'temp%'
Here are the results:
name dbid sid mode status status2 crdate reserved category cmptlevel
filename version
tempdb 2 0x01 0 8 1090520064 2006-10-26 09:26:35.027 1900-01-01 00:00:00.000
0 90 E:\mssql\data\tempdb.mdf NULL
fileid groupid size maxsize growth status perf dbid name filename
1 1 1024 -1 10 1048578 0 2 tempdev E:\mssql\data\tempdb.mdf
2 0 64 -1 10 1048642 0 2 templog E:\mssql\data\templog.ldf
However tempdb's data and log files are are not on the disk. I searched for
them using Agent Ransack (as well as Windows Explorer).
Keith Kratochvil
"Sebastian" <sebastian@.waksmundzcy.com.pl> wrote in message
news:%23Bnb$FJGHHA.2456@.TK2MSFTNGP06.phx.gbl...
> Keith Kratochvil wrote:
> Hi
> Check your logs(ldf) file size
> regards
> SW|||Does that directory structure exist on the E Drive? Does the E: Drive
even exist'
What other databases were supposed to be on your E Drive?
Keith Kratochvil wrote:[vbcol=seagreen]
> In addition to the errors that I mentioned (recorded within the Applicatio
n
> log), this error is within the System log:
> The SQL Server (MSSQLSERVER) service terminated with service-specific erro
r
> 1814 (0x716).
> The error is written right after the entry that states:
> The SQL Server (MSSQLSERVER) service entered the stopped state.
>
> I tried starting SQL Server normally after telling it where to create temp
db
> (via ALTER DATABASE ... MODIFY FILE...).
> It would not start -- the same errors on model and tempdb are written to t
he
> log.
> Then I started SQL Server via the command line again
> (sqlservr -smssqlserver -c -f -m -T3608).
> It started (as before).
> SQL crashes if I execute these commands:
> sp_helpdb tempdb
> select * From tempdb..sysfiles
>
> I can execute these commands, however:
> select * From master..sysdatabases where name = 'tempdb'
> select * From master..sysaltfiles where name like 'temp%'
> Here are the results:
> name dbid sid mode status status2 crdate reserved category cmptlevel
> filename version
> tempdb 2 0x01 0 8 1090520064 2006-10-26 09:26:35.027 1900-01-01 00:00:00.0
00
> 0 90 E:\mssql\data\tempdb.mdf NULL
>
> fileid groupid size maxsize growth status perf dbid name filename
> 1 1 1024 -1 10 1048578 0 2 tempdev E:\mssql\data\tempdb.mdf
> 2 0 64 -1 10 1048642 0 2 templog E:\mssql\data\templog.ldf
>
> However tempdb's data and log files are are not on the disk. I searched f
or
> them using Agent Ransack (as well as Windows Explorer).
> --
> Keith Kratochvil
>
> "Sebastian" <sebastian@.waksmundzcy.com.pl> wrote in message
> news:%23Bnb$FJGHHA.2456@.TK2MSFTNGP06.phx.gbl...

Could not create tempdb - SQL Server 2005 with SP1

I am receiving the following message within the Application Event Log on one
of my servers.
Could not create tempdb. You may not have enough disk space available. Free
additional disk space by deleting other files on the tempdb drive and then
restart SQL Server. Check for additional errors in the event log that may
indicate why the tempdb files could not be initialized.
I am also receiving this error:
The database 'model' is marked RESTORING and is in a state that does not
allow recovery to be run.
The strange thing about this message is that the server was working
correctly yesterday. The only thing that changed: The server was shut down
and moved to a new data center. Connectivity is in place because I can
connect to the box via Remote Desktop from work and from home.
This error is ONLYhappening on the default instance. There are two other
instances on the server (all three SQL Server installs are running under the
same network account).
There is enough free space on the volumes.
OS: 24GB free
internal array: 650 GB free
external array (MSA 500 G2): 900GB free
I even tried starting that instance in single user mode from the command
prompt via:
sqlservr -smssqlserver -c -f -m -T3608
This worked and I tried moving tempdb to the different volumes that are
available on the box. When I try to start SQL Server I receive the same
errors about model and tempdb and this instance fails to start.
I appreciate any assistance you can provide!
Keith Kratochvil
Keith Kratochvil wrote:
> I am receiving the following message within the Application Event Log on one
> of my servers.
> Could not create tempdb. You may not have enough disk space available. Free
> additional disk space by deleting other files on the tempdb drive and then
> restart SQL Server. Check for additional errors in the event log that may
> indicate why the tempdb files could not be initialized.
> I am also receiving this error:
> The database 'model' is marked RESTORING and is in a state that does not
> allow recovery to be run.
> The strange thing about this message is that the server was working
> correctly yesterday. The only thing that changed: The server was shut down
> and moved to a new data center. Connectivity is in place because I can
> connect to the box via Remote Desktop from work and from home.
>
> This error is ONLYhappening on the default instance. There are two other
> instances on the server (all three SQL Server installs are running under the
> same network account).
>
> There is enough free space on the volumes.
> OS: 24GB free
> internal array: 650 GB free
> external array (MSA 500 G2): 900GB free
> I even tried starting that instance in single user mode from the command
> prompt via:
> sqlservr -smssqlserver -c -f -m -T3608
> This worked and I tried moving tempdb to the different volumes that are
> available on the box. When I try to start SQL Server I receive the same
> errors about model and tempdb and this instance fails to start.
>
> I appreciate any assistance you can provide!
>
Hi
Check your logs(ldf) file size
regards
SW
|||In addition to the errors that I mentioned (recorded within the Application
log), this error is within the System log:
The SQL Server (MSSQLSERVER) service terminated with service-specific error
1814 (0x716).
The error is written right after the entry that states:
The SQL Server (MSSQLSERVER) service entered the stopped state.
I tried starting SQL Server normally after telling it where to create tempdb
(via ALTER DATABASE ... MODIFY FILE...).
It would not start -- the same errors on model and tempdb are written to the
log.
Then I started SQL Server via the command line again
(sqlservr -smssqlserver -c -f -m -T3608).
It started (as before).
SQL crashes if I execute these commands:
sp_helpdb tempdb
select * From tempdb..sysfiles
I can execute these commands, however:
select * From master..sysdatabases where name = 'tempdb'
select * From master..sysaltfiles where name like 'temp%'
Here are the results:
name dbid sid mode status status2 crdate reserved category cmptlevel
filename version
tempdb 2 0x01 0 8 1090520064 2006-10-26 09:26:35.027 1900-01-01 00:00:00.000
0 90 E:\mssql\data\tempdb.mdf NULL
fileid groupid size maxsize growth status perf dbid name filename
1 1 1024 -1 10 1048578 0 2 tempdev E:\mssql\data\tempdb.mdf
2 0 64 -1 10 1048642 0 2 templog E:\mssql\data\templog.ldf
However tempdb's data and log files are are not on the disk. I searched for
them using Agent Ransack (as well as Windows Explorer).
Keith Kratochvil
"Sebastian" <sebastian@.waksmundzcy.com.pl> wrote in message
news:%23Bnb$FJGHHA.2456@.TK2MSFTNGP06.phx.gbl...
> Keith Kratochvil wrote:
> Hi
> Check your logs(ldf) file size
> regards
> SW
|||Does that directory structure exist on the E Drive? Does the E: Drive
even exist?
What other databases were supposed to be on your E Drive?
Keith Kratochvil wrote:[vbcol=seagreen]
> In addition to the errors that I mentioned (recorded within the Application
> log), this error is within the System log:
> The SQL Server (MSSQLSERVER) service terminated with service-specific error
> 1814 (0x716).
> The error is written right after the entry that states:
> The SQL Server (MSSQLSERVER) service entered the stopped state.
>
> I tried starting SQL Server normally after telling it where to create tempdb
> (via ALTER DATABASE ... MODIFY FILE...).
> It would not start -- the same errors on model and tempdb are written to the
> log.
> Then I started SQL Server via the command line again
> (sqlservr -smssqlserver -c -f -m -T3608).
> It started (as before).
> SQL crashes if I execute these commands:
> sp_helpdb tempdb
> select * From tempdb..sysfiles
>
> I can execute these commands, however:
> select * From master..sysdatabases where name = 'tempdb'
> select * From master..sysaltfiles where name like 'temp%'
> Here are the results:
> name dbid sid mode status status2 crdate reserved category cmptlevel
> filename version
> tempdb 2 0x01 0 8 1090520064 2006-10-26 09:26:35.027 1900-01-01 00:00:00.000
> 0 90 E:\mssql\data\tempdb.mdf NULL
>
> fileid groupid size maxsize growth status perf dbid name filename
> 1 1 1024 -1 10 1048578 0 2 tempdev E:\mssql\data\tempdb.mdf
> 2 0 64 -1 10 1048642 0 2 templog E:\mssql\data\templog.ldf
>
> However tempdb's data and log files are are not on the disk. I searched for
> them using Agent Ransack (as well as Windows Explorer).
> --
> Keith Kratochvil
>
> "Sebastian" <sebastian@.waksmundzcy.com.pl> wrote in message
> news:%23Bnb$FJGHHA.2456@.TK2MSFTNGP06.phx.gbl...

Sunday, February 19, 2012

Could not allocate new page for database TEMPDB?

"Could not allocate new page for database 'TEMPDB'. There are no more pages available in filegroup DEFAULT. Space can be created by dropping objects, adding additional files, or allowing file growth."

I get this error when running a query on another database. But why?

Both data and transaction files on TEMPDB are set to "automatically grow file" and "unrestricted file growth" and there is 70GB of free space on the disk drive. Shouldn't the files just grow? Why would this happen?because temporary table store in tempdb|||because temporary table store in tempdb

Thanks for the reply. I don't understand what you are saying but it sounds like you know what the issue is. Could you please elaborate a little bit?|||You say :I get this error when running a query
you are running a query , can you show me the query ?
do you create temporary table in your query?|||You say :I get this error when running a query
you are running a query , can you show me the query ?
do you create temporary table in your query?

No, I'm not explicitly doing anything with TEMPDB.

My query is very straight forward:

SELECT TOP 100 SampleDescriptor, COUNT(*) RepCount FROM DataSamples GROUP BY SampleDescriptor ORDER BY RepCount DESC

On my dev system, with 30 test records, this works fine.

On the production server with 188 million records (yes, a LOT of records!), this fails with the TEMPDB error that I mentioned.

I'm trying a simple: SELECT COUNT(*) FROM DataSamples now. It's been running for over 30 minutes and still going. I wonder if it will hit a similar error...|||When you get the error, have you checked the size of tempdb (both data and log) and free space of the hard drive?

I assume that tempdb is located in the hard drive with 70GB free space.|||Yes, of course. The size of both tempdb data and transaction files are 2MB and they are located on the drive with 68GB free. All drives on that system have plenty of space (although for tempdb, D: should be the only one that matters):

C: has 25 GB free
D: has 68 GB free
E: has 124 GB free|||What do sp_spaceused and sp_helpdb return?

BTW, which version and service pack of SQL Server?

Could not allocate new page for database 'TEMPDB'.

I recently had a routine using a table variable involved in a fairly
complex query using a number of fairly large tables which ended with
the following error.
Server: Msg 1101, Level 17, State 10, Line 40
Could not allocate new page for database 'TEMPDB'. There are no more
pages
available in filegroup DEFAULT. Space can be created by dropping
objects,
adding additional files, or allowing file growth.
The tempdb is on autogrow.
The drive on which the tempdb resided was filling up after running for
a number of minutes. The drive had a couple of GB of space left until
the routine started. I looked into it a bit and read that temp
tables were better performers with larger tables than table vars so
tried using a temp table instead. The routine finished in a timely
manner without expanding the tempdb significantly from it's previous
size before the routines initial run(rebuilt tempdb). Any idea why the
big difference in performance and effect on the tempdb? The rest of
the routine remainded the same with the exception of the table var -->
temp table.
ThanksUse of temp tables and table v ariables will affect the query plans used
in a procedure.
It is likely that the use of the table variables has resulted in a query
plan that involved heavy use of worktables i.e sorting and thus the filling
up of tempdb.
If you can post the query plans for the different code (and the code) it
migth help to diagnose the problem.

> I recently had a routine using a table variable involved in a fairly
> complex query using a number of fairly large tables which ended with
> the following error.
> Server: Msg 1101, Level 17, State 10, Line 40
> Could not allocate new page for database 'TEMPDB'. There are no more
> pages
> available in filegroup DEFAULT. Space can be created by dropping
> objects,
> adding additional files, or allowing file growth.
> The tempdb is on autogrow.
> The drive on which the tempdb resided was filling up after running for
> a number of minutes. The drive had a couple of GB of space left until
> the routine started. I looked into it a bit and read that temp
> tables were better performers with larger tables than table vars so
> tried using a temp table instead. The routine finished in a timely
> manner without expanding the tempdb significantly from it's previous
> size before the routines initial run(rebuilt tempdb). Any idea why
> the
> big difference in performance and effect on the tempdb? The rest of
> the routine remainded the same with the exception of the table var -->
> temp table.
> Thanks
>|||I took a look at the query plans, they are identical. Odd thing is
that this used to run on the same environment in a timely manner using
the table var a w ago. Finding out the truth here may be difficult
as our application is being hosted by a client and we do not have
security permission to view their sensitive data.
Thanks for the post!

Could not allocate new page for database TEMPDB.

I tried to create a new table in VIEW to accomplish some urgent work and I have received the following message:

Server: Msg 1101, Level 17, State 10, Line 1
Could not allocate new page for database 'TEMPDB'. There are no more pages available in filegroup DEFAULT. Space can be created by dropping objects, adding additional files, or allowing file growth.

It should be recognized that the MS SQL Server performance is slower than before. What files the TEMPDB contains, which need to be cleared from time to time, and how can I solve this above mentioned matter.
Thank you.Hi,

execute following statment;
use tempdb
go
sp_helpfile

If growth is set to 0 (Zero), your tempdb can't allocate more space. See books online to read how to change growth and how to allocate.

/Mada|||Thank you !!
I will try to use it and I will search for books online to have the solution.

Best regards.

Could not allocate new page for database TEMPDB

I get the following error when doing a variety of basic queries on other databases:

"Could not allocate new page for database 'TEMPDB'. There are no more pages available in filegroup DEFAULT. Space can be created by dropping objects, adding additional files, or allowing file growth."

This doesn't make any sense since they are set to auto grow and there is plenty of disk space to do so.

Both data and transaction files of tempdb are set to:
"Automatically grow file" is checked
"Maximum file size" is set to "Unrestricted file growth"
Growth rate of 10%

Both tempdb data file and transaction file are on D: but all drives have ample space:
c: 25 GB free
D: 69 GB free
E: 175 GB free

sp_spaceused returns the following for tempdb:

name size unallocated space
tempdb 4.00 MB 1.45 MB

reserved data index_size unused
568 KB 176 KB 304 KB 88 KB

sp_helpdb returned for tempdb:

tempdb
4.00 MB sa 2 Apr 23 2004 Status=ONLINE, Updateability=READ_WRITE, UserAccess=MULTI_USER, Recovery=SIMPLE, Version=539, Collation=SQL_Latin1_General_CP1_CI_AS, SQLSortOrder=52, IsAutoCreateStatistics, IsAutoUpdateStatistics 80

This is with SQL Server 2000 (Personal Edition)
Product Version: 8.00.760 (SP3)

Is this some strange limitation of Personal Edition? Is it worth upgrading to Standard Edition?doesn't have anything to do with edition, it's your transaction. if it affects a lot of data, and in your case if work tables are needed to be created (this happens in tempdb) for sorting or grouping purposes, or if your indexes created with sort_in_tempdb, the data device will continue to grow for as much as it's needed based on your increment setting (default of 10% is not a good idea) once the limit is reached but the transaction has not completed, - it gets rolled back and the allocated size goes back to almost 0. if the "auto shrink" option is set, upon completion of rollback the allocated size goes down too. this explains why your sp_spaceused shows such a small number.|||doesn't have anything to do with edition, it's your transaction. if it affects a lot of data, and in your case if work tables are needed to be created (this happens in tempdb) for sorting or grouping purposes, or if your indexes created with sort_in_tempdb, the data device will continue to grow for as much as it's needed based on your increment setting (default of 10% is not a good idea) once the limit is reached but the transaction has not completed, - it gets rolled back and the allocated size goes back to almost 0. if the "auto shrink" option is set, upon completion of rollback the allocated size goes down too. this explains why your sp_spaceused shows such a small number.

Bingo! The query actually caused tempdb to use the whole 27GB available on the C: drive, failed, shrunk to a few MB, and gave the illusion that space wasn't an issue. I moved tempdb to the E: drive, and it works perfectly.

Thanks!