RSS

Category Archives: Database Development

Mini Data Lab – SQL Server 2019 on Docker Part 3

Mini Data Lab – SQL Server 2019 on Docker Part 3

Back for more I see!! Well glad you’ve come back to round three where we are going to make a few more minor adjustments to our container and run our first shell script.

Make sure your container is running by executing the following command in your command prompt window: docker ps
If you don’t see the name of your container you can simple run this command docker start NAMEOFYOURCONTAINER in the command prompt.

Read the rest of this entry »
 

Tags: , , ,

Mini Data Lab – SQL Server 2019 on Docker Part 2

Mini Data Lab – SQL Server 2019 on Docker Part 2

So here we are back for Part 2 (I highly recommend you read Part 1 if you haven’t yet). In this post we are going to start configuring our containers and our SQL Instances to make them a little more functional and useful. In the first post, we really just created the containers with all the default settings. That means that all the storage is going to be inside the container. If it is deleted, the storage goes with it. So instead, to make the container more robust and upgradable, we are going to map some local storage on my host machine.

Let’s first take a look at the way I have my disk/folder structure laid out. Again, this is on my personal computer so it’s not a best practice for production and more suitable for development environments.

For each container, I’m creating a separate folder with the MSSQL paths that I need to put my databases, transaction log, and backup files on. Additionally, under the DockerMount folder I have a folder called sqldockershared (which I will put some shared content in later).

Read the rest of this entry »
 

Tags: , , ,

Mini Data Lab – SQL Server 2019 on Docker Part 1

Mini Data Lab – SQL Server 2019 on Docker Part 1

Recently, with the help of a colleague at work, I’ve started to dabble a little with containers. I had a customer that requested some specific code to be tested, and I realized that I didn’t have my own local instance of SQL running (always good to have a local one). I decided to try to make this process easier instead of going the traditional route of creating a Virtual Machine and also to help me learn a new technology. In these series of posts, I’m going to document my process of creating a Mini Data Lab for SQL Server on my desktop using Docker. It is intended to be for beginners and in no way is an article for best practices or production deployments.

Read the rest of this entry »
 

Tags: , , ,

[SQL Snacks Video] Performance Tuning 103 – T-Logs and VLFs


Finally the arrival of Part 3 of my SQL Snack Pack on Performance Tuning! The series is dedicated to help beginners understand how to start performance tuning with SQL Server. The first video was about performing a baseline using the PAL tool.I would highly recommend you review that video as well as my SQL Snack on Instant File Initialization. Also, if you missed part two from yesterday you can review it here.

If you are still interested in learning more about Performance tuning with SQL Server, I will be giving an hour long presentation with the PASS DBA Fundamentals Virtual Chapter on January 6, 2015 (11 am Central Time/Noon Eastern Time).  For more information please visit http://dbafundamentals.sqlpass.org/ and join PASS for a great way to learn more about SQL Server.

Code from Demo below:

Read the rest of this entry »

 

Tags: , , , , , ,

[SQL Snacks Video] Performance Tuning 102 – Files, FileGroups, and TempDB

[SQL Snacks Video] Performance Tuning 102 – Files, FileGroups, and TempDB

Finally the arrival of Part 2 of my SQL Snack Pack on Performance Tuning! The series is dedicated to help beginners understand how to start performance tuning with SQL Server. The first video was about performing a baseline using the PAL tool.I would highly recommend you review that video as well as my SQL Snack on Instant File Initialization. This second video discusses the importance of properly sizing Data files, placement, and how the Proportional Fill-Algorithm works for data insertion. I’m hoping you get some last minute Performance tuning in before 2015 and so I will be posting the third video within the next 24 hours.

Code from Demo below:

Read the rest of this entry »

 

Tags: , , , , , ,

[SQL Snacks Video] Performance Tuning 101 – Baseline with PAL Tools

[SQL Snacks Video] Performance Tuning 101 – Baseline with PAL Tools

Welcome to Part 1 of my SQL Snack Pack on Performance Tuning! The series is dedicated to help beginners understand how to start performance tuning with SQL Server. This first video describes how to setup a baseline for your system using the PAL tools. It is essential to get a baseline before you start performance tuning so that you can determine how effective the efforts done in trying to tune your SQL Server have been.  The PAL tools at first look a little intimidating but they are really very easy to use and extremely helpful for performance analysis. Enjoy and happy baselining!

A special thanks to Edgardo Valdez for showing me the how to use this tool.

Link to download PAL Tools and Prerequisites: https://pal.codeplex.com/

 

Tags: , , , , , ,

SQL Saturday 294 Philadelphia, Nostalgic!

SQL Saturday 294 Philadelphia, Nostalgic!

Less than a week left and I’m extremely excited about SQL Saturday in Philly on June 7th, 2014 and the Precon the day before (I signed up for Allan Hirt’s).  I lived in Philadelphia for about 10 years during which I went to college, had my first two full-time jobs, and my first to kids were born in that area. This SQL Saturday is going to be a blast from the past for me.  The actual event takes place in Malvern PA which is off of 202 in the Northwestern Region of the Philadelphia suburbs.  It is part of the “mainline” and close to Valley Forge, King of Prussia and other historic/tourist attractions.  I used to work in the Mainline area for Johnson Matthey in Wayne (and part time in Malvern) so I’m very excited about taking this trip back to visit friends and family.

For those of you that don’t know about SQL Saturday it is a fantastic event. Here are some of the reasons I’ve encouraged people to attend SQL Saturday events:

Read the rest of this entry »

 

Tags: , , , , ,

[SQL Snacks Video] SQL Server Table Partitioning 103

[SQL Snacks Video] SQL Server Table Partitioning 103

Welcome back for part 3 of my SQL Snack Pack on Table Partitioning! If you have not watched the first two videos, I would highly encourage you to do so.

Read the rest of this entry »

 

Tags: , , , , , , , , ,

[SQL Snacks Video] SQL Server Table Partitioning 102

[SQL Snacks Video] SQL Server Table Partitioning 102

Welcome back for part 2 of my SQL Snack Pack on Table Partitioning! If you have not watched the first video, I would highly encourage you to do so.

Read the rest of this entry »

 

Tags: , , , , , , , , ,

[SQL Snacks Video] SQL Server Table Partitioning 101

[SQL Snacks Video] SQL Server Table Partitioning 101

I hope you’re hungry for another SQL Snack! In fact, this will be one of a series of snacks (dare I call it a SQL Snack pack?). Table partitioning is a fantastic feature that is easy to learn and can significantly improve your OLTP and Data-warehouse environments. It can be a little intimidating because it is tricky to get started with, but once you get the basics down you’ll realize it’s pretty straight forward and a very useful feature to have.  I will be providing the code and outline for each of the SQL Snacks related to table partitioning so that you have a chance to practice on your own.  Happy partitioning!

Read the rest of this entry »

 

Tags: , , , , , , , , ,

[SQL Snacks Video] The Basics of Joins

[SQL Snacks Video] The Basics of Joins

This is a special edition for SQL Snacks.  It is one (of many hopefully) SQL Snacks that has been recorded with the intention of fulfilling a request by a SQL community member looking to learn more about SQL Server.  It is straight forward, very basic, beginner level information about Joins with a few examples.

 

Tags: , , ,

SQL Saturday #277 Richmond – Covering new ground

SQL Saturday #277 Richmond – Covering new ground

SQL Saturday has been a fantastic experience for me here in the DC area (I blogged about it here) and I hope for the same thing in Richmond.  This is my first time to attend a SQL Saturday in a city outside my area of residency, and I will also be speaking there.  This is a bit of a new journey and one that I think I will enjoy.

This is a new experience and one that I have been excited about since speaking with Wayne Sheffield about it at the DC SQL Saturday in December 2013. I have him to thank for encouraging me to spread my wings and I hope for a smooth ride upward from here.  That is the embodiment of the Professional Association for SQL Server (PASS) after all; to establish life long learning and grow the community by giving back.  I think I could probably do a commercial for them or be a PASS spokesperson.  Seriously though, I’ve learned so many things that have helped my career for free or a very low cost.

For this SQL Saturday, I’m also planning to attend the PreCon event scheduled for the day before.  There is still time to register by going to the main site for the event here. I’ve selected to go to session by Robert Davis for my PreCon and it was a hard choice because the “Murder Thy Wrote” PreCon was very appealing as well and I hope to catch that one at the next SQL Saturday I attend.

Read the rest of this entry »

 

Tags: , , , , ,

Why SQL Server Professionals should love Windows 8

Why SQL Server Professionals should love Windows 8

Alright, I’ve got your attention. You’re probably thinking “who is this crazy guy that is using the word Love with Windows 8 in the same sentence?” Honestly though, I have not had many problems with Windows 8 and I’ve been happy running it for a long time. I’m actually disappointed that I don’t have Windows 8 at my job, so I can only use it at home. It has been extremely beneficial for me for my SQL Server related work. Why? And why am I stalling to answer your question? And why am I going to change the subject to Hyper-V?

If you’re still reading, then great, you’ve got the patience for what is coming next. Windows 8 Pro includes a Hyper Visor in it (Hyper-V to be exact).  I’m not talking about software to connect to virtual environments, I’m talking about an actual Hyper Visor that allows you to create and manage virtual machines.  Once you enable the option you’re ready to go after a restart, it’s that simple.

So what does this have to do with me as a SQL Server Professional? Well, how else are you going to build your own lab environment at home or at work where you can play around, build and break things, and be your own domain admin (warning: power may go to your head on that last one). It’s all part of your life long learning journey and your drive to become a better SQL Server Professional and get the latest and greatest version on your machine to test out without ruining your OS. It so happens that I’m a nice guy, and I’ll show you how to get your environment setup and how to create “templates” for future VMs with this Hyper-V Tricks for the SQL Professional Video I put together.

Are you ready to push SQL Server to it’s limits, test things you’ve never tested before, build and break environments without losing your job? If the answer is yes then this video is for you! When you’re done with this video make sure you check out my Virtual SQL Server Lab with Clustering post to enhance your own Virtual playground.

PowerShell Scripts mentioned in video (Remember to rename your VM if you like and to change the paths to match your setup):

new-vm -Name “SQLPS” -MemoryStartupBytes 2048MB -Path R:\HyperV\

new-vhd -ParentPath “R:\HyperV\SQL 2012 Template\SQL2012 Template Drive.vhdx” -Path R:\HyperV\SQLPS\SQLPS.vhdx -Differencing

Add-VMHardDiskDrive -VMName SQLPS -Path “R:\HyperV\SQLPS\SQLPS.vhdx”

 

Tags: , , , , , , , , , , ,

Only one month left! Register for the SQL Server Live! Conference in Orlando Through TheSQLPro.com and Receive a $500 Discount

Only one month left! Register for the SQL Server Live! Conference in Orlando Through TheSQLPro.com and Receive a $500 Discount

The SQL Server Live! Conference in Orlando is between November 18-22, 2013. There is a discount code provided for those who register using the discount code on my website.

The Agenda includes many great topics of interest for both Developers and DBAs:

SQL Server Administration & Maintenance
SQL Server Performance Tuning and Optimization
SQL Server Features & Components
SQL Server Tools, Tricks, and Techniques
BI, Big Data and Data Visualization
SQL Server for the Developer
SQL Server in the Cloud

Read the rest of this entry »

 

Tags:

Slides for SQL Server Internals Presentation with PASS DC Chapter

Slides for SQL Server Internals Presentation with PASS DC Chapter

For those of you that attended yesterday and are interested in the slides, you can download them here.

Thanks!
Topic:
SQL Server Internals Party: Storage, Memory and the Query Life-cycle

Abstract:
Come meet the Internals of SQL Server at this special get-together! In this presentation we will cover the basics of data storage and querying with SQL Server. We will cover how data is stored in pages and extents and how that translates to data reads/writes with the storage system. Additionally, we will explore how different queries are processed by SQL Server and how the query life cycle works in general. Finally we will cover disk storage and memory and tie it all together. This session is intended to be broad and to give a general overview of how a query is processed in SQL Server and how storage and memory play a part in that. Everyone is invited to this introductory level presentation and should be appealing to DBAs, DB & BI Developers and System Administrators. Party hats not included, rated G for Geeks.

 

