Categories
Events Review SQL Saturday Syndication

SQLSaturday 31 Chicago: Recap

Last weekend I had the distinguished pleasure of attending Chicago’s very first SQLSaturday event. Before I begin my recap I’d like to again give a HUGE thanks the organizers of the event: Wendy Pastrick (Blog | Twitter), Aaron Lowe (Blog | Twitter) and Ted Krueger (Blog | Twitter) as well as all of the awesome volunteers that helped out.

My wife Jessica (Blog | Twitter) and I arrived into Chicago Friday afternoon. We had time to catch a bite at Grand Lux Cafe with some friends and my sister. Pretty nice place, kind of like a Cheesecake Factory but a little better. My wife’s a foodie so she was loving it! After lunch I got the pleasure of meeting Brent Ozar (Blog | Twitter), Jeremiah Peschka (Blog | Twitter) and Jeremiah’s friend John Jakubowski (Blog | Twitter) as they picked me up and we headed out to the ‘Burbs for the speaker’s dinner. We had plenty of time in car to talk about all things geek such as NoSQL, Ruby on Rails, PASS and a few other choice subjects not fit for print. Let’s just say I learned some strip clubs in Ohio have free steaks for lunch.

Categories
Events Syndication

Upcoming Presentation: SQL Server 101 Series

I’m extremely proud to announce that I’ll be a part of a fantastic webinar series being put on by Pragmatic Works on SQL Server 101. Basically a 2-week-long series of webinars covering all the information you need to know to get started in SQL Server. I’ll be leading off the week with Introduction to Managing a SQL Server Database where I’ll cover some of the basics for an administrator getting started in the field. That same afternoon make sure you catch Patrick LeBlanc (aka @patrickdba on Twitter) presenting on Beginning T-SQL (register here for this session).

The rest of the week has some amazing presenters and content with folks like Steve Jones (Blog | Twitter), Brad McGehee (Blog | Twitter), Brian Knight (Blog | Twitter), Adam Jorgensen (Blog | Twitter), Christian Bolton (Blog | Twitter), and Devin Knight (Blog | Twitter)! HOLY CRAP, how did my name get mixed in with this elite bunch?!? Each session has its own registration link so make sure you register for the ones you think you’ll make as registrations are limited to 1,000 per session. Hope to see you all online that week!

SQL Server Global Webinar Series event page

Register for my talk here

And finally here’s a video introduction from Brian and Devin Knight about what to expect that week

Categories
Syndication

Beware Vendor Databases

You're crunchy and taste good with ketchup
HERE THERE BE DBAs

This is just a quick post to serve as a warning sign to those who are DBAs in shops where you routinely get vendor pre-packaged databases (which should encompass about 99% of you). Today we had a vendor installing a new application which required a SQL database, to which I am ever thankful. Unfortunately this database, as I came to discover after a discussion with my junior DBA, that it was actually a restore of a database that was a created after mashing a bunch of data together from disparate systems. Ouch.

Well long story short after the install I took a look at the database server’s (disclaimer: I put them on a shared SQL instance since the app is relatively small) error log to make sure nothing crazy was happening since during the install they had issues with account creations. FYI that turned out to be a small “we need sysadmin” rights issue to which I said ‘NAY!’ and granted them temp rights to complete their install and then revoked those rights when it was complete. Anyhow the error log showed me something interesting:

Message
SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Bound Trees' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.

Well that’s interesting. I quickly Banged it out and the first solution I found was a KB article (KB917828) that said these were “normal” messages you’d see in a database restored starting from SQL 2005 SP2 and upwards. I read on as I needed to know WHY these messages appeared and BAM, something hit me and sent off alarms:

The whole procedure cache is cleared when certain database level operations are performed in the following scenarios:

  • A database has the AUTO_CLOSE database option set to ON. When no user connection references or uses the database, the background task tries to close and shut down the database automatically.

Auto_close enabled on a database on my server? NOT ON MY WATCH! I quickly jumped over the database options and sure enough not only was AUTO_CLOSE enabled but AUTO_SHRINK as well. For those of you curious as to why I’d freak out about this, these options are really resource intensive and this being a shared instance I really don’t need that hassle. If you’d like to read about how/why these two options are bad check out Tim Ford’s blog at http://www.ford-it.com (aka @SQLAgentman on Twitter) and read his post on Dealing with SQL Shrinkage.

So remember kids: check, re-check and double-check what your vendor is doing when they setup databases on your systems. Ideally they should provide scripts for you to be able to validate and evaluate before you just “slap it in” to your production environment.

Categories
SQL University Syndication

SQL University History Week II: Current Events

pass_logo Welcome back students! In our last lesson we covered the history of SQL Server, the product. This is important stuff to know in order to understand the evolution of the technology you’re working with. SQL Server has made many strides and it continues to do so to this day. Today’s lesson we’re going to cover current events. The reason we’re covering current events is because this past week was the annual conference for PASS called the PASS Community Summit. PASS Summit Unite 2009 is the largest, most focused, and intensive Microsoft SQL Server conference in the world.

Sounds great doesn’t it? Well you might be asking yourself: What is PASS? I’m glad you asked! PASS stands for the Professional Association of SQL Server. PASS is an independent, not-for-profit association, dedicated to supporting, educating, and promoting the Microsoft SQL Server community. From local user groups and special interest groups (Virtual Chapters) to webcasts and the annual PASS Community Summit – the largest gathering of SQL Server professionals in the world – PASS is dedicated to helping its members Connect, Share, and Learn by:

  • Facilitating member networking and exchange of information through our websites, Chapters, annual Summits, regional and local events, and virtual communities
  • Working with Microsoft to influence the evolution of SQL Server products and services
  • Delivering high quality, up-to-date, technical content, presentations, and other educational material for professional development

PASS was founded in 1999 by Microsoft and CA and continues to enjoy executive level endorsement from both organizations. As the number one user community for Microsoft SQL Server, Microsoft looks to the PASS community for valued feedback, input, and inspiration. (Source: About PASS)

If you’ve been following anyone in the SQL community either via Twitter, reading SQL blogs, or browsing around any SQL-related forums you may have noticed a very large buzz in the community about the conference this week. There’s very good reason for this: The PASS Summit is the Superbowl of SQL Conferences (or World Cup for my international friends). This is the one conference during the year where folks from all over the world unite in one place and share their SQL skills, experiences and friendships. The motto for PASS is Connect, Learn, Share and that’s definitely what the Summit embodies. I personally have never been but this year I followed along via Twitter and it almost felt like I was there (Twitter is even funnier when you see the after-hours activities like Karaoke).

There have been a slew of blog posts about why the Summit (and I stress that the conference is called Summit, the organization is called PASS but many mistakingly refer to the conference as just PASS) is so great to attend. This post will try to not turn into one giant PASS Summit commercial but its hard not to gush over how awesome it is when you see all the knowledge shared and how the community rallies together. Suffice to say the annual conference is definitely worth your time and money to try and attend.

Beyond the conference PASS offers much more to the community. As a professional association they offer education resources for all members. How does one become a member? Don’t worry, it’s free and everyone is invited to join! Just follow this link to register. So what kind of learning resources does PASS offer? Well for starters the website offers links to resources to just about anything you can think of from technical articles, webcasts, tips/tricks from the experts, newsletters, tips/resources for speakers and much more. But the website is just the tip of the iceberg! PASS truly is a worldwide organization and that fact can be seen through the proliferation of local and regional SQL Server User groups. PASS has chapters all over the world and with each passing year it keeps growing! You can check the PASS Chapters page and check your region to see if there is a user group in your area. If there isn’t a user group located near you then guess what? You can establish one yourself! To get started on that journey check out the page on what steps are needed to set one up and become an official PASS chapter!

PASS Chatpers Worldwide as of 2009
PASS Chatpers Worldwide as of 2009

Another great resource PASS has established in the past year has been the proliferation of Virtual Chapters (formerly called Special Interest Groups or SIGS). These virtual chapters each have a focus on a different aspect of SQL Server such as Business Intelligence, Application Development, Professional Development, Virtualization, Women in Technology, Performance and Database Administration. These Virtual Chapters act just like local chapters in that they meet on a regular basis but rather than meeting in a physical location they meet online via LiveMeeting. These meetings are great and open to everyone. At these meetings they have someone in the community do a one-hour presentation (much like you would see at a conference or a local user group meeting). These are fantastic, and best of all free, learning resources which helps you advance your knowledge and career!

