Showing posts with label reduce. Show all posts
Showing posts with label reduce. Show all posts

Tuesday, March 20, 2012

Bigger log file a database

I have a database, the log file is very long (1 gb)
how to do to reduce the log file?
thank
Check in SEM, to see if your database is in full recovery mode... If so,
Backup the transaction log
ie
Backup log prod to disk="c:\lkjlklj.log" with init
then (until it shrinks) in Query Analyzer
Use prod
go
DBCC Shrinkfile (logfilename, neededsizeinMB)
GO
If the database is in simple recovery mode, just do the shrink
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
"alexander" <alexander@.discussions.microsoft.com> wrote in message
news:8B1EF531-933E-4422-90D9-FFC040F2E2CF@.microsoft.com...
> I have a database, the log file is very long (1 gb)
> how to do to reduce the log file?
>
> thank

Bigger log file a database

I have a database, the log file is very long (1 gb)
how to do to reduce the log file'
thankCheck in SEM, to see if your database is in full recovery mode... If so,
Backup the transaction log
ie
Backup log prod to disk="c:\lkjlklj.log" with init
then (until it shrinks) in Query Analyzer
Use prod
go
DBCC Shrinkfile (logfilename, neededsizeinMB)
GO
If the database is in simple recovery mode, just do the shrink
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
"alexander" <alexander@.discussions.microsoft.com> wrote in message
news:8B1EF531-933E-4422-90D9-FFC040F2E2CF@.microsoft.com...
> I have a database, the log file is very long (1 gb)
> how to do to reduce the log file'
>
> thank

Monday, March 19, 2012

big log file

Hello:
I have a db with 2 data files and 2 log file, but one log files is about
9GB, I would like first reduce the db to only one pair of file, one data and
one log and second reduce the size of log about 1gb or 2. how can I do that?
Best regards,
Owen.Firstly to remove 1 of the log files use
DBCC SHRINKFILE with the EMPTYFILE option.
Then ALTER DATABASE to remove it.
As for shrinking the other log, there are numerous articles on this, here a
few...
http://www.support.microsoft.com/?id=256650 INF: How to Shrink the SQL
Server 7.0 Tran Log
http://www.support.microsoft.com/?id=317375 Log File Grows too big
http://www.support.microsoft.com/?id=110139 Log file filling up
http://www.mssqlserver.com/faq/logs-shrinklog.asp Shrink File
http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
and AutoShrink
http://www.support.microsoft.com/?id=272318 INF: Shrinking Log in SQL
Server 2000 with DBCC SHRINKFILE
http://www.support.microsoft.com/?id=317375 Log File Grows too big
http://www.support.microsoft.com/?id=110139 Log file filling up
http://www.mssqlserver.com/faq/logs-shrinklog.asp Shrink File
http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
and AutoShrink
HTH. Ryan
"Owen" <anibal@.prensa-latina.cu> wrote in message
news:O0nvZdRHGHA.1424@.TK2MSFTNGP12.phx.gbl...
> Hello:
> I have a db with 2 data files and 2 log file, but one log files is about
> 9GB, I would like first reduce the db to only one pair of file, one data
> and
> one log and second reduce the size of log about 1gb or 2. how can I do
> that?
> Best regards,
> Owen.
>