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

Daily Coping Tip

Get outside and find joy in being active

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.

Long Term Storage

Data storage has always been a concern for data professionals. Early on in my career, we dealt with large ESDI, IDE, and SCSI drives, all of which would fail unexpectedly in servers. Sometimes after a few years, sometimes after a few weeks. We learned to use RAID and tape backups to ensure that our data was recoverable.

In many places tape was the long term storage medium used. These days, I know many people have moved to secondary disk storage of some sort, often rotating data across a few disk types that give you recovery for days, weeks, or longer. I don't know how long term storage work in Azure or AWS, but I assume some sort of combination of technologies are in use. I also know I don't trust them completely to be readily available and recoverable after a few years.

For most of us, database backups aren't really relevant after some number of weeks or months. We usually just don't need to recover things from long term storage. The exception might be for some types of data that do need to archived for legal or financial purposes. I know we used to keep a end of year tape for 7 years after we'd closed the financial records at one company. I don't know if that would be the case today, especially with so many "digital records" of transactions. Would we really need to recreate a system as it looked on a particular day from 5 years ago?

However, there are types of data that we might want to archive for a long time. An example might be the arts, where we have lots of music and video that can preserved. There might be other records, such as historical government records, which are suitable for WORM (write-once-read-many) systems.

A new type of recording uses glass and may provide archival storage for thousands of years. Obviously we don't know this is the case as we haven't been recording digital information for thousands of years, but it's an interesting medium. It also doesn't require the algorithms to be maintained as the idea is machine learning systems can read back the data and learn to interpret it.

To me, that might be the most interesting part of this project. Using computers to learn to read the data rather than requiring us to know have an MP3 player, a database system like SQL Server, or any other particular technology. Instead, we can let the computer learn how to read the data and then play back that recording of Prince in the year 3510.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

Randomizing the Day Inside a Month Using T-SQL

Emmitt Albright from SQLServerCentral

This article shows how you can randomize dates in T-SQL, but keep the month and year the same while the day varies.

External Article

Python Try Except Code Samples

Additional Articles from MSSQLTips.com

In this article we look at how to use exception handling when writing Python scripts along with many different examples using try, except, else and finally clause.

External Article

DevOps 101 webinar: The role of Automation

Additional Articles from Redgate

Join Grant Fritchey to discover how automating your database deployments enables you to speed up software delivery with repeatable processes that stop your database being the bottleneck.

Blog Post

From the SQL Server Central Blogs - A Few Thoughts on SQL Saturday Jacksonville

Steve Jones - SSC Editor from The Voice of the DBA

I was lucky to attend SQSQL Saturday Jacksonville 2022L Saturday Jacksonville 2022 a couple of weeks ago. This was the first SQL Saturday of 2022 for me, and the...

Blog Post

From the SQL Server Central Blogs - TSQL Tuesday #150: Your first technical job. Rollup.

Kenneth.Fisher from SQLStudies

This months subject for T-SQL Tuesday was Your first technical job. I have to say I really really enjoyed reading ... Continue reading

 

 Question of the Day

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

 

The Service Name

What does this code return?
SELECT @@SERVICENAME

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)

Power BI Build In Expressions

I want to get the Execution time and a few other pieces of metadata for my Power BI reports in the Report Builder. What is the prefix for the variables to use in an expression for variables like ExecutionTime, OverallPageNumber, etc.?

Answer: Globals!

Explanation: These are global variables and the Globals! is used as the prefix, as shown here:

=Globals!ExecutionTime

