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

Cook your favorite food for someone who will appreciate it

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.

Looking Back at Software Development Trends

In some ways, the world of software development hasn't changed much. The same sorts of skills and techniques I saw people using on COBOL programs hitting DB/2 and C++ over Oracle 6 are used today in React and C# against Azure SQL database. On the other hand, it does seem that we are more mature in how we work together and the flexibility with which we design systems.

I saw the results from a survey from 2019 that Atlassian ran for software developers. This was a look at what modern trends might exist, though over a year later, perhaps the world is dramatically changed again. Let me look at each of the four trends they point out.

I've been hearing about microservices for years, but have found relatively few customers using them. I don't hear a lot about them in the RDBMS space, and I think this is because the idea of separating out each entity (or small set) in a database and having data access only through a front end component doesn't make sense. There's power in using an RDBMS to enforce data integrity rules and allow aggregations. I've also seen some companies looking for miniservices, not micro ones.

Manual testing is still very prevalent for customers. While there are lots of unit tests, including some against a db, they don't always extend through CI to more complex scenarios. Quite a few customers still have bottlenecks where humans look at the application in a larger sense. I think the high cost of tools that run more complex tests is a part of the problem. I'm not sure how we improve this, though I do hope to see more unit or functional tests for db code.

Feature flags are extremely complex, though I do see them more as a defensive measure, where features are released, but then turned off if there are issues. This prevents a rollback from the app and db standpoint. I also don't see a lot of use of dark deploys for database features, perhaps because until the app is working, we aren't sure the data model is correct. Feature flag cleanup is certainly an issue for some clients.

The last trend is one I rarely see implemented. Looking at customer outcomes, and not just immediate sales, is something that few people seem to do. Perhaps because developers are evaluated on the work they complete, not whether it's in use. Managers are evaluated based on getting developers to do work, or on the sales that are produced, but it seems that few organizations try to measure the customer impact. We've started doing that at Redgate, and I'm interested to see how this evolves.

Keeping developers motivated, excited about their jobs, and productive with creative solutions is tough. The trends listed from the article seem to me more aspirational for most of the organizations with which I deal. Most clients I know see developers as interchangeable parts, similar to factory workers. I think if they invested a little more in the well-being of developers, both from their mental focus and the growth of their skills, they might find a lot more benefits accruing from their software.

Steve Jones - SSC Editor

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

 
 Featured Contents

An Introduction to Azure Synapse Analytics Workspace

Sucharita Das from SQLServerCentral

Introduction The Azure Synapse workspace is in preview mode as of July 2020. The workspace brings together enterprise data warehousing and big data analytics. This workspace has the best of the SQL technologies used in enterprise data warehousing, Spark technologies used in big data analytics, and pipelines to orchestrate activities and data movement. Here, I […]

Clarifying Data Warehouse Design with Historical Dimensions

Additional Articles from SimpleTalk

The standard data warehouse design from Kimball with facts and dimensions has been around for almost 25 years. In this article, Vince Iacoboni describes another way to design slowly changing dimensions.

Deployment Suite for Oracle: What’s New? Git Integration in Redgate Change Control v3.0

Additional Articles from Redgate

In Redgate Change Control v3.0, you can now commit your database changes to your local Git repository and collaborate with your team by pushing and pulling changes from the remote Git repository. If you’re using branches, you can also create and switch Git branches from within Redgate Change Control.

From the SQL Server Central Blogs - Caution When Dropping Unused Indexes on an Azure SQL Database

SQLEspresso from SQLEspresso

Index Maintenance is an important aspect of database health. Above and beyond regular index rebuilds and reorganizations it is important to understand the usage of the indexes on your...

From the SQL Server Central Blogs - Unconscious Bias

SQLRNNR from SQL RNNR

This article helps to unearth a cultural issue that each individual needs to address on a personal level. Bias is an enemy to productive conversation.
Related Posts:

Note to Self June...

 

 Question of the Day

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

 

Rebuilding System Databases

I realize that one of my SQL Server 2019 instances was installed with the wrong collation. Rather than re-install, I want to detach the user databases and rebuild the system databases. How do I do the rebuild?

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)

BDC Instances

What are the types of SQL Server instances that are part of a BDC (Big Data Cluster)?

