I am looking for script to give the Data and log files of each Database on
the server including the size of each file.
can you help<msnews.microsoft.com> wrote in message
news:e$$FnV8dHHA.1220@.TK2MSFTNGP03.phx.gbl...
>I am looking for script to give the Data and log files of each Database on
>the server including the size of each file.
> can you help
>
SQL Server 2005:
SELECT * FROM sys.master_files;
SQL Server 2000:
SELECT * FROM master.dbo.sysaltfiles;
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||You can also use the below system proc.
sp_MSforeachdb 'sp_helpdb ?'
Thanks
Hari
<msnews.microsoft.com> wrote in message
news:e$$FnV8dHHA.1220@.TK2MSFTNGP03.phx.gbl...
>I am looking for script to give the Data and log files of each Database on
>the server including the size of each file.
> can you help
>|||Hi
http://dimantdatabasesolutions.blogspot.com/2007/03/detaching-and-attaching-database.html
<msnews.microsoft.com> wrote in message
news:e$$FnV8dHHA.1220@.TK2MSFTNGP03.phx.gbl...
>I am looking for script to give the Data and log files of each Database on
>the server including the size of each file.
> can you help
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment