Thursday, February 9, 2012

actual space used in data file

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,
TN
sp_helpdb <your db>
can give you alot of this info
"TN" <TN@.discussions.microsoft.com> wrote in message
news:A86BD7C1-BC03-4163-80C9-EFB6A688D0B3@.microsoft.com...
> 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,
> TN
|||Thanks for your help.
But this Proc does not tell me space used in data file.
I can see space used in data file
right click on DB
select All Tasks menu item
select Shrink Database..
click Files button
I can see all
I want to know like this in SQL Query Analyzer
Thanks
TN
"Armando Prato" wrote:

> sp_helpdb <your db>
> can give you alot of this info
> "TN" <TN@.discussions.microsoft.com> wrote in message
> news:A86BD7C1-BC03-4163-80C9-EFB6A688D0B3@.microsoft.com...
>
>
|||Enterprise Mangler uses an undocumented DBCC function called DBCC
SHOWFILESTATS. You will need to build a tool around it if you want more
than absolute bare-bones information.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"TN" <TN@.discussions.microsoft.com> wrote in message
news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...[vbcol=seagreen]
> Thanks for your help.
> But this Proc does not tell me space used in data file.
> I can see space used in data file
> right click on DB
> select All Tasks menu item
> select Shrink Database..
> click Files button
> I can see all
> I want to know like this in SQL Query Analyzer
> Thanks
> TN
> "Armando Prato" wrote:
Analyzer.[vbcol=seagreen]
|||Use profiler - you can see exactly what queries EM uses to do this.
"TN" <TN@.discussions.microsoft.com> wrote in message
news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...[vbcol=seagreen]
> Thanks for your help.
> But this Proc does not tell me space used in data file.
> I can see space used in data file
> right click on DB
> select All Tasks menu item
> select Shrink Database..
> click Files button
> I can see all
> I want to know like this in SQL Query Analyzer
> Thanks
> TN
> "Armando Prato" wrote:
Analyzer.[vbcol=seagreen]
|||Thanks Scott,
I do not know what is profiler.
Please tell me how to use this tool.
Thanks
TN
"Scott Morris" wrote:

> Use profiler - you can see exactly what queries EM uses to do this.
> "TN" <TN@.discussions.microsoft.com> wrote in message
> news:305ECE55-D52D-4326-995C-221F8EE005D2@.microsoft.com...
> Analyzer.
>
>
|||Perhaps now would be a good time to spend a little effort familiarizing
yourself with the tools provided with SQL Server (of which profiler is one).
Each is documented in the SQL Server documentation; the appropriate section
of the documentation can be accessed directly from each application (for
those that are not command-line based) using the Help menu. In addition,
you can find answers to many basic and advanced questions by searching the
index or by searching the documentation just by guessing with appropriate
words. The online documentation shipped with SQL server is generally
referred to as BOL in the newsgroups (Books OnLine - which is the text of
the corresponding item in the Start menu).
"TN" <TN@.discussions.microsoft.com> wrote in message
news:E10E2A99-F3FF-4E90-A253-EBE562FD1393@.microsoft.com...[vbcol=seagreen]
> Thanks Scott,
> I do not know what is profiler.
> Please tell me how to use this tool.
> Thanks
> TN
> "Scott Morris" wrote:
FileType,[vbcol=seagreen]

No comments:

Post a Comment