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

A Real World Clash with AIs

A group of people are protesting more cars in San Francisco by disabling self-driving cars with a cone on their hood. It is likely that the cone disables some sensors and won't let the cars move. For truly autonomous cars, this could be an issue if people could prevent them from working. I could image a strip of duct tape or some other smaller obstacle that might also work and be less noticeable to anyone looking at the vehicle.

Ignoring the humor here, or the more-cars-in-cities debate, this is an interesting place where computing systems can fall down. People do find ways to hack sensors or other ways in which our software gets data from the real world, which can force behaviors we didn't expect. We might allow for these, or we might not. In this case, I don't know that the developers could do anything different, other than perhaps detect and alert the owners that the vehicle can't move until someone clears the obstacle. They could add more sensors, but I suspect hackers would just block those.

The bigger issue is that as we depend on computing devices that might work in the real world, we'll have more problems like this. Simple hacks that can interfere with the machines completing their tasks. If we get very dependent, imagine trying to summon this vehicle to get you to the hospital, then these hacks become more than just vandalism.

We have similar issues with people in the real world. People flatten tires (how does an autonomous car change a tire), they padlock doors and gates, they might do any number of things that interfere with others' ability to live their lives. Humans can often adapt to these issues, but what about computing devices? Will a new class of jobs come about to correct issues like this? Will we see "fix-it" robots that autonomously move around and remove cones from hoods or change tires?

It's hard to even think about all the crazy permutations of how autonomous computing devices can evolve and the types of interactions we might have. I'm not even sure if I think that the way we are approaching AI and autonomous systems is good. We're often applying similar frameworks to them that we do for other humans, which I'm not sure if the best way to approach these decisions.

The future is looking very strange, and it's coming quickly. I'm not even sure what to think about issues like this.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

Provisioning Microsoft Fabric: A Step-by-Step Guide for Your Organization

diponkar.paul from SQLServerCentral

See how to get started with Microsoft Fabric.

External Article

Database Monitoring for Developers

Additional Articles from Redgate

Database monitoring is an essential part of database development and testing because it will reveal problems early and allow you to drill down to the root cause, as well as look for any worrying trends in behavior of the database, when under load. If you are delaying doing this until a database is in production, you're doing it wrong.

External Article

Working with SQL Server Stored Procedures and .NET

Additional Articles from MSSQLTips.com

There is more than one way to work with SQL Server stored procedures from within a .NET Application. However, when using parameters, in order to avoid exposing your code to "SQL Injection" vulnerabilities, there is a certain way based on which you should write your code.

Blog Post

From the SQL Server Central Blogs - Creating and Configuring a Power BI VNet Data Gateway

Meagan Longoria from Data Savvy

If you are using Power BI to connect to a PaaS resource on a virtual network in Azure (including private endpoints), you need a data gateway. While you can...

Blog Post

From the SQL Server Central Blogs - Reflections on the Software Industry

Kevin3NF from Dallas DBAs

Every now and then we like to have someone do a guest post, with a topic of their own choosing. This time, we picked Kevin Miller (LI). Kevin is...

SQL Server 2022 Administration Inside Out

Steve Jones - SSC Editor from SQLServerCentral

Dive into SQL Server 2022 administration and grow your Microsoft SQL Server data platform skillset. This well-organized reference packs in timesaving solutions, tips, and workarounds, all you need to plan, implement, deploy, provision, manage, and secure SQL Server 2022 in any environment: on-premises, cloud, or hybrid, including detailed, dedicated chapters on Azure SQL Database and Azure SQL Managed Instance.

 

 Question of the Day

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

 

The PowerShell Copy

I have this PowerShell code:
$source="c:\fileloading" #location of starting directory
$destination="c:\fileloaded"; #location where files will be copied to
$files="*dys_ihhist*" #files matching this pattern
$a = get-childitem $source -filter $files
$a | foreach {copy-item $_.fullname $destination\$($_.basename)-$(get-date -f yyyyMMdd)$($_.extension)}
What happens when I run this?

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 Variable Priority

I run these commands in an administrative command prompt in Windows:

setx myvar SQLSaturdayToronto

setx myvar SQLSaturdayBoston /m

If I now run this in a new command prompt that was just opened, what is returned?

echo %myvar%

Answer: SQLSaturdayToronto

Explanation: User variables override system ones. The two set statements put SQLSaturdayToronto in the user variable and SQLSaturdayBoston in the system variable. The user one is returned in a new window. Ref: Variable precedence - https://www.baeldung.com/cs/user-vs-system-variables#:~:text=If%20a%20user%20creates%20a,the%20person%20who%20declared%20it.

Discuss this question and answer on the forums

 

Featured Script

Create Dynamic External Table in Azure synapse Analytics

ktenneti from SQLServerCentral

This script creates an external table in Synapse.

CREATE PROCEDURE [dbo].[copy_to_extrnl_tbl]
@p_query VARCHAR(MAX),
@p_schma_nm [VARCHAR](255),
@p_extrnl_tbl_nm [VARCHAR](255),
@p_loctn VARCHAR(1024),
@p_data_src [VARCHAR](255),
@p_file_frmt [VARCHAR](255),
@p_debug_mode [BIT]
AS
BEGIN

DECLARE @v_sql_text NVARCHAR(4000) = '
IF EXISTS (SELECT 1 FROM sys.external_tables WHERE object_id = OBJECT_ID(''[' + @p_schma_nm + '].[' + @p_extrnl_tbl_nm + ']''))
DROP EXTERNAL TABLE [' + @p_schma_nm + '].[' + @p_extrnl_tbl_nm + '];' + '
CREATE EXTERNAL TABLE [' + @p_schma_nm + '].[' + @p_extrnl_tbl_nm + ']
WITH
(
LOCATION = '''+ @p_loctn + ''',
DATA_SOURCE = [' + @p_data_src + '],
FILE_FORMAT = [' + @p_file_frmt + ']
) AS ' + @p_query ;

