Solved

SHRINKFILE error

Posted on 2006-06-28
6
600 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 250 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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
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…
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

724 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