MSSQL Check Running Queries

SELECT sqltext.TEXT, req.session_id, req.status, req.command, req.cpu_time, req.total_elapsed_time FROM sys.dm_exec_requests req CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext

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 …

Get Size of All Tables of MSSQL Database Read More »

Basic Controller Variables

If controller is related to central only i.e it contains dbCore only it should inherit from BaseAsyncController If controller is related to Organisation also i.e it contains both dbCore and dbOrg it should inherit from BaseAsyncFOController While inheriting Any Controller from BaseAsyncController or BaseAsyncFOController, it should initialise base controller with respective variables also. eg For …

Basic Controller Variables Read More »

Some useful Commands for Check and Maintain MSSQL Database

— Shrink Database DBCC SHRINKDATABASE (AdventureWorks2008R2, TRUNCATEONLY); — Rebuild All Index on a table ALTER INDEX ALL ON Production.Product REBUILD WITH (FILLFACTOR = 80, SORT_IN_TEMPDB = ON, STATISTICS_NORECOMPUTE = ON); — Reorganize all indexes on the HumanResources.Employee table. ALTER INDEX ALL ON HumanResources.Employee REORGANIZE ; — Check DB for database consistency DBCC CHECKDB — Reclaims …

Some useful Commands for Check and Maintain MSSQL Database Read More »

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 …

Configure Email in outlook and other email client software Read More »