Re: How do I shrink my logfile?

From: Kalen Delaney (replies_at_public_newsgroups.com)
Date: 07/22/04


Date: Thu, 22 Jul 2004 11:13:21 -0700

Usually when you see MY in an object name, it means you should replace it
with whatever YOUR name really is.

What is the name of the log file for YOUR db? That is the name you should
use instead of mydb_log. Sysfiles, or sp_helpfile, should show you the name
used for your database.

--
HTH
----------------
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Sydney Lotterby" <sydney@infosearch.com> wrote in message
news:#qNPqBBcEHA.3460@TK2MSFTNGP10.phx.gbl...
> I followed the instructions in the link but when I run DBCC
> SHRINKFILE(mydb_log,2) it says "could not locate mydb_log in sysfiles.  I
> checked sysfiles and, true, it is not there.
> What can I do?
>
> "Narayana Vyas Kondreddi" <answer_me@hotmail.com> wrote in message
> news:%23pOUoKAcEHA.3988@tk2msftngp13.phx.gbl...
> > See DBCC SHRINKFILE in SQL Server Books Online. Also see:
> >
> > INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC
SHRINKFILE
> > http://support.microsoft.com/default.aspx?scid=kb;EN-US;272318
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > http://vyaskn.tripod.com/
> > Is .NET important for a database professional?
> > http://vyaskn.tripod.com/poll.htm
> >
> >
> > "Joseph Geretz" <jgeretz@nospam.com> wrote in message
> > news:ewNWyDAcEHA.1656@TK2MSFTNGP09.phx.gbl...
> > I set my recovery model to simple. I set my database option to
AutoShrink.
> I
> > backed up my database. But the logfile is still 2.3 GB(!). How do I
shrink
> > this?
> >
> > Thanks!
> >
> > - Joe Geretz -
> >
> >
> >
>
>


Relevant Pages

  • Re: LOG Device Corrupted
    ... Check the documentation for the correct DBCC ... It seems your old database have mutiple LDF files. ... Stop sql server and rename the existing MDF to a new one and copy the ... Now execute the undocumented DBCC to create a log file ...
    (microsoft.public.sqlserver.server)
  • Re: Changing database size
    ... I already tried DBCC ... SHRINKFILE or DBCC SHRINKDATABASE procedures as per given ... database file size, ...
    (microsoft.public.sqlserver.server)
  • Re: how can i delete transaction log
    ... Go to SQL Server Eneterprise Manager ... Right click on database and select properties ... Filename is the log file. ... Please refer to help for dbcc shrinkfile command. ...
    (microsoft.public.sqlserver.programming)
  • Re: torn page
    ... It is not required to make the SQL Server to start in single user mode. ... the DBCC with Rebuild option to sinlge user. ... How to make database to single user:- ...
    (microsoft.public.sqlserver.server)
  • Re: question about autogrowth and shrinkfile
    ... I ran the backup a second time, and then shrinkfile worked. ... auto-grow is something that should never occur. ... said this database was 6 GB today. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.tools)