When Database Corruption Strikes – Calgary SQL Users Group

Download PDF

Today I am presenting one of my favorite sessions “When Database Corruption Strikes” remotely for the PASS Calgary SQL Server Users Group.


This is the same session that I presented at Pass Summit 2016, with a few minor additions, including a slide with information on corruption with Hekaton (In Memory OLTP).


This should be fun.

Here are the downloads

Posted in Corruption, PASS Chapter Tagged with: , ,

Linux commands for SQL DBA’s who don’t know Linux (yet)

Download PDF

With SQL Server now being available (pre-release) on Linux, I think we will see many SQL DBA’s who previously did not have Linux experience being forced into a new area. I am lucky in that I have had my share of Linux experience over my career, it has come easy to me. I figured I would share some Linux nuggets for those SQL DBAs diving into the Linux pool.

  • ls - List directory contents. Similar to dir on Windows.
  • top  - Sort of like the Windows task manager, shows you the top applications using cpu and memory.
  • sudo - runs a program or command with escalated user permissions.
  • apt-get - used to install a program. Kinda like the windows "add or remove programs" without the graphical interface.
  • ufwUncomplicated Firewall, is a front-end to iptables. Use this to allow or prevent port access to your Linux Server.
  • ps - processes.  Provides information on currently running process. For instance ps aux shows all running processes.
  • man - gets help on any of the Linux commands. For instance man ps provides the help page for the ps application.


That’s it for now, I will continue to grow this list as I have time.

Related Links:

Posted in SQL Linux Tagged with:

Allow Port 1433 Ubuntu Linux for SQL Server

Download PDF

If you have just installed SQL Server on Ubuntu Linux and you are trying to connect remotely you may have some difficulty connecting if port 1433 is not available.

Here is how you do it, using the UFW, or Uncomplicated Firewall on Ubuntu.

sudo ufw enable
sudo ufw allow 1433

While you are at it you may want to enable port 22 for SSH if that has not been allowed already. I also allowed 1434 for the dedicated admin console assuming that it is available on the Linux version of SQL Server v.next.


I hope this helps!  Enjoy.

Related Links:

Posted in SQL Linux Tagged with: , , , ,

SQL Server on Linux

Download PDF

This week Microsoft made the v.next version of SQL Server for Linux available in the public preview. It has been a couple of years since I have worked with Linux, but I am excited and going to give it a try.

SQL Server Linux

Also this week we released the SQL Data Partners weekly podcast, and this weeks episode was with Travis Wright. Travis is the program manager for the SQL Server transition to SQL Server on Linux.

Some of the topics covered in the podcast:

  • Why are they adding a Linux version of SQL Server.
  • What features are going to be supported.
  • The version of Linux supported.
  • What type of integrations are now possible – think WordPress on SQL Server.
  • How do I kick the tires on this?


Personally I am looking forward to this. I just installed Ubuntu Linux, the next step is to install SQL Server on Linux. I will follow up with more details once I have it working on Linux.

Related Links

Posted in SQL Linux Tagged with:

Getting Started with SQL Server on Linux

Download PDF

With the recent public availability of the SQL Server Linux release, I figured I should give it a try, and it went well. Here is all that it took.

  • Download and install to a VM Ubuntu Linux Server 16.04.  (1 hour)
  • Allow port 22 through the firewall to be able to connect to the server with Putty.  (1 min)
  • Follow the SQL Server install steps from Microsoft.  (15 min)
  • Allow port 1433, and 1434 through the firewall to be connect to sql server remotely. (1 min)
  • Connect to the Ubuntu linux box from SSMS on a computer running Windows.

Victory!  I am now connected to a fresh brand new SQL Server running on Ubuntu Linux.



Related Links:

Posted in SQL Linux Tagged with: , , ,

SQL Summit 2016 Session Feedback.

Download PDF

I was extremely excited to get my session feedback from my SQL PASS Summit 2016 session on Database Corruption today. I have been waiting, and was very please with the feedback.  Being the last time slot of the entire conference, I wasn’t quite sure what to expect.  Here is the overall evaluation.


