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

Cloud Backup

I think that backup and restore are the most critical things for any database professional to master. Whether you're a professional DBA, a developer setting up a system, or a seasoned DBA, I would argue having your data safe is the primary task. Security comes next, then performance, availability, and a number of other tasks that could go in any order, but if we don't have a way to restore our data when hardware fails, we're in trouble. And given enough time, or enough difference pieces and parts, something will fail. If you can't restore a system when a problem occurs, that's what Grant would call an RGE.

Over the years companies have moved to many different technologies to handle backups. Tape was common early in my career, but all disk systems, with de-duplication capabilities have become popular. I really don't think about anything other than getting a second (or third) copy of data these days, so I can't speak to any particular way of managing backups. However, for SQL Server, I do want the option to set full, differential, and log backups based on my RPO and RTO requirements.

There seems to be a new trend for companies that I ran across: they're moving to the cloud. Here's a short slideshow of some stats that show cloud use is increasing. This is a survey, so it's not all companies, but the trends are clear. More data is being backed up, and it's likely easier (and cheaper) to use cold storage in the cloud. That makes sense since it's data that you expect you'll very rarely need to use in a restore.

There are a couple of other interesting items I saw in the survey. The number of companies that are backing up more than 100TB grew quite a bit, even as the number of companies backing up < 25TB fell. That's a sign that we're capturing more data. Whether we need to, or whether legislation like the GDPR will get companies to trim some of that data, remains to be seen.

Another interesting item is that more companies are testing their DR plans. Fewer never test them, but the frequency is increasing with more companies testing quarterly or monthly. That's smart as we become more dependent on computer systems. I know some organizations can't roll back to paper, as we've seen in a number of airline IT issues. If you never test your DR plan, I hope that you don't have an issue when you can ill afford to find another job, becuase you might suffer those consequences. Really, I hope that you actually know this isn't professional and you start working on ways to test a restore of service.

More companies are moving to the cloud, and the resistance for security, cost, privacy, etc. reasons is going down. I think many of the concerns that both executives and IT professionals have had in the past are proving to be non-issues. This is especially true as more vendors institute government rated or more secure data centers as a part of their product offering.

If you don't like the cloud, that's fine. If you don't know anything about it except rumor, guesses, or hearsay, I'd suggest you learn more. The cloud is likely coming into your career, so learn a bit about it. At least enough to give reasons why you don't want to move your data there. If you do, you might be surprised that the cloud is not that bad a place to be, at least for some workloads.

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 ( 5.3MB) 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 Change Automation

CI/CD  for your SQL Server database

Feeling the pain of managing and deploying database changes manually? Redgate SQL Change Automation completes your database delivery process by building, testing, and deploying the database changes you and your team check into version control.  
Try it free

GDPR

How to make your SQL Server development GDPR ready

Redgate’s SQL Data Privacy Suite helps you to build a data catalog of your SQL Server estate, and put in processes to protect and monitor personal information. Find out more about how our tools help with GDPR compliance

Featured Contents

 

Stairway to Columnstore Indexes Level 12: Clustered or Nonclustered?

Hugo Kornelis from SQLServerCentral.com

The previous levels of this stairway describe details, features, and limitations of columnstore indexes in SQL Server. But they do not answer what should be the first question for every database professional: should columnstore indexes be used in my databases; on what tables should they be used; and should they be clustered or nonclustered columnstore indexes? More »


 

Free eBook: Understanding SQL Server Concurrency

Press Release from Redgate

When you can’t get to your data because another application has it locked, a thorough knowledge of SQL Server concurrency will give you the confidence to decide what to do. More »


 

Using undocumented DBCC WRITEPAGE to instigate SQL Server database corruption

Additional Articles from MSSQLTips.com

In this tip look at the undocumented command DBCC WRITEPAGE to corrupt a SQL Server database and then use the command to undo the corruption. More »


 

From the SQLServerCentral Blogs - Table Variable Performance “Fixed” in SQL 2019

Matthew McGiffen from SQLServerCentral Blogs

Reading the new features for SQL 2019 I spotted this: One of the most popular posts on my blog last year... More »


 

From the SQLServerCentral Blogs - Shortchanged with International Money in SQL Server

Bert Wagner from SQLServerCentral Blogs

Imagine you have to perform some salary analysis for your employer International Mega Corp. The data you have to work with... More »

Question of the Day

Today's Question (by Steve Jones):

A tuple in Python contains a set of items, which could be other tuples. I create this tuple in the Python REPL:

 >>> AFCWest = (("Denver", "Broncos"), ("Kansas City", "Chiefs"), ("Oakland", "Raiders"), ("Los Angeles", "Chargers")) 

Now I want to access the elements. If I want to just return "Broncos", how would I do this?

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: Python.

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

Expert Scripting and Automation for SQL Server DBAs

Automate your workload and manage more databases and instances with greater ease and efficiency by combining metadata-driven automation with powerful tools like PowerShell and SQL Server Agent. Automate your new instance-builds and use monitoring to drive ongoing automation, with the help of an inventory database and a management data warehouse. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I have this table with a column set.

 CREATE TABLE UserConfig ( UserConfigKey INT IDENTITY(1,1) NOT NULL CONSTRAINT UserConfigPK PRIMARY KEY , UserID INT , IsActive BIT SPARSE , IsSubscriber BIT SPARSE , DefaultQuantity INT SPARSE , Options XML COLUMN_SET FOR ALL_SPARSE_COLUMNS ) GO 

I want to insert a new row and use this statement:

 INSERT dbo.UserConfig ( UserID , IsActive , IsSubscriber , DefaultQuantity ) VALUES (8, 1, 1, 5, CAST('<IsActive>1</IsActive><IsSubscriber>1</IsSubscriber><DefaultQuantity>7</DefaultQuantity>' AS XML) ) GO

What happens?

Answer: An error is returned and the row is not inserted.

Explanation:

An error is returned here. Values cannot be provided for both the sparse columns and the column set. This is the error

Msg 110, Level 15, State 1, Line 36
There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.

Ref: Use Column Sets - click here


» Discuss this question and answer on the forums

Featured Script

number of rows and columns of an instance

Fabiano Carvalho from SQLServerCentral.com

This code gets the number of rows from a table, using space in mb, gb, and the amount of columns in a table.

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 2017 : SQL Server 2017 - Administration

Specific Database Permissions for User With AD Group Login - My second DBA question in two days. I'll need a holiday if this keeps up. I have a user U1, who...


SQL Server 2017 : SQL Server 2017 - Development

Need syntax help with a JOIN inside of a Subquery - I am designing a query that outputs JSON using FOR JSON PATH and I'm having difficulty including a JOIN for...

SQL Server 2017 - Transferring Transformed Data to a Staging Server VERY frequently - Hi all, I have the following scenario with a client:  The client has multiple SQL Server databases (versions range from 2008 R2...

Running total over partition order - Hi, I need to find the running total for each group order by date. So the query is select......., sum(colA) OVER (PARTITION...

How to build an app with GUI that works with SQL Server? - I have to create a project which should have a GUI because people who gonna use it don't know TSQL....

sql server does not seem to have an equivalent of Oracle %ROWTYPE ? - It seems that SQL*Server does not have equivalent of Oracle %ROWTYPE ?  Unless I am looking at old answers on the web ...


SQL Server 2016 : SQL Server 2016 - Administration

File and Folder Permissions for SQL Server. - Recently, I updated the user SQL Server runs under from NT SERVICE\MSSQLSERVER to a domain account and restarted the SQL...

Database audits - permission changes - Hello SSC, I am needing to track all user permission changes at the database level.  The method I am trying to...

Windows user has SELECT and DB_DATAREADER writes still gets: "The SELECT permission was denied on the object" - This is a head scratcher. I have a windows user, I even deleted and recreated the users account on the server...

insert the records in Table 2 whenever the records delete in Table 1. - Hi, I would like to insert the records in Table 2 whenever the records delete in Table 1. How to achieve this. Please suggest. Thank you...


SQL Server 2016 : SQL Server 2016 - Development and T-SQL

Insert records in to table that has primary key identity seed - I'm trying to insert records from one table in to another table like the example below.  The two tables have...

Max size file in BCP process - Hi Experts, We are  processing  huge data file's on daily process form file to SQL server using BCP command. For Example : Daily...

Delete data with sliding date window - Hello, I have a table where I have one year+ of data, and I need to delete the current month,...

Wrong estimate when inserting in multiple sessions - Consider the following: 1. Create table test with int column id 2. Session A: insert 5 records, don't commit 3. Session B: insert...

Importing from XML to SQL 2014 - This is my 4th day on SQL so I am a newbie. I created a query to import from an...


SQL Server 2014 : Development - SQL Server 2014

Change Logs -

Format column as HHH:MM:SS instead of MMM DD YYYY HH:MM (AM/PM) - Hi everyone, This problem seemingly does not have a clear solution. I am importing data from Excel using OPENROWSET. In the Excel...


SQL Server 2012 : SQL Server 2012 - T-SQL

pass multiple values into stored procedure - In t-sql-2012, I am trying to load all the schoolID values into the variable called @CalendarID. I then want to pass...


SQL Server 2008 : SQL Server 2008 - General

UK Date Error - SQL2008 - Dear all - We successfully moved a DB from a 2008 platform to 2012. However we received reports from our Web...


Data Warehousing : Analysis Services

Tracking use of measures/dimensions - Hi, I have a SSAS multi-dim cube used by around 100 people.  It's a legacy cube that I'm re-developing on SQL2016, has...

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 ©2018 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com