Hi all,
I'm having a problem need your help:
I can see all properties of datafile (FilegroupName, FileID, FileType,
Location, CurrentSize, Space Used) by Enterpise Manager.
Please tell me how do I see all those properties by SQL Query Analyzer.
I want to know actual space used in data file to shrink file.
Thanks in advanced,
TNThere's a bunch of system procedures that can get your started; sp_helpfile and sp_spaceused.|||thanks for your help
but I want to know exactly used space in data file to shrink to.
because I have a DB:
current size : 10000MB
space used : 814 MB
I want ot shrink the data file down around 850 MB.
Thanks
TN|||The best way is to query sysindexes system table. Look into sp_spaceused code to see how the used space is computed.|||See BOL
DBCC SHRINKDATABASE|||use master;
select
'Data device'=fileproperty('master', 'spaceused'),
'Log device'=fileproperty('mastlog', 'spaceused')
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment