Sunday, February 12, 2012

Can not shrink a Database!

Hi,
I am running SQL 2K
I have a DB that is 6GB.
out of that, 5.5GB is the Trans Log.
I did a backup of the Data and the log.
Now it shows 5.3GB unused, but I cant get that free space to go away!
When I creaded the DB it was 10MB? so I know that is not the problem
any ideas?
thanks George.George,
A log backup wont shrink the files, it would just empty it.To shrink the
files, use DBCC SHRINKFILE.More details here:
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/support/kb/Articles/q272/3/18.asp
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"george d lake" <georgel@.valleyyellowpages.com> wrote in message
news:uf8dznzaDHA.2672@.tk2msftngp13.phx.gbl...
> Hi,
> I am running SQL 2K
> I have a DB that is 6GB.
> out of that, 5.5GB is the Trans Log.
> I did a backup of the Data and the log.
> Now it shows 5.3GB unused, but I cant get that free space to go away!
> When I creaded the DB it was 10MB? so I know that is not the problem
>
> any ideas?
> thanks George.
>|||Ok,
I ran this:
DBCC SHRINKFILE(SystemMon_Log, 140)
And got this:
Cannot shrink log file 2 (SystemMon_Log) because all logical log files are
in use.
(1 row(s) affected)
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
"Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
news:OOAParzaDHA.2344@.TK2MSFTNGP09.phx.gbl...
> George,
> A log backup wont shrink the files, it would just empty it.To shrink the
> files, use DBCC SHRINKFILE.More details here:
> INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
> http://support.microsoft.com/support/kb/Articles/q272/3/18.asp
> --
> Dinesh.
> SQL Server FAQ at
> http://www.tkdinesh.com
> "george d lake" <georgel@.valleyyellowpages.com> wrote in message
> news:uf8dznzaDHA.2672@.tk2msftngp13.phx.gbl...
> > Hi,
> > I am running SQL 2K
> > I have a DB that is 6GB.
> > out of that, 5.5GB is the Trans Log.
> > I did a backup of the Data and the log.
> > Now it shows 5.3GB unused, but I cant get that free space to go
away!
> > When I creaded the DB it was 10MB? so I know that is not the problem
> >
> >
> > any ideas?
> >
> > thanks George.
> >
> >
>|||Ok.
It worked!
"Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
news:OOAParzaDHA.2344@.TK2MSFTNGP09.phx.gbl...
> George,
> A log backup wont shrink the files, it would just empty it.To shrink the
> files, use DBCC SHRINKFILE.More details here:
> INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
> http://support.microsoft.com/support/kb/Articles/q272/3/18.asp
> --
> Dinesh.
> SQL Server FAQ at
> http://www.tkdinesh.com
> "george d lake" <georgel@.valleyyellowpages.com> wrote in message
> news:uf8dznzaDHA.2672@.tk2msftngp13.phx.gbl...
> > Hi,
> > I am running SQL 2K
> > I have a DB that is 6GB.
> > out of that, 5.5GB is the Trans Log.
> > I did a backup of the Data and the log.
> > Now it shows 5.3GB unused, but I cant get that free space to go
away!
> > When I creaded the DB it was 10MB? so I know that is not the problem
> >
> >
> > any ideas?
> >
> > thanks George.
> >
> >
>

No comments:

Post a Comment