Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 dbcc shrinkfile

Author  Topic 

carumuga
Posting Yak Master

174 Posts

Posted - 2009-11-13 : 08:33:25
I would like to shrink the data files, .mdf and .ndf files but prior to that, should i need to check using the query the amount of space that can be recovered or free space available for recovery?

Please send those query if that is the case.

Thanks in advance.

Pradip
Starting Member

32 Posts

Posted - 2009-11-17 : 06:09:47
I don't thinks such query can form,Not Sure but I think different data having different type could have different size for shrink.

www.silicus.com

pradipjain
Go to Top of Page

Pradip
Starting Member

32 Posts

Posted - 2009-11-20 : 01:17:10
Hi Chandra, below query my help you.

SELECT name ,size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS AvailableSpaceInMB
FROM sys.database_files;
GO

pradipjain
Go to Top of Page
   

- Advertisement -