Tags: ,

SQL Server Internals Presentation with PASS DC Chapter October 10, 2013

SQL Server Internals Presentation with PASS DC Chapter October 10, 2013

If you’re in the DC/Baltimore area, or just feel like coming to DC to learn about SQL Server, please join me for my presentation on SQL Server Internals. The date is Thursday October 10, 2013 at 6:30PM at the Microsoft Building in Chevy Chase. For more details please visit http://passdc.sqlpass.org/
Topic:
SQL Server Internals Party: Storage, Memory and the Query Life-cycle

Abstract:
Come meet the Internals of SQL Server at this special get-together! In this presentation we will cover the basics of data storage and querying with SQL Server. We will cover how data is stored in pages and extents and how that translates to data reads/writes with the storage system. Additionally, we will explore how different queries are processed by SQL Server and how the query life cycle works in general. Finally we will cover disk storage and memory and tie it all together. This session is intended to be broad and to give a general overview of how a query is processed in SQL Server and how storage and memory play a part in that. Everyone is invited to this introductory level presentation and should be appealing to DBAs, DB & BI Developers and System Administrators. Party hats not included, rated G for Geeks.

Date/Time: October 10, 2013 @ 6:30PM

Location:
Microsoft Technology Center
5404 Wisconsin Ave. Ste. 700
Chevy Chase, MD 20815

 

Tags: ,

Free Conference Pass to SQL Server Live! in Orlando

Free Conference Pass to SQL Server Live! in Orlando

Want a free pass to the SQL Server Live! conference in Orlando this year? Look no further, here is your chance to win a free pass to the conference. Of course, you first have to answer a few questions to be considered!

Read the rest of this entry »

 

Tags:

Image

Register for the SQL Server Live! Conference in Orlando Through TheSQLPro.com and Receive a $500 Discount

Register for the SQL Server Live! Conference in Orlando Through TheSQLPro.com and Receive a $500 Discount

The SQL Server Live! Conference in Orlando is between November 18-22, 2013. There is a discount code provided for those who register using the discount code on my website.

The Agenda includes many great topics of interest for both Developers and DBAs:

SQL Server Administration & Maintenance
SQL Server Performance Tuning and Optimization
SQL Server Features & Components
SQL Server Tools, Tricks, and Techniques
BI, Big Data and Data Visualization
SQL Server for the Developer
SQL Server in the Cloud

Read the rest of this entry »

 

Tags:

Spend some quality time with your Database using Database Snapshots for testing

Spend some quality time with your Database using Database Snapshots for testing

First let’s get things straight, this post is not an encouragement for anyone to spend more time with his/her Database or with Database Snapshots for that matter. If you’re married to your Database, that’s a different story all together and I don’t think I could help you. As database professionals we are always looking to improve the quality of our code and data.  This post is intended to show an easy way to use Database Snapshots in order to  test new code or change data and revert changes back quickly and easily.

Read the rest of this entry »

 

Tags: , , , , , , , , ,

Indexing Fundamentals Presentation – Pending Questions Answered

Indexing Fundamentals Presentation – Pending Questions Answered

On July 10th 2013, I gave a presentation with the Professional Association for SQL Server (PASS) DBA Fundamentals Virtual Chapter. The topic was Indexing Fundamentals and there were some questions that we did not have time to answer. I have combined similar questions and given one answer to cover the specific topic.

If you missed the presentation, you can click HERE to see the recording.

Abstract:
Indexing is an integral part of SQL Performance and Architecture. In this presentation we will cover the basics of Clustered and Non-Clustered Index structure and function. Additionally, we will discuss the B-Tree structure, index density (fill factor), page splits, and performance considerations. Finally, there will be a brief discussion of index maintenance.

Read the rest of this entry »

 

Tags: , , , , , ,