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 |
|
Pugnax
Starting Member
2 Posts |
Posted - 2007-01-27 : 12:35:17
|
| Folks: Is there a way to decrease the initial size of a database/log file? I've noticed you can increase it, but if you decrease it, after you confirm the change and go checking again, you will see nothing happened. Is there a way? Am I missing anything?! |
|
|
sachinsamuel
Constraint Violating Yak Guru
383 Posts |
Posted - 2007-01-29 : 02:43:37
|
| Check how much the files are filled. If you try to decrease more than the data filled in the file then I don't think it will allow you.Don't sit back because of failure. It will come back to check if you still available. -- Binu |
 |
|
|
Pugnax
Starting Member
2 Posts |
Posted - 2007-01-31 : 07:48:19
|
| Thanx Sachin...The database - used in the develoment environment - was changed from recovery model full to simple. It was created as full, and had never been backed up. The log is huge, and I checked there are no open transactions. I am trying to truncate the log to 2mb, but it doesnt go lower than 5mb. The data file is about 12mb.is there a relation between the data and the log size? |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-31 : 08:20:43
|
| I have limited knowledge of the logfile, but I think you can not shrink the size of the logfile to less than it was originally set to, when the database was created.Peter LarssonHelsingborg, Sweden |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-01-31 : 08:45:49
|
Log file will often be about 120% of data file - although that would usually be for FULL recovery modelShrinking the log file below what is actually needed will cause the file to be re-extended (which is a resource-intensive operation, and fragments the file - therefore repeat Shrinking is not recommended)The minimum size of your Logfile will most likely be governed by:The minimum size you can set it to (based on initial creation size, or possibly the size of MODEL database if that is larger)Biggest logged transaction your application (etc) generatesMaintenance actions - such as Reindex - which may cause large logged transactionsPersonally I wouldn't put any further effort into trying to shrink a 5MB log file on a 12MB database Kristen |
 |
|
|
|
|
|