General information
Forum:
Microsoft SQL Server
Mike
DBCC Shrinkfile is superseded by DBCC ShrinkDatabase.
Generally you do not want to use dbcc shrinkdatabase unless you have done a backup of your Log file.
If you need to shrink your log file, change the Recovery Mode to Simple first and then do the ShrinkDatabase command. After that change the Recovery Mode back to Full.....
=============
alter database db_name
set recovery simple
go
dbcc shrinkdatabase(db_name)
go
alter database db_name
set recovery full
go
=============
>Hi,
>
>Does anyone know how to clean the logfile of an sql server 2000 ?
>
>I tried the steps below but the logfile still maintains it size of 12GB Compared to the size of the database which is only 1.2GB
>
>Step1 - Backup Transaction Log then Backup the Database (Complete)
>
>
>Step2 - used the DBCC ShrinkFile command in SQL Query Analyzer
> DBCC SHRINKFILE(SMARTAPP_LOG,30,TRUNCATEONLY)
>
>Step3 - used the DBCC ShrinkDatabase command in SQL Query Analyzer
> DBCC SHRINKDATABASE(SMARTAPP,50,TRUNCATEONLY)
>
>I tried all of these steps but it does not work. Any Idea?
>
>
>Thanks in advance...
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only