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

Daily Coping Tip

Talk three calm breaths at regular intervals during the day

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.

The Cloudy Future in 2021

Ignite took place recently, and the keynote from Satya Nadella was interesting, and if you have time, interesting to watch. If not, there's an excerpt in written form. In any case, I like his passion and excitement about the future. I'm slightly sad that he's not on stage somewhere, and instead in a studio of some sort, but that's the world today.

There were five pillars of the keynote which related to the future of the cloud. One of these was the idea that we are at "peak centralized computing" now, but we need to get more decentralized. The idea here, I think, is that we will have more of the computing services taking place outside of data centers and server rooms, and in more devices. We already see some of this, with mobile devices, cars, sensors, and more handling some computing loads.

The Edge is something Microsoft continues to push, and I think the adoption of this paradigm will continue, with some pre-processing or filtering occurring in devices or intermediate servers, and then less, or limited, data being loaded into our database platforms. I also expect that we'll see more data loaded into a database somewhere, and less ETL into another platform and more just in time querying from a client or other data store.

I was also glad that trust was a pillar, though I think this was an attempt to corral a number of disparate ideas into one topic. However, the idea of data protection, and individual rights such as privacy, are important, and I do think that Microsoft recognizes this. Even if they are just trying to build a product to profit, I appreciate the work they are doing in this area, adding new capabilities to allow companies to better control, limit access, and protect data in flexible ways. Now, if we can just get the companies to respect the individual's data they hold, I think the world will be better.

Lots of what Microsoft presents in their keynotes and conferences is aspirational, with limited experience or understanding of whether customers really will adopt these ideas. Every year I see some visions that don't ever get widely used across the next year and aren't mentioned the next year. However, some of their ideas are good, and some will evolve in different ways to help improve our world. This year, I loved seeing the remote ways HoloLens 2 is being used.

I never know what will catch on, but I do like seeing the visions that others have for our world.

Steve Jones - SSC Editor

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

 
 Featured Contents

PostgreSQL WHERE, ORDER BY, and GROUP BY Clauses

Shivayan Mukherjee from SQLServerCentral

Overview A database clause is a conditional statement used to filter data from the database. There are various database clauses available in PostgreSQL, like Where, Order By, Group By, Having, Distinct, Limit, Fetch. In this first chapter of the tutorial we will cover Where, Order By, Group By clauses with suitable example. WHERE Clause The […]

Storage 101: RAID

Additional Articles from SimpleTalk

RAID has been around since the 90s to ensure performance and reliability of storage. Robert Sheldon explains the history and theory behind RAID.

From the SQL Server Central Blogs - Setting the Sample Rate for Automatic Statistics updates

matthew.mcgiffen 73574 from Matthew McGiffen DBA

I talked a few posts ago about Automatic Sample Sizes for Statistics Updates. From SQL 2016 CU4 we've been able to override that. You can manually update a statistics...

From the SQL Server Central Blogs - Stellar Toolkit for MS SQL - Software Review

nelsonaloor from PracticalSQLDba

As a SQL database administrator, I am responsible for maintaining our organization's SQL Server and databases. But despite implementing best database maintenance practices, including backups and performing DBCC CHECKDB...

 

 Question of the Day

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

 

Getting the SQL Connections

I want to get a count of the connections to my SQL Server 2019 instance in T-SQL. Which of these work?

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)

An Empty NumPy Array

I have imported the numpy module:

import numpy
a = numpy.xxxx

What replaces the xxxx to get an empty array in the variable, a?

Answer: numpy.empty(shape=(0,0))

Explanation: The empty() function in the numpy module will do this. You can also use numpy.array([]). Ref: numpy.empty - https://numpy.org/doc/stable/reference/generated/numpy.empty.html

Discuss this question and answer on the forums

 

Featured Script

A varchar(MAX) STRING_SPLIT function for SQL 2012 and above

Jonathan AC Roberts from SQLServerCentral.com

An alternative for Microsoft's STRING_SPLIT function that will work on SQL Server 2012 and higher.

IF OBJECT_ID('[dbo].[STRING_SPLIT]','IF') IS NULL BEGIN
EXEC ('CREATE FUNCTION [dbo].[STRING_SPLIT] () RETURNS TABLE AS RETURN SELECT 1 X')
END
GO
ALTER FUNCTION [dbo].[STRING_SPLIT]
(
@string nvarchar(MAX),
@separator nvarchar(MAX)
)
RETURNS TABLE WITH SCHEMABINDING
AS RETURN
WITH X(N) AS (SELECT 'Table1' FROM (VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) T(C)),
Y(N) AS (SELECT 'Table2' FROM X A1, X A2, X A3, X A4, X A5, X A6, X A7, X A8) , -- Up to 16^8 = 4 billion
T(N) AS (SELECT TOP(ISNULL(LEN(@string),0)+1) ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) -1 N FROM Y),
Delim(Pos) AS (SELECT t.N FROM T WHERE SUBSTRING(@string, t.N, LEN(@separator+'x')-1) LIKE @separator OR t.N = 0),
Separated(value,position) AS (SELECT SUBSTRING(@string, d.Pos + CASE WHEN Pos=0 THEN 1 ELSE LEN(@separator+'x')-1 END , LEAD(d.Pos,1,2147483647) OVER (ORDER BY (SELECT NULL)) - CASE WHEN d.Pos=0 THEN 2-LEN(@separator+'x') ELSE d.Pos END - (LEN(@separator+'x')-1)),
d.pos
FROM Delim d
WHERE @string IS NOT NULL)
SELECT LTRIM(s.value) value,
ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) position
FROM Separated s
WHERE s.value <> @separator;
GO

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 - Administration
Stopping the SQL Server Agent before a datacenter shutdown - I have read different opinions on whether to manually shut off the SQL Agent service before shutting down a SQL instance for 2 days; some believe the server being off is perfectly fine, and others have said to manually stop the Agent and manually start when the server/instance is turned back on. To me the […]
SQL Server 2017 Dev Certificate error - Error Message attempting to download data from my SQL Server 2017 dev edition. 0 - The certificate chain was issued by an authority that is not trusted. I've tried so many suggestions and it's probably because I'm not a certificate expert. So. Two questions. As a person with limited DBA experience with advanced settings, how […]
SQL Server 2016 - Administration
Removing Stopped Databases - Greetings all,  first post.... In doing backups with our Cohesity system it reports errors with a few databases which lead me to investigate the cause.  Basically these are stopped databases on the Microsoft Server 2016 / MSSQL 2016 server systems.  The SQL Configuration Managers shows them as stopped.  These particular databases were moved to other […]
SSRS - Object reference not set to an instance of an object -     Hi All SQL Server version: 2016 SP2 CU13 I have one particular report that keeps giving me the error below....All other reports work just fine. An unexpected error occurred in Report Processing. (rsInternalError) Object reference not set to an instance of an object. According to the Execution log, the report ran last a […]
SQL Server 2016 - Development and T-SQL
Empty Index Statistics object - This is a new thread but relates directly to Index statistic is empty - how is this possible? My post in that thread and for background " I too am on SQL2016 CU15 , db in Compatibility mode 2012.  In the past four months we have had three occurrences of this problem. We are truncating […]
Transactions - Hi, Can you please let me know what is the benefit of using the 'SET IMPLICIT_TRANSACTIONS ON' in the below code when we already have 'BEGIN TRAIN' which can be used to rollback if any error occurs? So, I see IMPLICIT is also being used sometimes, not sure what is the benefit when we already […]
Development - SQL Server 2014
Index on View - Dear Group: I was going to create an index on a view we have, but I am getting the following error:  "Cannot create index on view '' because the view is not schema bound." I Googled this and found that the issue is that we need to create the view using SchemaBinding like the following:  […]
Calling a Function to Update Temp Table - Hello, I have created a function that will determine the Distance between 2 sets of Lat and Log Coordinates.  The function is working as desired.  As a next step, what I would like to do next is record the difference in miles into my temp table. I am attempting is to call the Function within […]
SQL 2012 - General
How to get PartId from table #trades that have wrong Code ON Code Value To when - How to get PartId from table #trades that have wrong Code ON Code Value To when code type from and code value from Exist ? How to get PartId from table #trades that have wrong Code ON Code Value To when code type from and code value from Exist ? I work on SQL server […]
SQL Server 2019 - Administration
SSRS report download fails - Hi. I am trying to download a report from SSRS 2019 in word format and fails with error as below: An error occurred during rendering of the report. (rrRenderingError) The type initializer for 'MS.Utility.EventTrace' threw an exception. Requested registry access is not allowed. Same case with Excel. Only PDF works. The cases when I am […]
Importing text file issue - Hi, I am trying to import the attached REF_RF1MAS.txt file but am getting numerous bulk load errors. I was given the attached A_spec that is supposedly the import specs but it does not seem correct. I tried the code below.  Any ideas on what the issue is? Thanks.   Msg 4863, Level 16, State 1, […]
SQL Server 2019 - Development
Wait for query to finish before returning results - When I do "select * from ... " from a large table, the result starts to "stream" before the query is completely done. Is there a way to prevent this? Some kind of oppositve of the "FAST" queryhint?
Many executionplans for one query, why? - I've yet to find an answer for this. I've found a few queries that have a few executionplans. Why is that? For example, I've seen queries (in QueryStore) that has executionplans A and B (and more)... For a few days the query uses A and then goes back to B, and then back to A […]
Reporting Services
SSRS Dynamic columns for different Year groups - Hi,   I have sample data, please can someone help me create the output based on the following data? So asically in SSRS when year 6 is selected it should populate the output below for Year 6, Year 7 populate the output for Year 7.   CREATE TABLE Data ( StudentId int, intYear int, ,subject […]
History Snapshots - Bulk create for many reports - Hi guys, just found the History Snapshot Option within SSRS. Do you know if there is a way to create a schedule that will be used by every report. E.G. I want to take a history snapshot of every report with a retention of 24 hours. Then the snapshot should be deleted. Maybe you can […]
 

 

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

 

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