SQL Server useful but less known features

  • Posted on: 2 November 2016
  • By: Michał Turecki
  1. Checking who is connected to the database

    sp_who

    SELECT
    NULL as [Connections by Database],
    [host_name] AS [Client Machine],
    db.name AS [Database],
    [program_name] AS [Client Program],
    COUNT(*) AS [Open Connections]
    FROM sys.dm_exec_sessions s (nolock)
    LEFT JOIN sys.dm_exec_requests r (nolock) ON r.session_id = s.session_id
    LEFT JOIN sys.databases db (nolock) ON db.database_id = r.database_id
    WHERE s.session_id >= 50 -- Ignore SQL Server processes
    GROUP BY [host_name], db.name, [program_name]
    ORDER BY [Client Machine], [Database], [Client Program]

  2. Adjusting connection pooling settings

    By default pool size is 100 per database with a command timeout (effectively a connection timeout) of 15 seconds. To increase add following to the connection string:

    Connection Timeout=30;Pooling='true';Max Pool Size=200

  3. Checking the size of column's contents

    To check how much data the column contains:

    SELECT *, DATALENGTH([column]) AS ColumnSizeInBytes FROM table

  4. Using SQL Server profiler

    Profiler is a powerful way to debug application performance problems, to check query execution time. If you're developing any application using SQL Server as a database, running it at least once for every application release can help with pinpointing possible performance issues. Remember the rule - there should be a constant number of queries regardless of the amount of records fetched - that way application will scale better. Sometimes it's better to replace a single complex query with more simpler queries because for each result row, columns shared by joins are repeated and delivered to client for processing many times.

Comments

best online casino
list of casino slot machines
online casino
casino games
casino slots
list of casino slot machines
new online casinos accepting usa
empire city online casino
casino slots
casino slots

best online casino
list of casino slot machines
online casino
casino games
casino slots
list of casino slot machines
new online casinos accepting usa
empire city online casino
casino slots
casino slots

best casino slots machine
list of casino slot machines
online casino real money no deposit
online casino
online casino real money
casino blackjack
casino blackjack
casino blackjack
free online casino
casino blackjack

best casino slots machine
list of casino slot machines
online casino real money no deposit
online casino
online casino real money
casino blackjack
casino blackjack
casino blackjack
free online casino
casino blackjack

casino games online
best casino slots machine
online casinos
online casinos
casino blackjack
online casino real money
best online casino
casino slots
online casino usa
online casino usa

casino games online
best casino slots machine
online casinos
online casinos
casino blackjack
online casino real money
best online casino
casino slots
online casino usa
online casino usa

casino games online
best casino slots machine
online casinos
online casinos
casino blackjack
online casino real money
best online casino
casino slots
online casino usa
online casino usa

casino games online
best casino slots machine
online casinos
online casinos
casino blackjack
online casino real money
best online casino
casino slots
online casino usa
online casino usa

Hi! reputable online pharmacy beneficial web site http://cialisopharmacy.com

Hi! reputable online pharmacy beneficial web site http://cialisopharmacy.com

Hi! reputable online pharmacy beneficial web site http://cialisopharmacy.com

Hi! reputable online pharmacy beneficial web site http://cialisopharmacy.com

online casino no deposit bonus
best casino slots machine
best casino slots machine
list of casino slot machines
casino blackjack
online casino no deposit bonus
best casino slots machine
best online casino
casino bonus
casino slots

online casino no deposit bonus
best casino slots machine
best casino slots machine
list of casino slot machines
casino blackjack
online casino no deposit bonus
best casino slots machine
best online casino
casino bonus
casino slots

casino games
real online casino
online casino no deposit bonus
online casino reviews
online casino real money no deposit
list of casino slot machines
online casinos
nj online casino
online casino
online casino reviews

casino games
real online casino
online casino no deposit bonus
online casino reviews
online casino real money no deposit
list of casino slot machines
online casinos
nj online casino
online casino
online casino reviews

new online casinos accepting usa
casino slots
online casino
casino blackjack
online casino games
online casino usa
online casino no deposit bonus
online casinos
online casino real money
list of casino slot machines

new online casinos accepting usa
casino slots
online casino
casino blackjack
online casino games
online casino usa
online casino no deposit bonus
online casinos
online casino real money
list of casino slot machines

new online casinos accepting usa
casino slots
online casino
casino blackjack
online casino games
online casino usa
online casino no deposit bonus
online casinos
online casino real money
list of casino slot machines

casino bonus
online casino reviews
empire city online casino
casino blackjack
empire city online casino
online casino
online casino
casino slots
online casinos
casino slots

