![]() |
|
|||||||
| Chit Chat Public Talk about any thing you want! This forum is public. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Deleteing msSQL log files
We seem to be getting a lot of users with there logs full in msSQL.
I can delete them but the way i do it just does not seem right. Does any one know if there is a command or Query you can run on just one database to clear out the logs.. Does any one really need the logs and if not is there a command that can be run once a week to clear out every ones?? Just not that good on the database side of things in msSQL.. I know a lot of you guys use it here so I am sure some one knows.. ![]()
__________________
Brad Pugh http://www.vortechhosting.com ------ Local System/Network Monitor http://nagios.hsphere.cc/ Login:guest Pass:guest XML FEED http://nagios.hsphere.cc/feed.xml ------ My Other Life:
|
|
#2
|
|||||||||||
|
|||||||||||
|
under the properties of each db there is an option that can be checked off "Auto Shrink". This should keep things under control. I think it is not checked as the default setting. If PSoft would enable us with higher rights we would be able to take care of this and many other common tasks ourselves.
Jon |
|
#3
|
|||||||||||
|
|||||||||||
|
If you want to do it maually issue a
DBCC SHRINKDATABASE command. To keep the logs small make sure you set the recovery model to "Simple" (same options tab as the Auto Shrink checkbox) this in combination with jon's tip above about Auto shrink will keep all logs under 5Mb or so freeing up a lot of space you could then give to us as MS SQL Space *wink* |
|
#4
|
|||||||||||
|
|||||||||||
|
As a side thought, you can also setup maintenance jobs on all DB's which will check integrity, run database backups and do shrinks etc weekly, they're very easy to setup.
|
|
#5
|
||||
|
||||
|
Well it would be nice if there was a command to go over all the DB and switch them to simple as h-sphere does not set this by default and also set auto Auto Shrink for them all.
__________________
Brad Pugh http://www.vortechhosting.com ------ Local System/Network Monitor http://nagios.hsphere.cc/ Login:guest Pass:guest XML FEED http://nagios.hsphere.cc/feed.xml ------ My Other Life:
|
|
#6
|
|||||||||||
|
|||||||||||
|
Can you find the stored procedure or script that H-Sphere uses to create the DB's ? I can prolly modify it for you to create the appropriate settings when the user creates the DB. I can probably knock up a script you can run to just set all DB's as well if you want.
|
|
#7
|
||||||||||||
|
||||||||||||
|
Brad,
If you are able to adjust the setting, could you autoshrink the mssql db "slr_photos"? I got several calls from this client over the weekend that his database had gone over quota due to his log files. Thanks |
|
#8
|
|||||||||||
|
|||||||||||
|
If you submit a trouble ticket you'll find this will get done fairly quickly for you nVision.
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MSSQL Files | mbarlowm | Chit Chat Public | 8 | 09-24-2003 02:56 AM |
| asp in htm files | Silverbug | Chit Chat Public | 4 | 07-01-2003 08:27 AM |