Try the link below for sp_helpfile it is a system stored procedure and it is in the Master database. Hope this helps.
http://msdn2.microsoft.com/en-us/library/ms174307.aspx
|||Thanks!
But I think Sp_helpfile don't know single Table or Records size
sp_helpfile (Transact-SQL)
Returns the physical names and attributes of files associated with the current database. Use this stored procedure to determine the names of files to attach to or detach from the server.
|||Sorry it is sp_spaceused and there are undocumented system stored proc that you can use. Try the links below for details.
http://www.sqlservercentral.com/columnists/achigrik/sql2000.asp
http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1062
http://msdn2.microsoft.com/en-us/library/ms188776.aspx
|||Many thanks!
How can I know rows used space ? Such as I want to know the user Paul used space
select * from mytable where UserName='Paul'
|||Paul spaced used? Paul plus tables associated to Paul because sp_spaceused is for database objects like tables not users.|||
Sorry!
When system perform the sql select * from mytable where UserName='Paul' , it will return many rows , iI want to know these rows use size space.
|||I am sorry I cannot help you the space used that concerns my employers are to make sure the transaction log will not run out of space, but I know the max for a row is 8060 which is also a SQL Server page. Try the thread below for the specs per Microsoft.
http://forums.asp.net/thread/1398414.aspx
|||ok just open enterprise manager select the database then in the summary window just click report then expand disk space used by tables and you should get the info you're looking for as per table.
Have fun!
No comments:
Post a Comment