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.
| 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 gbWhat 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 transactiongoDBCC SHRINKDATABASE ([databasename]) --this will free the unused sectors and make the size of the db to the only used sizegouse [databasename]go select * from sysfilesgo -- please select the logical name ur log group and use that in the command belowdbcc 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 |
 |
|
|
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? |
 |
|
|
|
|
|