Another great item to come out of the PASS umbrella are the free, local training events called SQLSaturday. These are free 0ne-day training events modeled after code camp events. At SQLSaturday there are several tracks based on different aspects of SQL Server (i.e. Administration, BI, Development etc.). These events attract speakers from all over and gives a chance for attendees to not only learn about SQL Server and PASS but gives them a taste of the community as well. If you’re interested go check out their events page and see if there is one scheduled for your area!

While there are many, many learning resources for SQL Server out there such as SQL Server Central, SQLShare and SQLServerpedia, know that we are all united when it comes to PASS since we are all members of the same fraternity of data professionals.

In our last class for this week I’ll cover the future of SQL Server, PASS and you!

Continue on to part III

Categories
SQL University Syndication

SQL University:Computer Lab at SQLServerbeta.com

Good afternoon students, this is just a quick announcement to let you know that SQL University (sort of) is offering a computer lab for students to cut their teeth on SQL 2008 technology. I say sort of because this lab is actually offered via a partnership with PASS, Maximum ASP, and DELL Computers at http://www.sqlserverbeta.com .

The labs offer up a virtual sandbox environment where you can discover and practice everything you learn here in a dedicated hosted environment! Here’s the lab description:

The beta team has created a Microsoft® Hyper-V™ based private cloud to host individual instances of Microsoft® SQL Server® 2008 on which you can perform your experiments.  You will have access to a Hyper-V instance and SA rights to a SQL Server Instance. The instance is available to you for three continuous hours and you are welcome to come back and use the beta instance as often as you like.
 
We have included the following sample databases for you to perform your experiment upon:
  • Adventure Works 2008 OLTP
  • Adventure Works 2008 DW
  • Adventure Works 2008 AS
  • Adventure Works 2008 LT

We will be adding additional labs in the coming months in preparation for the release of SQL Server 2008 R2, so check back often.

So how do you get in on this great deal? Well just head on over to http://www.sqlserverbeta.com and Register!

Categories
SQL University Syndication

SQL University:Fall 2009 Syllabus

Listed below is the Fall 2009 Syllabus for SQL University. Please refer back here often as weekly topics/presenters/dates may be subject to change. Each week each professor is asked to present between 2 and 3 articles on a given topic. The days where you see as Optional are listed in case the presenter that week chooses to take advantage of that 3rd day.

For links to each session please check the main SQL University page.

Date Topic Presenter
9/29/2009 Basic Tools Jorge Segarra
10/1/2009 Basic Tools Pt2 Jorge Segarra
10/5/2009 Backups/Restores: Recovery Models Argenis Fernandez
10/7/2009 Backups/Restores: Backups Argenis Fernandez
10/9/2009 Backups/Restores: Restores
10/12/2009 Basic Admin Tasks I
Wendy Pastrick
10/14/2009 Basic Admin Tasks II
Jeremiah Peschka
10/16/2009 Optional
10/19/2009 SQL Internals I
Wendy Pastrick/Jeremiah P.
10/21/2009 SQL Internals II
Wendy Pastrick/Jeremiah P.
10/23/2009 Optional
10/26/2009 Security K. Brian Kelley
10/28/2009 Security K. Brian Kelley
10/30/2009 Optional
11/2/2009 History Week Jorge Segarra
11/4/2009 History Week Jorge Segarra
11/6/2009 Optional
11/9/2009 Indexes/Performance Tuning Josef Richberg
11/11/2009 Indexes/Performance Tuning Josef Richberg
11/13/2009 Optional
11/16/2009 Troubleshooting tips/techniques Chuck Lathrope
11/18/2009 Troubleshooting tips/techniques Chuck Lathrope
11/20/2009 Optional TBD
11/23/2009 Intro to BI: Reporting Govinds Yadav
11/25/2009 Intro to BI: Reporting Govinds Yadav
11/27/2009 Optional
11/30/2009 Intro to SSIS Josef Richberg
12/2/2009 Intro to SSIS Josef Richberg
12/4/2009 <<OPEN>>
12/7/2009 Replication Kendal Van Dyke
12/9/2009 Replication Kendal Van Dyke
12/11/2009 Optional
12/14/2009 Advanced Dev. I Govinds Yadav
12/16/2009 Advanced Dev II Govinds Yadav
12/18/2009 Advanced Dev III Govinds Yadav
Categories
Syndication

SQL University: Basic Tools Pt. II

In Tuesday’s class we covered the different authentication methods as well as did a quick walk-through of the SQL Management Studio interface. In today’s lecture we’ll continue looking at SSMS. Some of the things we look at include how to create a query against a database, brief intro to the Profiler tool as well as a brief intro to the Database Engine Tuning Advisor.

Warning: Video is hosted by YouTube. If you cannot see it your company might be blocking that site. My apologies, I will have an alternative method available in future.

In addition to watching the video you guys have a little bit of homework. Don’t worry, it’s not hard. Just try a few of the things on this list to help you get accustomed to the environment.

  • Connect to your local database using SSMS using Windows authentication
  • Browse to the AdventureWorks Database, Open up the Tables folder and select the TOP 1000 Rows from Person.Address table. In comments below, post the AddressLine1 for AddressID 17.
  • [Extra Credit] Browse to the Security folder, Open up the Logins folder. Create a new login called testlogin. Make it SQL Server authentication, give it password of ‘P@$$w0rd’ (NOTE: Thanks to Brian Kelley for pointing this out. Do NOT use your production servers/databases for this excercise. Also NEVER use password this simple in your production environment…ever. Security will be covered in a few weeks.), make its default database AdventureWorks.

Next week we’ll be covering Backup and Restore with Argenis Fernandez (Blog | Twitter). The full syllabus for the semester will be posted shortly.

Categories
Events PASS Virtualization Syndication Syndication

PASS Virtualization VC Webcast: Virtualizing SQL Servers

For those who don’t know, PASS has several Virtual Chapters. Each VC has its own distinct topic they focus on. The most recent VC established is the Virtualization Virtual Chapter (say that 3 times fast). Our group is dedicated to helping spread the education of virtualization to folks who are thinking of jumping into the virtualization realm with their SQL Servers. We’re pretty excited as we have some top notch virtualization experts such as Duncan Epping (Blog | Twitter), Scott Lowe (Blog | Twitter) and Brent Ozar (Blog | Twitter) who will be syndication their blogs on the Virtualization VC’s blog feed.

Tomorrow afternoon Wednesday, September 30th at 12pm EST | 4pm GMT, the PASS Virtualization Virtual Chapter is proud to host our first webcast featuring Denny Cherry (Blog | Twitter) discussing the pros and cons of moving SQL Servers into a virtual environment. We’ll be talking about when it’s a good idea, when it’s a bad idea, and why there’s no hard-set answers. We’ll be focusing on how to make this decision and how to gather the metrics you need to make a good decision. Audio will be provided through the speakers. This presentation will be presented via Windows LiveMeeting so make sure you arrive early and make sure everything is ready to go on your end. See you tomorrow at the presentation!

Meeting Invite Link: https://www.livemeeting.com/cc/usergroups/join?id=BP7D93&role=attend&pw=x_](2cfJ4

Categories
SQL University Syndication

SQL University: Basic Tools

Welcome to the first day of SQL University. Today we’re going to be talking about basic tools you’ll be using as a database administrator (DBA).

Throughout our lessons you will notice I will be linking heavily to SQL Server Books Online. Books Online is the official documentation for all things SQL Server. This is important to know as many administrators and developers refer to this documentation on a daily basis as well as in everyday conversation. You can access Books Online in one of two ways. One is directly via the website on MSDN or you can actually download Books Online (Click to Download Latest as of 9/23/09) so that you can access and refer to the documentation even when no network access is available. While downloading it for offline use can be beneficial (and portable) be aware that Microsoft does update Books Online with new information which means you would have to download and install the latest version of Books Online when this occurs. The good news is that when you use the local version of Books Online it does ask you up front if you want to use the internet as the first point of reference. Another advantage of having Books Online locally installed is that you can bookmark topics and searches so you can save time if you find yourself referring to a certain topic (which I can almost guarantee you will!). That being said make sure you explore the various links given to fully get the most out of the content delivered here at SQL U.

The most basic tool in the SQL Server toolset for an administrator or developer is a management graphical interface called the SQL Server Management Studio (SSMS). SSMS is where you can access, configure, manage and administrate your servers. The following video walks you through the basics of SSMS so you can become familiar with it. Before you watch the video there are a few things you need to know about SQL Server.

Authentication

In order to connect to a server or database you need to provide it valid credentials. This method is referred to as authentication. SQL Server recognizes two different types of authentication: Windows authentication and SQL Server Authentication. Windows authentication (sometimes also referred to as Integrated Security)  is when you provide SQL Server Windows account credentials. This can be either a Windows domain account (i.e. domainusername) or a local Windows account (i.e. local-machineusername). By default Windows authentication is the default authentication method selected when you open SSMS, and of note, is also more secure. We’ll get in to the hows and whys of that in another class. When you open SSMS, the Windows credentials for the account you are logged into the machine as will automatically pass to SSMS. For instance if I’m logged into my computer as a user called JSEGARRA, that is on a domain called MSDOMAIN, SSMS will open and you will see in the box for username (will be greyed out) MSDOMAINJSEGARRA.

The second method of authentication is SQL Server Authentication (sometimes also referred to as just SQL Authentication). This method of authentication is useful for instances that, for whatever reason, do not have access to a Windows domain account or just a domain in general. SQL accounts are created and kept within the database instance itself.  An example of a use for this type of authentication method would be a database server that resides outside of a company firewall so that the public needs to get to it. Typically these servers are kept in what’s called the DMZ (demilitarized zone), which is an area that belongs to the company but is segregated from the internal network for security reasons. Since the DMZ is outside of the normal network you wouldn’t be able to authenticate with a domain account so instead we use local credentials like a SQL account.

Best of Both Worlds

For those curious, yes you CAN have both Windows authentication and SQL authentication enabled on your database server. This mode is called Mixed mode since you’re mixing both types of authentication methods. Be aware, however, that this increases your attack surface as you’re opening more holes to access your database server. Microsoft best practices recommend using Windows authentication for security reasons (account is managed at domain level, leverage AD groups, etc.).

Video: Walkthrough of SSMS pt 1. (9:02)
Warning: Video is hosted by YouTube. If you cannot see it your company might be blocking that site. My apologies, I will have an alternative method available in future.

Click here to leave course feedback

Categories
SQL University Syndication

SQL University: Orientation

Ok everyone, please take your seats. Thank you. Welcome to SQL University, my name is Jorge Segarra and I’ll be helping you start on your journey to SQL Server. You’re here because you either are curious about SQL Server and wish to start down that path or you’ve become an accidental DBA in your organization and require knowledge to get your new job done. I’ll be one of your online professors along this journey. Since this is the orientation we’ll start with some basics you’ll need for this semester.

School Supplies (aka stuff you’ll need for SQL University):

What I’ll ask of students is that you go over this list and get yourself prepared. First day of class will start on Monday, September 28th and we’ll be covering how to use the basic management tool for SQL Server: The SQL Server Management Studio. In the meantime here’s your homework assignment:

1. Install SQL Server 2008 Express (Runtime with Management Tools)

2. Install AdventureWorks Databases – Download here

NOTE: AdventureWorks is a ficticious bicycle company. The databases are example databases that are commonly used for practice with SQL Server so that students can learn basics from. Please Use the Recommended Download (All Databases.x86.msi)

3. Go through the whole SQL Tutorial on W3 Schools (If you don’t know SQL syntax consider this MANDATORY. If you already know the language and you’d like a refresher go ahead and do the tutorial anyways)

4. Either watch the video (about 34 minutes) or download and read through the Relational Database Theory paper to familiarize with key concepts and theories.

So now that you have your homework let’s cover how SQL University is going to work. I have amassed a few fellow faculty members that will help me out with classes this semester. Each staff member will be blogging on a different beginner topic and tagging their post with SQL University. I will be linking their classes here so you can have a central place to come back to and see all of the great SQL University content at a glance. With each topic/class I ask that students try to be active and ask questions in the comments section of each post. The more questions posted the more answers can get posted and the more we ALL learn!