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

The SQL Twilight Zone

This editorial was originally published on Nov 2, 2018. It is being republished as Steve is on holiday.

Imagine you've just returned from holiday and your data professional world is turned upside down. There's not a single SQL Server left at work, or maybe there's no job to work with SQL Server. Now, what do you do?

I'm hoping that's not the case for me, as I'm actually writing this a couple weeks ahead of time. When this publishes, I'll have just returned from a holiday in Hong Kong, which I'm guessing is a completely different reality than the one I normally live and work in. I'm very excited as I've ever been, so I likely won't be refreshed and recharged after a quick, 6 day trip to the other side of the world. Hopefully I slept very little and saw quite a bit.

In any case, I thought about this recently as I chatted with a few fellow data professionals that had left the SQL Server world behind. They had moved on, some with regrets, some happy, but for all of these individuals, there was no more SQL Server. In today's SQL twilight zone, imagine that you can't work with SQL Server any longer, but you do need to keep working.

On which platform would you want to work?

Perhaps there's another platform you work on now, or would like to work on. Maybe you'd want to move away from data and do something else? I'm also curious if some of you would be disappointed or just take a move in stride.

For me, I am a little torn and I've have to think a bit more about what to do. I've worked on other platforms in the past, and would be comfortable changing if I had to. My first inclination is to say PostgreSQL, which I've always admired a bit. It felt immature back when we started SQLServerCentral, but I liked it better than MySQL. And much better than Oracle or DB/2, especially with the tooling.

My other choice would be CosmosDB. I think what Microsoft is doing here is fantastic, and while there is work to be done, this is a great way to store some new data. The only concern I would have is are there enough jobs for people that work with CosmosDB? Adoption is growing,  but is it enough to build a career on? I'm not sure. Perhaps, but I'd have to make that decision after more research.

Let us know today. What platform would you move to, or would you leave databases?

Steve Jones - SSC Editor

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

 
  Featured Contents
SQLServerCentral Article

Using SQL Server Stored Procedures with the Django ORM

omu from SQLServerCentral

Learn how you can call stored procedures in the Django ORM, which lets you encapsulate more complex queries inside the database.

External Article

Data Streaming Databricks in Azure

Additional Articles from MSSQLTips.com

The core functionality of Apache Spark has support for structured streaming using either a batch or a continuous method. The two most popular sources of input data are data lake files and Kafka events. Check point files in the data lake are used to keep track of what data has been processed to date.

Technical Article

The State of the Database Landscape in 2025: Insights and trends

Steve Jones - SSC Editor from SQLServerCentral

How are you navigating the database landscape? Our latest report sheds light on the current state of database management and offers valuable insights into how organizations can navigate and simplify the growing complexities of the database landscape.

Blog Post

From the SQL Server Central Blogs - Which approach to take: Build it, buy it, cloud it?

Joyful Craftsmen from Joyful Craftsmen Blog

As a Consultant, I would typically answer with – it depends! Then a typical conversation starts with an expression of personal preferences based on experience, the organization’s history, and...

Blog Post

From the SQL Server Central Blogs - Book Review: A Radical Enterprise

Steve Jones - SSC Editor from The Voice of the DBA

I grabbed this book over the 2024 holiday season as it was on sale and recommended by the DevOps practitioners over at ITRevolution. A Radical Enterprise looks at a...

Deciphering Data Architectures

Deciphering Data Architectures

Additional Articles from SQLServerCentral

Data fabric, data lakehouse, and data mesh have recently appeared as viable alternatives to the modern data warehouse. These new architectures have solid benefits, but they're also surrounded by a lot of hyperbole and confusion. This practical book provides a guided tour of these architectures to help data professionals understand the pros and cons of each.

 

  Question of the Day

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

 

Multiple Sequences

In SQL Server 2022, I run this code:
CREATE SEQUENCE myseqtest START WITH 1 INCREMENT BY 1; GO CREATE TABLE NewMonthSales (SaleID INT , SecondID int , saleyear INT , salemonth TINYINT , currSales NUMERIC(10, 2)); GO INSERT dbo.NewMonthSales (SaleID, SecondID, saleyear, salemonth, currSales) SELECT NEXT VALUE FOR myseqtest , NEXT VALUE FOR myseqtest , ms.saleyear , ms.salemonth , ms.currMonthSales FROM dbo.MonthSales AS ms; GO SELECT * FROM dbo.NewMonthSales AS nms 
Assume the dbo.MonthSales table exists. If I run this, what happens?

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)

Inserting Sequences

I created a new sequence in SQL Server 2022 with this code.

CREATE SEQUENCE myseqtest START WITH 1 INCREMENT BY 1; GO

I want to use this to insert some data from another table into a new table with this sequence. Which of these queries shows the way to do this efficiently?

-- 1 INSERT dbo.NewMonthSales (SaleID, saleyear, salemonth, currSales) SELECT NEXT VALUE FOR myseqtest , ms.saleyear , ms.salemonth , ms.currMonthSales FROM dbo.MonthSales AS ms; GO -- 2 INSERT dbo.NewMonthSales (SaleID, saleyear, salemonth, currSales) SELECT NEXT VALUE , ms.saleyear , ms.salemonth , ms.currMonthSales FROM dbo.MonthSales AS ms, myseqtest; GO --3 DECLARE mycurs CURSOR FOR SELECT ms.saleyear , ms.salemonth , ms.currMonthSales FROM dbo.MonthSales AS ms DECLARE @yr INT, @mn INT, @sales NUMERIC(10,2) FETCH NEXT FROM mycurs INTO @yr, @mn, @sales WHILE @@FETCH_STATUS = 0 BEGIN INSERT dbo.NewMonthSales (SaleID, saleyear, salemonth, currSales) SELECT NEXT VALUE FOR myseqtest , @yr , @mn , @sales FETCH NEXT FROM mycurs INTO @yr, @mn, @sales END 

