Friday, March 9, 2012

log file

Hi, I have a database is read only purpose. But for some reasons, from
yesterday, the log file is growing to 10 GB.
How to find it out what cause the problem? Please help.One thing is the purpose and another the options of the db. See "alter
database" in BOL, to learn how to change a db to read_only mode.
Example:
use master
go
alter database northwind
set read_only
go
use northwind
go
select * into t1 from orders
go
use master
go
alter database northwind
set read_write
go
AMB
"js" wrote:
> Hi, I have a database is read only purpose. But for some reasons, from
> yesterday, the log file is growing to 10 GB.
> How to find it out what cause the problem? Please help.
>
>|||You could use Profiler to see what SQL statements are running in the
database. If the database is read-only then can you explicitly mark the
database as read-only? Also check the recovery model of your database. If
there is no need to write to that database, you could set the recovery model
to simple and make full database backups.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"js" <js@.someone@.hotmail.com> wrote in message
news:upLwwzDbFHA.2768@.tk2msftngp13.phx.gbl...
Hi, I have a database is read only purpose. But for some reasons, from
yesterday, the log file is growing to 10 GB.
How to find it out what cause the problem? Please help.|||Thanks for the help.
Is it possible to track down when the problem happened?
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:e5Emx$DbFHA.2984@.TK2MSFTNGP15.phx.gbl...
> You could use Profiler to see what SQL statements are running in the
> database. If the database is read-only then can you explicitly mark the
> database as read-only? Also check the recovery model of your database. If
> there is no need to write to that database, you could set the recovery
> model
> to simple and make full database backups.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "js" <js@.someone@.hotmail.com> wrote in message
> news:upLwwzDbFHA.2768@.tk2msftngp13.phx.gbl...
> Hi, I have a database is read only purpose. But for some reasons, from
> yesterday, the log file is growing to 10 GB.
> How to find it out what cause the problem? Please help.
>
>|||Difficult. But if you could get hold of a tool like Lumigent Log Explorer,
you could look at the transaction log contents to identify any data
modification command that could have used up a lot of log space.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"js" <js@.someone@.hotmail.com> wrote in message
news:Ov5l9EEbFHA.3120@.TK2MSFTNGP12.phx.gbl...
Thanks for the help.
Is it possible to track down when the problem happened?
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:e5Emx$DbFHA.2984@.TK2MSFTNGP15.phx.gbl...
> You could use Profiler to see what SQL statements are running in the
> database. If the database is read-only then can you explicitly mark the
> database as read-only? Also check the recovery model of your database. If
> there is no need to write to that database, you could set the recovery
> model
> to simple and make full database backups.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "js" <js@.someone@.hotmail.com> wrote in message
> news:upLwwzDbFHA.2768@.tk2msftngp13.phx.gbl...
> Hi, I have a database is read only purpose. But for some reasons, from
> yesterday, the log file is growing to 10 GB.
> How to find it out what cause the problem? Please help.
>
>|||Hi,
It is very difficult to investigate the real cause of the issue apart from
analyzing the transaction log.
Since your database is only Read only why dont you set the database itself
to READ ONLY mode.
ALTER DATABASE <DBNAME> SET READ_ONLY
Thanks
Hari
SQL Server MVP
"js" <js@.someone@.hotmail.com> wrote in message
news:upLwwzDbFHA.2768@.tk2msftngp13.phx.gbl...
> Hi, I have a database is read only purpose. But for some reasons, from
> yesterday, the log file is growing to 10 GB.
> How to find it out what cause the problem? Please help.
>

No comments:

Post a Comment