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

Daily Coping Tip

Regularly pause to stretch and breathe today.

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 Craziness of Code

Every once in a while I find a fun post that makes fun of programming. I think because the author is struggling with some piece of code, they write about the craziness of software development, often with an analogy that compares building something in the real world to how software programs get written. Here's one, with a bridge construction analogy, that degenerates into a rant on the disparate ways in which different programmers work together and how the entire world of the Internet is held together in a constant patch-fix loop.

I do think that most large software applications have a decent amount of inconsistency. I'd suspect most large databases (in terms of object count), also have a variety of techniques, tools, and standards in use. That's because the tooling that we use to build things change. We don't have the constraints of the real world, which is why we could have a stored procedure using a subquery to calculate a running total and another one that uses the OVER() clause.

We can be more consistent in SQL because the language doesn't change as quickly, but in application code, frameworks, techniques, and even libraries come and go constantly. Different developers have favorites, and without strong controls that limit the experimentation of your staff, likely your code base has a variety of styles and algorithms that do the same thing. Static code analysis, linters, and unit tests can help ensure your code runs effectively, but it still likely has sections that no one wants to touch.

This flexibility can be maddening to developers, especially when they start a new position. At the same time, each of them probably thinks there are a few places where they think they can write the code better, and they will attempt to do so, even if they are creating more inconsistency in the project. Multiply this by the 40% of programmers that are willing to make changes without trying to mimic how others write code and pretty soon the architect (if you have one) has no idea how anything works.

In the real world, we can't easily get things to work together if they are disparate. We don't suddenly change from framing one wall with a 2x4 to another with a 2x6. We might use different size nails or thinner brake pads or any of a number of other changes from one place to another, but often those differences don't matter. At least not enough that we find houses and bridges constantly falling down. Of course, the workers building those structures follow a set of plans and standards, using similar tools and techniques.

That doesn't happen in software, where you are often not limited by external constraints, but often your imagination. We can construct things in software that no one ever thought of before, we can grab materials, i.e. code from Stack Overflow, and use them in our system. Often builders don't get to source materials from wherever they want, which inherently limits the variation between parts of the structure. That being said, lots of little mistakes get hidden in construction projects, just like they do in code.

I don't think programming sucks. It's always an interesting challenge, and I do think that when you have a group of developers that care about their craft and are trying to work together to solve a problem, we get some amazing software built and deployed. It might not be consistent or pretty, but often it works very well. If it takes regular maintenance, that's fine. It's an ongoing challenge that keeps us employed.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

Understanding the Mapping Data Flow Activity in Azure Data Factory

Randheer from SQLServerCentral

Learn about using Mapping Data Flows in Azure Data Factory.

External Article

The 10 Benefits of Monitoring for Leaders

Additional Articles from Redgate

A third-party database monitoring tool is an investment that drives enormous value for the bottom line of a business in ten key ways, from simplifying cloud migration to retaining talent. Here's how.

External Article

Understanding SQL Server Linked Servers

Additional Articles from MSSQLTips.com

In this tip we look at how to setup a Linked Server in SQL Server using SQL Server Management Studio.

Blog Post

From the SQL Server Central Blogs - Error – Reference to external ‘master.dacpac’ could not be resolved when deploying dacpac in Azure Devops

Koen Verbeeck from Koen Verbeeck

I have a database project in Visual Studio. Inside the database, I use a couple of system views to fetch some metadata about tables. To make the project build...

Blog Post

From the SQL Server Central Blogs - Online Training Courses

Tim Radney from Tim Radney - Database Professional

Today Paul sent out the quarterly numbers to the team letting us know the hours our courses have been viewed during March. Being a data guy, I decided that...

 

 Question of the Day

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

 

The DB2 Migration

I want to migrate a DB2 database to an on-premises SQL Server database. Which tool(s) should I use?

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)

Creating Azure SQL Databases

I want to delegate the ability of someone else in my organization to create Azure SQL databases in my subscription. I create a login for another user, and want to give them the ability to create new databases. Which role should I assign in the logical master database?

Answer: dbmanager

