PASS 2012 Countdown – 3 Weeks To Go

Another week down and there are now 3-weeks until this year’s PASS Summit.  Take a moment and register now if you haven’t.  It’s really easy to do, click on the banner below and enter your information and your manager’s credit card information.  She called me earlier today, go ahead and do it.  No, really…

Like last week, I’m adding in a dumb video with a SQL theme.  Hopefully it’s a little more bearable than last weeks.

Evidently, I need to record these with a better sound system.

After talking about the during the day at the PASS Summit, this post is going to help you figure out some of the PASS Summit night life.  Because there is one thing for certain, when the exhibition hall closes and the last presentation of the day is finished, there is still networking and learning to be had.

To start making your plans, there are a few things to keep in mind.  While you make you plans consider these:

  1. Participating in after hours activities does not require being a party animal
  2. Hanging out in your hotel room is not an after hours event
  3. Going to a movie is the wrong kind of after hours event
  4. You don’t need to be invited to come and join people

One of the first times that I went to PASS, I had no idea what to do after the sessions ended.  I didn’t really know anyone but my co-worker that was there and we weren’t the most social people.  In many situations, my natual introversion takes over and I become a wallflower.  So that year, we went to a few events – left early and actually considered a movie one night, but instead went back to our smelly hotel room.  This was not a good example of leveraging the networking opportunities at PASS.

The PASS Summit is only a week and you can’t push off the opportunity to hang out with the people there for a week.  So, what are you supposed to do at night?

Scheduled Events

First, let’s look at the events that are scheduled:

Sunday, November 4

TBD Photowalk #1 An annual event that is hosted by Pat Wright, you get a tour of some great Seattle sites and an opportunity to learn a little more about photography.

Monday, November 5

6:00pm Monday Night Networking Dinner – Meet people that want to meet other people.  It’ll probably be easier to meet new peers here than it is to add people to your newest Google+ circle.

Tuesday, November 6

TBD Photowalk #2 Same event on a second day and also hosted by Pat Wright.
5:30pm First Timers Orientation and Networking Session – If this is your first time at PASS, you should be here.  A little anxious?  Suck it up – so is everyone else.  That’s the dirty little networking secret – almost everyone else is as nervous as you may be at networking.
6:30pm PASS Summit 2012 Welcome Reception and Quiz Bowl – It’s fun.  It’s questions.  It’s a chance to see my Quiz Bowl team not win anything.
8:00pm Exceptional DBA Awards Party – Want to throw down a few cards and chips.  This is the place to be.  A room full of hopes dashed by the cards.  Hang out and share your luck with other SQL Server professionals.  Also, watch the awards ceremony for this year’s Exceptional DBA.

Wednesday, November 7

6:30am PASS Summit 2012 #SQLRUN - If you like to run and want to make a few friends in the SQL Server community, then check out this year’s SQL Run by Jes Borland.
6:15pm
Exhibitor Reception – Vendors and free food.  Listen to some of them talk and maybe find out your new project is just a purchase away from completion.  Or not… “dude, it’s free food”.
9:00pm SQL Karaoke – This is probably my favorite evening event.  Jager and singing.  The event starts at 9:30 when the KJ arrives and goes until the bar shuts down.  Get here early, because it tends to get packed and it will be standing room only after a while.  I can pretty much guarantee that you’ll find me onsite with a table by 9:00 so come down and visit before the real fun starts.

Thursday, November 8

6:45am Breakfast Presentation – While not necessarily an after hours event, you can jump in for a morning breakfast and a little education from Fusion IO and SIOS Technology on “Meeting the Most Demanding SQL Server Performance and High Availability Requirements without Going Broke.”
6:30pm Colorado PASS Summit 2012 Dinner - An event for attendees from Colorado or wanting to network with people from Colorado.  Join in for some dinner and networking.
7:00pm Community Appreciation Party – Seattle’s Experience Music Project for some free food, drinks and music.  Join in for a light dinner and drinks, live band Rockaraoke, rock star simulations, and more at this interactive venue featuring some of rock music’s most celebrated memorabilia!

Unscheduled Events

Of course, how can I tell you about unscheduled events.  Honestly, I can’t because by their nature they haven’t been scheduled.  This is where you come in.  At anytime, there are probably 5 or more people from PASS at whatever venue that you visit.  Look around and see, you may find a peer just around the corner.  Get together, share a table, then pull together a few others and a couple more tables.  And it is on… like Donkey Kong.

To help get unscheduled events going there are a few places that you may want to gravitate towards…

If you see a group of people, ask to join in.  Most of us don’t bite.  A good way to plan your evening itinerary is by finding out where people are on Twitter or FourSquare.


Follow me on Twitter at StrateSQL.

Posted in Conference, PASS, SQL Server, SQLServerSyndication | Tagged , , | Leave a comment

Indexing Book Winner

Back on October 3, I put up a post about a free indexing book.  And specifically about Expert Performance Indexing for SQL Server 2012; which I wrote earlier this year  with Ted Krueger (Blog | @Onpnt).

I forgot to mention it, but Sarah Strate (Blog | @DanceM0m) drew a winner on Monday and I shot off an e-mail for the winner.  I’m still waiting for a reply, but if I don’t get one, we’ll choose a new winner on Friday.


Follow me on Twitter at StrateSQL.

Posted in SQL Server | Tagged | Leave a comment

Lost in Translation – Deprecated System Tables – sysfulltextcatalogs

4957867646_2f2478fd69_m5 This post is part of a blog series which focuses on translating compatibility views in SQL Server to their respective dynamic management objectsYou can find a list of all of the deprecated views in the introduction post.

The compatibility view sysfulltextcatalogs is used to describe full text catalog.  For every catalog in the database there is one row returned from the compatibility view.

The catalog view sys.fulltext_catalogs replace sysfulltextcatalogs.  Like the compatibility view, there is one row returned for every full text catalog from sys.fulltext_catalogs.

Status Column

The compatibility view contains a single status column.  The status column contains only one know value; which is 0×1 to indicate if it is the default catalog.

Query Via sysfulltextcatalogs

With only the one value in the status column, queries against sysfulltextcatalogs are fairly simple.  Using the query, provided in Listing 1, a query against the compatibility view contains the other three columns in the view without any formatting.  The value in pathcolumn will be NULL if the path for the fulltext catalog is in the default location.


--Listing 1 – Query for sys.sysfulltextcatalogs
SELECT  ftcatid
      , name
      , path 
      , CONVERT(INT,status & 0x1) / 1 AS is_default
      , status
FROM sysfulltextcatalogs

Query via sys.fulltext_catalogs

In similar fashion, queries against sys.fulltext_catalogs are also fairly simple.  As the query in Listing 2 demonstrates, the status column is replace is the is_default column.  Beyond that, the other three columns from the compatibility view are fully represented with a single name change with the ftcatid column.  In addition to the columns from the original compatibility view there are some new properties exposed in the catalog view.  There are values to identify the accent sensitivity, file group, file, principal that owns the catalog, and import status for the fulltext catalog.


--Listing 2 – Query for sys.fulltext_catalogs
SELECT  fulltext_catalog_id AS ftcatid
      , name
      , path
      , is_default
      , is_accent_sensitivity_on
      , data_space_id
      , file_id
      , principal_id
      , is_importing
FROM sys.fulltext_catalogs

Summary

In this post, the use of sysfulltextcatalogs over sys.fulltext_catalogs was reviewed.  Making the change from the compatibility view to the catalog view is a fairly simple task with only a single column needing to be renamed. After reading all of this, do you see any reason to continue using sysfulltextcatalogs?  Is there anything missing from this post that people continuing to use the compatibility view should know?


Follow me on Twitter at StrateSQL.

Posted in SQL Server, SQLServerSyndication | Tagged , | 1 Comment

Lost in Translation – Deprecated System Tables – sysforeignkeys

4957867646_2f2478fd69_m5 This post is part of a blog series which focuses on translating compatibility views in SQL Server to their respective dynamic management objectsYou can find a list of all of the deprecated views in the introduction post.

The compatibility view sysforeignkeys returns information on the columns in foreignkeys.  Each row represents the relationship between each column in foreign key relationships.  With the keyno column indicating the order of the columns within the constraint.

Sysforeignkeys is replaced by the catalog view sys.foreign_key_columns.  Like the compatibility view, the catalog view also represents each row of constraint relationships in it’s output.

Query Via sysforeignkeys

Contrary to many of the other compatibility views, the information represented in sysforeignkeys is done so quite simply.  There are columns identifying the relationship, parent, and child tables.  And then columns for the rows in the parents and columns that are related and their order.  The query in Listing 1 is one commonly used to retrieve information from sysforeignkeys.


--Listing 1 – Query for sys.sysforeignkeys

SELECT constid
,fkeyid
,rkeyid
,fkey
,rkey
,keyno
FROM sysforeignkeys

Query via sys.foreign_key_columns

As simple as sysforeignkeys is to access, sys.foreign_key_columns is just as easy.  Save for the renaming of the columns, the information returned is identical in all other respects.  Using the query in Listing 2, the same information on foreign keys can be retrieved.  The one thing a little more simple about sys.foreign_key_columns is the added clarity in the name of the catalog view and the names of the columns


--Listing 2 – Query for sys.foreign_key_columns

SELECT constraint_object_id AS constid
,parent_object_id AS fkeyid
,referenced_object_id AS rkeyid
,constraint_column_id AS fkey
,parent_column_id AS rkey
,referenced_column_id AS keyno
FROM sys.foreign_key_columns

Summary

In this post, the use of sys.foreign_key_columns was discussed as an alternative to sysforeignkeys.  With a very small amount of code change, the upgrade from one to the other is quite simple.  After reading all of this, do you see any reason to continue using sysforeignkeys?  Is there anything missing from this post that people continuing to use the compatibility view should know?


Follow me on Twitter at StrateSQL.

Posted in DMO, SQL Server, SQLServerSyndication | Tagged , | 2 Comments

Last Weeks Top 10 “Reading” Links

2012-01-013

Throughout the week, I like to tweet links to the things that I’ve been reading.  Since they all come out through out the day, I figured that I’d share a list of those that were most popular last week.

Last week’s top 10 “Reading” Links

  1. Adam Machanic : Thinking Big (Adventure) [21 clicks]
  2. Conor vs. Join Algorithms – Conor vs. SQL [20 clicks]
  3. Conor vs. Optional Parameters – Conor vs. SQL [10 clicks]
  4. Once More With Feeling: Stop Using Active/Passive and Active/Active | SQLHA [9 clicks]
  5. Most common latch classes and what they mean [9 clicks]
  6. Kevin Kline : Understanding SQLIOSIM Output [9 clicks]
  7. Interviewing a DBA [9 clicks]
  8. Changes to automatic update statistics in SQL Server [9 clicks]
  9. Flipping Bits: Enterprise Flash Drives: not just performance [9 clicks]
  10. Multiple log files and why they’re bad [8 clicks]

Follow me on Twitter at StrateSQL.

Posted in SQL Server, SQLServerSyndication | Tagged , , | Leave a comment

Ask the Unicorn: How to become a DBA?

Every now and then I get a question in e-mail and I usually just reply and leave it at that.  I figured since I’m spending the time to answer the questions, I might as well wrap them up and share them with others. And, yeah, this is a good place to tie that unicorn mask into my blog.

Recently I received the question below from someone that is at a consulting firm doing mainly SQL development work:

The question I have is I really want to learn more and dive deeper into SQL and I do not feel that I am getting that where I am at. I am looking for any suggestions you may have for me to break into a program/role where I can learn from a DBA or how to become a DBA. I have the base knowledge but I want to learn more on the administration side. Any help or suggestions you can give me would be greatly appreciated.

The most traditional way to get the DBA experience is to move back into a role outside of consulting where you get to manage an environment. This can provide that deep DBA knowledge that you are looking to gain.  You’ll likely need to find an employer that is looking for a DBA that can work across both DBA and SQL Developer skillsets, where you can emphasize the second as a reason to overlook some of the missing knowledge in the former.  Unfortunately, this is a good way for a consultant to go batty since one of the main reasons for going into consulting is to get around and see new environments.

As an alternative to that, I would look at two strategies. First, identify information and skills that DBAs know and are good at. For instance, disaster recovery and performance tuning. Then just learn all that you can about the topics. Speak on them. Write about them. Talk to others on the topics. Basically, form your processes to accomplish them and get others to validate. Then use your peers to guide you along best practices. This will build the basis of knowledge that you’ll need as a DBA.

The second strategy is to try and apply that knowledge.  Push your firm to adopt an OLTP practice. With this, you they can attract other DBAs that you can learn from and provide engagements that will be important to being a DBA.  As a consultant, this is really where the fun DBA work often is. Most of us don’t like to be on-call – but we enjoy leveraging our knowledge and skills to build the right environment and make the performance scream. Help your company move toward engagements that emphasize the upside of the DBA skillset. Some of these will be assessments where you evaluate the configuration and utilization of environments. You can check the HA/DR plans to validate that they work as intended. Offer performance and index analysis services to leverage your experience with other clients with new clients.

The concern may be that you don’t know enough to help in all cases. When we go to clients, their DBAs often have well thought out reasons for the way things are – our goal there is to challenge the assumptions but not the intellect.  There will be differences in opinions at times.  But this is where you can bring value.  With consulting it is often easier to build a network of professionals with vast expanses of knowledge and experiences.  We can leverage that for our clients and bring in the information and view points that the client’s own DBAs may not have considered.  In the end, we will make the DBA and environment better, and learn, for ourselves, a bit more about how to engage future clients.


What do you think? What advice would offer to someone that asked the same question? Leave your replies in the comments below. Also, if you want “the unicorn” to answer a question in a future post, send me a message on LinkedIn or at AskTheUnicorn.


Follow me on Twitter at StrateSQL.

Posted in Q&A, SQL Server, SQLServerSyndication | Tagged , | Leave a comment

Lost in Translation – Deprecated System Tables – sysfiles

4957867646_2f2478fd69_m5 This post is part of a blog series which focuses on translating compatibility views in SQL Server to their respective dynamic management objectsYou can find a list of all of the deprecated views in the introduction post.

The compatibility view sysfiles returns one row for every file that is associated with a database.  The data returned is scoped at the database level.

The catalog view sys.database_files is the replacement for sysfiles.  Like sysfiles, sys.database_files returns one row for every file that is associated to a database.

Status Column

The compatibility view contains a single status column.  According to Books Online, there are only three properties exposed through the status column.  A little research, though, indicates there are more than those stored within the column.  The values that have been uncovered so far are:

  • 0×1:Default device (no longer used)
  • 0×2:On disk file
  • 0×10:Indicates if media is read only
  • 0×40:Indicates if file is the transaction log
  • 0×80:Indicates if file has been written to since last backup
  • 0×1000:Indicates if file is read only
  • 0×4000:Indicates whether device was create implicitly by CREATE DATABASE
  • 0×8000:Indicates whether device created during CREATE DATABASE
  • 0×100000:Indicates whether the growth rate is a percentage
  • 0×10000000:Indicates if the file contains sparse data
  • 0×20000000: Indicate if the file is offline

Query Via sysfiles

When querying the data from sysfiles, there are a few things that need to be taken into account.  First, there are a number of values stuffed into the status column.  These values need to be retireved to understand all of the properties for the files.  Second, while there are a number of values, not all of them are in use any longer and refer more to constructs that are no longer a part of SQL Server today, such as media devices for databases.  Along with that, some methods of identifying the state of a file, such as device_created_implicitly_by_create_database, are vague and may not be well suited as a flagged item.  The last item is the perf column, this column is reserved for internal use and appears as a 0 in all examples found. The query to retrieve the information from sysfiles can be found in Listing 1.


--Listing 1 – Query for sysfiles
SELECT fileid
,groupid
,size
,maxsize
,growth
,name
,filename
,CONVERT(INT,status & 0x10) / 16 is_media_read_only
,CONVERT(INT,status & 0x1000) / 4096 is_read_only
,CONVERT(INT,status & 0x100000) / 1048576 is_percent_growth
,CONVERT(INT,status & 0x10000000) / 268435456 is_sparse
,CONVERT(INT,status & 0x40) / 64 is_transaction_log
,CONVERT(INT,status & 0x20000000) / 536870912 is_offline
,CONVERT(INT,status & 0x1) / 1 default_device
,CONVERT(INT,status & 0x2) / 2 disk_file
,CONVERT(INT,status & 0x80) / 128 is_file_written_to_since_backup
,CONVERT(INT,status & 0x4000) / 16384 device_created_implicitly_by_create_database
,CONVERT(INT,status & 0x8000) / 32768 device_created_during_database_creation
,status
,perf
FROM sysfiles

Query via sys.database_files

Since the catalog view view sys.database_files presents the previously mentioned status columns directly in the view, the query for this information is quite simple.  As shown in the query in Listing 2, most of the columns from sysfiles are present in the query. There are some exceptions to this though.  First, the perf, media, and device details, which are obsolete, are no longer represented.  Second, instead of using flag to represent things like device created during CREATE DATABASE, there are columns that indicate the LSN of when these events occurred.  In total there are twelve LSN events tracked that can provide the information previously flagged but with greater granularity.


--Listing 2 – Query for sys.database_files
SELECT file_id
,file_guid
,data_space_id as groupid
,size
,max_size
,growth
,name
,physical_name
,is_media_read_only
,is_read_only
,is_percent_growth
,is_sparse
,type
,type_desc
,state
,state_desc
,is_name_reserved
,create_lsn
,drop_lsn
,read_only_lsn
,read_write_lsn
,differential_base_lsn
,differential_base_guid
,differential_base_time
,redo_start_lsn
,redo_start_fork_guid
,redo_target_lsn
,redo_target_fork_guid
,backup_lsn
FROM sys.database_files

Summary

In this post, we discussed the use of sys.database_files instead of sysfiles.  While the information presented is quite simple, there are some nuances with some of the flags and ways in which SQL Server has changed how the files are organized.  But with anything using sysfiles with SQL Server 2012, the obsolete properties shouldn’t be an issue.  After reading all of this, do you see any reason to continue using sysfiles?  Is there anything missing from this post that people continuing to use the compatibility view should know?


Follow me on Twitter at StrateSQL.

Posted in DMO, SQL Server, SQLServerSyndication | Tagged , | 1 Comment

Reblog: October 5 to October 11

BookWelcome to this Friday’s reblog summary post.  The aim of these posts is to bring some old posts that newer readers may not have seen back to the forefront.  As with many technology blogs, just because a post is old, doesn’t mean it doesn’t still have value.

Some posts from years gone by that you may have missed are:

And I sure can’t let these two die off…

Do you have something from years gone by that was posted during this week?  If so, leave a comment below and we’ll give some new life to good knowledge.


Follow me on Twitter at StrateSQL.

Posted in SQL Server, SQLServerSyndication | Tagged , | Leave a comment

24 Hours of PASS Recordings Online

This just in… the 24 Hours of PASS sessions are in and available for streaming.  If you missed an hour or ten of the learning goodness, now’s your chance to go back and see what you missed.

In case you missed it, you can check out my session, which was broadcast at 2 AM CST, now as well.  It’s a subset of what I’ll be covering at the PASS Summit – so if you want the teaser, check it out.

Session 20 - Digging Into the Plan Cache
Presenter: Jason Strate
Download presentation slides (PDF)

And if you don’t want the teaser… then just check out the other sessions.


Follow me on Twitter at StrateSQL.

Posted in 24 Hours of PASS, PASS, SQL Server, SQLServerSyndication | Tagged , , | Leave a comment

Lost in Translation – Deprecated System Tables – sysfilegroups

4957867646_2f2478fd69_m5 This post is part of a blog series which focuses on translating compatibility views in SQL Server to their respective dynamic management objectsYou can find a list of all of the deprecated views in the introduction post.

The compatibility view sysfilegroups returns one row for every filegroup in a database.  Filegroups are used as collections of files that are associated with databases and are used to help determine where data will be placed on disk.  Every database will have at least one filegroup.

The replacement for sysfilegroups is the catalog view sys.filegroups.  Similar to sysfilegroups, this catalog view returns all of the filegroups that are associated with a database.

Status Column

The compatibility view contains a single status column.  The status column contains two possible values.  These values are:

  • 0×8:Read only
  • 0×10: Default filegroup

Query Via sysfilegroups

After considering the status column, the query to access the data in sysfilegroups is fairly simple.  Using the query in Listing 1, we can see that the two case statements can be used to extract whether the filegroup is read only and the default filegroup.  There is an additional column, allocpolicy, that is included for completeness but offers no values.  This is an internal column which no longer has a use case in SQL Server.


--Listing 1 – Query for sys.sysfilegroups
SELECT f.groupname
,f.groupid
,CASE WHEN CONVERT(INT,f.status & 0x8) = 8 THEN 1 ELSE 0 END as is_read_only
,CASE WHEN CONVERT(INT,f.status & 0x10) = 16 THEN 1 ELSE 0 END as is_default
,f.allocpolicy
,f.status
FROM sysfilegroups f

Query via sys.filegroups

All of the columns needed to map sys.filegroups to sysfilegroups are included in the former by default.  The status column does not exist, similar to other catalog views, instead it is replaced with the columns is_read_only and is_default.  The query to provide this information is included in Listing 2.  Along with the base columns needed to replace sysfilegroups, there are a few other columns of interest.  The first are type and type_desc, these two columns are inherited from the catalog view sys.data_spaces; which is the parent catalog view for filegroups, partition schemes, and filestream data storage.  The value in sys.filegroups will always be those for filegroups.  The other column is filegroup_guid which provides a uniqueidentifier value for non-PRIMARY filegroups.


--Listing 2 – Query for sys.filegroups
SELECT name
,data_space_id
,is_read_only
,is_default
,type
,type_desc
,is_system
,filegroup_guid
FROM sys.filegroups

Summary

In this post, we discussed the use of sys.filegroups instead of sysfilegroups.  The jump between the two isn’t that extreme.  As long as you haven’t fashioned some manner to leverage the internal column allocpolicy, if should be an easy upgrade between the two.  After reading all of this, do you see any reason to continue using sysfilegroups?  Is there anything missing from this post that people continuing to use the compatibility view should know?


Follow me on Twitter at StrateSQL.

Posted in DMO, SQL Server, SQLCLR | Tagged , | Leave a comment