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

payday loan for bad credit
get loan with bad credit
emergency cash
american payday loans
lending com
loan express
quick loans for bad credit
pay day loans direct lenders
express loan
american loans
loan direct
advance loan
st george personal loan

payday loan for bad credit
get loan with bad credit
emergency cash
american payday loans
lending com
loan express
quick loans for bad credit
pay day loans direct lenders
express loan
american loans
loan direct
advance loan
st george personal loan

payday loan for bad credit
get loan with bad credit
emergency cash
american payday loans
lending com
loan express
quick loans for bad credit
pay day loans direct lenders
express loan
american loans
loan direct
advance loan
st george personal loan

payday loan for bad credit
get loan with bad credit
emergency cash
american payday loans
lending com
loan express
quick loans for bad credit
pay day loans direct lenders
express loan
american loans
loan direct
advance loan
st george personal loan

loan market
lending com
1000 loans
texas payday loans
america advance
quick and easy loans
apply for loan
immediate loans
cash payday loans
instalment loans
advance cash services
small loans without credit checks
where can i get a loan with bad credit

private personal loans
bad credit payday loans direct lenders only
america advance
montel williams loans
i need money fast
payday loans el paso tx
cash advance loan
direct lender
online pay day loans
direct payday lenders for bad credit
fast money online
cash now loans
payday advance near me

private personal loans
bad credit payday loans direct lenders only
america advance
montel williams loans
i need money fast
payday loans el paso tx
cash advance loan
direct lender
online pay day loans
direct payday lenders for bad credit
fast money online
cash now loans
payday advance near me

private personal loans
bad credit payday loans direct lenders only
america advance
montel williams loans
i need money fast
payday loans el paso tx
cash advance loan
direct lender
online pay day loans
direct payday lenders for bad credit
fast money online
cash now loans
payday advance near me

private personal loans
bad credit payday loans direct lenders only
america advance
montel williams loans
i need money fast
payday loans el paso tx
cash advance loan
direct lender
online pay day loans
direct payday lenders for bad credit
fast money online
cash now loans
payday advance near me

advance cash services
personal loan interest rates
payday loans milwaukee
america cash advance
online payday loan direct lenders
get loan with bad credit
unsecured personal loans bad credit
applying for a loan
loan up
loan direct
compare personal loan rates
personal loans online
pay day loan

advance cash services
personal loan interest rates
payday loans milwaukee
america cash advance
online payday loan direct lenders
get loan with bad credit
unsecured personal loans bad credit
applying for a loan
loan up
loan direct
compare personal loan rates
personal loans online
pay day loan

loan money online
e z money payday loans
payday loan lenders only
loan sites
quick short term loans
cash america loans
personal loan online
quick money online
5000 loan bad credit
where to get a loan
cash advance lenders
easy loans to get
private loans

loan money online
e z money payday loans
payday loan lenders only
loan sites
quick short term loans
cash america loans
personal loan online
quick money online
5000 loan bad credit
where to get a loan
cash advance lenders
easy loans to get
private loans

loan money online
e z money payday loans
payday loan lenders only
loan sites
quick short term loans
cash america loans
personal loan online
quick money online
5000 loan bad credit
where to get a loan
cash advance lenders
easy loans to get
private loans

loan money online
e z money payday loans
payday loan lenders only
loan sites
quick short term loans
cash america loans
personal loan online
quick money online
5000 loan bad credit
where to get a loan
cash advance lenders
easy loans to get
private loans

same day loans
quick easy loans
easy cash loans
payday cash advance
payday loans direct lender
signature loans for bad credit
mobile loans
loan direct
emergency cash
cash to go
lenders network
getting a loan with no credit
loans in houston tx

same day loans
quick easy loans
easy cash loans
payday cash advance
payday loans direct lender
signature loans for bad credit
mobile loans
loan direct
emergency cash
cash to go
lenders network
getting a loan with no credit
loans in houston tx

same day loans
quick easy loans
easy cash loans
payday cash advance
payday loans direct lender
signature loans for bad credit
mobile loans
loan direct
emergency cash
cash to go
lenders network
getting a loan with no credit
loans in houston tx

same day loans
quick easy loans
easy cash loans
payday cash advance
payday loans direct lender
signature loans for bad credit
mobile loans
loan direct
emergency cash
cash to go
lenders network
getting a loan with no credit
loans in houston tx

quick easy money
personal loans for people with bad credit
short term lenders
payday loans direct lenders bad credit
loans today
emergency loans bad credit
online cash loans
ez cash
direct lender payday loans
emergency loan bad credit
micro loans
i need money today
personal loans with no credit

