SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


DBCC shrinkfile error - Msg 8985


DBCC shrinkfile error - Msg 8985

Author
Message
rubes
rubes
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1004 Visits: 398

Chandu and Bapi, now that you fellas have the transaction log shrunk, you may want to start asking yourselves some more questions...

  • Why was the log file so big in the first place?
  • Do I have the correct recovery model? (Full, bulk-logged, simple)
  • Are transaction log backups being taken?... how often?...

Books online should be a great resource for you on disaster recovery and transaction log management if you don't have much experience in these areas.



Regards,
Rubes
Nicholas Cain
Nicholas Cain
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17196 Visits: 6200
Bapi run

SELECT NAME, FILEID FROM SYSFILES

to get the fileID of the log file, then use that in the DBCC SHRINKFILE script



Shamless self promotion - read my blog http://sirsql.net
guzman_anthony
guzman_anthony
SSC Veteran
SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)SSC Veteran (283 reputation)

Group: General Forum Members
Points: 283 Visits: 35
Hi Chandu,

How to check/know the file ID. is it the same as SPID? i do have the same error..please help.

thanks

anthony
GilaMonster
GilaMonster
SSC Guru
SSC Guru (549K reputation)SSC Guru (549K reputation)SSC Guru (549K reputation)SSC Guru (549K reputation)SSC Guru (549K reputation)SSC Guru (549K reputation)SSC Guru (549K reputation)SSC Guru (549K reputation)

Group: General Forum Members
Points: 549053 Visits: 47742
Please note: 8 year old thread. Chandu has not logged in in 7 years.

Please don't post the same problem in multiple places.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


dineshvishe
dineshvishe
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1284 Visits: 342
1)SELECT name, size

FROM sys.master_files

WHERE database_id = DB_ID(N'tempdb');


2)Try Make database recovery mode to Simple.
3) Right Click Datbase =>Tasks =>Shrinks =>Files => Log => select shrink action => Realease unused space.
select shrink action => select in MB
4) SELECT name, size

FROM sys.master_files

WHERE database_id = DB_ID(N'tempdb');
check size...
GilaMonster
GilaMonster
SSC Guru
SSC Guru (549K reputation)SSC Guru (549K reputation)SSC Guru (549K reputation)SSC Guru (549K reputation)SSC Guru (549K reputation)SSC Guru (549K reputation)SSC Guru (549K reputation)SSC Guru (549K reputation)

Group: General Forum Members
Points: 549053 Visits: 47742
Please note: 9 year old thread.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Hany Helmy
Hany Helmy
SSCertifiable
SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)

Group: General Forum Members
Points: 7249 Visits: 1122
Nicholas Cain (4/14/2004)
Try shrinking it using the fileid (SELECT NAME, FILEID FROM SYSFILES), use the same syntax, just replace the filename with the fileid.

Just want 2 thank u cause that fixed my issue with 1 of the db`s although the error msg was in sys.database_files & I found some Indexes corruption, even after REPAIR_REBUILD, could not fix the shrink_log file issue till I googled it and found your solution, so thanx again.
Hany Helmy
Hany Helmy
SSCertifiable
SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)

Group: General Forum Members
Points: 7249 Visits: 1122
GilaMonster (5/24/2013)
Please note: 9 year old thread.

Now it`s even 11 years old thread, but amazingly still very useful to fix the current issues, seems that MS will never ran out of bugs :-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search