Feeds:
Posts
Comments

Try researching recovering the master database online and you will see countless references to having to have SQL at the same version and builld level as the backup of the master database.  Since most folks probably don’t have a routine in place to record the version number each time SQL server is patched we need a way to be able to determine the version and build level of our instance.

If you take regular backups of the master database and have to restore to the same instance, you should be ok to not have to worry about the version.  However, if you are having to recover the system database from one instance to another server, then the build version becomes very important.

Imagine the scenario that you get a call from the NOC at 3:00 AM stating an important production server has crashed. You crawl out of bed, remote in and realize that all your SAN LUNS are missing.  You report back to the NOC, they call the SAN administrator and you learn that the LUNS are unrecoverable.  As luck would have it, you have a spare server you can migrate over to but you don’t script out all your user objects so you have to recover the system databases as well.  What version are you on?  10.0.4023 or 10.0.4062  You don’t know.  All you know is SQL 2008 Sp2.

As luck would have it, the boys and girls at Microsoft thought ahead.  This data is stored in the header and we have the ability to retrieve that information.

RESTORE HEADERONLY FROM DISK = ‘DRIVE:\PATH\DB_NAME.BAK’

This will return the SoftwareVersionMajor, SoftwareVersionMinor, and the SoftwareVersionBuild.  For example 10.0.4064.  Pretty neat huh?

Once you have SQL on the new instance installed and patched to the same level, you can start SQL in single user mode, connect to SQL using SQLCMD, and then restore the master database.  There are tons of blogs with step by steps on how to recover the master database.

I hope you never have to use this in production, but you should have plenty of experience practicing this.

In recent months I have been asked to ensure we are auditing both successful and failed logins, not just failed logins.  It is simple enough to open SSMS, connect to the instance, right click on the server, chose properties, click on security and then check the proper radio button.  When putting together or most recent updates to our server installation guide I decided to spend the few minutes to research how to make this change with few steps.

In my case I need this to be both failed and successful logins.  I will execute the following code within SSMS.

EXEC xp_instance_regwriteN'HKEY_LOCAL_MACHINE',
 N'Software\Microsoft\MSSQLServer\MSSQLServer',N'AuditLevel', REG_DWORD, 3 Continue Reading »

Recently I learned that you can and probably should increase the number of SQL Server Error logs that your instance of SQL Server maintains.  This is real simple to change.  You can make the change via the GUI with a few simple steps or accomplish it with TSQL.

To make this change with SSMS, open SSMS, connect to your instance, expand Management, right click on SQL Server Logs and chose Configure.  You can then check the box “Limit the number of error log files before they are recycled” and increase the number from 6 to any number up to 99. 

Using TSQL you can execute the following statement to increase to 99 files, simply change 99 to how ever many files you would like to retain.

USE [master];
GO

EXEC xp_instance_regwriteN’HKEY_LOCAL_MACHINE’,N’Software\Microsoft\MSSQLServer\MSSQLServer’,N’NumErrorLogs’, REG_DWORD, 99;

GO

I recently attended the first micro training event with Red Gate where Grant Fritchey demonstrated a BETA tool called SQL Index Manager.  This tool is aimed at the accidental DBA or for those like me who are just lazy.  :)

It is basically a nice GUI to return your index fragmentation level and makes a recommendation whether you should rebuild or reorganize your index.  An extra nice feature is the ability to fix them right then and there or the tool will generate the TSQL code for you to execute later either manually in SSMS or you can through it into a job. 

A much better long term solution though is to utilize Ola Hallengren maintenance script or the one I like to use written by Michelle Ufford.  Even with me having weekly jobs to interrogate my indexes I have been playing with the SQL Index Manager and taking a look at my databases each day during the week to see how much fragmentation is occuring.  What I have noticed is a few volital tables that could use a mid week or nighly reorg.  Fortunately most of these are tables used in various back end operations and do not impact my end users.

I give this tool two thumbs up and would recommend everyone to download it now while it is free and give it a try.  Keep in mind that this is a BETA release.  This product came out of the down tools week so this product was built quickly but I haven’t found to many bugs other than the random crash here and there.  It is still more stable than most Windows OS’s I have worked on. 

Check out RedGate SQL Index Manager

I have the privilege of attending SQL Skills Immersion Event week one in Atlanta GA this week.  My expectations were high since it is SQL Skills.  Paul and Kimberly are two of the most respected SQL Server professionals in the business and have quite a few years under their belt with working with SQL Server.  What ever my expectations were coming into the event, they were met and exceeded.  I was somewhat concerned that the level of content would be far above my level of comprehension and that many things would be over my head.  That hasn’t been the case.  The flow of information is at such a pace that everyone can keep up and they take the time to fully explain the more complex topics.

For anyone that is thinking about attending more advanced SQL training to progress your career, the Immersion Events are worth the price of admission.  The only downside is there are 4 different weeks of training and most companies wont pay for someone to attend all 4 weeks in one calendar year.  If you are like me, you get one week of training, that means it would take me 4 years to get to attend all of it.

If you haven’t attended a SQL Skills Immersion Event or don’t know about them, then check out the SQL Skills website.  For one, you should already be familiar with Paul, Kim, and Jonathan’s blogs and you should also be a SQL Skills insider.

Be on the lookout for some upcoming blogs on many of the new things I have learned this week.

The time following the PASS Summit has been absolutely crazy for me.  Upon returning home I spent some much needed time with my wife and kids and returned to work on Monday.  During my normal lunchtime activity of playing racquetball I sustained a very nasty injury to my eye.  This put me out of commission for a couple of weeks.  I am still having issues and will ultimately have to have surgery.  Yuck.

On the work front things have been just as crazy.  We had a very high profile project that I got pulled into that required being pulled out of my office for a week and working day and night. The hours were very long but the project was awesome to work on.  I got to work with so many different areas of our IT department and learn a great deal about a tool called WireShark.

I was also recently promoted to Database Administrator Lead.  I have four other DBA’s on my team that I get to help mentor and support.  This is a huge honor for me and right in line with my desire to pay it forward.  I have spoken at numerous SQL Saturdays this year as well as leading a PASS Chapter.  Now I get to influence others in my company as a job responsibility.  :)

I have been working with Central Management Server and exploring Policy Based Management.  Over the next few weeks I should have it elevated into production to help better manage my environment.  I picked up several tips and tricks during the Summit.  I may have to dig out my notes from the sessions since it has been awhile.

This week I have been spending time in Atlanta attending SQL Skills Immersion week one.  I hope to be able to attend week two in Tampa early next year.  I have attended various training over the past decade from various places but hands down, SQL Skills provides the best content and training method I have ever experienced.

 

I started out day three after the keynote by attending Adam Machanic session on Query Tuning.  I must say that I will need to watch this session again once I can stream it.  There was way to much good information being given for me to remember it all and couldn’t take notes for fear of missing something.  Double edge sword I suppose.  Didn’t take notes but couldn’t remember everything I heard either.

Lunch was set up with birds of a feather style where you could sit at a table with industry experts.  Since I am in need of setting up PBM and CMS when I get back to the office I sat with Jorge and Colin.  Learned a few things as well as getting a full belly.

After lunch I dropped into Glenn Berry’s session on Scaling SQL Server.  Glenn presented some great information that all system admins and architects should also hear.

Next I went to John Sterrett’s session on CMS and PBM.  Combine that with attending Jorge’s session on PBM in a nutshell and I truly feel like I can get this PBM project underway when I get back to work on Monday.

All in all, Friday was a successful day for me to walk away with much more knowledge than I started with.

 

Summit Sessions Day 2

Day two of sessions only had me attending three sessions.  One of them was 3 hours.  I started out after the keynote attending Klaus’s session on Advanced SQL 2008 troubleshooting.  Klaus had a huge crowd and covered some really good information.  I picked up a couple of new tips to apply when I get back to work next week.

My second session was probably one of the best I attended.  Thomas LaRock put on a sessions titled “Performance Tuning Made Easy”.  LaRock covered the method and framework for troubleshooting.  This really hit home for me.  I have attended numerous sessions on indexing, performance tuning with DMV’s, etc.  LaRock covered a step by step approach to troubleshooting that I will be implementing when I get back.

I finished out the day with Paul Randal in his Myth Busters session.  Paul always draws a crowd and puts on a great show.  Paul helps debunk common myths that are floating around.

There were several social events after day two of the sessions.  Idera had a happy hour at the Tap House, SQL Sentry put on an event at Pike Brewing Co, and Red-Gate had a dinner for the Friends of Red-Gate.  The Friend of Red-Gate dinner was at FareStart.  There is a wonderful story around FareStart where they take in homeless and nearly homeless folks and put them through culinary school.  The restaurant prepares 2500 lunches 7 days a week to be distributed around Seattle.  It is an amazing foundation.  This has inspired many of us to do something different within the SQL Community.  I spent a few hours with a couple of key people that have the resources to put together an amazing program.  I am looking forward to seeing something develop with them over the next several months.

Day two was a success for me.

The keynote started out with Rob Farley and Buck Woody singing an awesome song about a slow running query.  What a great way to start out the day.  Next Wayne Snider was recognized.  He spoke at his first summit in 1999.  Both Wayne and Rick Heiges are rolling off the PASS board this year.  Wayne gave a good roast of Rick and congratulated him on helping create the 24 hours of PASS.  Well done Rick.

Wayne got a bit emotional up on the stage which he said was either gratitude or intergesten .  Wayne gave a great quote “As you slide down the banister of life, may the splinters of success stick in your career”.  Here’s to Wayne for making such an impact on the SQL Community.  Thanks for all you have done.

May 10th – May 11th – SQL Rally.  SQL Saturdays are everywhere.  PASS Summit 2012 will be November 6 -9th in Seattle WA.  Two days of pre-cons starting on Nov 5th.  $995 for Summit $1395 includes both days of pre-con’s.  Free ebook by Manning on MVP Deep Dives collection.  This is a combination of both MVP Deep Dives books.  It is 96 pages and FREE.

Birds of a Feather lunch is today.  This is always a huge hit.

Last day to get the DVD set for $125 plus S/H.  That is only $.73 per session.

David Dewitt came on stage to the largest applause yet.  He is clearly a fan favorite.  David created two new hash tags so we can tweet which specs we want him to wear.  This data will be analyzed as big data.

What is big data?  Think pedabytes.  2700 nodes and 60 PD’s is what Facebook deals with.  Now that is BIG DATA.  Estimates for the worlds data is 35 ZB by 2020.  That is enough dvd’s to be stacked almost to Mars.  What is generating the increase?  More data, web searches, tweets, people realizing data is to valuable to delete, and the cost of storage is decreasing.  The old guard (ebay) uses 10 PB on 256 nodes, young turks (facebook) use 20 PB on 2700 nodes, Bing 150 PB on 40k nodes.

NoSQL does not mean NO to SQL.  It’s really to say Not Only SQL.  So why NoSQL?  More data model flexibility.  JSON as a data model, No “schema first”, relaxed consistence models.  They are willing to trade consistency for availability.  Low upfront software costs. The folks just don’t understand SQL.  (applause from the audience)

We now have two universes.  Structured and Unstructured.  Relational DB and NoSQL Systems.  ACID and NoACID.  Relation DB’s provide maturity, stability, efficiency.  NoSQL provides a large amount of flexibility.

This is not a shift to a new DB platform.  SQL is not going away.  RDBMS will dominate transaction processing and ALL small to medium sized data warehouses. Many business will end up with data in both universes.

Dr Dewitt started explaining how Hadoop came to be and how it stores data by splitting large files into smaller chunks and storing them across the cluster nodes.  They are stored in a file system.  Based on its method of storing the data on clusters in different racks with different switches fault tolerance and speed are great.  One of the nodes could actually be in another datacenter.  Sounds like some complicated algorithms making this happen.

When a datanode fails, the data that was stored on that node are then stored on other available nodes in the cluster.  When a new node is brought back online the file system will start spreading the data around to this new node.  These events are all down under the covers.

Pro’s – Highly fault tolerant, relatively easy to write, MR framework removes burde of dealing with failures from programmers.

Con’s – Schema embedded in application code, a lack of shared schema.

Dr Dewitt went on to say that Facebook created HIVE and Yahoo created PIG in order to query Hadoop data.  MapReduce jobs are difficult to write when you have to join data.  Tables in HIVE or more relation DBMS like with data stored in tables.

Connecting the universes – Sqoop.  Reasons were stated on why we would want to connect the universes such as being able to use procedural language to query.  You may also need to access data that is in both relational and NoSQL environments for the business need.  Makes sense to me.

Ok, so I got caught up in Dewitt’s speech and didn’t type as much.  He basically laid it all down on how Hadoop stores all the data.  He covered the pro’s and con’s of it all.  Very well done.  I suggest everyone who is interested to stream the keynote from the SQLPASS.ORG website.  It is recorded and available.  Really good stuff.

Basically to sum it up – NoSQL tools: Hive, Pig, and Sqoop. We learned their history and some of the things they are useful for. NoSQL = Not Only SQL.  Relational Databases are not going anywhere and there is a market place for both.  There are now TWO universes.  Structured and “Not So” Structured.

Watch the keynote.  One of the final slides is worth it alone.  Great visual aide.

The keynote started out with Bill Graziano taking to the stage in a kilt and declaring that the second day of the PASS Summit is now officially SQL Kilt day.  Bill asked everyone in a kilt to stand up.  It had to be a record number of men in skirts today.

Lori Edwards was recognized for her volunteer work and received the PASSion award and myself and Jack Corbett were highlighted as Outstanding PASS volunteers.  It was awesome being asked to stand and getting applause from 1000′s of data professionals.  It was very humbling.

Bill also went over some financials.  Looks like the community involvement spending has increased ALOT.  It is obvious to me that more funding into SQL Saturday’s, 24 HOP, and other events are helping to grow the PASS Community a great bit.

Quentin Clark took to the stage with a lot of iron sitting in racks behind him.  He kindly told all of us to drop the name “Denali” and refer to it as SQL Server 2012.

Bob Erickson – Executive VP of Interlink Transport Technologies – #2 transporter in the world.  Bob discussed how mission critical the data for his company is with having to route containers to port authority and the sheer volume of data.  Zero downtime is a huge requirement.  Downtime means shipments stop.  Microsoft implemented an always on solution for them to assist with there mission critical systems.

During the live demo of Always On which is one of the more favored new features of SQL 2012 the presenter was doing a great job covering the product but no one could see his slides.  Twitter lit up with everyone asking for them to use Zoomit to zoom into the areas of the slides so we can see what he is typing and highlighting.  When the presenter finally caught on and stated he was going to use Zoomit, the audience erupted into a very loud applause.  The SQL Community is awesome isn’t it.

ColumnStore Index was covered next.  Very slick technology that will really help out in the BI stack.
Lara Rubbelke took to the stage and teased us with more Excel demos.  When Lara came out a round of applause went out.  Still some issues with the color scheme of the slide deck for those of us in the audience but she quickly brought out Zoomit so we can all see what she is featuring and typing.  Well done Lara.  During her demo she highlighted data quality issues with Radio Shack being placed in the middle of a lake.  The purpose was to show how the knowledge base works.  Rather cool way to demo this feature.  With the columnstore index she drastically reduced the time the query for the report took to run.  47 seconds down to .3 seconds.  Not bad huh?

SQL Server Appliances are being optimized and pre-tuned.  Organizations being able to go out and purchase a BI appliance to implement an enterprise data warehouse is truly awesome.  Imagine purchasing a SQL 2012 Parallel DW appliance to implement a multi terabyte end to end BI solution.  No more guessing with configuration, hardware, installation.  Over 480 cores for scale out ability.  HP’s enterprise DW appliance was shown and stated you can scale to 700 TB of data.  1-5 TB of DW space can fit in a single 6U unit.  That is six inches of rack space.  This is a great solution for small to mid size companies.  From the box to DW is only 20 minutes for the setup.  This should really help everyone get a BI Solution up and in place.  An HP Business Decision Appliance is as small as a 1U server.

HP Database Consolidation Appliance.  Can order within the next month.  First private cloud appliance available on the market.  Extreme availability, enough spares that you don’t worry when a drive fails.  A full rack contains 2TB of ram, 192 cores, 400 disks with 60k IO’s available.  You can start with a half rack in order to be able to scale out to a full rack.  The max scale out is yet known.  HP has yet to reach the limit.  Want 10 units to build a POD, no problem.  WOW.  The speaker said “We have yet to build the biggest one”  Kinda funny and was pointed out on twitter by Brent Ozar, “The biggest one you have built is the biggest one”.  HA

Michael Rys – Principal Program Manager.
Started out showing his book collection and of course did a shameless plug for his own book.  If you got it, flaunt it I guess. Semantic Search results was highlighted by pulling out keywords and displaying them of different books.  Semantic Search looks at the language models of documents and will determine keywords.  Pretty neat stuff.

SQL Server Data Tools (formerly “Juneau”) will ship with SQL Server 2012.  This was met with lots of fan fair from the audience.  The tools are unified across database and BI.

A sweet new feature demo’d was connecting directly to SQL Azure storage from within SSMS.  SQL Azure Federations also were shown today.  Many folks got really excited as this enables more scalability.  A new Metro UI theme has been very dominant during the demo’s yesterday and today.  It appears this will be a new “feature”.  There is a mixed response to the new GUI.

New CTP’s for SQL Azure Reporting and SQL Azure Data Sync are available today.  Coming end of year SQL Azure Federation, New Management Experience, and data size increase to 150 GB.

Older Posts »

Follow

Get every new post delivered to your Inbox.

Join 424 other followers