Get Size of All Tables of MSSQL Database

SELECT
OBJECT_NAME(i.OBJECT_ID) AS TableName,
i.name AS IndexName,
i.index_id AS IndexID,
8 * SUM(a.used_pages) AS ‘Indexsize_KB’
FROM
sys.indexes AS i JOIN
sys.partitions AS p ON p.OBJECT_ID = i.OBJECT_ID AND p.index_id = i.index_id JOIN
sys.allocation_units AS a ON a.container_id = p.partition_id
GROUP BY
i.OBJECT_ID,
i.index_id,
i.name
ORDER BY
OBJECT_NAME(i.OBJECT_ID),
i.index_id

Next Query:

SELECT 
    t.NAME AS TableName,
    s.Name AS SchemaName,
    p.rows AS RowCounts,
    SUM(a.total_pages) * 8 AS TotalSpaceKB, 
    CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS TotalSpaceMB,
    SUM(a.used_pages) * 8 AS UsedSpaceKB, 
    CAST(ROUND(((SUM(a.used_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS UsedSpaceMB, 
    (SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB,
    CAST(ROUND(((SUM(a.total_pages) - SUM(a.used_pages)) * 8) / 1024.00, 2) AS NUMERIC(36, 2)) AS UnusedSpaceMB
FROM 
    sys.tables t
INNER JOIN      
    sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN 
    sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN 
    sys.allocation_units a ON p.partition_id = a.container_id
LEFT OUTER JOIN 
    sys.schemas s ON t.schema_id = s.schema_id
WHERE 
    t.NAME NOT LIKE 'dt%' 
    AND t.is_ms_shipped = 0
    AND i.OBJECT_ID > 255 
GROUP BY 
    t.Name, s.Name, p.Rows
ORDER BY 
    t.Name

Configure Email in outlook and other email client software

Manual Settings

If you do not see an auto-configuration script for your client in the list above, you can manually configure your mail client using the settings below:

Secure SSL/TLS Settings
(Recommended)
Username: info@shresthansons.com.np
Password: Use the email account’s password.
Incoming Server: host.outsourcingnepal.com

  • IMAP Port: 993
  • POP3 Port: 995
Outgoing Server: host.outsourcingnepal.com

  • SMTP Port: 465
Authentication is required for IMAP, POP3, and SMTP.
Non-SSL Settings
Username: info@shresthansons.com.np
Password: Use the email account’s password.
Incoming Server: mail.shresthansons.com.np

  • IMAP Port: 143
  • POP3 Port: 110
Outgoing Server: mail.shresthansons.com.np

  • SMTP Port: 26
Authentication is required for IMAP, POP3, and SMTP.
Notes:
  • IMAP email access coordinates between the server and your mail application. Messages that have been read/deleted/replied to will show up as such, both on the server and in the mail application.
  • POP3 does not coordinate with the server. Messages marked as read/deleted/replied to in the mail application will not show up as such on the server. This means that future mail downloads with POP3 will show all messages as unread.
  • Outgoing mail is sent using SMTP.
  • We recommend using POP3 over SSL/TLS or IMAP over SSL/TLS since they provide increased security for your interactions with the remote mail server.

Merry Christmas 2015

Merry-Christmas-Image-1024x640

A Merry Christmas to you, our cherished partner. We’re sending you and your family heartfelt wishes for peace, joy and abundance this Holiday Season.