• Skip to main content
  • Skip to primary sidebar

DBA Diaries

Thoughts and experiences of a DBA working with SQL Server and MySQL

An Overview of SQL Server Task Scheduling

November 25, 2012 by Andy Hayes 1 Comment

In my previous post, I touched upon SQL Server wait types and in order to understand wait types in SQL Server, it's important to know first how the server schedules tasks. On each CPU core, only a single thread or "worker" can be running at any given time. Each CPU, be it logical or physical inside your SQL Server is assigned a scheduler and it is responsible for managing t … [Read more...] about An Overview of SQL Server Task Scheduling

An Introduction to SQL Server Wait Types and Stats

November 10, 2012 by Andy Hayes 1 Comment

sql server wait types and stats

Ok, so in this post, I wanted to go over SQL Server wait types and statistics  - what they are and how to check them. My idea is then to start a series of posts which go into more detail about individual SQL Server wait types, their causes and how to improve them. At the time of writing this post, I do not know about all of the wait types in SQL Server and there are many of … [Read more...] about An Introduction to SQL Server Wait Types and Stats

How to Delete Millions of Rows using T-SQL with Reduced Impact

October 9, 2012 by Andy Hayes 27 Comments

In this post, I talk about deleting millions of rows in SQL Server whilst keeping impact low. Deleting millions of rows in one transaction can throttle a SQL Server TRUNCATE TABLE - We will presume that in this example TRUNCATE TABLE is not available due to permissions, that foreign keys prevent this operation from being executed or that this operation is unsuitable for … [Read more...] about How to Delete Millions of Rows using T-SQL with Reduced Impact

Reset Table Identity Value Using DBCC CHECKIDENT RESEED

September 23, 2012 by Andy Hayes 1 Comment

sql server dbcc checkident

DBCC CHECKINDENT RESEED can be used to reset a tables identity value on a column. On the official Microsoft page about it, it reads "Checks the current identity value for the specified table in SQL Server 2016 and, if it is needed, changes the identity value. You can also use DBCC CHECKIDENT to manually set a new current identity value for the identity column." This … [Read more...] about Reset Table Identity Value Using DBCC CHECKIDENT RESEED

Using sp_change_users_login to fix SQL Server orphaned users

September 19, 2012 by Andy Hayes 17 Comments

sp_change_users_login report

In this post, I'm going to be looking at sp_change_users_login in order to fix SQL Server orphaned users as a continuation to a previous article. There I looked at a couple of ways to transfer logins from one SQL Server to another and touched upon the issue of the orphaned "security identifier" (SID). A typical scenario that arises is when the DBA quickly realises that the lo … [Read more...] about Using sp_change_users_login to fix SQL Server orphaned users

« Previous Page
Next Page »

Primary Sidebar

Categories

  • All Articles (84)
  • Career Development (8)
  • MySQL Administration (18)
  • MySQL Performance (2)
  • SQL Server Administration (24)
  • SQL Server News (3)
  • SQL Server Performance (14)
  • SQL Server Security (3)
  • SQL Tips and Tricks (21)

Top 10 Popular Posts

  • Using sp_change_users_login to fix SQL Server orphaned users
  • MySQL SHOW USERS? – How to List All MySQL Users and Privileges
  • How to shrink tempdb
  • How to Transfer Logins to Another SQL Server or Instance
  • How to Delete Millions of Rows using T-SQL with Reduced Impact
  • T-SQL – How to Select Top N Rows for Each Group Using ROW_NUMBER()
  • New T-SQL features in SQL Server 2012 – OFFSET and FETCH
  • How to Kill All MySQL Processes For a Specific User
  • Using exec sp_who2 to help with SQL Server troubleshooting
  • How to fix “conversion failed when converting date and/or time from character string”

Recent Posts

  • How to fix “conversion failed when converting date and/or time from character string”
  • Using SQL GROUPING SETS for Multiple GROUP BY Queries in a Single Query
  • How to Setup MySQL Master Master Replication
  • How To Use SQL to Convert a STRING to an INT
  • How to set up MySQL Replication Tutorial

Search

Connect

  • Twitter
  • Facebook
  • RSS

About

  • Cookie Policy
  • Disclaimer
  • About
Copyright ©