Ref: Build-in collections - Globals and User References - https://docs.microsoft.com/en-us/sql/reporting-services/report-design/built-in-collections-built-in-globals-and-users-references-report-builder?view=sql-server-ver16

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 - Development
How to avoid using operator when there are different values on two tables ? - I work on sql server 2017 I need to get different of feature value based on partid and feature name I search for alternative way to compare different values based on partid and feature name without using <> not equal operator because i face slow when using <> not equal so what i do so […]
Error: excel automation Open File does not work in SQL 2017 - This code works on other 2005 SQL Sever but my 2017 SQL Server gives error. /* Excel Automation*/ declare @xlApp integer, @rs integer Declare @FileName varchar(500) declare @xlWorkbooks integer declare @xlWorkBook integer declare @xlWorkSHEET integer declare @xlCell integer declare @xlLastRow INTEGER DECLARE @sql VARCHAR(4000) execute @rs = dbo.sp_OACreate 'Excel.Application', @xlApp OUTPUT select @rs, @xlapp execute […]
SQL Server 2016 - Administration
Upgrading from sql server 2012 to SQL server 2016 - I upgraded the SQL server from 2012 to 2016 and it successfully completed with one error during upgrade. The error is " Invalid Namespace" click retry the failed action, or click 'cancel' to cancel the action and continue setup. I clicked retry first but got same message again then clicked cancel and it went succesful […]
How to confirm if the replication is using Push/Pull subscription? - Hello, On an existing configured replication setup, how to confirm if it's using a Push or Pull subscription? Basically working on setting up a similar replication in a new server, but am unable to find the details of the existing legacy server's configuration!
Development - SQL Server 2014
explicite alternative to FORMAT() concerning DATE - Hi all, I have been using FORMAT() FORMAT(Tab.date, 'yyyy-MM-dd') AS 'date_begin', but been told it would be slow when it comes to big queries. How can I still want the result to be a date (NOT STRING) But I want to 'discard' the Days, Hours, etc (2020-11-01 00:00:00.0000000) Leaving a year/month only date field (2020-11) […]
SSIS execute SQL - I am running SSIS >> Execute SQL task with Direct sql Statement , connected to MySQL via ADO.Net as CREATE TABLE Test_abc ( task_id INT AUTO_INCREMENT PRIMARY KEY, title VARCHAR(255) NOT NULL ) Insert into Test_abc(title) values('abc');   but when I run the package, following error is displayed Problems with the query, "ResultSet" property not […]
SQL Server 2019 - Administration
Faster Retstore options. - Hi, I'm looking for a third-party backup and restoration solution because native restore takes roughly 7 hours for a 4TB database. Some of the object restore solutions really do a full restore in the background then just pull out the tables selected. This does not alleviate the 7-hour time limit. Is the Lite Speed version […]
Uninstall SQL 2012 Install SQL 2019 use the existing AOG Listener & cluster name - i have a task: Uninstall SQL 2012 Install SQL 2019 use the existing AOG Listener & cluster name Can any one guide step by step?
How can I generate a key for this column which is part of a database model? - I am normalizing a larger table. Here is a screenshot showing part of the relationship of the normalized table: I'm using MS SQL Server and SSMS. The plan was to create the empty tables then insert values from the denormalized table. I started doing so until I realised that I hadn't generated 'Type codes' in […]
SQL Server 2019 - Development
UNION from many linked servers - Hello! Here is an example of a script that selects into one table the same data spread across  2 linked servers --/****** Script for SelectTopNRows command from SSMS ******/ DECLARE @DateTimeStart DATETIME; DECLARE @DateTimeEnd DATETIME; SET @dateTimeStart = '2022-06-10 10:00:00' SET @dateTimeEnd = '2022-06-10 11:00:00'; IF OBJECT_ID(N'tempdb..#TQC') IS NOT NULL BEGIN DROP TABLE #TQC END […]
Inner Join with multiple filter - Table 1 Bank ID Transaction ID Date Amount 1 1 30-06-2020 50 1 2 30-06-2020 80 1 1 31-12-2020 72 1 2 31-12-2020 71 2 1 30-06-2020 70 2 2 30-06-2020 100 2 1 31-12-2020 67 2 2 31-12-2020 82 Table 2 Bank ID Transaction ID Date Amount 1 1 31-03-2021 83 1 2 31-03-2021 […]
SQL that copies and pastes data in a database that changes - Good Morning, I have programmed a SQL coding that copy "z" data under the "a" data but the number "a" rows can change (It finishes row number 16 in my example below but it can finish row number 25) I have added below the coding that I had programed Can you change my coding in […]
Strategies and Ideas
Proper DW Fact and Dimension design questions - Sorry, I'm not great at Data Warehouse design. =(  I'm modeling a bakery for a friend of mine. He purchases ingredients and the prices for them may change over time. (Flour prices are crazy).  The design for that part of the problem is kinda like this: BakeryProduct --- (1,m)---Recipe(BaleryProductKey, IngredientKey, Weight)--(M,1)--Purchase (IngredientKey, DateKey, VendorKey, Units, […]
Proper DW Fact and Dimension design questions - Sorry, I'm not great at Data Warehouse design. =(  I'm modeling a bakery for a friend of mine. He purchases ingredients and the prices for them may change over time. (Flour prices are crazy).  The design for that part of the problem is kinda like this: BakeryProduct --- (1,m)---Recipe(BaleryProductKey, IngredientKey, Weight)--(M,1)--Purchase (IngredientKey, DateKey, VendorKey, Units, […]
Integration Services
SSIS - ignore the file that has issue and continue with the others - I have 10 text files and file 4 at nth row has special character that cant be loaded to sql server table required is to log the issue AND ignore processing the 4th file and process the rest      
 

 

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

 

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