Sunday, February 19, 2012

Error - log file for tempdb is full

Hi,
I'm using SQL Server 2000.
I often get this message on my server saying "the log file for database
'tempdb' is full. Back up the transaction log for the database to free up
some log space..". But it does not allow me to backup and truncate the
transaction log file for the tempdb, maunally from the Enterpirse manager.
The only way is to re-start the server which often is not a preferred way
becuase there are more than 300 users connected to the server and its
difficult and bad for the buisness.
Also, sometime ago I tried the following DBCC command:
DBCC SHRINKFILE(tempdb_log, 1)
But unfortunately after that whenever I re-start the server, the Autogrow
option for the tempdb is only "1 KB", which is very very low in our company's
buisness, which is a real time scenario with people working 24/7 and doing
heavy transactions.
So I have to remember alwyas , to manually change the autogrow option to 10%
or more.
Can someone please help. Its being a nuisance now specially with me only as
the database support person in the company and with me on leave sometimes
causes problems.
Thanks,
Somi
Hi,
Have a look into the below URL:-
http://www.aspfaq.com/show.asp?id=2446
Thanks
Hari
SQL Server MVP
"Somi" <Somi@.discussions.microsoft.com> wrote in message
news:94F948DC-0A8C-40B4-A125-FFE8FB0E25A4@.microsoft.com...
> Hi,
> I'm using SQL Server 2000.
> I often get this message on my server saying "the log file for database
> 'tempdb' is full. Back up the transaction log for the database to free up
> some log space..". But it does not allow me to backup and truncate the
> transaction log file for the tempdb, maunally from the Enterpirse manager.
> The only way is to re-start the server which often is not a preferred way
> becuase there are more than 300 users connected to the server and its
> difficult and bad for the buisness.
> Also, sometime ago I tried the following DBCC command:
> DBCC SHRINKFILE(tempdb_log, 1)
> But unfortunately after that whenever I re-start the server, the Autogrow
> option for the tempdb is only "1 KB", which is very very low in our
> company's
> buisness, which is a real time scenario with people working 24/7 and doing
> heavy transactions.
> So I have to remember alwyas , to manually change the autogrow option to
> 10%
> or more.
> Can someone please help. Its being a nuisance now specially with me only
> as
> the database support person in the company and with me on leave sometimes
> causes problems.
> Thanks,
> Somi
>
|||Hi,
try out this and schedule it in a job it will not effect ur ERP
database.
backup log tempdb with truncate_only
dbcc shrinkfile(templog,1)
select * from sysfiles
u can also create a stored procedure and schedule it that will check
the logfile size and if it reached to a certain size u can execute the
code(shrink) the shrinkfile will free the space on logfile but it will
not shrink the space on disk.
u have to backup the logfirst and then execute shrink file then it will
free the space on disk.
hope this help u
from
Doller
Hari Prasad wrote:[vbcol=seagreen]
> Hi,
> Have a look into the below URL:-
> http://www.aspfaq.com/show.asp?id=2446
> Thanks
> Hari
> SQL Server MVP
> "Somi" <Somi@.discussions.microsoft.com> wrote in message
> news:94F948DC-0A8C-40B4-A125-FFE8FB0E25A4@.microsoft.com...
|||Thanks Hari and Doller,
I am going through all the options provided by you both.
But I still have a doubt in my mind,
when I use "dbcc shrinkfile(templog,1)" command, will it restrict the auto
grow option of the tempdb log file to only 1 MB ? and this definitely is not
what i want in our scenario of heavy and continuous transactions & constant
use of #temp tables, cursors etc.
As I mentioned in my main issue that I've already tried this option and that
seems to have cause this problem that now the auto grow option for the tempdb
sits at 1 MB only, unitl i manually change it everytime the server re-starts.
Thanks,
Somi.
"doller" wrote:

> Hi,
> try out this and schedule it in a job it will not effect ur ERP
> database.
> backup log tempdb with truncate_only
> dbcc shrinkfile(templog,1)
> select * from sysfiles
> u can also create a stored procedure and schedule it that will check
> the logfile size and if it reached to a certain size u can execute the
> code(shrink) the shrinkfile will free the space on logfile but it will
> not shrink the space on disk.
> u have to backup the logfirst and then execute shrink file then it will
> free the space on disk.
> hope this help u
> from
> Doller
>
> Hari Prasad wrote:
>
|||1. Set the autogrow option on Model to 10%, tempdb is created from model.
2. Ensure there is enough disk space for the tempdb log - it will always
truncate automatically, you must be sure there is enough space for the log
on the hard drive... If not, add a second log on another drive - or move the
log to another drive..
that should take care of you...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Somi" <Somi@.discussions.microsoft.com> wrote in message
news:94F948DC-0A8C-40B4-A125-FFE8FB0E25A4@.microsoft.com...
> Hi,
> I'm using SQL Server 2000.
> I often get this message on my server saying "the log file for database
> 'tempdb' is full. Back up the transaction log for the database to free up
> some log space..". But it does not allow me to backup and truncate the
> transaction log file for the tempdb, maunally from the Enterpirse manager.
> The only way is to re-start the server which often is not a preferred way
> becuase there are more than 300 users connected to the server and its
> difficult and bad for the buisness.
> Also, sometime ago I tried the following DBCC command:
> DBCC SHRINKFILE(tempdb_log, 1)
> But unfortunately after that whenever I re-start the server, the Autogrow
> option for the tempdb is only "1 KB", which is very very low in our
> company's
> buisness, which is a real time scenario with people working 24/7 and doing
> heavy transactions.
> So I have to remember alwyas , to manually change the autogrow option to
> 10%
> or more.
> Can someone please help. Its being a nuisance now specially with me only
> as
> the database support person in the company and with me on leave sometimes
> causes problems.
> Thanks,
> Somi
>

No comments:

Post a Comment