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

Daily Coping Tip

Be kind to yourself. Start the week off by doing something for yourself.

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.

Where Does NoSQL work well?

It seems not too long ago that NoSQL was the hottest thing on the market. MongoDB was leading the charge, with tremendous growth as a company and many developers looking to adopt their platform. I remember years ago going to visit a number of customers in New York City, where Mongo had just grown their offices. Every company was considering migrating their RDBMS to MongoDB, trying to calculate the cost and return.

Now, I certainly hear about companies adopting database that are in the NoSQL family, but not always (or even often) to replace a RDBMS. Instead, it's for a new application or alongside an existing RDBMS. While there are applications that are well suited for a non-RDBMS data store, there are plenty that perform worse on those platforms. This might be because the platform doesn't handle their workload, or because the developers aren't writing good code, but I know I'm not worried that RDBMS usage is going away, or even down.

I ran across an article earlier this year that wonders if NoSQL is a good choice for your application. The article covers a bit of the types of these stores and how they work. It's a basic look, but it makes sense and it addresses the benefits of NoSQL, like scaling. It also notes there are issues, which is something to think about. Not that I see a lot of developers thinking about the issues. Often they think the can code around them.

The piece notes that for some problems, these databases work great. However, for a side project or a simple site, a relational store is likely better. NoSQL classes of databases are suited to scale well, but with quite a few tradeoffs.

Are there places you'd use NoSQL? I'm curious. If your organization has adopted these stores, or rejected them, it would be good to share some information.

Steve Jones - SSC Editor

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

 
 Featured Contents

Reading and Writing your Database's Documentation using JSON

Phil Factor from SQLServerCentral

One of the problems to which I keep returning is finding the best way to read and apply documentation for databases. As part of a series of articles I'm doing for Redgate's Product Learning, I've been demonstrating how to maintain a single source of database documentation, in JSON, and then add and update the object […]

Creating and Maintaining a SQL Code Snippet Library

Additional Articles from Redgate

How to save all your different types of SQL code snippets in a central library of JSON Snippet Collections, where you can search and edit each collection and then write them out as individual code snippets, for use in SQL Prompt, SSMS or your programmer's clipboard.

Getting Started with Azure Purview for Data Governance

Additional Articles from MSSQLTips.com

In this article we will explore how to get started with Azure Purview and then explore some of the features within Purview Studio.

From the SQL Server Central Blogs - Server Review Essentials for Accidental and Junior DBAs—Prepping for Server Reviews

Kevin3NF from Dallas DBAs

Welcome back to our series, Server Review Essentials for Accidental and Junior DBAs, where we’ve been taking an in-depth look at how to get ready to perform regular SQL...

From the SQL Server Central Blogs - A Weekly SQL Clone Image Creation Process

Steve Jones - SSC Editor from The Voice of the DBA

SQL Clone is a neat product from Redgate that I wish I’d have had when I was doing database software development. It lets me have a consistent image for...

 

 Question of the Day

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

 

The CURRENT_TIMESTAMP

I have a CREATE TABLE statement and I use a default for a column with the CURRENT_TIMESTAMP value. My table looks like this:
CREATE TABLE defaulttest2
( myid INT
, mydate DATETIME2(7) DEFAULT CURRENT_TIMESTAMP)
GO
What is the datatype that is returned by CURRENT_TIMESTAMP?

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)

The Debug Parameter

I have a function in a module that I've loaded into my session. If I add the -Debug parameter to my function call, what is the value of $DebugPreference for the duration of the function call?

Answer: Inquire

