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

Default Backups and Feature Awareness

Have you ever been asked a question about your software and thought that the person was asking about an obvious feature? Perhaps someone has suggested a feature to you and you answered that this was already in the product. Did any of you think your users were stupid or  not very observant, or something else?
 
I've had that situation appear a few times, with my on different sides of the discussion. I watched someone ask a question that I knew the answer to, watched someone else respond, and thought, huh, how didn't they know that. I asked a question about something in the Microsoft Azure world and got a quick answer, wondering why I hadn't been able to find the solution myself. And stopping myself from cursing the Microsoft devs too much. I've had a few people do strange things at SQLServerCentral after the migration and wondered, why in the world.......? Then I remember that lots of people use the site differently than I do and I should expect that.
 
I thought about this while reading Joey D'Antoni's piece on backups. It's not hard to make backups. It's not hard to set up a maintenance plan to run backups. It's not hard to set up a history task to trim old ones. Heck, it's not hard to implement Ola's scripts.
 
The problem is all of these solutions require some knowledge.
 
I think plenty of people assume either the system backs itself up or their nightly file sweep by a central backup system will grab the database. Hint: it won't. I think plenty of people think it's someone else's job. Or they are in a hurry with an installation and assume they or someone else will come back and set up backups later. Plenty of third party software may create a database, but never set up a backup process.
 
That's not good. While I like Joey's suggestion, I'd go further. I'd have instance defaults set on install and an automatic, nightly full backup process set for all new databases with a week's retention. I'd embed this in the DDL so the default is backups will be set on CREATE DATABASE, and you can use a switch to turn this off if you want to use some other backup process. I bet backup software, like SQL Backup, would even do this for you, turning off native backups when you turn on their scheduler.
 
I think backup is the most critical thing a DBA does, or an accidental DBA, or the accountant that installed Dynamics, or anyone working with a database. Next would be verifying things with a restore. Then comes security and the list goes on from that point. If you don't have the data, because of ransomware, virus, bad hardware, or anything else, you are in a bad situation.
 
Please. Set up backups. If you find a server without them, inform someone in writing of the dangers and give them resources for creating backups. If you create databases as part of your software deployment process, set up backups somehow. Use a maintenance plan. Those aren't great, but they're better than nothing. There's a reason why SQL Monitor has an alert for databases with no backup. It's a critical one to have running.
 
 
 

Steve Jones - SSC Editor

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

 
Redgate SQL Monitor
  Featured Contents
Stairway to T-SQL Beyond The Basics

Stairway to T-SQL: Beyond The Basics Level 3: Building a Correlated Subquery

Greg Larsen from SQLServerCentral.com

This stairway level will expand on the subquery topic by discussing a type of subquery known as a correlated subquery, and explores what a correlated subquery is and how it is different from a normal subquery.

How to Build an Efficient Request Process for SQL Server DBAs

Additional Articles from MSSQLTips.com

Take a look at some of these DBA request examples and things you could do to improve your request process.

Free eBook: Performance Tuning with SQL Server Dynamic Management Views

Additional Articles from Redgate

Dynamic Management Views (DMVs) are a significant and valuable addition to the DBA's troubleshooting armory, laying bare previously unavailable information regarding the under-the-covers activity of your database sessions and transactions.

From the SQL Server Central Blogs - What do you get with a Free account in #Azure?

Kenneth.Fisher from SQLServerCentral

The first thing I want to do is say thank you to Michael Crump (b/t). He tweeted out this: What ... Continue reading

From the SQL Server Central Blogs - Azure Data Factory: Extracting array first element

Rayis Imayev from SQLServerCentral

(2019-Apr-28) Full credit goes to Microsoft for the latest efforts updating Azure products with new features and documenting corresponding changes for the end users. Azure Data Factory (ADF) is a great...

 

  Question of the Day

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

 

Getting the time

How do I get the system time in R?

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

 

Redgate SQL Change Automation
 

 

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

Cleaning Your Tables

What does DBCC CLEANTABLE do?

Answer: This reclaims space from all variable-length dropped columns

Explanation: DBCC CLEANTABLE is designed to reclaim space from dropped variable-length columns. Ref: DBCC CLEANTABLE - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-cleantable-transact-sql?view=sql-server-2017

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.


DAX query on filter in Power BI - Hi I have created a DAX formula that counts an attribute based on a filter. Is it possible to have a filter coming from two different dimension groups.   In the example below, I want to count all Table A field A records where the TableA.field3 = 1 and TableB.Field2 =2 .   CALCULATE(COUNT('TableA'[FieldA]), Filter('TableA', [Field3] […]
Calculate the sum of a value where a specific column has a lower value (DAX) - I have an SSAS tabular Model with a table containing ledger data and another table containing account information. On this account filtering table I have a field called Typeorder. The Typeorders are as follows COA_Type ,Typeorder Revenue ,1 COGS ,2 Operating Expense ,3 NonOperating Expense, 4 Income Tax ,5 Asset ,6 Liability ,7 Equity, 8 […]
Master Data Services - Can Anybody Please Assist me in connecting to  Internet Information Services. Here follows the error, settings etc.
Creating 1 record in 1 table from multiple records in another table - 0 I am trying to populate a table with multiple records from another table. I have a table which contains records of an employee's schedule. Each record contains a single incident of a date and time for 1 employee: Fields are: ScheduleID = unique record identifier ScheduleName = identifies the schedule ScheduleLine = identifies the […]
SSIS - runaway queries after converting - (Not sure if this is the right forum, if not: mods please move). I'm converting our data warehouse from SQL 2012 to 2017. Once I increased the database compatibility to 2017, a number of my queries are now runaways -- queries that take a few minutes when running through a query window will take hours […]
Concatting in variable - I don't really understand the following issue. I can fix it by adding the Sorting in the subquery itself, however why does this not work? I have a table which contains 3 rows (NL,BE,US). I want to concat those in 1 variable called @Output. When the bit @StartWithNL = 1, it should always start with […]
VIEW SERVER STATE privilege for a stored procedure - I have a logging stored procedure that need to perform SELECTs from sys.dm_exec_connections and sys.dm_exec_sessions.  To do so, the principal requires VIEW SERVER STATE privilege.  Obviously, I do not want to grant every user which would execute the stored procedure VIEW SERVER STATE privilege.  The stored proc is compile under the SA account.  Yet, unless […]
Replicate data of tables fromSQL Server to Postgres SQL - Hi all, We need to replicate data from SQL Server to Postgres SQL database for limited tables. We created a linked server on SQL Server and we are able to insert data from one table of SQL Server to postgres Table using Insert statement below. INSERT INTO TEST_POSTGRES.testdb.[public].courtcase_casetype( casetype, status) SELECT CaseType, Status FROM [dbo].[tblCaseType]; […]
Exceptional Handling is not executing catch block - Below is the sample stored procedure and tale for error  logging error table: CREATE TABLE [dbo].[ErrorLog]( [ErrorID] [bigint] IDENTITY(1,1) NOT NULL, [LogDate] [datetime] NULL DEFAULT (getdate()), [ErrorProcedure] [varchar](100) NULL, [ErrorLine] [int] NULL, [ErrorDescription] [varchar](4000) NULL, [Parameter Details] [varchar](4000) NULL, ) sp for error log : CREATE PROCEDURE [dbo].[spInsertErrors] @ParamDetails varchar(4000) = null AS BEGIN SET […]
Automate Master Data Management (MDM), replicate master data to different source - I want to gather master data from different sources (Oracle/DB2/MySQL/SQL Server etc.) and then merge in central database then replicate data back to its subscribers automatically. Is there any way using MDM or SQL Server Replication to publish specific Tables/Columns to different data sources? I know about MDM little, which is difficult to implement, it […]
Log shipping from different versions - Hello, Is it possible to create log shipping from sql server version 2008R2 to SQL Server version 2016?   thanks in advance!
Use constraints to determine to execute either an insert or an update (re-post) - Hello, I would like to use either a Unique Constrain or Check Constrain to determine if an insert should be executed or if an update should be executed....here is the pseudo code of scenario: I have a table named Foo with the following columns: User_Name, Visit_Number The UserName column captures the user name, and the […]
import backup from database miroring to ALWAYSON - Good evening everyone I have a backup of a database configured in mirroirng I have to use this backup for the imported in an alwayson configuration Should you remove the mirroring on this base and make another backup before importing it into the alawayson thank you for your advice
Cant Connect to SSRS URL and Also Not to MySQL PHPMYAdmin - Can Somebody please Assist? I cant connect to SSRS URL ad also not to phpmyadmin.  
SQL Capacity planning - Hi, I am assigned to migrate the databases from SQL Standard 2012 /2014 to SQL Enterprise 2016. Around 20 production databases with different database sizes comes all togther 500gb. In these 20 dbs only 3 databases are having maximum IO.  In these 3 dbs one is around 300gb and other 2 dbs are 100gb and […]
 

 

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

 

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