Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SHRINKFILE error

Posted on 2006-06-28
6
Medium Priority
?
603 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 14

Expert Comment

by:sathyagiri
ID: 17002705
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 750 total points
ID: 17008484
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
ID: 17011494
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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 14

Expert Comment

by:sathyagiri
ID: 17011838
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
ID: 17012263
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
ID: 17032011
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

650 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