Explanation: When -debug is passed in, the value is set to Inquire. Ref: About_Preference_variables - https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Core/About/about_Preference_Variables?view=powershell-7.1

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
Business Use changes - when to delete disabled jobs - Over the past 5 years with my employer, I have created a number of stored procedures, jobs, etc as I built interfaces for outside vendors. As the vendors have changed, and we entered into an affiliation agreement with a larger organization, many of the jobs are now disabled and the tables and SPs are no […]
SQL Server 2017 - Development
Seeking input on Best Method to Join on First or Last Row in a 1:M Join - I have included the DDL to re-create the 2 tables in this examples. I can't post the actual DDL so these are abbreviated versions of the 2 tables I'm working with. The relationship between PERSON and PERSON_HISTORY is 1:M.  What I seek is the most effective/best method for joining these 2 where I get only […]
SQL Server query results sort order with totals - I am trying to sort by the ID with the highest total. I can sort by ID and then get the total for each member but I cannot seem to get it to sort by id and total. Below is what I have and what I want. On what I have I am doing Any suggestions on […]
SQL Server 2016 - Administration
Argument syntax for SSIS Execute Process Task Editor - Hi, I'm trying to modify my SSIS packages to use sftp and since it cannot be done using the FTP Manager Connection within SSIS, I am calling a PowerShell script to connect to our sftp server and move the files as needed.  The PowerShell script works okay and copies the file with no errors, but […]
Handling reports of slow-running procedures - Hello experts, Does anyone know of a page or document that outlines a process for user reports of "slow-running procedures"? This issue is pretty frustrating for me because SQL activity is so dynamic that it's not like easier problems of missing permissions, low drive space, etc. Each time I get a request to look into […]
SQL Server 2016 - Development and T-SQL
Multiple deadlocks occuring on simultaneous deletions from temporal table - We have a stored procedure which is attempting to delete 1-2 rows at a time from a temporal table overnight. The stored procedure is executed several times simultaneously (around 10-15 threads) by parallel processes, and so attempts may be made to delete 30 rows simultaneously by different SPIDs, for example. DELETE FROM dbo.Table WHERE ID […]
Does Every BEGIN require an END - Does every instance of BEGIN within your code require an END? I've seen more than one piece of code, usually a Stored procedure made by the vendor who provides our accounting software, that has more instances of BEGIN than END.  I always believed that every instance of BEGIN required an END. Is that not the […]
help on execute table variable into one table - I have created table variable as below , just want to that result into table as last line is not working please help on that, Select * into table_temp from execute (@query) how to make sure this query like select * into table_2 from  table_1   DECLARE @cols AS NVARCHAR(MAX), @query AS NVARCHAR(MAX) select @cols […]
SQL Server 2019 - Administration
UniqueIdentifier as Primary Key, non-clustered index, fragmentation issue - I've been working a little bit with a few tables here, they've got "CreatedDate" as clustered Index and and Id (UniqueIdentifier) as Primary Key. The Id's are generated from code and are non-sequential. The problem(?) is that the Id-PK index gets heavily fragmented almost instantly even after a defrag-session. I can't say I've identified any […]
SQL Server 2019 - Development
DB logins permission script out - Hi, Can anyone share or point me to get -DB logins permissions in a single script. Not using use dbname. I could see all script is having use db, since i have lot of db.
Unable to connect to Remote SQL Server Application from C# Application - Hi there We have a remote SQL Server instance on a VM , that we can connect to successfully from SQL Server Management Studio on my local machine. However I am having problems connecting to this database from a c# application Now my connection string is as follows: string ConnectionString = "server=METRODEMO\\SQLEXPRESS;Database=Logger;Trusted_Connection=True;"; I have also […]
SQL Server 2008 - General
Foreign key for Xml Datatype - Is foreign key constraint possible in xml data type? OR Is it possible to mention multiple Foreign keys  in a single cell? For ex: If xml has 2 rows, 2 ids will be given in main col with some separator, if xml has 3 rows then 3 keys so on. Can it be done?
Checkdb error - While  executing DBCC CHECKDB i am getting following error "Check terminated. A failure was detected while collecting facts. Possibly tempdb". Checked for estimated tempdb following was the result. Estimated TEMPDB space needed for CHECKALLOC (KB) 19762 Estimated TEMPDB space needed for CHECKTABLES (KB) 1 Auto growth is enabled for tempdb still error repeats. what is […]
Powershell
table script to dump to csv with foreign key order - Can PS be used to dump the SQL DDL to csv but do it in the order which would used to reload an empty database.. Tables have lots of foreign key constraints .  I would like to produce a file that I could use to rebuild an empty database, but foreign keys are causing me […]
Oracle
Need Help with Pivot / Unpivot SQL - Hi Can any one help me with query to transfer from position1 to position2 as shown below ?  
 

 

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

 

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