Re: HELP! LOG file has grown too large
From: Eric (eric_at_anon.com)
Date: 11/04/04
- Next message: Tibor Karaszi: "Re: Attach DB from SQL7 into SQL2000"
- Previous message: Melih SARICA: "Re: HELP! LOG file has grown too large"
- In reply to: Melih SARICA: "Re: HELP! LOG file has grown too large"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 4 Nov 2004 12:49:35 +0100
Thanks Tibor and Melih.
You guys are stars!
"Melih SARICA" <melihsarica@hotmail.com> wrote in message
news:#Da6WMmwEHA.1404@TK2MSFTNGP11.phx.gbl...
> DBCC SHRINKFILE([107_log], 2)
>
>
> "Eric" <eric@anon.com> wrote in message
> news:euD%23R7lwEHA.2172@TK2MSFTNGP14.phx.gbl...
> > SQL Statement:
> > DBCC SHRINKFILE(107_log, 2)
> >
> >
> > Error message:
> > Server: Msg 170, Level 15, State 1, Line 1
> > Line 1: Incorrect syntax near '_log'.
> >
> >
> >
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.com> wrote
> in
> > message news:#tM9T2lwEHA.3144@TK2MSFTNGP15.phx.gbl...
> > > I agree with Melih,
> > >
> > > Please post exact commands you try to execute and exact error message.
> > >
> > > --
> > > Tibor Karaszi, SQL Server MVP
> > > http://www.karaszi.com/sqlserver/default.asp
> > > http://www.solidqualitylearning.com/
> > >
> > >
> > > "Eric" <eric@anon.com> wrote in message
> > news:elU3HvlwEHA.4028@TK2MSFTNGP15.phx.gbl...
> > > > 80
> > > >
> > > > "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.com>
> wrote
> > in
> > > > message news:#pRS$olwEHA.392@TK2MSFTNGP12.phx.gbl...
> > > > > What is your database compatibility level?
> > > > >
> > > > > --
> > > > > Tibor Karaszi, SQL Server MVP
> > > > > http://www.karaszi.com/sqlserver/default.asp
> > > > > http://www.solidqualitylearning.com/
> > > > >
> > > > >
> > > > > "Eric" <eric@anon.com> wrote in message
> > > > news:OMxCiPlwEHA.2196@TK2MSFTNGP14.phx.gbl...
> > > > > > Thanks Tibor,
> > > > > > but when I perform a DBCC SHRINKFILE I just get an error message
> > > > 'incorrect
> > > > > > syntax near...'
> > > > > > What am I doing wrong?
> > > > > >
> > > > > >
> > > > > > "Tibor Karaszi"
<tibor_please.no.email_karaszi@hotmail.nomail.com>
> > wrote
> > > > in
> > > > > > message news:OmiAJBlwEHA.3416@TK2MSFTNGP09.phx.gbl...
> > > > > > > > Can someone tell me if this is the best way to achieve this
> > without
> > > > > > > > compromising the database?
> > > > > > >
> > > > > > > No! You risk that the database is corrupt (suspect) when you
> start
> > SQL
> > > > > > Server. It you aren't
> > > > > > > prepared to restore from a backup, don't do this!!!
> > > > > > >
> > > > > > > I have an article about shrink database files. In about the
> middle
> > of
> > > > this
> > > > > > article, I have some
> > > > > > > links to KB articles etc. Read them. They have all the
> information
> > you
> > > > > > need.
> > > > > > > http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> > > > > > >
> > > > > > >
> > > > > > > > I know that in MS Exchange, you can get rid of all the log
> files
> > > > simply
> > > > > > by
> > > > > > > > performing a full backup of the exchange database. Doesn't
it
> > work
> > > > the
> > > > > > same
> > > > > > > > in SQL server?
> > > > > > >
> > > > > > > No. A database backup does not empty the transaction log
> file(s).
> > > > > > > --
> > > > > > > Tibor Karaszi, SQL Server MVP
> > > > > > > http://www.karaszi.com/sqlserver/default.asp
> > > > > > > http://www.solidqualitylearning.com/
> > > > > > >
> > > > > > >
> > > > > > > "Eric" <eric@anon.com> wrote in message
> > > > > > news:OGaJ34kwEHA.2676@TK2MSFTNGP12.phx.gbl...
> > > > > > > > I'm a newbie so please bear with me.
> > > > > > > >
> > > > > > > > We have a database where the MDF is 2.5 GB in size but the
LDF
> > has
> > > > grown
> > > > > > to
> > > > > > > > 45GB (the maintenance plan had included a complete backup
but
> no
> > > > > > Transaction
> > > > > > > > Log Backup and I presume this is why the log file has been
> > bloating
> > > > out
> > > > > > of
> > > > > > > > proportion during the last months)
> > > > > > > > Now the disk is approaching full capacity and I'm worried
> about
> > the
> > > > > > > > consequences.
> > > > > > > >
> > > > > > > > In order to remedy this situation I would like to do the
> > following:
> > > > > > > > Do a full backup of the database, detach the database,
delete
> > the
> > > > log
> > > > > > file
> > > > > > > > and then reattach the database to create a new normal sized
> > logfile.
> > > > > > > > Can someone tell me if this is the best way to achieve this
> > without
> > > > > > > > compromising the database?
> > > > > > > > I've tried DBCC SHRINKFILE (database_log, 2) in query
analyser
> > but
> > > > get
> > > > > > the
> > > > > > > > error message "Incorrect syntax near '_log' " and don't know
> how
> > to
> > > > work
> > > > > > > > round this.
> > > > > > > > I've also tried selecting 'shrink database...' in Enterprise
> > Manager
> > > > but
> > > > > > > > that doesn't make any difference to the log file size.
> > > > > > > >
> > > > > > > > I know that in MS Exchange, you can get rid of all the log
> files
> > > > simply
> > > > > > by
> > > > > > > > performing a full backup of the exchange database. Doesn't
it
> > work
> > > > the
> > > > > > same
> > > > > > > > in SQL server?
> > > > > > > >
> > > > > > > > Some downtime for the database is permissable on this
network.
> > > > > > > >
> > > > > > > > any help is greatly appreciated
> > > > > > > >
> > > > > > > > eric
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: Tibor Karaszi: "Re: Attach DB from SQL7 into SQL2000"
- Previous message: Melih SARICA: "Re: HELP! LOG file has grown too large"
- In reply to: Melih SARICA: "Re: HELP! LOG file has grown too large"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|