SQLServerCentral - www.sqlservercentral.com

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

Featured Contents

The Voice of the DBA

Storage that Expires

Whether you like the idea of the GDPR (and the new California law), I'm sure you agree that these laws will likely change our data handling in business. Even if they are weakened through legal challenges, many companies have already started to comply and change some of their practices.

I've written about the GDPR plenty of times this year, and I like the law. I hope the law stands strong and resists most challenges. While I'm sure there will be plenty of spurious or silly requests and complaints, I do think these laws are asking for the good data handling practices that most data professionals have advocated for years. These include not only security but also integrity. How often have many of us advocated for corrections to problematic data and been told no? How many times have we complained about security practices?

One area that I think has been neglected too long in most industries is the area of retention. Most companies I've worked for have retained data indefinitely, without any thought or policy. In my mind, we ought to explicitly think about how long we hold data, and remove older data that isn't needed for our organization's operation. I feel more strongly about this over time as we find that data beaches become more and more prevalent.

Azure has started a preview of immutable storage, essentially WORM (Write Once, Read Many) drives as an Azure container. I've used WORM storage, but it's often been viewed as a way of keeping information forever. that can change with this new Azure storage, as you can set a lifecycle management period. The blobs will be removed after this time, which removes one management headache from administrators.

I could see quite a few uses for this type of storage. If it's inexpensive enough, what about storing backups here? We could have policies set to remove files after some limited period. I'm sure there are plenty of other uses for storage the is immutable, but also contains lifecycle management options. What creative use would you have for this type of expiring WORM storage?

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 ( 3.5MB) 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 Monitor

What’s the top challenge faced by SQL Server professionals in 2018?

Learn how 626 SQL Server professionals monitor their estates in our new report on the State of SQL Server Monitoring. Discover the challenges currently facing the industry, and what is coming next.  Download your free copy of the report

SQL Prompt

Write, format, analyze, and refactor SQL fast with SQL Prompt

Writing SQL is 50% faster with SQL Prompt. Your SQL code can be formatted just the way you like it, you can create and share snippets with your team, and with code analysis you get suggestions to improve your SQL as you type. Download your free trial

Featured Contents

 

Creating a Logical SQL Server: Level 2 of the Stairway to Azure SQL Database

Arun Sirpal from SQLServerCentral.com

In this second level of the Stairway to Azure SQL Database, we cover the basics of building a logical server using the portal and PowerShell. More »


 

Free eBook: Troubleshooting SQL Server: A Guide for the Accidental DBA

Press Release from Redgate

Three SQL Server MVPs (Jonathan Kehayias, Ted Krueger and Gail Shaw) provide fascinating insight into the most common SQL Server problems, why they occur, and how they can be diagnosed using tools such as Performance Monitor, Dynamic Management Views and server-side tracing. The focus is on practical solutions for removing root causes of these problems, rather than "papering over the cracks". More »


 

SQL Server Reporting Services Rest API

Additional Articles from MSSQLTips.com

What functionality is available in the SQL Server Reporting Services REST API and how should you use it? More »


 

From the SQLServerCentral Blogs - Configure SQL Server Failover Cluster Instance on Azure Virtual Machines with MSDTC

Ryan Adams from SQLServerCentral Blogs

Configure SQL Server Failover Cluster Instance If you are running a SQL Server Failover Cluster Instance on premises and looking... More »


 

From the SQLServerCentral Blogs - T-SQL Tuesday #104 – My Undercover Toolbox favourites

david.fowler 42596 from SQLServerCentral Blogs

This months T-SQL Tuesday is being hosted by Bert Wagner , you can find the invitation for this months topic here. Bert... More »

Question of the Day

Today's Question (by Steve Jones):

I've got this dataframe:

 > battingpergame Year H HR SO 1 2018 8.40 1.14 8.52 2 2017 8.69 1.26 8.25 3 2016 8.71 1.16 8.03 4 2015 8.67 1.01 7.71 5 2014 8.56 0.86 7.70 6 2013 8.66 0.96 7.55 7 2012 8.65 1.02 7.50 8 2011 8.70 0.94 7.10 9 2010 8.76 0.95 7.06 10 2009 8.96 1.04 6.91 

I want to create a new dataframe with just the year and home run columns (Year, HR). Which command should I use to get these results?

 > homeruns.by.year Year HR 1 2018 1.14 2 2017 1.26 3 2016 1.16 4 2015 1.01 5 2014 0.86 6 2013 0.96 7 2012 1.02 8 2011 0.94 9 2010 0.95 10 2009 1.04 

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: R Language.

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 T-SQL Window Functions in SQL Server

Expert T-SQL Window Functions in SQL Server takes you from any level of knowledge of windowing functions and turns you into an expert who can use these powerful functions to solve many T-SQL queries. Replace slow cursors and self-joins with queries that are easy to write and fantastically better performing, all through the magic of window functions. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I have a login, JoeDev, on my instance. This login has no user mappings in any user database. I want to grant this login the CONTROL permission on the Sandbox database. What do I need to do? 

Answer: Add the login as a user to the Sandbox database and run GRANT CONTROL ON DATABASE::Sandbox to JoeDev

Explanation:

The CONTROL database permission must be assigned to a user in a database. Therefore the login needs to be mapped to a user in the database and then the command run.

Ref: GRANT Database Permissions - click here


» Discuss this question and answer on the forums

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

SSMS 17.3 Start Powershell give s error - No SQL Server cmdlets found on this computer - This is a Win 10 desktop and I've installed the sqlserver module via install-module sqlserver -force. I can import it...


SQL Server 2016 : SQL Server 2016 - Administration

dm_db_index_usage_stats not accurately reflecting index usage - Hi all I'm trying to resolve a performance issue we are having with a stored proc - i've recently added a new...


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

How to improve Delete Performance - I have an SSIS pkg, where I have three tables to load, with the first step to perform a delete...

Accurate Estimations, But Hash Match Aggregate Spilling to TempDB - Hi, I'm on SQL Server 2016 Enterprise, V13.0.5026.0.  I have a straightforward query that runs on a fact table with a...


SQL Server 2014 : Administration - SQL Server 2014

SQL PATCHING - Hi Experts, Is there any problem applying a SQL CU update while users are working on the server? Thank you for your...


SQL Server 2014 : Development - SQL Server 2014

Sorting and Grouping problem - Hi, I have a table:

Finding a particular date in all tables - HI all, The famous SearchAllTables proc failed to find date values I know exist in my (DateTime) columns.  A quick Google...

Joining on the numeric part of string... - Hi All, It's been a while...I'd like to get your advice on the most efficient way to join on only the...


SQL Server 2012 : SQL 2012 - General

Having trouble importing tab delimited file - Hi, I am trying to import a Tab delimited file in to a table in SQL Server. But I am getting this...

Weird Issue - Availability Group Logins not working on secondary(s) but they do work on primary replica - We have an AG with three nodes, one primary and two secondary nodes.  If I make a Windows Login (or...

Fehler in Metadaten-Manager in SSAS-Projekt - Hi allerseits, wir sind seit Ende letzter Woche mit einem hässlichen Fehler konfrontiert und wissen aktuell keinen Ausweg. Wenn man das SSAS-Projekt...


SQL Server 2012 : SQL Server 2012 - T-SQL

DBCC Shrinkfile not shrinking Data File - I'm encountering an issue with shrinking a data file.  There were large tables created in the wrong filegroup that needed...

sql cursor in stored procedure - not looping - I have a problem that I don't know how to solve.Since yesterday I've tried all the different approaches I could...


SQL Server 2008 : SQL Server 2008 - General

Flat File csv with double quotes - I am running into an issue and I can not figure it out. I have an SSIS package I am working...

how can i get the top 3, after i count the column ? - how can i get the top 3, after i count the column ? here is my code. to count the no....


Reporting Services : SSRS 2012

SSRS 2012 Expressions - Hi All, I need a field to display different calculations based on the value of a parameter. For example, MyBikeCompany has 3...


Reporting Services : SSRS 2016

Grouping and Exporting to Text File - Hello, I have very simple data from a SQL table that needs grouped and formatted like below.  Two columns, ID and...


Data Warehousing : Integration Services

SQL 2016 Integration Services on Win2016 Servers - Access is denied message when connecting (for administrator) - I'm installing SQL 2016 Integration Services on Win2016 Servers.  I get the below error when connecting from SSMS on the...

recover the number of files processed by a Foreach loop - Hello everyone Who has an idea please how can I get the number of files processed by a loop foreach I created...


Microsoft Access : Microsoft Access

Database Audit -

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