Thursday, December 20, 2012

MSSQL management

- Log file size can grow very large. So its max size should be set at the beginning.
- If a log file is already too large, need to shrink/trunk it: 1) right click -> properties -> options (set recovery mode to simple), 2) Tasks > Shrink > Database (specify size to shrink to, and do it), 3) right click -> properties -> options (set recovery mode to full).
- Set default memory usage: right click on instance, choose memory.
- Get size of tables. See here for example. Below command will show size of data, index, reserved and free.
  EXEC sp_spaceused [table name]

No comments:

Blog Archive

Followers