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.

sql_on_linux1

 

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.

speakerfeedback1

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.

20161028_152745_pano

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
CREATE PROCEDURE #MyProcedureName

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.

https://global.gotomeeting.com/join/828611693

 

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: , , , , , , ,

When Database Corruption Strikes – Summit 2016

Download PDF

Today I had the pleasure presenting my session “When Database Corruption Strikes” as PASS Summit 2016. I want to thank PASS and the program committee for this great opportunity to present on a topic that I enjoy so much… Database Corruption and how to fix it.

when database corruption strikes

 

Here is a shot from my point of view about 10 minutes before the session began.

20161028_152745_pano

Read more ›

Posted in Corruption, PASS Summit Tagged with: ,

When Database Corruption Strikes – PASS Summit 2016

Download PDF

It has been a great week at PASS Summit 2016. Tomorrow I will be presenting on Database Corruption.  The session is called “When Database Corruption Strikes.”   This session is at 3:30pm in Room 2AB, if you are interested in how to deal with database corruption, please come and see this presentation.

Here is the session abstract:

Your database is running fine month after month with no problems. Suddenly someone reports that their query won’t run. They get an error stating “SQL Server detected a logical consistency-based I/O error”, or something even scarier. Do you know what to do now?

We will walk through three corrupt databases exploring ways to go about finding and fixing the corruption. More importantly we will explore how to prevent further data loss at the time corruption occurs. Learn what things you can do to protect yourself when corruption strikes. Learn how to avoid making things worse, and how to protect your data if things do get worse. You will leave with a checklist of steps to use when you encounter corruption. By the end of this session you will be ready to take on corruption, one database at a time.

I look forward to seeing you there. If you happen to see me any other time at PASS Summit, please come up and say Hi.

pass_16_speaking_600x315

Posted in Corruption, Summit 2016 Tagged with: ,

PASS Summit 2016

Download PDF

Last Pass Summit 2016night I arrived in Seattle for PASS Summit 2016. This is my 4th consecutive PASS Summit, and my second time to be here as a speaker, and I am certainly looking forward to the week.

Before I had even checked in I ran into a few friends and ended up talking for a while and catching up on things. This is one of the things I love about PASS Summit, the people.

The Washington State Convention center is all decked out with branding for the PASS Summit 2016.

Last year I made the mistake of booking my hotel on PriceLine and I ended up on the other side of downtown, and had quite a journey to get to the conference each day. This year I decided to book the hotel through PASS, the room is a reasonable price, and its right next to the conference center.

 

For those who are attending for the first time, I have a few tips, in no particular order:

  • When you see someone you recognize, go up and say Hi and introduce yourself.
  • Keep an eye on the twitter hash tags for the event #sqlpass, #sqlsummit, and #passsummit. You might find out about some interesting things happening.
  • For the first timer’s go to the first timers meeting. You will get some great information.
  • Go to the welcome reception and talk to people.
  • Stay hydrated. With the long days and after hour activities, it is easy to forget about drinking enough water.

 

Pass Summit 2016 SpeakerAs I mentioned in an earlier post, if anyone wants some personal training on Database Health Monitor, I will have some time on Monday and Tuesday, just catch me and let me know.

This year I am presenting on database corruption. The session is titled “When Database Corruption Strikes”. The session on on friday afternoon at 3:30pm and is one of the last sessions of the conference. I will be showing 3 corrupt databases and ways to find and fix the corruption with non data loss.

If you have any experience with database corruption, I would love to hear your stories. Catch me anytime and let me know what your experiences were with corruption.

Most importantly –  make personal connections, this is the biggest SQL Server database event of the year, and it might be your only opportunity to meet some of the attendees until next year.

Posted in PASS Summit Tagged with: ,

Interested in some personal training on Database Health Monitor?

Download PDF

AStar_of_lifet PASS Summit next week, I will be available most of the day on Monday and Tuesday to meet with anyone to discuss Database Health Monitor, or consulting work. Just send me an email or contact me via twitter @SqlEmt.

I am also available to meet up during the summit, for lunch, dinner, drinks whatever works best.

Related Links:

Posted in PASS Summit, Summit 2016 Tagged with: