Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
The Voice of the DBA
 

Daily Coping Tip

Release yourself from inner demands and self-criticism

I also have a thread at SQLServerCentral dealing with coping mechanisms and resources. Feel free to participate.

For many of you out there working in a new way, I'm including a thought of the day on how to cope in this challenging time from The Action for Happiness Coping Calendar. My items will be on my blog, feel free to share yours.

DR as a Service

It's not the first task when I start a new job, but often as a DBA or developer, I usually ask about Disaster Recovery (DR) plans sometime within the first six months. If I'm a DBA, of course I need a plan. If I'm a developer, however, I still need to understand how this might work as it can affect how I build the software and prepare for networking, machine changes, etc. Even if I don't concern myself with production DR, I usually do want to make sure the VCS repos are being protected, which is something I've found isn't always being handled.

I have had to build and test DR plans as a member of an Operations team in the past. While my plans and practice are nothing like Google's large exercises, they often reveal some issues, even when we duplicate the service without touching production. I've usually found the brainstorming and debating of the various ways to build a plan to be fun. Arguing for money and then actually implementing plans is less interesting, but the testing is a great challenge. I've had some fun days offsite where we try to recover systems and find all the little things that we take for granted in our production environment.

These days there are companies offering DR as a Service (DRaaS), which is an interesting concept. I found an article from Michael Otey that looks at the features you might want to look for if you contract with a vendor. In the past, I would never consider this, but the more we advance in the world with cloud infrastructures and even full service co-location vendors, the  more I think DRaaS makes sense.

I wouldn't necessarily take anyone's word that their service meets my needs, so thinking about the requirements, and then working through a few PoCs (proof of concept) is likely very important. We do a lot of PoC work at Redgate to help customers evaluate whether Compliant Database DevOps is a good fit. I think this is important for software development, but even more important for DR plans. After all, downtime is expensive, and the last thing you want to find out when troubles arise is that some critical piece of infrastructure can't be easily duplicated.

I've used DR companies in the past, with their own physical facilities. They have impressive capabilities and marketing, but the mixing of their skills with my systems has often been rocky and lead to changes in our plans, contracts for new or fewer services, and often updated documentation for junior staff. After all, I usually expect DR situations to occur when I'm on vacation, so I plan for that.

You never know when you'll need to execute DR plans. It pays to think about this ahead of time and periodically test yourself and your staff.

Steve Jones - SSC Editor

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

Redgate SQL Prompt
 
 Featured Contents

Configure Replication Between an On-premises SQL Server and AWS RDS

Jignesh Raiyani from SQLServerCentral

In this article, we will review how to migrate the data from on-premises SQL Server to AWS RDS for SQL Server using transactional replication. There are several ways to migrate data from on-premises SQL Server to AWS RDS for SQL Server and transactional replication is one among them. Configuring transactional replication between the on-premises SQL Server […]

Comparing Two SQL Server Databases: When, Why, and How

Additional Articles from Redgate

SQL Compare has a simple premise: it will compare two databases, a source, and a target, and generate a script that, when executed on the target, will make its schema the same as the source. Tony Davis explores all the ways this can be helpful during database development work.

Implementing SQL Server Security with Stored Procedures and Views

Additional Articles from MSSQLTips.com

Learn about how ownership chaining allows you to limit permissions on specific database objects yet give users access through other objects such as views and stored procedures.

From the SQL Server Central Blogs - VMworld 2020 – Top 10 Database Sessions (Part 1)

kleegeek from Technobabble by Klee from @kleegeek

Whether you are a SQL Server Database Administrator, Infrastructure Architect, or any other member of IT managing SQL Servers in a virtualized environment, you should already be registered for...

From the SQL Server Central Blogs - Review: Stellar Repair for SQL Server

Grant Fritchey from The Scary DBA

I was contacted by Stellar Info quite a while ago. They asked me to try out their software. I said yes, but I was really bad about getting it...

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

Express in a Container

I want to run SQL Server 2019 Express edition in a container. How can I do this?

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

 

 

 Yesterday's Question of the Day (by Steve Jones - SSC Editor)

A calculated column in R

I have a small dataframe in R that looks like this:

> mysales
   orderdate customerids orderqty orderprice
1 2019-09-23           1       10         10
2 2019-06-16           2       20         10
3 2019-03-09           3       30          9

I want to add a line total column, called linetotal, that is the product of the quantity and the price. Which code does this?

Answer: mysales$linetotal <- mysales$orderprice * mysales$orderqty

Explanation: Simply adding a column can be done with the $ notation and the new column name. We can then use an assignment operator to add this with the expression we need, in this case: mysales$orderprice * mysales$orderqty Ref: Adding columns to a dataframe - http://www.cookbook-r.com/Manipulating_data/Adding_and_removing_columns_from_a_data_frame/

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 - Administration
SQLServer Agent not sending dbmail on job completion - Hi Everyone! I have a problem with a SQL Server 2017 with dbmail. I have the attached script and when I run it manually it works ok and sends the mail, and it also registers the activity on sysmail_event_log. But when I run it with a job, the step works fine but no mail is […]
SQL Server 2017 - Development
How to check if NextDay is Holiday (exclude Saturday and Sunday)? - Hi: We maintain a calendar table with these columns. We have a process which runs daily and one of step in that is to take different action if the next day (Monday/Tuesday/Wednesday/Thursday/Friday) is holiday. If it is not a holiday then no action is required. create table #Calendar (CalendarDate date, DayOfWeek int, BusinessDayFlag bit, NextBusinessDay […]
Query tuning help. - Hi, I've attached plan for this query. This query returns around 70M rows. I see the most expensive operator is at clustered index scan Dim_Invoice.  There is a filter on inovoice date column from factinvoice line table. Will declaring non clustered index on invoice date on factinvoiceline speed up the query? Currently this query takes […]
SQL Server 2016 - Administration
Report Server Load balanced issue with one server while accessing https: - We have 2 servers which are load balanced, when reporting service is stopped on server1, https  URL is still accessible. But, when service on server 2 is stopped and try to access the URL ,we are getting the error message" cannot connect securely on this page, this might be because the sites uses outdated TLS […]
Function Code - Hi, I have a fn with below code I want to understand the highlighted line. Not sure what is FN doing apart from return the value in DATETIME format. CREATE FUNCTION DBO.TFNGETDATEONLY ( @InDate DATETIME) RETURNS DATETIME BEGIN RETURN CAST(CONVERT(VARCHAR(10), @InDate, 101) AS DATETIME) -- can you please explain what this line is doing and […]
Development - SQL Server 2014
Stored Procedure Performance Woes... How to get around CURSORS for html gen. - Hi everyone, Working with a stored procedure that is used in an application of ours. This procedure takes an integer as a parameter and in the end, returns what is a long line of HTML that has many many columns and many rows. This HTML is very dynamic and the data that is dealt with […]
Where do I start from ? - Following with a user complain about SQL timeout I bumped into one issue with a view. I ran the Object Execution Statistics report and saw that one particular SP, which querying a view containing about 3 tables and 12 views, is coming up with high numbers. I am not a dba specialist and would like […]
SQL 2012 - General
Always On - tips for running large transactions - Hi all, I wanted to get a second opinion on something, this weekend I need to do a deployment to 2 databases which are part of an always on availability group. The deployments are going to cause a table rebuild of some tables, the largest of which is 61GB So I know that the work […]
SQL Server 2012 - T-SQL
multipoint to line geometry - Hi, Attached, I exported a CSV file from a multipoint record from sql server  database. select Shape, Shape.ToString(),id from Table_x id is the unique id of the multipoint record GEOMETRYCOLLECTION (MULTIPOINT ((45.7500915527344 10.0216674804688 0 128), (45.750244140625 10.0218505859375 0 128), (45.7503967285156 10.0220336914063 0 129), (45.7505493164063 10.0221862792969 0 129), (45.7507019042969 10.0223388671875 0 130), (45.7508544921875 10.0225219726563 0 130), […]
SQL Server 2019 - Administration
Polybase and HA - I am planning for HA environment and we are using Polybase and would like to use the PolyBase scale-out groups and would like to get some thoughts how that would work with DR. Any advise? Thanks in Advance!
SQL Server 2019 - Development
Ignore the entire record if a matching record is found - Hello, Kindly guide me with the following code in T-SQL. I need to only extract those KeyId where the applicationname = 'Flower' does not exist. So Flower is present in keyId = 100, 101, so in the output I should not have 100 and 101. Just need to display 102.
SQL query error help - Hi Guys, I have a table, around 320 fields. I am trying to use a simple Insert statement. Insert into a table (List all fields) Select all fields One of the fields from 320 is giving me "Truncation error" What is the best way to pinpoint which field has an issue. Any advice would be […]
SQL Server 2008 - General
Encrypted column copy - I am using SQL Server 2008 R2. I have encrypted some of the columns in the table using "EncryptByPassPhrase" method. How to copy the encrypted table to other database or server. I tried to copy  table  using Export and import  wizard. But encrypted columns in the copied table is blank. How to export/import encrypted tables […]
SQL Azure - Administration
Any guides for sizing Azure managed instances. - Hi All, Has anyone got any tips for sizing a move from VM running sql instances from our current IaaS to Azure managed instance? Primary areas that we are concerned about are disk performance on the Azure side. Guess the primary question we have is do we need to go with Business Critical or General […]
Integration Services
Using SSIS packages build in VS2010 when migrating SQL server from 2008 to 2016 - With eof of Windows2008R2, lots of our customers are planning new server setups, usually employing SQL server 2016 instances on new local servers. We have complex SSIS solutions combined with SSAS/SSRS originally developed with VS2010 + SQL server 2008. A couple of customers we migrated upgrading the solution to VS2015. This caused massive problems mainly […]
 

 

RSS FeedTwitter

This email has been sent to {email}. 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.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -