SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

The Voice of the DBA

Auto DevOps

As much as I like DevOps, this scares me. There are a lot of employees (20%) at BMW that are software engineers. They want to increase that to a larger percentage, which I assume means that we'll have more and more code in our automobiles, with more systems tightly integrated. We're even gathering more and more data in modern vehicles. Maybe there are good database job opportunities for some of you with automakers.

If there's one thing we've learned in a few decades of writing software, it's that large monolithic systems are a mess. They contain vulnerabilities, and more importantly, they are very difficult to patch and change. All of the DevOps success stories I've seen from large systems have either been a complete rewrite, or a long term refactoring that removes dependencies and tight couplings between modules.

In cars, we've seen all sorts of hacking issues. Hackers can attack a vehicle remotely and a faulty (or hacked) update might leave you in trouble. Granted these things aren't that likely, yet, though I think this piece understates the potential problems. I think that because once a hack is discovered, how sure are we that a) it will be reported to vendors (hackers might just exploit it), or b) that a fix will certainly be developed that works well and doesn't cause any issues (remember 10s of millions of lines of code current year cars), and c) consumers will apply the patch. That last item worries me, especially if cars become more connected and share data about operation or as we move to autonomous (semi- or total) vehicles.

Personally I'm not against code in vehicles. I'm not even against some connected systems. What I am against is a monolithic, tightly coupled system. I don't want engine control or drive by wire sharing a network or code with a CD player or navigation system. I don't want one computer controlling vehicular functions, entertainment, and climate control. I also want to be sure that there is some protection for all this data, to be sure it doesn't overwhelm any system. I'll also admit I like idea of upgrading or replacing parts from different vendors, some of whom might do a much better job of building systems.

We've learned a lot about software and complex systems. While I don't want all manufacturers to use one system or have tight regulations, I would like to see some mandates that separate critical systems from each other. Both in code, and physically. We don't need to specify code standards, or encryption, or any details, but let's ensure that a base bar of building software is being used in any of the mass produced vehicles, planes, trains,  automobiles, or anything else of substantial size that is operated by the general public.

Steve Jones from SQLServerCentral.com

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


The Voice of the DBA Podcast

Listen to the MP3 Audio ( 4.7MB) podcast or subscribe to the feed at iTunes and Libsyn. feed

The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music.

ADVERTISEMENT
SQL Clone

SQL Clone: Now supporting databases up to 64TB

Create copies of production databases and SQL backups in seconds and save up to 99% of disk space using SQL Clone. Redgate’s new tool removes much of the time and resource needed to create and manage database copies, allowing teams to work on local environments to develop, test and diagnose issues faster. Try it free

SQL Monitor

New SQL Monitor Reporting Module

SQL Monitor now includes a new Reporting module. It allows you to create customized reports, combining the individual server performance metrics available in SQL Monitor with summary information on your entire SQL Server estate. These reports can then be exported to pdf and emailed to you on a scheduled basis. Download SQL Monitor now and get a 14 day free trial

Featured Contents

 

Creating a Robust SSIS Development Environment using the SSIS Catalog

Reinis Berzins from SQLServerCentral.com

Discover how to integrate features of Visual Studio and the SSIS Catalog for an efficient development and deployment environment. More »


 

How might classification and better documentation improve data safety?

SQL Atlas is the latest prototype to come from the Redgate Foundry - find out more about what the tool does and try out the interactive demo for yourself. More »


 

Query Store and Parameterization Problems

Additional Articles from SimpleTalk

The query store gives us a novel way of identifying those queries that are causing performance problems when they are parameterized by SQL Server for reuse. Although it is relatively simple to ensure that certain troublesome queries avoid the problem, it is laborious to identify these queries. Additionally, Query Store gives us the means to fix the problem for groups of queries by means of plan guides without changing the DDL at all. Dennes Torres explains the details More »


 

From the SQLServerCentral Blogs - Database Fundamentals #5: Database Properties

Grant Fritchey from SQLServerCentral Blogs

Don’t let the ease of creating databases lull you into a false sense of security. They actually can be very... More »


 

From the SQLServerCentral Blogs - What Immediate_sync means in Transactional Replication – Part1

Dharmendra Keshari from SQLServerCentral Blogs

In my previous two blogs – Capture Important Parameters of the SQL Server Replication and Add new articles to existing Transactional Replication... More »

Question of the Day

Today's Question (by Steve Jones):

I am trying to round down for in my coffee card tracking to ensure that I never run out of money. For each amount, I want to round down and ignore the cents, which means that I will be saving fractions of dollars throughout the year. I'll use all these at the end of the year to buy Christmas presents. I also want my deposits (show as negatives) to also be rounded, to add more savings.

In testing, I don't seem to get the right results from this query.

 WITH mycte (a, n) AS (SELECT a, n FROM (VALUES ('Coffee', 2.38), ('Coffee', 4.53), ('Recharge card', -15.50), ('Recharge card', -5.25)) a (a, n) ) SELECT a, SUM(FLOOR(n)) FROM mycte GROUP BY a; 

I have more tracked in recharges than I added, not less. Why?

Here are my results

 a ------------- ------- Coffee 6 Recharge card -22 

Think you know the answer? Click here, and find out if you are right.


We keep track of your score to give you bragging rights against your peers.
This question is worth 2 points in this category: FLOOR().

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

Exam Ref 70-761 Querying Data with Transact-SQL

Prepare for Microsoft Exam 70-761–and help demonstrate your real-world mastery of SQL Server 2016 Transact-SQL data management, queries, and database programming. Designed for experienced IT professionals ready to advance their status, Exam Ref focuses on the critical-thinking and decision-making acumen needed for success at the MCSA level. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I run this code, and I get a NULL because this isn't valid XML.

 SELECT TRY_CONVERT(XML, '') 

What is returned with this code?

 SELECT TRY_CONVERT(XML, 4) 

Answer: Msg 529, Level 16, State 2, Line 3 Explicit conversion from data type int to xml is not allowed.

Explanation:

If a conversion is explicitly not allowed, an error is returned. In this case:

Msg 529, Level 16, State 2, Line 3
Explicit conversion from data type int to xml is not allowed.
Ref: TRY_CONVERT - click here

» 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 2016 : SQL Server 2016 - Administration

Notification if any plan changes against any specific table/procedure - Hello, Is there anyway I can get notified if there is any new plan in place against any specific table object...


SQL Server 2016 : SQL Server 2016 - Development and T-SQL

Identity Insert - Hi, I am trying to do a identity insert on table .[WorkComment_test. DDL CREATE TABLE .(      NOT NULL,      NOT NULL,      (max)...


SQL Server 2014 : Administration - SQL Server 2014

Read Access to Database Tables - How do you do it in MS-SQL ? - Hi all, I need to control access to the developers&business users whom (by business rules) are allow to look into certain...


SQL Server 2014 : Development - SQL Server 2014

Display members with active cards - Hi guys, I have a little complicated issue, I want to display all the members in the Allmembers table, and their card...

How to find row(s) with the same value in a recordset - Hi, I got this query, that gives me all the products(optionid) that are ready to be shipped: SELECT T_Order_Detail.OrderID,    T_Order_Detail.OptionID,    T_Order_Detail.Quantity FROM...


SQL Server 2012 : SQL 2012 - General

Backup DB as a bak file type? - Hello, I am using SSMS and trying to do a db back. I select DB > Tasks > Backup. Type: Full Destination: Disk...


SQL Server 2008 : SQL Server 2008 Administration

Memory Issue - SQL Server 2008 R2 - Hello. Last saturday I migrated a sql server 2008 r2 sp3 from a server Dell R730 Xeon E5-2697v3 with 512GB to...


SQLServerCentral.com : SQLServerCentral.com Website Issues

How can I delete my account - How can I delete my account at sqlservercentral.com?  I can't find any information on it.  I don't want my email...

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.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2017 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: [email protected]