Answer: 1

Explanation: You can include the NEXT VALUE FOR seq in your code and it will insert multiple rows, each with the next sequence value. Ref: NEXT VALUE FOR - https://learn.microsoft.com/en-us/sql/t-sql/functions/next-value-for-transact-sql?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
Splitting Text based on certain phrases in string - I have a text string that contains something similar to below : [{"ChannelName":"LOT4 - Telephone","ChannelRecordId":"42c49edf-9aa1-ec11-b85f-00155d640f76","Removed":false},{"ChannelName":"LOT4 - Video","ChannelRecordId":"46c49edf-9aa1-ec11-b85f-00155d640f76","Removed":false}] I need to strip out into separate columns or create additional records for the guid after the text "ChannelRecordID":" and also the false at the end (which might say true). The number of iterations of the phrase ChannelRecordID […]
SQL Server 2016 - Administration
KB5046856 fails to install - Hello experts, The following SQL update is failing to install on some of our SQL Servers with the following error. Is anyone else seeing this? I've tried Googling the error but have not found a specific fix for this issue. Thanks for any help. -- webrunner Update: Installation Failure: Windows failed to install the following […]
Perfomance in views - Hello, I want to ask you about the following case that I live with a company in my country. They have a SQL server licensed with SQL enterprice ver 2016, where in the same instance about 25 databases coexist and in particular the main one and heart of all the systems, the Erp base. There […]
SQL Server 2016 - Development and T-SQL
Deadlocks after index rebuild - We rebuilt a bunch of indexes that had avg_fragmentation_in_percent>30. Now we have 1 job that is consistently getting deadlocks and I'm trying to find the root cause. Attached is the event data xml file from the deadlock event. Any help on which direction to start looking is greatly appreciated. We are using 2016 sp 2. […]
SSIS (Integration Services) - "External table is not in the expected format" - Good Afternoon. I have been manually running an SSIS package on an adhoc basis, which populates an Excel file from a SQL Server Table. There is no apparent issue with the package, but often I get the following error: "External table is not in the expected format" And it resolves when I Shut Down and Re-Start the […]
SQL Server 2019 - Administration
Multisubnet Cluster DBs not replicating - No AD on one subnet - Hi All, We have setup a 3 node SQL Server 2019 (CU30) multi subnet cluster with 2 nodes on production site and 1 node in disaster recovery (DR) site. The DR site does not have any AD/Domain and it is still under the same AD/Domain as production (Just different subnet but same AD - One […]
SQL Server 2019 - Development
how to output date of when a SP was created and last modification? - Hi everyone I have a query that gives me the list of all SP in my DB.  I would like to modify the query so it outputs two additional fields: 1. When was the SP created (call it CREATION_DATE)? 2. When was the SP last updated (call it LAST_UPDATE_DATE)? Is this possible?  If yes, how […]
Source to Target Mapping (Lineage) - Hi all, I work with an unusual warehouse and I was wondering if anyone else has this issue, we are looking to document source to target but with our set up it seems like it's going to be a manual process. We don't have a separate ETL tool that loads the data. Our warehouse is […]
where to find information about xE sqlserver.databases_bulk_copy_throughput - where to find information about xE sqlserver.databases_bulk_copy_throughput ? I'm searching for de description of all attributes ( e.g. "count" - is it number of B/KB/MB/GB or number of rows ? )
Analysis Services
How do I read XEL files in SSAS? - A colleague of mine has setup SSAS monitoring through Extended Events and these are writing to XEL files on the local server. Can anyone advise how I can read these on an SSAS server? I know how to do this in SQL Server but those commands don't work (or exist) in the SSAS query window. […]
SQLServerCentral.com Test Forum
New test Mar 2025 - Testing posting and replying
SQL Server 2022 - Administration
Service Principal Name (SPN) getting this error and then sqlserver restarting. -   HI All, Service Principal Name (SPN) getting this error and then sqlserver restarting. every time unable to find other thing in logs in event viewer and in sqlserver logs also , do we need to check with windows team to get a fix for this so that again and again this wont happens and […]
SQL Backup folder permission issue - Hi SQL experts, Having an issue on one of our SQL servers at work in which the SQL backup folder permissions are not right and the folder is inaccessible. I just noticed this problem when attempting to setup nightly maintenance plans. Even though I'm logged in with my domain admin account, I still don't have […]
DBCC Clone Database Failing on SQL 2022 - When running clone sql is changing one specific table to History table and its failing. Please suggest if there is any bug  
SQL Server 2022 - Development
Getting error in sql server 2022 - Hi folks We have migrated database from sql server 2014 std to sql server 2022 std. database get restored and old server is sql service is stopped. Now after few initial operation we are facing this error "Please create master key in the database or open master key in session" as checked on net restored […]
 

 

RSS FeedTwitter

This email has been sent to [email protected]. To be removed from this list, please click here. If you have any problems leaving the list, please contact the [email protected]. 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.
[email protected]

 

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