/*======================================================================
Execute the dynamic SQL that was generated
======================================================================*/

IF @p_debug_mode = 1
SELECT @v_sql_text;
ELSE
EXECUTE sp_executesql @v_sql_text;

END

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 - Administration
PowerShell dbatools offline installation error - Hi. Server OS - Windows 2019 Std. SQL Version 2017 Enterprise. Downloaded dbatools-master.zip file and extracted all files, copied into following $env:PSMoudulepath folder  C:\Users\Administrator\Documents\WindowsPowerShell\dbatools\ Downloaded Microsoft.PackageManagement.NuGetProvider-2.8.5.208.dll. copied into C:\Users\Administrator\Documents\WindowsPowerShell\dbatools\. Downloaded dbatools.library.2023.5.5.nupkg, and renamed it dbatools.library (File type is LIBRARY File after renamed) then copied into C:\Users\Administrator\Documents\WindowsPowerShell\dbatools\. Finally dbatools module not get installed on server side […]
SQL Server 2016 - Administration
Backup progress minor question - Hello experts, I just noticed something sort of trivial, but curious nonetheless. I have a T-SQL backup statement using STATS = 10, but this was the output just now: 10 percent processed. 20 percent processed. 30 percent processed. 41 percent processed. 51 percent processed. 60 percent processed. 70 percent processed. 80 percent processed. 91 percent […]
Administration - SQL Server 2014
Event ID 19036 & 10016 from Application and System log at the same time - The OLE DB initialization service failed to load. Reinstall Microsoft Data Access Components. If the problem persists, contact product support for the OLEDB provider. Why do those 2 event IDs occur at the same time and what does it mean. What does this error mean?Where should I start to troubleshoot this and fix it. Is […]
Troubleshooting relocated database - Hi...   First time post to this forum. I've seen a strange characteristic after relocating a database from one server to another.   Overview:   My database SampleDB (data and log) reside on a SAN storage volume that is connected via fiber to the physical server that is running SQL Server 2014.  I currently have 2 physical […]
Changing Encryption on database from triple des to aes - We currently have a Windows 2016 server running Sql Server 2014 that uses triple des for field encryption.   We are in the process of getting that changed to AES 128 or AES 256, but I am not exactly sure how this process works so I thought I would ask for some guidance or directions to […]
SQL Server 2019 - Administration
NVARCHAR(MAX) to VARCHAR(MAX) - Quick and simple. Converting a column from NVAR(MAX) to VAR(MAX) has drastically increased the data stored in the column. Table size in MB is drastically higher after the conversion. There are extra GBs of data after conversion. Any explanations?
Increase the MaxTokenSize value of the server computer - The prelogin packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. We get quite a few of these errors. Per microsoft... https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-17832-database-engine-error?view=sql-server-ver16 The Max token size is already set to 65535 on the server but still these errors show up.They are benign […]
17832 error in sql server inspite of MaxTokenSize set to 65535 - 17832 error in sql server inspite of MaxTokenSize set to 65535 How can we get around this. These errors are clogging the error log. Thanks
SQL Server 2019 - Development
Trouble opening up SSIS package in VS 2019 - Package have connection to ORACLE database. And I have installed AttunitySSISOraAdaptersSetupX64 & MicrosoftSSISOracleConnector-SQL19-x86 on my machine to help connect to ORACLE.  When I try to open the package, I get this error. Any help on this would be much appreciated. Severity Code Description Project File Line Suppression State Error Error loading 'Packagename.dtsx' : Object reference […]
SQL Azure - Development
Azure SQL DB (not managed Instance) - emulation of linked Servers? - Hello there Community, we are using a Azure SQL DB. Now we want to get Data from some AWS RDS SQL Servers. Normally we would implement them per linked Servers, because we need the ability to get ad hoc data in queries. But there are no linked Servers with an Azure SQL DB, only with […]
General
Just sharing an experience related to backups. - You've all by now seen my tag about 'Backup(Backup(Your backups)).  Well, here's a real-life scenario: My friend, a PHD candidate at a local university, had materials related to his working dissertation on a 2.5" USB drive.  Couple weeks ago he tried to access it and it has failed.  The light blinks for a bit, then […]
Design Ideas and Questions
Help With Database Design - Hi, I am designing a database for keeping records of properties purchased and sold. And I am not sure how to implement the following relationship as shown in the screenshot below. I think this is somewhat related to the concept of inheritance but I am not sure how to best implement it at the database […]
SQL Server 2022 - Administration
Seeing below errors in SQL Server 2022 error log - XE session 'telemetry_xevents' is stopping and starting for every 1 hour . Please advise how to stop this. A valid TLS certificate is not configured to accept strict (TDS 8.0 and above) connections. The connection has been closed. An error occurred in a Service Broker/Database Mirroring transport connection endpoint, Error: 8474, State: 11. (Near endpoint […]
SQL Server 2022 - Development
Determine if value occurred within all shifts - I have an employee table with job Start and End dates. I also have a shift table of all available shifts for the company. Employee activity is contained in the #value table. I'm trying to obtain all shifts each employee crossed based on #EmpTable.Enc_Start and #EmpTable.Enc_end....and which shift an employee had 'activity' (#value.ProcDate).  I've tried […]
Converting sequential time records into IN and OUT times - Hi, We have a Time & Attendance application that stores the time punched by each employee in a sequential format. We have the indication for that. if the employee punches in and out on the same day no problem on that. if the employee punch in at 8 PM and punch out the next day […]
 

 

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

 

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