Answer: compute and datapool instances

Explanation: There are compute instances and datapool instances. The former is used to scale out the actual query processing. The latter are used to manage storage and the datapool. Ref: What are Big Data Clusters? - https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-overview?view=sql-server-ver15

Discuss this question and answer on the forums

 

Featured Script

Execute on DMVs without user having View Server State

inkosi_dba_dev from SQLServerCentral

Wanted to share this script to the community just in case anyone out there may be search for a way to allow a hosted customer the ability to query certain DMVs for information without granting them View Server State. There are some other options out there, but this worked better for me after going through […]

/*
Purpose:
This script is intended to provide database customers
with an alternative way of executing on a system objects
without gaining the right to the {View Server State}
permission.

Description:
The script assumes that the LOGIN is already created
and has a USER account in the specified database. The process
will allow a non privileged user the ability to execute a stored
proc that calls on a DMV to gain infomation regarding session activity.
Because the stored procedure is based in the user database a certificate signature was also attached to the Stored proc
in order to control the security risk of change to the proc in order to gain more
visibility.

--Logic
1. A stored proc is created in the user database.
2. A certificate is created within the user database
3. Use the newly created certificate to add a signature to the proc
4. Make a copy of the user database certificate and house it in the master database
5. Create login that will act as proxy from the certificate created in the master database
6. Grant {View Server State} to the certificate mapped LOGIN
7. Finally grant execute on the stored proc to the database user
*/

USE ['User Database Here'];
GO

CREATE PROCEDURE ['Proc Name Here']
AS

BEGIN
SET NOCOUNT ON;

--Example of querying on a DMV for full resultset
SELECT
[session_id],
[login_time],
[host_name],
[host_process_id],
[nt_user_name],
[login_name],
[context_info]
FROM sys.dm_exec_sessions
WHERE database_id IN ('database ids here if needed') --Databases pertaining to the customer if hosting multiple customers

END
GO

--Create Cert in the User DB
CREATE CERTIFICATE [Permission$ViewServerState]
ENCRYPTION BY PASSWORD = '$tr0ngP@ssw0rd'
WITH SUBJECT = 'VIEW SERVER STATE permission',
EXPIRY_DATE = '2025-12-31';

ADD SIGNATURE
TO [dbo].['Proc Name Here']
BY CERTIFICATE [Permission$ViewServerState]
WITH PASSWORD = '$tr0ngP@ssw0rd';

DECLARE @Cert NVARCHAR(4000) = CONVERT(NVARCHAR(4000),CERTENCODED(CERT_ID(N'Permission$ViewServerState')), 1);

--Use master to create a cert based on the user database cert
EXEC (N'USE [master];
CREATE CERTIFICATE [Permission$ViewServerState]
FROM BINARY = ' + @Cert);

--Create Proxy LOGIN and grant VSS permission
EXEC (N'USE [master];
CREATE LOGIN [Permission$ViewServerState_User]
FROM CERTIFICATE [Permission$ViewServerState];

GRANT VIEW SERVER STATE TO [Permission$ViewServerState_User];
');

--Final grant user Execute or Select(If a Table-valued Function is required) on the object
USE ['User Database Here'];
GO

GRANT EXECUTE ON OBJECT::[dbo].['Proc Name Here'] TO ['Execuiting User Name Here'];

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 - Development
Stored Procedure with Money Value - hi everyone, I've a "problem" with a Stored Procedure and .net application because two values (money) are managed as double and this generate a mismatch with currency (should be 187,50 but is 18750). In SQL, I created a User Table and SP: CREATE TYPE tbl_FIC_InvoiceGuest AS TABLE ( Invoice_Token nvarchar(50) NULL, Invoice_Total money NULL, ) […]
SQL Server 2016 - Administration
SQLServer2016 SP2 CU14 - Hi, Version: Microsoft SQL Server 2016 (SP2) (KB4052908) - 13.0.5026.0 (X64) Mar 18 2018 09:11:49 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor) We would like to install latest patch CU14 .But Last time CU12 installation was failed in this server. Can we […]
SQL Server 2016 - Run Jobs on Dynamic Logical Schedule - Hello, In SQL 2016, I currently have monthly, weekly and daily maintenance plans that run on a fixed schedule. As a new requirement, I need to run it more dynamically than on a fixed time. The plan is: 1. If 1st of month - then run Monthly job 2. Then check if this is a […]
SQL Server 2016 - Development and T-SQL
sql2016 - if column cell changes, insert value into another column cell - How can I calculate or insert TrimWgt (17.15 from MasterRolls value =3) and (17.15 from MasterRolls value = 4) into another column if the MasterRolls column increments or different from the the previous. If I had another column in the table or I can create another table. Please assist. My table is updating every 30-60 […]
Development - SQL Server 2014
PIVOT table with more than one aggregate and for only weeks with data. - I need help to pivot my sql output for Class with aggregates of QTY and CUBES for WEEKS. Some rows will only have one of the classes. I would like to end up with something like this.   SELECT Datepart(wk, ompcreateddate + 84) AS week, CONVERT(VARCHAR, ompcreateddate + 84, 101) AS date, cmopostcode AS Zip, […]
SQL Server 2019 - Administration
Azure Data Studio and Jupyter Notebooks - Trying to install the PowerShell Kernel for ADS and it wont complete the download, this I am guessing is down to our policy to no longer allow connections to anything using the older TLS/SSL protocols, so it's blocking the download.   Anyone know of a way I can force ADS to use a different version […]
SQL Server 2019 - Development
SSMS SQL Editor "shortcut in the current line" - My fingers were fumbling at the keyboard in the SSMS SQL query editor window, and I ended up with a little [->] icon in the gray gutter bar on the left (where break point icons show). I knew approximately the keys I was working with and searched the Web. On this page: https://docs.microsoft.com/en-us/sql/ssms/sql-server-management-studio-keyboard-shortcuts?view=sql-server-ver15 I found […]
Reporting Services
SSRS page footer doesnt go all the way at the bottom of each or any page - Hello, I have a report almost like an invoice, and i put a page header, and it works, always appears at the top of the ssrs report page no problem. THE PROBLEM.... i have a page footer, and there is a gap between the bottom and the invoice totals etc., i attached a screen shot, […]
TextBox Property>Action>GotoURL for Multiple Values? - Hi I am using two stuff commands in my query. One gets the date of an action, there can be more than one and it was requested to have them strung along do it looks like 1/1/19,2/1/19,3/1/19 etc.... The other stuff command builds a url so the report can link back to the page for […]
SSRS 2016
How to access SSRS out of network - Hi All, I and new to SSRS and have Installed and configured a Reporting Service in my client (Its working in my network and users can access it). I want to test it at first to find out if the users can access to my reports via Internet?(because the final server which is going to […]
SSDT
SSIS dtexec Error - The 'OraOLEDB.Oracle.1' provider is not registered. - Hi I am have one SSIS package that connects to Oracle and pulls the data. I am trying to execute this package using DTExec utility. "C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\DTExec" /ISSERVER "\SSISDB\\\.dtsx" /SERVER "" But I am facing oracle connectivity error "The 'OraOLEDB.Oracle.1' provider is not registered on the local machine." continuously. I have designed […]
Analysis Services
SSAS dimensions and measures to JSON - Hi, I am in a situation where my front end needs names/unique names for all dimensions(levels and members) and also measures/calculations.  What is the best way to go about doing this?
Strategies and Ideas
Need help resisting falling back to dimensional/snowflake schemas - In a structure for an International business with a SalesOrder and SalesOrderLine, a data model needs created that answers these questions: 1. Show me which SalesOrders are in the sale region of South-East Asia 2. Show me the status of each sale order item. 3. Show me the total sales against each sales region compared […]
Integration Services
Import Active Directory objectGUID using .Net Provider for MS Directory Services - For a few years now I have been using SSIS and a ".Net Provider for OleDB\OLE DB Provider for Microsoft Directory Services" Connection in to extract Active Directory account information into a text file, so that I can cross check AD user accounts with accounts in older "downstream systems" that can't talk with Active Directory.  […]
SSIS - How to convert DateTime from ISO format - Hello, In my source file having DateCreated column as ISO format string like '2020-08-05T05:50:49.844Z'. I want to convert from ISO date string to DateTime2 in SSIS. Please advice best way to achieve this. Thanks, Sabarish
 

 

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

 

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