We are pleased to announce our our new SQL Server Course >>>”Getting Started with Microsoft SQL Server” <<< We are launching this course with a 50% OFF discount code! Coupon Code: INTRO50 *For a limited time only* Yes, Kiana won the battle (link to video below) over which course we are going to launch first. We originally had a debate …

Announcing our Newest SQL Server Course Read more »

Steve Stedman So years ago, when my kids were growing up, and they were watching the Discovery Channel, or Animal Planet, or whatever it was where the Crocodile Hunter was there. And I remember Steve Irwin, the Crocodile Hunter used to say Danger, Danger, Danger, and he’d go in and like deal with some crocodile or something like that. And …

Danger Danger Danger – REPAIR_ALLOW_DATA_LOSS Read more »

When creating a table you can specify IDENTITY with the following syntax: For example The IDENTITY property is valid for data types of the integer data type category, except for the bit data type, or decimal data type.  So how many rows can you insert into that table?  It depends on the data type used. What happens when I run …

Are you wasting half the capacity of IDENTITY? Read more »

I needed a way to list the indexes for an entire database, but I was running into a problem using sys.indexes that I could only see the indexes for the current database. Below is the solution that I put together to list off of the indexes in the entire database. CREATE TABLE ##allindexes(databse_id INTEGER,table_id INTEGER,index_id INTEGER,table_name      VARCHAR(1024));EXECUTE Sp_msforeachdb’use [?];INSERT INTO ##AllIndexesselect DB_ID() as database_id, object_id as table_id, index_id, namefrom sys.indexeswhere name is not null’ SELECT *FROM   ##allindexes;DROP TABLE ##allindexes;

Microsoft has just release an cumulative update for SQL Server 2017 CU 23. I am always interested in fixes to DBCC CHECKDB and DBCC CHECKTABLE. There was one fix related to CHECKTABLE that fixes an issue where the session gets killed when you run DBCC CHECKTABLE with PHYSICAL_ONLY due to disk full. The session remains in KILLED\ROLLBACK state and threads …

New cumulative update for SQL Server 2017 Read more »

After my post yesterday on the performance implications of concatenating long strings with the + operator and the CONCAT function, today I am following up with a way to speed up concatenation if you need to build really long strings. What the previous show as that the longer the string gets the slower the concatenation is. So instead we declare …

Performance: Faster way to concatenate longer string Read more »