Log File

Horse06
Member Posts: 496
Hi expert, I tried to shrink the log file using the following command:
use [bagstore]
go
dbcc shrinkfile([bagstore_Log.ldf], 10)
But I had an error as below:
Server: Msg 8985, Level 16, State 1, Line 2
Could not locate file 'bagstore_Log.ldf' in sysfiles.
DBCC execution completed.
bagstore_Log.ldf is the only one for the database.
Please advise! Thank you!
use [bagstore]
go
dbcc shrinkfile([bagstore_Log.ldf], 10)
But I had an error as below:
Server: Msg 8985, Level 16, State 1, Line 2
Could not locate file 'bagstore_Log.ldf' in sysfiles.
DBCC execution completed.
bagstore_Log.ldf is the only one for the database.
Please advise! Thank you!
0
Comments
-
You have to put logical name of the file. You can find it in the database properties.0
-
On a different note:
Is this a NAV database? 10 MB seems like an awful small log file. Why are you shrinking it?There are no bugs - only undocumented features.0 -
[Topic moved from 'NAV/Navision Classic Client' forum to 'SQL General' forum]
BTW: if you are not used to write TSQL, you can do a shrink selecting the database => rightclick and then Task=Shrink Files and selecting the file you want to shrink.
BTW2 : If this is a production DB, I wouldn't do this without knowing what (and why) I am doing! Repeating bbrown : Why do you want to shrink it?Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
The log file is more than 3GB, and so that is why I want to shrink it. Thank you!0
-
Since last time we had the log file with 9gb and the whole system crushed. Lastly I want to know 10 here in the command means 10mb? Thank you experts!0
-
Horse06 wrote:Since last time we had the log file with 9gb and the whole system crushed. Lastly I want to know 10 here in the command means 10mb? Thank you experts!
I'm thinking you have other problems then just the size of your log file. Even 9 GB isn't very big. What do you mean by "the whole system crushed"? The fact that the file is growing on its own is a sign of a configuration problem. The log file should be sized large enough that it does not grow between backups.There are no bugs - only undocumented features.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions