SQLAuthority News – SQL Server 2012 Upgrade Technical Guide – A Comprehensive Whitepaper – (454 pages – 9 MB)

May 16th, 2012 by Pinal Dave

Microsoft has just released SQL Server 2012 Upgrade Technical Guide. This guide is very comprehensive and covers the subject of upgrade in very much depth. This is indeed a great detailed white paper. Even writing a summary of the whitepaper would be over 100 pages. SQL Server 2012 is quite a important release from Microsoft. This white paper discusses how to Upgrade from SQL Server 2008/R2 to SQL Server 2012. I love that it starts with the most interesting and basic discussion of upgrade strategies: 1) In-place upgrades, 2) Side by side upgrade, 3) One server, 4) Two server. This whitepaper is not just a theory but excellent resources for Tips and Tricks – here is an example of tip: ”If you want to upgrade just one database from a legacy instance of SQL Server and not upgrade the other databases on the server, use the side-by-side upgrade method instead of the in-place method.”

There are so many trivia, tips and ticks that making list of the humanly impossible in short period of the time. My friend Vinod Kumar who is SQL Server Expert has written very interesting article on SQL Server 2012 Upgrade. Vinod addresses the most interesting practical questions related to upgrades. He starts with fundamentals of how to start backup before upgrade and ends with fail-safe strategies after the upgrade is over. He covers end to end concepts in his blog posts in simple words in extremely precise statements. A successful upgrade uses a cycle of: plan, document process, test, refine process, test, plan upgrade window, execute, verify upgrade and then opens for business. If you are on Vinod’s blog post – I suggest you go all the way down and collect the gold mine of most important links. I have bookmarked the blog by blogging about it and suggest you to bookmark it with the way you prefer.

Vinod Kumar’s blog post on SQL Server 2012 Upgrade Technical Guide

SQL Server 2012 Upgrade Technical Guide is much detailed resource available online for free. Each chapter is very carefully crafted and explained in detail. Here is the quick list of the chapter included in the whitepaper. Before downloading the whitepaper be aware of its size of 9 MB and 454 pages.

Here are the list of chapters:

Chapter 1: Upgrade Planning and Deployment
Chapter 2: Management Tools
Chapter 3: Relational Databases
Chapter 4: High Availability
Chapter 5: Database Security
Chapter 6: Full-Text Search
Chapter 7: Service Broker
Chapter 8: SQL Server Express
Chapter 9: SQL Server Data Tools
Chapter 10: Transact-SQL Queries
Chapter 11: Spatial Data
Chapter 12: XML and XQuery
Chapter 13: CLR
Chapter 14: SQL Server Management Objects
Chapter 15: Business Intelligence Tools
Chapter 16: Analysis Services
Chapter 17: Integration Services
Chapter 18: Reporting Services
Chapter 19: Data Mining
Chapter 20: Other Microsoft Applications and Platforms
Appendix 1: Version and Edition Upgrade Paths
Appendix 2: SQL Server 2012: Upgrade Planning Checklist

Download SQL Server 2012 Upgrade Technical Guide [454 pages and 9 MB]

Pinal Dave (http://blog.sqlauthority.com)


Filed under: Database, DBA, PostADay, SQL, SQL Authority, SQL Documentation, SQL Download, SQL Query, SQL Server, SQL Tips and Tricks, SQL White Papers, SQLAuthority News, SQLServer, T SQL, Technology

Time to Register for TechEd pre-cons

May 16th, 2012 by Denny Cherry
So Microsoft TechEd is quickly approaching. If you wanted to sign up for a pre-con there is still time, and plenty of space left available at both the North America and Europe TechEd pre-cons. These pre-cons are full day long sessions, being presented in this case by Tom LaRock and myself. In this session, [...]

Securing SQL Server with Transparent Data Encryption (TDE)

May 16th, 2012 by Jonathan Gardner

If it was not clear by my recent post Auditing SQL Server, I have compliance and security on my mind lately. This post is no different.

While SQL Server has had encryption for some time, implementation takes significant planning and can require modification of application code. With SQL Server 2008, Microsoft introduced Transparent Data Encryption (TDE). This feature allows for encryption of the actual data and log files and any subsequent backups of those files. TDE avoids the need for application modification by performing the encryption and decryption in real time and at the database level.

Note: TDE is an Enterprise Only feature

Before covering how to enable TDE and encrypt the database, it needs to be noted that the certificate used to encrypt the database needs to be backed up and available in the event a recovery is necessary. This needs to be included in DR planning before TDE is enabled.

The first step toward TDE is creation and subsequent backup of the Master Key.

USE master
GO
--Create the Master Key Encryption
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'MyP@$$w0rd'
GO
--Backup the Master Key
BACKUP MASTER KEY TO FILE = N'C:\SQLCertBackup\MasterKey'
    ENCRYPTION BY PASSWORD = 'MyP@$$w0rd'
GO

Once the Master Key has been created, the Server Certificate can be created. This certificate is stored in the master database.

USE master
GO
--Create the Server Certifiacate
CREATE CERTIFICATE MyServerCert WITH SUBJECT = 'My Certificate'
GO
--Backup the certificate
BACKUP CERTIFICATE MyServerCert TO FILE = N'C:\SQLCertBackup\MyServerCert'
GO

With the Master Key and the Certificate created, the database is ready to be secured through the creation of the database encryption key. This key is secured by the certificate created above.

--Create the Database Encryption Key
USE AdventureWorks2012
GO
CREATE DATABASE ENCRYPTION KEY WITH ALGORITHM = AES_256 ENCRYPTION BY SERVER
    CERTIFICATE MyServerCert
GO

The final step is to actually enable encryption of the database.

--Enable encryption on the database
ALTER DATABASE AdventureWorks2012
SET ENCRYPTION ON
GO

TDE and Performance

Understanding that TDE works by encrypting and decrypting in realtime naturally leads to questions regarding performance. Microsoft BOL claims that it will only increase CPU utilization by 3-5%. Some independent testing by Rob Garrison seems to support Microsoft’s claim. You can check out his testing here.

Additional items to consider when implementing TDE:

  • During the initial implementation of TDE, the entire database and log files will need to be encrypted. How long this will take is dependent upon many factors including size of the database and server specifications.
  • Enabling TDE on an instance will encrypt the tempdb for the entire instance.
  • Backup compression will not be as effective because encrypted data does not compress well.
  • FILESTREAM data is not encrypted using TDE.

Conclusions

TDE gives the DBA a way to secure the database without having to alter applications connecting to it. It is important to understand the effects before implementing. If applications connecting to the database already cause a heavy load on the CPU it is important to test how TDE will effect performance.

If you are using TDE in production, I would love to hear about your experience in the comments below.

Permalink | Leave a comment  »

What Toy Story 2 Can Teach You About Testing Your Backups and Recovery Strategy

May 16th, 2012 by Thomas LaRock

This is a great little video that helps reinforce a few things.

  1. Make sure your backups are running.
  2. Test your recovery strategy.
  3. Working from home can solve everything.

Can't see the video in your RSS reader or email? Click Here!

What Toy Story 2 Can Teach You About Testing Your Backups and Recovery Strategy is a post from: SQLRockstar | Thomas LaRock

Being careful in SSAS to not make a cube/dimension unprocessed

May 16th, 2012 by James Serra

A big headache in SSAS, especially when dealing with a large cube, is making a change that when deployed, causes a cube to become unprocessed, forcing you to do a full process so the cube is usable.  Nothing is worse than making a change without realizing it will cause the need for a full process on all the partitions of a cube that will take many hours.

For example, a process full on a dimension will cause cube/measures group/related partitions to become unavailable/unprocessed.  Here are other actions that will make your cube unprocessed:

  • New measure group
  • New measure
  • Edit measure aggregation method
  • Edit dimension usage

Here are other actions that will make your dimension unprocessed (and therefore all cubes connected to the dimension become unprocessed):

  • Add an attribute to a dimension
  • Change the order by property of an attribute
  • Edit the attribute relationship
  • Add or delete dimension translation

So, make sure you understand which changes will cause an unprocessed state which makes the cube unusable so you can do it off-hours so you don’t end up getting angry phone calls that the cube is not working!

More info:

SSAS: Which change makes the cube/dimension unprocessed?

Processing Analysis Services Objects

Cube “Process State” changing to UnProcessed

The only good thing about Java is bitching about Java

May 16th, 2012 by Denny Cherry
So the other day I was having one of those days.  Nothing was going right, systems just didn’t want to work correctly, and Java had just pissed me off for the last time.  To put this into perspective Kris took her laptop into the living room to get some stuff done on it so that [...]

Named Sets and Block Computation in SSAS 2012

May 16th, 2012 by Chris Webb

Greg Galloway (who really should blog more often!) recently came across an otherwise undocumented query performance optimisation in SSAS 2012: using named sets inside aggregate functions in MDX no longer prevents the use of block computation/bulk mode. This was something that was explicitly called out as a Bad Thing To Do in Books Online (the link to the page in question is now dead though, possibly because it’s being updated), but here’s an example of a query that will now run much faster in SSAS 2012 Multidimensional than it used to in R2:

with
set myset as {[Customer].[Customer].[Customer].members}
member measures.demo as
sum(myset,[Measures].[Internet Sales Amount])
select measures.demo on 0,
[Date].[Calendar Year].members on 1
from [Adventure Works]

There are still situations where block computation can’t be used however, namely when the Current() function is used (which are going to be very rare I think):

with
set myset as {[Customer].[Customer].[Customer].members}
member measures.demo as
sum(myset
, iif(myset.current is [Customer].[Customer].&[20075]
, 0, [Measures].[Internet Sales Amount])
)
select measures.demo on 0,
[Date].[Calendar Year].members on 1
from [Adventure Works]

Thanks also to Jeffrey Wang for the background on this.


SQLRally Dallas Slides

May 15th, 2012 by Ryan Adams

I was fortunate enough to get to present not 1 but 2 sessions at SQLRally 2012 in Dallas last week.  As a core organizer of the event, this really made it a special week to present twice and see it all come together.  My first session was a community choice pick.  The second session I got at the last minute due to a speaker cancellation (and a speaker I was very much looking forward to meeting).  Allen White filled the other open slot as we were the next two community choice picks in line.

Both sessions went extremely well, so I was very pleased.  If you attended then I hope you were as well.  I got my first request for a fan photo and plenty of complements so thank you to everyone that attended!  Below are links to my slide decks.

Mirroring Start to Finish

Manage Your Shop with CMS and Policy Based Management

#OKPASS – I’m Leaving on a Jetplane

May 15th, 2012 by Colin Stasiuk

OK so this will be another first for me…. I’ve done plenty of remote presentations (via LiveMeeting) for PASS Chapters around the world but this will be the first time I’ve actually flown to another PASS Chapter (OKPASS)  and presented live in person! :)