Then on to the actual feedback, which I would like to say thanks to everyone who commented. This will help me prepare for my next session.

  • All logistics were good but I suggest a larger room for this session next year (this one should definitely be repeated next year!).
  • Room was packed and as a result was a bit warm.
  • Really good session, nice to have a base of knowledge of what to do or not to do when corruption occurs.
  • Great presentation
  • Wish it was longer so much info that is essential
  • This should be a precon!
  • I came back specifically from lunch for this session… was actually by the space needle. I’m glad I did. Excellent session, well laid out. Examples were great.
  • This was a great session. Steve was very detailed and explained things well.
  • Great information
  • Dude…..
  • If you would do a whole day precon…. i would come in a heartbeat!
  • One of my favourite sessions at Summit 2016. Steve is a great speaker and very engaging. A little rushed towards the end, but it didn’t spoil what was a great session.
  • Wasnt sure i was going to go to a session in the last slot. Turned out to be the best session. Well put together good examples and moral of the story is check for corruption and have lots of backups!!
  • Great session!
  • Extremely informative. Great material. Hopefully I will never need to use it but I feel much more knowledgeable on the subject.
  • Very good presentation and the samples are all good.
  • Gime more time to complex recover corruptions
  • Great demo, lots of detail. Lots of good information.
  • Steve was a great speaker and a great teacher. The corruption challenges were outstandingly presented. I learned a lot. This was my favorite session at PASS.
  • Great session, thanks. Probably the best I attended all week! I can’t even imagine being able to recover from a problem like those you presented, tho’, especially being the only SQL Server DBA in-house. Maybe next time show more simplified examples…
  • Steve demonstrated ways to handle three different types of corruption, including one that was a fascinating dive into the world of DBCC PAGE. Despite being the last session of the week, it was very well attended, and there were many questions after the session.
  • This presentation exceeded my expectations. I’ve been to Paul Randal’s session on fixing corruption using a hex editor in past years and thought nothing could come close but this one did. Excellent!! Huge thank you to the presenter.
  • Excellent session. My only gripe is that for a session of this level (and for this topic), the speaker reviewed some very basic topics which caused him to run out of time. This is a shame, because the final corruption reproduction was the most involved.

Here is photo of the room and the presentation from my perspective about 10 minutes before we got started.


Given all this feedback, I think that I am going to grow, or expand the session into some different sessions:

  • Basics of corruption, what it is, detection, and tracking of corruption issues.
  • Basic techniques for repairing corruption.
  • Advanced database corruption repair and recovery.

We will see where it goes, but I certainly had a good time with the presentation.

If you have any other feedback to send my way, please do. Thanks to all that attended.

Posted in Summit 2016 Tagged with: , , ,

Temporary Stored Procedures #sproc

Download PDF

Yes, you can create temporary stored procedures by prefixing the name of the sproc with a #. The temporary stored procedure is sort of a “leave no trace” stored procedure that is only good for your session. If you use double ## you will get a global temporary stored procedure.

For instance:

Read more ›

Posted in TSQL Tagged with: , , , , , , ,

DBCC CheckDB and CheckTable doesn’t check In-Memory OLTP.

Download PDF

Special thanks to my friend Theresa Iserman for introducing me to Jos de Bruijn the Senior Program Manager for the In Memory OLTP (Hekaton) project to help get my questions answered at PASS Summit.

So, the Hekaton – In Memory OLTP tables are perhaps one of the most amazing performance improvements to SQL OLTP in a long time. The way that they are managing data with no latches, locks or spinlocks is awesome, and the performance gains are great.

However in a recent session at Pass Summit 2016 with Bob Ward, I followed up with a question on CheckDB and In Memory OLTP tables. Since the data for these are not store in the normal SQL Server data files or even in regular pages. Bob confirmed that CheckDB (and CheckTable) does not check the data associated with the In Memory OLTP tables. I even confirmed this from Books Online in a post called “Transact SQL Constructs Not Supported by In-Memory OLTP” which stated the following:

  • DBCC CHECKDB skips the memory-optimized tables in the database.
  • DBCC CHECKTABLE will fail for memory-optimized tables.

Read more ›

Posted in Corruption, Hekaton Tagged with: , , , , ,

Bellingham SQL Server Users Group November Meeting

Download PDF

Bellingham SQL Server Users Group (Pass Chapter) – November 30th at 6:00pm.

Features Presentation by Randolph West: “Back up and Restore your Database with Azure Blob Storage”.

Making use of good disaster recovery fundamentals and modern off-site storage, you will learn how to back up and restore a full database backup using Azure Blob Storage, even if your version of SQL Server doesn’t support it.

This should be a great presentation.


If you can’t make it in person and would like to join us on the GoToMeeting session, please click the following link to start your session at about 6:00pm on November 30th.



As usual, we will have pizza at the meeting provided by Stedman Solutions, LLC.

The chapter meeting will be at the following address. Thanks to Derrick Bovenkamp for providing the conference room for this meeting.

709 West Orchard Drive #4

Bellingham, WA 98225


For any questions, please contact Steve Stedman

More info:

Posted in PASS Chapter Tagged with: , , , , , , ,

Visualizing VLF’s – Updated

Download PDF

A while back a wrote a blog post with a query to Visualize the VLF’s in your database. Today I have an update to that script.

Here is an updated script that has adds another column called “TextStatus” to the output to give you a better idea of what the different statuses mean. You now get 3 statuses shown, “In Use”, “Available”, and “Available Never Used”. The If you have lots of VLFs that are “Available Never Used” that may be an indication that your log file may be larger than you need. If you don’t have any that are “Available Never Used” the log may be smaller than you need.

Read more ›

Posted in Uncategorized Tagged with: , , , , , , ,

SQL Server Performance Tuning

Need help with SQL Server Performance Tuning, contact Steve at Stedman Solutions, LLC for help, or take a look at the performance tuning page at the SteveStedman.com blog. We can help with tuning a single query or with figuring out why your SQL Server is running slow. Free 30 minute consultation.

Newsletter Signup

Stay informed of Database Corruption Challenge events, and other things happening at SteveStedman.com with my newsletter.
Newsletter signup form.

Stedman Solutions