Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««123»»

shrink fails with error - File ID of database ID cannot be shrunk as it is either being shrunk by another process or is empty Expand / Collapse
Author
Message
Posted Monday, May 30, 2011 10:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 20, 2014 2:55 AM
Points: 1, Visits: 105
Thanks Ted, it worked for me too.
Post #1117069
Posted Tuesday, July 5, 2011 3:57 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 1, 2014 1:08 AM
Points: 102, Visits: 416
Me also faced the same issue.I increased some MB on the datafile and shrinked.It worked fine for me
Post #1136324
Posted Tuesday, July 5, 2011 7:15 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, January 2, 2014 12:30 AM
Points: 6, Visits: 106
It worked for me also..
Post #1136449
Posted Tuesday, November 15, 2011 1:52 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, July 18, 2014 1:30 PM
Points: 142, Visits: 560
For me too.. thanks
Post #1205737
Posted Tuesday, November 29, 2011 1:03 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 22, 2012 10:17 AM
Points: 1, Visits: 36
Thanks Ted, worked for me too
Post #1213514
Posted Monday, May 14, 2012 4:16 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, October 14, 2014 8:16 AM
Points: 19, Visits: 156
First i increase size of datafaile by 500 Mb but i recieved same error , but next time when i increased same by 1 MB it worked. Thanks

In one of blogs i found this as well
"According to Microsoft, the problem was "DBCC SHRINKFILE was unable to run on the primary data file of the user database "DatabaseName" because a background operation which had obtained a latch for the required shrink operation previously was not released."
Post #1299439
Posted Wednesday, June 20, 2012 6:05 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, June 20, 2012 6:54 PM
Points: 3, Visits: 9
Thanks Ted. It worked for me.
Post #1319031
Posted Wednesday, June 20, 2012 10:44 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 7:32 PM
Points: 1,618, Visits: 1,550
I'm only going to add one thing:





My blog: SQL Soldier
Twitter: @SQLSoldier
My book: Pro SQL Server 2008 Mirroring
Microsoft Certified Master: SQL Server 2008
Principal DBA: Outerwall, Inc.
Also available for consulting: SQL DBA Master
Post #1319074
Posted Friday, June 22, 2012 8:42 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, November 1, 2013 1:47 PM
Points: 167, Visits: 164
[code="sql-- Using tempDB
SELECT
'instance',
cast(SUM(unallocated_extent_page_count) as bigint) as 'Free Unallocated',
cast(SUM(version_store_reserved_page_count) as bigint) as 'version store resv pages',
cast(SUM(user_object_reserved_page_count) as bigint) as 'user obj resv pages',
cast(SUM(internal_object_reserved_page_count) as bigint) as 'int obj resv pages',
cast(SUM(mixed_extent_page_count) as bigint) as 'mixed ext pages'
FROM sys.dm_db_file_space_usage
--
SELECT
'session',
session_id,
user_objects_alloc_page_count,
user_objects_dealloc_page_count,
internal_objects_alloc_page_count,
internal_objects_dealloc_page_count,
session_id
FROM sys.dm_db_session_space_usage
WHERE session_id > 50
--
SELECT
'task',
R1.session_id,
R4.client_net_address,
R4.num_reads,
R4.num_writes,
R3.text
FROM sys.dm_db_task_space_usage AS R1
LEFT OUTER JOIN
sys.dm_exec_connections AS R4
ON R1.session_id = R4.session_id
LEFT OUTER JOIN
sys.dm_exec_requests AS R2
ON R1.session_id = R2.session_id
OUTER APPLY sys.dm_exec_sql_text(R2.sql_handle) AS R3
WHERE R1.session_id > 50;
--Amount of Free Space in tempdb
SELECT SUM(unallocated_extent_page_count) AS [free pages],
(SUM(unallocated_extent_page_count)*1.0/128) AS [free space in MB]
FROM sys.dm_db_file_space_usage;
SELECT DB_NAME(dbid) AS DBNAME,
(SELECT text FROM sys.dm_exec_sql_text(sql_handle)) AS SQLSTATEMENT, *
FROM master..sysprocesses
WHERE open_tran > 0[/code]

here are some things that might be nice to track during the time the tempdb is growing, just make a job and some tables and run these into tables every min and it should give an idea to what is causing your pain...
Post #1319989
Posted Monday, December 10, 2012 2:25 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, December 4, 2013 12:59 PM
Points: 19, Visits: 69
thanks ted! worked here also
Post #1394499
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse