Showing posts with label isit. Show all posts
Showing posts with label isit. Show all posts

Monday, February 20, 2012

Reduce the Size of SQL Log File

We have MS SQL 2000 Enterprise Edition, running on Windows 2000 Server. Is
it a good idea to reduce the size of the SQL Log File? If it is, do I need
to make sure no one is using the database while I am reducing the size of
the log file? Is it possible to setup these commands in a batch file
instead of running them under Query Analyzer? Thanks.
BACKUP LOG Smart_DATA WITH TRUNCATE_ONLY
GO
DBCC SHRINKDATABASE (Smart_DATA, TRUNCATEONLY)
What recovery model is the database in? Also see
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Diane Walker" <ett9300@.yahoo.com> wrote in message news:u90cVi%23vFHA.1256@.TK2MSFTNGP09.phx.gbl...
> We have MS SQL 2000 Enterprise Edition, running on Windows 2000 Server. Is it a good idea to
> reduce the size of the SQL Log File? If it is, do I need to make sure no one is using the
> database while I am reducing the size of the log file? Is it possible to setup these commands in
> a batch file instead of running them under Query Analyzer? Thanks.
> BACKUP LOG Smart_DATA WITH TRUNCATE_ONLY
> GO
> DBCC SHRINKDATABASE (Smart_DATA, TRUNCATEONLY)
>
>
>
|||"while I am reducing the size of the log file?"
-No you neednt, even that would speed up the task. if you have any
maintainance window, do it within this.
"Is it possible to setup these commands in a batch file instead of
running them under Query Analyzer ?"
-Yes of course, put the statements in a job (step) and execute it here.
HTH, Jens Suessmeyer.
|||Thank you very much.
"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1127458411.014481.253870@.g49g2000cwa.googlegr oups.com...
> "while I am reducing the size of the log file?"
> -No you neednt, even that would speed up the task. if you have any
> maintainance window, do it within this.
> "Is it possible to setup these commands in a batch file instead of
> running them under Query Analyzer ?"
> -Yes of course, put the statements in a job (step) and execute it here.
> HTH, Jens Suessmeyer.
>

Reduce the Size of SQL Log File

We have MS SQL 2000 Enterprise Edition, running on Windows 2000 Server. Is
it a good idea to reduce the size of the SQL Log File? If it is, do I need
to make sure no one is using the database while I am reducing the size of
the log file? Is it possible to setup these commands in a batch file
instead of running them under Query Analyzer? Thanks.
BACKUP LOG Smart_DATA WITH TRUNCATE_ONLY
GO
DBCC SHRINKDATABASE (Smart_DATA, TRUNCATEONLY)What recovery model is the database in? Also see
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Diane Walker" <ett9300@.yahoo.com> wrote in message news:u90cVi%23vFHA.1256@.TK2MSFTNGP09.phx
.gbl...
> We have MS SQL 2000 Enterprise Edition, running on Windows 2000 Server. I
s it a good idea to
> reduce the size of the SQL Log File? If it is, do I need to make sure no
one is using the
> database while I am reducing the size of the log file? Is it possible to
setup these commands in
> a batch file instead of running them under Query Analyzer? Thanks.
> BACKUP LOG Smart_DATA WITH TRUNCATE_ONLY
> GO
> DBCC SHRINKDATABASE (Smart_DATA, TRUNCATEONLY)
>
>
>|||"while I am reducing the size of the log file?"
-No you neednt, even that would speed up the task. if you have any
maintainance window, do it within this.
"Is it possible to setup these commands in a batch file instead of
running them under Query Analyzer ?"
-Yes of course, put the statements in a job (step) and execute it here.
HTH, Jens Suessmeyer.|||Thank you very much.
"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1127458411.014481.253870@.g49g2000cwa.googlegroups.com...
> "while I am reducing the size of the log file?"
> -No you neednt, even that would speed up the task. if you have any
> maintainance window, do it within this.
> "Is it possible to setup these commands in a batch file instead of
> running them under Query Analyzer ?"
> -Yes of course, put the statements in a job (step) and execute it here.
> HTH, Jens Suessmeyer.
>