Something that I’ve always envied about speakers in the US is how easy it is for them to travel (either by plane or driving) to other PASS chapters that are nearby.  From where I live (Edmonton) the ONLY PASS Chapter that is not an minimum of a 10 hour drive is Calgary PASS (Where I’ll be presenting in July) so this is really exciting for me.

PASS is trying to help Regional Mentors get out to the chapters in their region for more “face time” by (currently on a trial basis) allocating some budget money for regional mentors travel expenses.  I think this is an amazing opportunity for Regional Mentors to get out to a chapter that they haven’t been to before, do a presentation, and get some face to face contact.  I know I wouldn’t of been able to present in person for OKPASS if it wasn’t for this so I’m really excited (and thankful) for the opportunity!

Meeting details below:

Date: May 26th 2012
Time: 3:00 pm – 5:00 pm
Location: Landmark II Building, Suite #702, 1708 Dolphin Ave. Kelowna, B.C.
Speaker: Colin Stasiuk
Topic: SQL 2012 – When Worlds Collide

Session Abstract:

This intro to SQL Server 2012 presentation is going to look at some of the new features and functionality for not only the DBAs (EDMPASS) but also the developers (EDMUG). For the developers in the audience we’re going to discuss and demo new features like paging, result sets, sequence numbers and throws and for the DBAs in the room we’ll discuss AlwaysOn, contained databases, and user defined server roles. Hopefully this will help get you prepared and excited for the upcoming newly released version – SQL Server 2012.

Presenter Information: Colin Stasiuk ( blog | twitter )

Colin Stasiuk is an MCP, MCTS SQL 2005/2008, MCITP DBDEV, and MCITP DBA. Currently, he is an independent consultant contracted to Invidi Technologies Corporation and also provides remote database support and monitoring through his SQL Wingmen service offering. Colin is an accomplished Microsoft SQL Server DBA who has been working with SQL Server since 1996. He is the owner of Benchmark IT Consulting and is always willing to lend a hand with questions in many SQL Server community forums and via Twitter. His specialties include SQL Server Administration, Performance Tuning, Security, Best Practice / Standards, Upgrades, and Consolidation. Colin is the Regional Mentor for PASS Canada, President and founder of EDMPASS, and co-author of Pro SQL Server 2008 Policy-Based Management.

If you’d like to chat with me about this or anything else (SQL or other) please leave a comment or hit me up on my Twitter: @ColinStasiuk

Post to Twitter Post to Delicious Post to Digg Post to StumbleUpon

The 1940 Census: A True NoSQL Database!

May 15th, 2012 by Bob Pusateri

On April 2 of this year, the National Archives released the complete population schedule of the 1940 census. These records were highly anticipated not only for their genealogical value but also because of their detailed information about an incredibly interesting period of U.S. History. This census captured the point in time where the country was finally starting to come out of the great depression but had not yet entered World War II. Many questions it included were new and designed to gauge the effects of the depression, with topics including income, education, unemployment, and migration. In 1940, millions were employed by the WPA, PWA, and other New Deal agencies, and the Farm Security Administration’s photography program had a small group of photographers traversing the nation capturing images of everyday American life. Some of my favorite photos come from this collection.

Population Schedule Form

Population Schedule Form (Click to Enlarge)

As interesting as the Census is for all its historical and social reasons, there’s an equally awesome tale to be told of all its data and the technologies behind it. Setting up a table in SQL Server to store 310 million rows and aggregate results from them would be pretty easy today – many DBAs deal with tables that are orders of magnitude larger than that, but in 1940 it was a major undertaking involving thousands of workers. Today the census is still a non-trivial task, however I’d imagine most of that work goes into getting data from the population into a database, while calculating the results from that is relatively simple.

ETL: Enumerate, Tabulate, Lock Up
Prior to 1960, censuses weren’t mailed to your house like they are now. Instead every household was visited in person by an enumerator, a single person responsible for an “Enumeration District”, or “ED”. EDs varied wildly in size, and could consist of a single block in a large city, or an entire township in a more rural area. The enumerator would stop by and ask questions about each member of your household while writing the answers onto a population schedule form that measured 23.75″ wide by 18.5″ high. Yep, the entire database was on paper. Torn page detection must have been a very serious issue! When the enumerator had information about every last person in their district, they would send their data to the Census Office via log shipping Registered Mail.

Once in Washington, an army of operators transferred each record from the population schedule forms to a punch card. Punch cards had been used to tabulate the census since 1890 and were still the best technology available fifty years later. The 1880 census was tabulated by hand, which took 7 years to complete. Knowing there had to be a better way to calculate results, former census employee Herman Hollerith set out to create a machine that could count results from data stored on punched cards. He won a contract to tabulate the 1890 census, which was completed in only 1 year. By 1900, he had formed the Tabulating Machine Company and greatly increased his fees, knowing he had a monopoly and the Census Office would have no other option than to pay them. By 1910, census employees had developed and patented their own counting machine to avoid using Hollerith’s. The Tabulating Machine Company, which by then had merged and changed names to the Computer Tabulating Recording Company, was nearly bankrupted by the loss of business. They eventually got their act together and were able to turn a profit. In 1924, Computer Tabulating Recording Company changed its name to International Business Machines Corporation.

Tabulating by Machine

Women in (1940) Technology: Tabulating By Machine

After the records were copied to punch cards and tabulated by machine, the aggregated results were released immediately for uses like determining congressional seats and allocation of public funds. Since the population schedules contain information on individuals, they are held for 72 years before being released for research purposes. Rather than keep all 3.9 million pages of records on paper, the Census Office used the most compressed format available at the time, microfilm. Apparently they had not yet discovered the rather obscure and undocumented BACKUP CENSUS TO TAPE=’MICROFILM’ WITH COMPRESSION; command. The records released this year are images scanned from that microfilm.

Indexing
Since all the data consists of images, there’s no easy way to index them. Optical character recognition software is pretty good these days, but probably not good enough to pick out the handwriting in these images – most of which is in cursive. Instead everything was indexed by enumeration district, meaning you need to know where someone was living during April of 1940 before you can search for them. Many genealogy websites are now working on indexing this data by name, but it is not expected to be completed for a few months.

Finding Your Family
If you had relatives in the US in 1940 and know where they lived at that time, I highly recommend looking for them. Everything can be found for free at http://1940census.archives.gov. The first thing you’ll need to do is find which enumeration district they lived in. If you have an address, you are very much in luck. If you only have a general idea of where they were, then you’ll probably have to do a bit more work to find them. The census site lets you drill down by state, county, and city, and provides a list of EDs that apply. If you’re searching in an urban area you might need to use maps and/or descriptions returned by the search to narrow down exactly which ED they were in. If the official site isn’t finding anything for you, I’ve also had luck using Steve Morse’s 1940 ED Finder. Once armed with a list of relevant enumeration districts, you can view or download the population schedules from each district and look for people you recognize. You’ll probably end up looking through all the sheets because the entries on the forms aren’t always in order. My guess is that enumerators would start going down a street, skip houses where nobody was at home and then come back to them later.

I was fortunate enough to find all of my family, and it’s really neat to be able to see a snapshot of their lives at a time when my grandparents were close to my age. It also gave me great appreciation for what a chore recordkeeping was in that era! Even if you have no relatives in this census I think it’s still worth taking a look at – it was very interesting to see what kinds of jobs people had, their education level, and how much they were paid. My family was in the suburbs of Chicago at that time, and probably 7 out of 10 people in their area worked in “telephone manufacturing” which would have been at Western Electric’s Hawthorne Works. My wife’s family was in a rural area downstate, and practically everyone worked on a farm and the few who didn’t were employed by the WPA. The best job title I saw when searching for her family was “chicken picker”.

Best of luck if you end up searching for your ancestors. If you find any who were employed as a chicken picker, let me know!

Fun Videos