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

cialis without a prescription sildenafil citrate order cialis

cialis without a prescription sildenafil citrate order cialis

cialis without a prescription sildenafil citrate order cialis

cialis without a prescription sildenafil citrate order cialis

If you’re upset about your weight and want to lose a little more, get this…

An overweight mother with pre-diabetes has just SHOCKED the medical
community by losing an unheard of 22lbs pounds in just 13 days…

....Without starving herself, she lost a total of 37lbs in the first month!
-> CLICK HERE to see her Transformation Pics!

...Even without exercising, she went on to burn off 84lbs (almost a pound a day)
and eliminated any sign of diabetes or any other life-ending diseases.

And the amazing thing is…

All she did was this D.I.Y. “carb-pairing” trick that reconditions your 3 female
weight-loss hormones to drastically accelerate fat-burning while still eating the
foods you love.

Check it out for yourself…

“Carb-Pairing” Melts Away 37 Pounds in Just 20 Days (WOMEN ONLY)

Enjoy!

If you’re upset about your weight and want to lose a little more, get this…

An overweight mother with pre-diabetes has just SHOCKED the medical
community by losing an unheard of 22lbs pounds in just 13 days…

....Without starving herself, she lost a total of 37lbs in the first month!
-> CLICK HERE to see her Transformation Pics!

...Even without exercising, she went on to burn off 84lbs (almost a pound a day)
and eliminated any sign of diabetes or any other life-ending diseases.

And the amazing thing is…

All she did was this D.I.Y. “carb-pairing” trick that reconditions your 3 female
weight-loss hormones to drastically accelerate fat-burning while still eating the
foods you love.

Check it out for yourself…

“Carb-Pairing” Melts Away 37 Pounds in Just 20 Days (WOMEN ONLY)

Enjoy!

If you’re upset about your weight and want to lose a little more, get this…

An overweight mother with pre-diabetes has just SHOCKED the medical
community by losing an unheard of 22lbs pounds in just 13 days…

....Without starving herself, she lost a total of 37lbs in the first month!
-> CLICK HERE to see her Transformation Pics!

...Even without exercising, she went on to burn off 84lbs (almost a pound a day)
and eliminated any sign of diabetes or any other life-ending diseases.

And the amazing thing is…

All she did was this D.I.Y. “carb-pairing” trick that reconditions your 3 female
weight-loss hormones to drastically accelerate fat-burning while still eating the
foods you love.

Check it out for yourself…

“Carb-Pairing” Melts Away 37 Pounds in Just 20 Days (WOMEN ONLY)

Enjoy!

online pharmacy tech programs with financial aid cheap online pharmacy canada drugs coupon code

online pharmacy tech programs with financial aid cheap online pharmacy canada drugs coupon code

online pharmacy tech programs with financial aid cheap online pharmacy canada drugs coupon code

online pharmacy tech programs with financial aid cheap online pharmacy canada drugs coupon code

pharmacy technician classes online prescription drugs online pharmacy technician class online

pharmacy technician classes online prescription drugs online pharmacy technician class online

pharmacy technician classes online prescription drugs online pharmacy technician class online

pharmacy technician classes online prescription drugs online pharmacy technician class online

pharmacy degrees online pharmacy tech schooling online online pharmacy viagra

pharmacy degrees online pharmacy tech schooling online online pharmacy viagra

mexican online pharmacy cvs pharmacy online online pharmacy viagra

mexican online pharmacy cvs pharmacy online online pharmacy viagra

pharmacy degrees online pharmacy tech schooling online online pharmacy viagra

mexican online pharmacy cvs pharmacy online online pharmacy viagra

buy cialis online buy cialis no rx buy tadalafil online/#buy cialis

buy cialis online buy cialis no rx buy tadalafil online/#buy cialis

buy cialis online buy cialis no rx buy tadalafil online/#buy cialis

buy cialis online buy cialis no rx buy tadalafil online/#buy cialis

buy sildenafil buy viagra cheap buy viagra medication

buy sildenafil buy viagra cheap buy viagra medication

buy sildenafil buy viagra cheap buy viagra medication

buy cialis online without prescription buy cialis usa buy cialis no rx/#purchase cialis online no prescription

buy cialis online without prescription buy cialis usa buy cialis no rx/#purchase cialis online no prescription

buy cialis online without prescription buy cialis usa buy cialis no rx/#purchase cialis online no prescription

buy cialis online without prescription buy cialis usa buy cialis no rx/#purchase cialis online no prescription

Buy Cipro 500mg Allergia Propecia viagra online prescription Propecia Disfunzione Erettile

Buy Cipro 500mg Allergia Propecia viagra online prescription Propecia Disfunzione Erettile

Buy Cipro 500mg Allergia Propecia viagra online prescription Propecia Disfunzione Erettile

buy finasteride where buy propecia order propecia/#where buy propecia

buy finasteride where buy propecia order propecia/#where buy propecia

buy finasteride where buy propecia order propecia/#where buy propecia

buy finasteride where buy propecia order propecia/#where buy propecia

Поршев Андрей Викторович мошенник
город Казань

Машина Камри госномер У033ВС116 вин XW7BF4FKX0S0007025
сервис Восстания 8А
дом Казань, ул. Лукина д.41, кв.126
мобильный 8(951)069-79-47

замена sti

этот человек-обманщик
обещает поставку любых деталей по приемлемой цене и исчезает
отключает телефон когда вы звоните
с ним лучше не заключать никаких договоренностей
он берет деньги и исчезает.

Поршев Андрей Викторович мошенник
город Казань

Машина Камри госномер У033ВС116 вин XW7BF4FKX0S0007025
сервис Восстания 8А
дом Казань, ул. Лукина д.41, кв.126
мобильный 8(951)069-79-47

замена sti

этот человек-обманщик
обещает поставку любых деталей по приемлемой цене и исчезает
отключает телефон когда вы звоните
с ним лучше не заключать никаких договоренностей
он берет деньги и исчезает.

Поршев Андрей Викторович мошенник
город Казань

Машина Камри госномер У033ВС116 вин XW7BF4FKX0S0007025
сервис Восстания 8А
дом Казань, ул. Лукина д.41, кв.126
мобильный 8(951)069-79-47

замена sti

этот человек-обманщик
обещает поставку любых деталей по приемлемой цене и исчезает
отключает телефон когда вы звоните
с ним лучше не заключать никаких договоренностей
он берет деньги и исчезает.

Поршев Андрей Викторович мошенник
город Казань

Машина Камри госномер У033ВС116 вин XW7BF4FKX0S0007025
сервис Восстания 8А
дом Казань, ул. Лукина д.41, кв.126
мобильный 8(951)069-79-47

замена sti

этот человек-обманщик
обещает поставку любых деталей по приемлемой цене и исчезает
отключает телефон когда вы звоните
с ним лучше не заключать никаких договоренностей
он берет деньги и исчезает.

cialis without prescription sildenafil citrate discount cialis

cialis without prescription sildenafil citrate discount cialis

Pages