SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

Featured Script

The Voice of the DBA

The Google Solution

I was watching a talk from Google on how they back up their data. After all, one of the biggest assets Google has is the tremendous amount of data that they have collected over the years. There are many systems at Google, and certainly lots of data in each of them. In this case, Gmail was the system being discussed, and the data is in the exabyte range. If you don't have an hour to watch the talk, then there's a nice summary at highscalabilty.

In the talk, there are certainly things that Google aims to do with their approach. First, they can't lose data. That's a priority, as it should be for all of us that manage data. They also focus on restores, not backups. In fact, if they can make restores easily by adding work and complexity to backups, that's a trade-off worth making. I haven't typically viewed the restore process this way, though I do think restores are ultimately the most important part of any recovery task. However, I haven't really thought about how I could actually make restores easier by changing something at backup time. I've often tried to make backups quicker, or take them more often, but perhaps this is an area to re-examine. Are there things you can think of that would make restores easier? Maybe not easy enough for your cat to kick off (as discussed in the video), but easy for the average sysadmin at your company?

Google wants redundancy, which includes people. They can't depend on any one machine, one tape, or one person. Therefore, they need to have multiple copies of data and more automation that reduce those single points of failure. Along those lines, our clients and customers don't need to know if we have 3 copies, 7 machines, or any other configuration. Our responsibility is to ensure our customers can access data.

Why should we care what Google does with GMail or any of their systems? Well, I only see our databases growing, with sizes going from GB and millions of rows to TB and billions of rows, or even to PBs. There are lessons that we can learn about the management of data at scale, and the ways in which our customers might perceive the availability and accessibility of their information. Google has learned they need to be more efficient with resource usage. Whether that's disks or people, they can't require 1000 times more resources for 1000 times more data. We should take note of that.

Perhaps the best lessons from Google are in the areas of testing and expectations. They test constantly, to ensure that they can actually recover data. While I think the SQL Server backup system is very solid, I'd be regularly testing restores to ensure that I really can recover from backup files, from external disks and tape, or even complete a restore on a backup system. The other lesson is that Google expects things to fail, so they plan for that, and aren't surprised by failures. SQL Server gives us options here with Always On and other HA technologies if we can take advantage of them. With a single RDBMS instance, there isn't a lot most of us can do, but we can at least be prepared to rebuild our instance elsewhere as a last resort.

Steve Jones from SQLServerCentral.com

Join the debate, and respond to today's editorial on the forums


The Voice of the DBA Podcast

Listen to the MP3 Audio ( 4.8MB) podcast or subscribe to the feed at iTunes and Libsyn. feed

The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music.

ADVERTISEMENT
SQL Toolbelt

Not enough hours in your day?

The SQL Toolbelt lets you reduce the time spent on SQL Server development and administration. Cambridge University developer David Spaxman, for example, says: “I’m saving 10-12 hours a week using the SQL Toolbelt.” Learn how you can double your productivity, speed up deployments and protect your data. Download a free trial.

SQL Clone

SQL Clone – create database copies fast!

Create copies of production databases and SQL backups in seconds and save up to 99% of disk space using SQL Clone. Redgate’s new tool removes much of the time and resource needed to create and manage database copies, allowing teams to work on local environments to develop, test and diagnose issues faster. Join the beta.

SQL Compare

New Redgate SQL Compare 12 has landed!

SQL Compare 12 has landed with a brand new user interface, support for SQL Server 2016, and a wealth of fixes and improvements. Check out this blog post from Redgate's Carly Meichen to hear more about what’s new, why the team have built it, and how. Read now.

Featured Contents

 

Performance Improvement for Cursors in Stored Procedures

Brian Hibbert from SQLServerCentral.com

Exploring some differences between using cursors, local fast forward cursors and using set logic. More »


 

Multi-Step Input Forms in ASP.NET MVC

Additional Articles from SimpleTalk

It is a common problem with a web page that a form is too complex to fit easily on the page. You can, of course, rely on the scrollbar, but it soon becomes a daunting and erratic process for the poor user. Wizards, that allow you to guide the user through a process, are great but take time to set up. Is there a simple solution for those occasions where there is too much data-entry for a form but a full wizard seems like overkill? More »


 

SSC 2016 User Survey and Competition

What do you want to see more of on SQL Server Central? Anything you think we should get rid of? Let us know in this 17-question user survey, and at the end you can choose to be entered into a draw to win a $100 Amazon gift card. Thanks to everyone who's already answered, we greatly appreciate the feedback! More »


 

From the SQLServerCentral Blogs - Creating Custom Databases with SQL Prompt

Steve Jones from SQLServerCentral Blogs

SQL Prompt has lots of great features that can help you write SQL quicker. However, you’ve got to train yourself... More »


 

From the SQLServerCentral Blogs - A Data Professional’s Story – PASS Summit 2016

CYates from SQLServerCentral Blogs

This year is different. Why? I’m not sure yet. There is a lot of reflection going on since my return... More »

Question of the Day

Today's Question (by Steve Jones):

I create this view in my system

 CREATE VIEW CustomerView AS SELECT CustomerID, CustomerName, OutstandingBalance, Active FROM dbo.Customers; GO 

Next, I build another view that depends on the first one.

 CREATE VIEW ActiveCustomers AS SELECT CustomerID, CustomerName, OutstandingBalance, Active FROM dbo.CustomerView WHERE Active = 1; GO 

If I then issue this statement, what happens?

 DROP VIEW dbo.CustomerView; 

Think you know the answer? Click here, and find out if you are right.


We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point in this category: Views.

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

SQL Server T-SQL Recipes

SQL Server T-SQL Recipes is an example-based guide to the Transact-SQL language that is at the core of SQL Server. This edition has been lightly updated for SQL Server 2014 and provides ready-to-implement solutions to common programming and database administration tasks. Learn to create databases, create in-memory tables and stored procedures, insert and update data, generate reports, secure your data, and more. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I run the PowerShell command shell and import the SQL Server module. I don't have a default instance, but I do have these two named instances:

  • .\SQL2016
  • .\SQL2014

How do I change my default location in the shell to browse the 2014 instance? (Assume the name of my computer is [Plato])

Answer: cd SQLServer:\SQL\Plato\SQL2014

Explanation:

Powershell gives a user the ability to browse systems as though they were a file system. With the SQL Server module, one can browse a SQL Server instance as one sees the folder structure in the SSMS Object Explorer.

To change, one usually issues a "cd SQLServer:" to get to the default instance. In my case, I need to specify a path starting with \SQL. I then include the computer and instance.

I can also use "cd \SQL\Plato\SQL2014".

Ref: Specify Instance in the SQL Server PowerShell Provider - https://msdn.microsoft.com/en-us/library/hh245280.aspx


» Discuss this question and answer on the forums

Featured Script

Function - Word count in a sentence

Hannan Kravitz from SQLServerCentral.com

This function will give you a word count based on the number of spaces in a string.
Example:
 SELECT WordCount FROM [dbo].[udf_WordCount] ('It''s now or never I ain''t gonna live forever')

More »

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2016 : SQL Server 2016 - Administration

estimate the t-log grow - I would like to know the t-log grow as the databases are in simple recovery , how can we calculate the...

File Group Backups and Restore - Morning All, I have a database, with a filegroup that is 2TB of documents (blob data). I frequently have restore this database...


SQL Server 2014 : Administration - SQL Server 2014

Benefits of SQL 2014/2016 over 2005 ?? - I'm sure it's a long list, but what are the "Top 10" list of improvements I can take to management...

Query returning incorrect results randomly - Hi Team, I'm running a simple SQL query which returns a set of columns based on a search criteria. It has...

MSDB jobs in DB mirroring and AlwaysOn availability group - Hi all, As we have already know -> system databases are not mirrored nor replicated in both mirroring and alwayson availability...

Bit of a rant - queries on space - Sorry this might be me ranting abit, but am prepared for someone to tell me I am being unreasonable hehe. So...


SQL Server 2014 : Development - SQL Server 2014

How to use a CSV as parameter in a query - I always used a query with an(one) integer parameter, but now it has to change to more integers in the...


SQL Server 2012 : SQL 2012 - General

Table Size Growing Over Time - I have a table with two columns: Col1 is a varchar(250) Col2 is a varchar(20) I have an SSIS package that runs...


SQL Server 2012 : SQL Server 2012 - T-SQL

Need assistance with Dynamic SQL - Hello, I have the following code below that is throwing the following error: Msg 214, Level 16, State 3, Procedure sp_executesql,...

delete all table from a table - Hi! I need to delete all tables listed in a table named dbo.tblSum. There are 500 tables that I need to...


SQL Server 2008 : SQL Server 2008 - General

Give database to customers, how would you want to receive it? - Hi All, I apologise in advance if this has already been covered but searching for deploying, distributing or packaging a database...

linked ole objects in table - In our database we have a table with pdf documents linked as an ole object in a field. The field...


SQL Server 2008 : T-SQL (SS2K8)

Username increment by 1 if already exists in table - Hi All, I am having user table as below Create table #TEMP_USER ( ID int identity (1,1) , USERNAME nvarchar(50) ); I want to insert...


SQL Server 2008 : SQL Server 2008 Administration

Using a local installation of SQL Studio to connect to a remote database server - Hello -- One of my colleagues wanted to know if there is a major advantage to utilizing a local installation of...


Reporting Services : Reporting Services

Reporting Services From a Data warehouse - Bottleneck On Every Month - Hi All, I am a Software Engineer working in an MNC on MSBI Platform. I have been working in Reporting services project...


Data Warehousing : Integration Services

Need to implement left join using look up - I have a stage table S and new columns from other table T , i want to do left join on...


Data Warehousing : Strategies and Ideas

Multiple Joins on Fact Table - Hi, I am building a DW which will load data from 2 separate sources. Each source will populate the Broker Dim table...


SQL Server 2005 : Administering

reindex maintenance plan failed in sql 2008 (An item with the same key has already been added) - Executed as user: DAQMSDBS01\SYSTEM. Microsoft (R) SQL Server Execute Package Utility Version 10.50.1600.1 for 64-bit Copyright (C) Microsoft Corporation 2010....


SQL Server 2005 : SQL Server Newbies

Random 64 Characters alphanumeric String - I need to create a random 64 alphanumeric string every time a new row is added to a SQL 2005...


SQL Server 7,2000 : SQL Server Agent

Msg 8152, Sev 16: String or binary data would be truncated. [SQLSTATE 22001] - Hi, I have a SQL Server Agent Job which runs a stored procedure. In the past this has run fine, but...

This email has been sent to newsletter@newslettercollector.com. To be removed from this list, please click here.
If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com.
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2015 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com