quick easy money
personal loans for people with bad credit
short term lenders
payday loans direct lenders bad credit
loans today
emergency loans bad credit
online cash loans
ez cash
direct lender payday loans
emergency loan bad credit
micro loans
i need money today
personal loans with no credit

quick easy money
personal loans for people with bad credit
short term lenders
payday loans direct lenders bad credit
loans today
emergency loans bad credit
online cash loans
ez cash
direct lender payday loans
emergency loan bad credit
micro loans
i need money today
personal loans with no credit

quick easy money
personal loans for people with bad credit
short term lenders
payday loans direct lenders bad credit
loans today
emergency loans bad credit
online cash loans
ez cash
direct lender payday loans
emergency loan bad credit
micro loans
i need money today
personal loans with no credit

need a loan
i have bad credit and need a loan
apply for a loan online
cash lenders
bank personal loan
micro loan
onlineloans
online lenders
private lenders for personal loans
loans direct lenders
apply personal loan
overnight loans
personal unsecured loans

need a loan
i have bad credit and need a loan
apply for a loan online
cash lenders
bank personal loan
micro loan
onlineloans
online lenders
private lenders for personal loans
loans direct lenders
apply personal loan
overnight loans
personal unsecured loans

need a loan
i have bad credit and need a loan
apply for a loan online
cash lenders
bank personal loan
micro loan
onlineloans
online lenders
private lenders for personal loans
loans direct lenders
apply personal loan
overnight loans
personal unsecured loans

payday loans richmond va
payday loan store
loans for people with no credit
loans direct
dollar loan
emergency cash
fast cash loans bad credit
cashusa
mobilemoney
loan with bad credit
ez payday loan
payday lending
vacation loans

payday loans richmond va
payday loan store
loans for people with no credit
loans direct
dollar loan
emergency cash
fast cash loans bad credit
cashusa
mobilemoney
loan with bad credit
ez payday loan
payday lending
vacation loans

payday loans richmond va
payday loan store
loans for people with no credit
loans direct
dollar loan
emergency cash
fast cash loans bad credit
cashusa
mobilemoney
loan with bad credit
ez payday loan
payday lending
vacation loans

payday loans richmond va
payday loan store
loans for people with no credit
loans direct
dollar loan
emergency cash
fast cash loans bad credit
cashusa
mobilemoney
loan with bad credit
ez payday loan
payday lending
vacation loans

empire city online casino
casino blackjack
casino blackjack
casino online
casino games online
online casino no deposit bonus
casino bonus
real online casino
online casino no deposit bonus
online casino

empire city online casino
casino blackjack
casino blackjack
casino online
casino games online
online casino no deposit bonus
casino bonus
real online casino
online casino no deposit bonus
online casino

empire city online casino
casino blackjack
casino blackjack
casino online
casino games online
online casino no deposit bonus
casino bonus
real online casino
online casino no deposit bonus
online casino

empire city online casino
casino blackjack
casino blackjack
casino online
casino games online
online casino no deposit bonus
casino bonus
real online casino
online casino no deposit bonus
online casino

free online casino
empire city online casino
casino slots
online casino reviews
casino games online
free casino games online
empire city online casino
real online casino
real online casino
empire city online casino

free online casino
empire city online casino
casino slots
online casino reviews
casino games online
free casino games online
empire city online casino
real online casino
real online casino
empire city online casino

online casino real money no deposit
best online casino
new online casinos accepting usa
online casino real money
casino blackjack
best online casino
online casino
best casino slots machine
real online casino
free casino games online

online casino real money no deposit
best online casino
new online casinos accepting usa
online casino real money
casino blackjack
best online casino
online casino
best casino slots machine
real online casino
free casino games online

online casino real money no deposit
best online casino
new online casinos accepting usa
online casino real money
casino blackjack
best online casino
online casino
best casino slots machine
real online casino
free casino games online

online casino real money no deposit
online casino reviews
free online casino
online casino usa
online casino reviews
online casino real money no deposit
online casino real money
real online casino
casino online
casino blackjack

online casino real money no deposit
online casino reviews
free online casino
online casino usa
online casino reviews
online casino real money no deposit
online casino real money
real online casino
casino online
casino blackjack

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

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

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

casino online
list of casino slot machines
casino bonus
online casino usa
nj online casino
free online casino
real online casino
casino slots
online casinos
empire city online casino

casino online
list of casino slot machines
casino bonus
online casino usa
nj online casino
free online casino
real online casino
casino slots
online casinos
empire city online casino

Pages