Ti Kwan Leap "Boot To The Head" Skit  

Posted by ReelTym



The DeWalt-16....NAILED IT!  

Posted by ReelTym

What do you get the guy who has everything this Father's Day/Christmas/Birthday?

DeWalt has the answer!!!



DeWALT - 16
It can drive a 16-D nail through a 2x4 at 200 yards. This makes construction a breeze, you can sit in your lawn chair and build a fence. Just get your wife to hold the fence boards in place while you sit back, and relax and when she has the board in the right place, just fire away.  With the hundred round magazine, you can build the fence with a minimum of reloading.  After a day of fence building with the new DeWalt Rapidfire Nail Gun, the wife will not ask you to build or fix anything else, probably, ever again.

Understanding Row Versioning-Based Isolation Levels  

Posted by ReelTym


Useful Links:
The following table summarizes the differences between snapshot isolation and read committed isolation using row versioning.
PropertyRead-committed isolation level using row versioningSnapshot isolation level
The database option that must be set to ON to enable the required support.READ_COMMITTED_SNAPSHOTALLOW_SNAPSHOT_ISOLATION
How a session requests the specific type of row versioning.Use the default read-committed isolation level, or run the SET TRANSACTION ISOLATION LEVEL statement to specify the READ COMMITTED isolation level. This can be done after the transaction starts.Requires the execution of SET TRANSACTION ISOLATION LEVEL to specify the SNAPSHOT isolation level before the start of the transaction.
The version of data read by statements.All data that was committed before the start of each statement.All data that was committed before the start of each transaction.
How updates are handled.Reverts from row versions to actual data to select rows to update and uses update locks on the data rows selected. Acquires exclusive locks on actual data rows to be modified. No update conflict detection.Uses row versions to select rows to update. Tries to acquire an exclusive lock on the actual data row to be modified, and if the data has been modified by another transaction, an update conflict occurs and the snapshot transaction is terminated.
Update conflict detection.None.Integrated support. Cannot be disabled.

Understanding Row Versioning-Based Isolation Levels  

Posted by ReelTym


Useful Links:
The following table summarizes the differences between snapshot isolation and read committed isolation using row versioning.
PropertyRead-committed isolation level using row versioningSnapshot isolation level
The database option that must be set to ON to enable the required support.READ_COMMITTED_SNAPSHOTALLOW_SNAPSHOT_ISOLATION
How a session requests the specific type of row versioning.Use the default read-committed isolation level, or run the SET TRANSACTION ISOLATION LEVEL statement to specify the READ COMMITTED isolation level. This can be done after the transaction starts.Requires the execution of SET TRANSACTION ISOLATION LEVEL to specify the SNAPSHOT isolation level before the start of the transaction.
The version of data read by statements.All data that was committed before the start of each statement.All data that was committed before the start of each transaction.
How updates are handled.Reverts from row versions to actual data to select rows to update and uses update locks on the data rows selected. Acquires exclusive locks on actual data rows to be modified. No update conflict detection.Uses row versions to select rows to update. Tries to acquire an exclusive lock on the actual data row to be modified, and if the data has been modified by another transaction, an update conflict occurs and the snapshot transaction is terminated.
Update conflict detection.None.Integrated support. Cannot be disabled.

Find Space Used by Table and It's Indexes  

Posted by ReelTym

declare @usage table (
    object_id int,
    schema_name sysname,
    table_name sysname,
    index_name sysname,
    index_id int,
    usedKB int,
    reservedKB int,
    row_count bigint,
    primary key clustered ( object_id, index_id )
    )
insert into @usage
    select
        p.object_id,
        s.name,
        o.name,
        coalesce( i.name, 'HEAP' ),
        i.index_id,
        p.used_page_count * 8,
        p.reserved_page_count * 8,
        p.row_count
        from sys.dm_db_partition_stats p
        join sys.objects o on p.object_id = o.object_id
        join sys.schemas s on o.schema_id = s.schema_id
        left join sys.indexes i on o.object_id = i.object_id and p.index_id = i.index_id
        where o.type_desc = 'USER_TABLE' and o.is_ms_shipped = 0

--ByIndex
select *
    from @usage
    order by schema_name, table_name, index_name, index_id

--ByTable
select
    schema_name, table_name,
    usedKB = sum(usedKB), reservedKB = sum(reservedKB), rows = max(row_count)
    from @usage
    group by schema_name, table_name
    order by schema_name, table_name