Explanation: There is a special role in Azure SQL database that you can assign to logins to allow them to create databases. This is the dbmanager role. Ref: Fixed database roles - https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles?view=sql-server-ver15#special-roles-for--and-azure-synapse

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
How to change shared datasource in Report Server SSRS using t-sql? -   I need to change a shared datasource for more than a hundred reports from Report Server. (the step below on a snip) So for each report on a server I'd go to "Manage" --> "Datasource" and from there select datasource I need. Is any way I can do that using t-sql in ReportServer database?
SQL Server 2017 - Development
When value is same for the status then - Hi Expert, there is condition when value is same for the status then it should take min date and if the value is change for the status then max date create table test (newdate datetime,status varchar(10), value varchar(10)) insert into test   values ('2022-01-04 18:00:57','Newone','segmentone'),('2022-01-04 19:00:57','Newone','segmentone'), ('2022-04-04 18:00:57','Newtwo','segmenthee'),('2022-04-04 19:00:57','Newtwo','segmenfour')     expected output ('2022-01-04 18:00:57','Newone','segmentone') […]
Must declare the scalar variable "@Name". - Hello, i need your help please since i am stuck here and not sure how to fix this. Trying to run this code below and getting this message (Must declare the scalar variable "@Name"). How can i pass the @name into the from clause so the results are returning for each db? Thank you DROP […]
SQL Server 2016 - Administration
One linked SSRS report is not visible to clients - Hello experts, I'm facing a puzzling issue. Clients have a linked report that a developer made. Although the clients can see two other linked reports in the same folder, for some reason they report they cannot see the third report. I have made a chart below to show the details. I checked the permissions and […]
SQL Server 2016 - Development and T-SQL
Maintenance Plan to Sever All Connections - Before I ask the question, I know this can be done via *.bat files and task scheduler on the server or a forced reboot of the server and a few other methods, but unfortunately, due to security reasons at my company,  we do not have the ability to do this outside of SQL Server itself, […]
SQL Server 2012 - T-SQL
V-40922 SQL Server must enforce password encryption for storage. - how do i get a list of SQL Server database objects, database configuration files, associated scripts, and applications defined within or external to SQL Server that access the database/user environment files/settings. Thank you
SQL Server 2019 - Administration
SSIS Problems - Hello, I am setting up SQL 2019 and trying to get a couple old SSIS packages to work.I am getting the error message, "TaskDetail:Error: The requested OLD DB Provider Microsoft .ACE.OLEDB.12.0 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode." When I go to the Scheduled Job to […]
When you add a database to the Always on availability group, What checks does th - Hi, When you add a database to the Always on availability group, What checks does the SQL\database engine perform?   Thanks.
SQL Server 2019 - Development
min date for repeated values - Hi Expert, I wanted to fetch min date records where value column data is repeated   create table test3 (newdate datetime,status varchar(22),value varchar(22) ) insert into test3 values ('2021-06-16 09:44:47.000', 'Newthree', '6 - 1'), ('2022-04-01 18:00:57.000', 'Newthree', '6 - 1'), ('2022-03-28 15:58:40.000', 'Newtwo', '3 - Test'), ('2022-03-31 15:20:17.000', 'Newtwo', '8 - MO'), ('2022-04-01 18:20:27.000', 'Newtwo', […]
How to split single name with space in sql - I have  table data with stores like select Name from tblstudent Result will be Southeri,Brettuen I need space after comma  (Result should be like Southeri, Brettuen)   How can we achieve this?  
Using a CASE Statement In A WHERE Clause - I want to use a case statement in a where clause and I want to use getdate() in conjunction with a date field in my table (MyAuditDate) to determine which where clause I use. In other words, if getdate() falls between the first day of the month and the Fifteenth day of the month, I […]
SQL Azure - Development
Is it possible to use Azure Data Studio to connect to on-prem SQL Server? - I'm getting this error when trying to create a connection to an on-prem SQL Server through Azure Active Directory - Universal with MFA authentication. Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught) Thanks!
Azure Data Factory
Azure Synapse Pipeline: Create resuable Quality Assurance modules - Hi, There is a requirement from the project team to design a Synapse based solution which has reusable load assurance and quality assurance controls added to it. The idea is that for any source entity to be ETLed to target, it could use these built QA code blocks/modules in the pipeline. A catch here is […]
Reporting Services
Duplicate Subscriptions but with different parameter - Hi forum, First time post. I am looking for some help with SSRS Running in SQL Standard 2019. I have reports that are parameterised by store. I need to schedule the emailing of reports, and have created one subscription for store 1. Aside from the store number the rest of the subscription is the same, […]
Employers and Employees
Do we now need to be full developers? - I initially got into the world of databases as I didnt enjoy hard core development - websites, javascript, asp.net etc just was not my thing It feels however that we are more and more being pushed into semi-developer roles. E.g. on my latest project, some functionality requires creation of azure functions. The MS documentation makes […]
 

 

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

 

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