?
Solved

SHRINKFILE error

Posted on 2006-06-28
6
Medium Priority
?
602 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 MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
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 Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 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