Solved

SHRINKFILE error

Posted on 2006-06-28
6
594 Views
Last Modified: 2008-01-09
I ran this"

DBCC SHRINKFILE (pnndb_log, 100)

and get this error

cannot shrink file '2' in database 'pnndb' to 12800 pages as it only contains 63 pages.  DBCC execution completed.  If DBCC printed error messages, contact your system administrator

any ideas?
0
Comment
Question by:Aopoku
6 Comments
 
LVL 14

Expert Comment

by:sathyagiri
Comment Utility
What;s the size of your pnndb_log file?

I guess it's smaller than 100MB, that's why the error.
0
 
LVL 4

Accepted Solution

by:
Sowmya_K earned 250 total points
Comment Utility
Check the size of your pndb_log file . if it is lesser than 100MB then thats the root cause of this error (agree with sathya giri) .
 
If it is larger than 100 and , u still seem to get the error then the following reason could be the trouble maker:

The DBCC SHRINKFILE and DBCC SHRINKDATABASE commands will not move data and reduce the file size if the EstimatedPages value equals the MinimumSize value that is reported when the command completes. Because of data modification queries on tables with binary large object (BLOB) data types (text, ntext, image), it is possible to have many uniform extents allocated that are sparsely populated with data (for example, only 1 of the 8 pages that the extent controls is allocated), which will cause the DBCC SHRINKFILE and the DBCC SHRINKDATABASE commands to over-estimate the number of EstimatedPages, and the commands do not perform the shrink operations.
0
 

Author Comment

by:Aopoku
Comment Utility
Pnndb_log.LDF and the other Pnndb_Log_002.LDF currently 205 MB and 307 MB respectively.  They seem to be using up lots CPU and memory on the server.  What  can I do resolve this problem?
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 14

Expert Comment

by:sathyagiri
Comment Utility
Refer to this,

looks like you can use DBCC SHRINKFILE with the EMPTYFILE parameter to resolve this.

http://support.microsoft.com/default.aspx/kb/324432
0
 

Author Comment

by:Aopoku
Comment Utility
how can i prevent these log files from growing or how can I maintain these files so that they do not affect performance.
0
 

Expert Comment

by:apparition0
Comment Utility
I thought SQL BOL said the 100, was a percentage.  So to make it 40% free, use 40.

To keep things from growing,
SQL Enterprise Manager ->
Database NAme ->
Right Click ->
Properties ->
Log tab ->
probably uncheck "autogrow", or set a actual limit.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SAP and ODBC links 2 88
What is ISQL? 6 99
Compare and update data between two databases 6 41
MySQL ERROR 1045 (28000) 2 36
Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now