casino bonus
online casino reviews
empire city online casino
casino blackjack
empire city online casino
online casino
online casino
casino slots
online casinos
casino slots

online casino no deposit bonus
online casino real money no deposit
casino games online
casino blackjack
empire city online casino
casino slots
casino games online
real online casino
online casino usa
casino bonus

online casino no deposit bonus
online casino real money no deposit
casino games online
casino blackjack
empire city online casino
casino slots
casino games online
real online casino
online casino usa
casino bonus

online casino games
online casino real money
list of casino slot machines
casino bonus
online casino real money
list of casino slot machines
online casino real money
casino online
empire city online casino
free online casino

online casino games
online casino real money
list of casino slot machines
casino bonus
online casino real money
list of casino slot machines
online casino real money
casino online
empire city online casino
free online casino

online casino games
online casino real money
list of casino slot machines
casino bonus
online casino real money
list of casino slot machines
online casino real money
casino online
empire city online casino
free online casino

online casino games
online casino real money
list of casino slot machines
casino bonus
online casino real money
list of casino slot machines
online casino real money
casino online
empire city online casino
free online casino

online casino
best casino slots machine
online casino usa
casino online
empire city online casino
list of casino slot machines
online casino real money
online casino games
online casino
list of casino slot machines

new online casinos accepting usa
online casino real money
casino online
free online casino
online casino usa
casino blackjack
online casino no deposit bonus
online casino no deposit bonus
casino games
casino online

new online casinos accepting usa
online casino real money
casino online
free online casino
online casino usa
casino blackjack
online casino no deposit bonus
online casino no deposit bonus
casino games
casino online

new online casinos accepting usa
online casino real money
casino online
free online casino
online casino usa
casino blackjack
online casino no deposit bonus
online casino no deposit bonus
casino games
casino online

casino online
casino games
real online casino
online casino real money no deposit
casino online
casino games online
online casino
online casino reviews
best casino slots machine
casino games online

casino online
casino games
real online casino
online casino real money no deposit
casino online
casino games online
online casino
online casino reviews
best casino slots machine
casino games online

online casino real money no deposit
real online casino
online casino reviews
casino blackjack
casino slots
online casino
online casino real money
online casino real money no deposit
best online casino
best online casino

online casino real money no deposit
real online casino
online casino reviews
casino blackjack
casino slots
online casino
online casino real money
online casino real money no deposit
best online casino
best online casino

online casino real money no deposit
real online casino
online casino reviews
casino blackjack
casino slots
online casino
online casino real money
online casino real money no deposit
best online casino
best online casino

online casino real money no deposit
real online casino
online casino reviews
casino blackjack
casino slots
online casino
online casino real money
online casino real money no deposit
best online casino
best online casino

online casino real money no deposit
best casino slots machine
free casino games online
online casino real money no deposit
casino games online
empire city online casino
online casino
online casinos
list of casino slot machines
online casino real money no deposit

online casino real money no deposit
best casino slots machine
free casino games online
online casino real money no deposit
casino games online
empire city online casino
online casino
online casinos
list of casino slot machines
online casino real money no deposit

online casino reviews
casino bonus
casino games online
casino slots
casino blackjack
free online casino
online casino no deposit bonus
online casino reviews
online casino reviews
empire city online casino

online casino reviews
casino bonus
casino games online
casino slots
casino blackjack
free online casino
online casino no deposit bonus
online casino reviews
online casino reviews
empire city online casino

online casino reviews
casino bonus
casino games online
casino slots
casino blackjack
free online casino
online casino no deposit bonus
online casino reviews
online casino reviews
empire city online casino

online casino reviews
casino bonus
casino games online
casino slots
casino blackjack
free online casino
online casino no deposit bonus
online casino reviews
online casino reviews
empire city online casino

Hello! klonopin online pharmacy beneficial web page http://cialisopharmacy.com

Hello! klonopin online pharmacy beneficial web page http://cialisopharmacy.com

Hello! klonopin online pharmacy beneficial web page http://cialisopharmacy.com

Hello! klonopin online pharmacy beneficial web page http://cialisopharmacy.com

casino games online
best online casino
free online casino
online casino no deposit bonus
real online casino
online casino
casino online
free online casino
online casino no deposit bonus
casino games

casino games online
best online casino
free online casino
online casino no deposit bonus
real online casino
online casino
casino online
free online casino
online casino no deposit bonus
casino games

casino games online
best online casino
free online casino
online casino no deposit bonus
real online casino
online casino
casino online
free online casino
online casino no deposit bonus
casino games

Pages