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 |
parrot
Posting Yak Master
132 Posts |
Posted - 2012-08-27 : 15:36:09
|
My 2005 sql data base has a log file that is 10 times bigger than my data file. I changed the recovery model to Simple from Full but that will not reduce the size of the log file. The file will be static and will not require full recovery. Is there anyway I can reduce the log file size after changing the recovery mode to Simple? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
parrot
Posting Yak Master
132 Posts |
Posted - 2012-08-27 : 18:17:48
|
Should I specify a target size or just run the DBCC SHRINKFILE myfile as the command? What type of shrinkage can I expect for a logfile that is 1 gb and a data file that is 200 mb? I just want to reduce the logfile as much as possible. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
parrot
Posting Yak Master
132 Posts |
Posted - 2012-08-27 : 22:51:44
|
When I try to execute the shrink command in SQL Server Management Studio, the program aborts. I open up Query Designer and then enter the follow command: DBCC SHRINKFILE (Mydatabase_Log, 100)When I click Execute Query, SQL Server Management Studio aborts. Can I not execute this instruction in SQL Server Management Studio? |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
prett
Posting Yak Master
212 Posts |
Posted - 2012-08-28 : 03:03:23
|
Please check this article, it has good explanation about this issue: http://recoverdatabase.blogspot.com/2012/04/what-to-do-if-sql-server-log-file.html |
 |
|
parrot
Posting Yak Master
132 Posts |
Posted - 2012-08-28 : 10:29:28
|
I finally found an explanation on the internet on how to execute the DBCC SHRINKFILE command. Basically, you have to click on the New Query menu selection on SQL Server Management Studio rather than open a table and then clicking on Query Designer. You also can right click on the database item and then select Tasks and then Shrink. Thanks to everyone for their advice. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|