Solid tips
tips from this world and tips from other world
Thursday, June 7, 2007
How do you know diskspace used by tables in a SQL database?
Use the following stored procedure to view space used by every table:
exec sp_spaceused
Or you can use the undocumented foreachtable function in combination with that.
exec sp_MSforeachtable 'exec sp_spaceused ''?'';'
How to reclaim the diskspace from SQL log file (.LDF)?
To reclaim disk space from SQL log file
- Detach the database using Enterprise manager or Stored procedure.
- Delete the log file physically
- Attach the database using Enterprise Manager which will create a new log file for the database
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)
Subscribe free via email
Enter your email address:
Delivered by
FeedBurner
...