Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 delete from sql server

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2005-05-02 : 02:53:20
I have my db doing an automatic backup which is up to 2.5 gb
What can I delete to make it smaller.
How do I clear log files?
I am new to the admin end of sql server -- is there anything else that is worth doing on a regular basis as cleanup for the database?
Any temporary files for me to delete?

pentiumsingh
Starting Member

9 Posts

Posted - 2005-05-02 : 06:53:56
hi
please try this
dump tran [databasename] with no_log --this will clear ur transaction
go
DBCC SHRINKDATABASE ([databasename]) --this will free the unused sectors and make the size of the db to the only used size
go
use [databasename]
go
select * from sysfiles
go
-- please select the logical name ur log group and use that in the command below
dbcc shrinkfile ('logical_group_name_of_log_file',0,truncateonly)

and if possible try to remove all unwanted indexes

now ur backup would be of less size

Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2005-05-03 : 04:07:47
thanks how can i delete or trucate the transaction log?
Go to Top of Page
   

- Advertisement -