Attachments and MS SQL sizing

I have a couple of database (MS-SQL specifcally) questions.

  1. Are Attachments stored directly in the database (blobs??), or just links to files somewhere else on the file system?
  2. Is there any capacity planning quidelines for MS SQL sizing? e.g. typical size for a CM system with XXX contract documents (relates to 1, depending on where docs a re stored).

From my experience a demo KB seems to need about 15MB for a backup, but I don’t know how much space this is taking in a MS SQL Database when running. - Thanks!

  1. Attachments are stored separately under data/KB/largeobjects directory and referenced through links in the records of the KB.
  2. The database doesn’t include the attachments, so if your primary disk usage is contributed by attachments, then the DB doens’t need to be granted a lot of disk size. There are numerous online references to SQL queries that would tell you how large the tables are in the DB.

Example: This SQL query will give you the top 10 tables in the DB in MB.

SELECT table_schema as Database, table_name AS Table, round(((data_length + index_length) / 1024 / 1024), 2) Size in MB FROM information_schema.TABLES where table_schema = ‘sw2_std’ ORDER BY (data_length + index_length) DESC limit 10;