Solved

SHRINKFILE error

Posted on 2006-06-28
6
596 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
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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Creating and Managing Databases with phpMyAdmin in cPanel.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
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…

920 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

15 Experts available now in Live!

Get 1:1 Help Now