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

Smart AI Agents and Data Security

I don't know if Anthropic, OpenAI, or Google have really spent a lot of time and effort on security around their models. I know they talk about it (Anthropic, OpenAI, Google), but in practice, I'm not sure the researchers and testers are being as careful as the marketing and management of those companies want you to think.

Gemini broke into three companies during a security test. Claude escaped a test environment and breached three organizations. OpenAI had breaches of Hugging Face and other sites, so perhaps this is the most powerful model, as it exceeded the "rule of three." In all these cases, the agents weren't doing anything amazing. These were acting the same as most malicious or bored human hackers who might find or guess credentials and take advantage of them. In some sense, this points to the generally poor state of security in the world.

On the other hand, it could be that these high-tech organizations aren't equipped to secure systems from the rapid, capable digital fingers of agents powered by a model. If they can't, then to what extent can we be expected to secure internal AI agents in our organizations?

For those of us who secure and manage data assets, do we think that our systems are well secured? Do we think our legitimate users, to whom we've granted access, are securing their credentials? What is the likelihood that we'll have an internal breach from an agent that's asked to find some data and discovers a) unsecured credentials in a file or repo, b) finds production data it can access in a non-production, less secure system, c) a backup of a database not protected that the agent can restore, or d) some other hole?

I do think AI has a lot of potential, but it operates in a somewhat slapdash, reckless fashion. I'm not convinced most vendors (or models or software incorporating AI) will provide robust and comprehensive security controls. Even if they do, how many of us will know how to implement them well? Heck, we see developers and DBAs mess up SQL Server security on a regular basis, and I think that's a simple system to configure.

I'm excited by AI and also terrified of the possibilities.

Steve Jones - SSC Editor

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

 
 
 Featured Contents
SQLServerCentral Article

Building a SQL Server Fleet Audit That Leadership Actually Reads

Mayank Sethi from SQLServerCentral

Learn how to build a report that shows the health of your database estate that your leadership will read and use.

External Article

“But NOLOCK won’t hurt me if I’m using an index!”

Additional Articles from Brent Ozar Blog

NOLOCK is bad and you probably shouldn't use it, but every time I mention that publicly, the pushback just keeps coming. I don't know why people so firmly believe that their situation couldn't possibly be affected by bad/random data from NOLOCK.

Technical Article

Take the 2027 State of the Database Landscape Survey

Press Release from SQLServerCentral

Share your view on the database landscape and you could win USD$500.

Blog Post

From the SQL Server Central Blogs - Microsoft Tools for Making Data AI-Ready

James Serra from James Serra's Blog

Making Data AI-Ready, Part 2 (This is the second article in a three-part series on making data AI-ready. Part 1 covered the fundamentals of AI-ready data, this article looks...

Blog Post

From the SQL Server Central Blogs - Local Models Using GPUs with Ollama

Steve Jones - SSC Editor from The Voice of the DBA

Can you use your GPUs when running a local model under Ollama? You can, and it really depends on how you run Ollama and what your hardware is. Ollama...

SQL Server 2022 Query Performance Tuning

Grant Fritchey from SQLServerCentral

Troubleshoot slow-performing queries and make them run faster. Database administrators and SQL developers are constantly under pressure to provide more speed. This new edition has been redesigned and rewritten from scratch based on the last 15 years of learning, knowledge, and experience accumulated by the author. The book Includes expanded information on using extended events, automatic execution plan correction, and other advanced features now available in SQL Server.

 

 Question of the Day

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

 

RegEx Functions IV

I have this data in a table in a SQL Server 2025 database:
EmailAddressID EmailAddress
7              dylan0@ADVENTURE-WORKS.COM
8              Diane1@ADVENTURE-WORKS.COM
If I run this query, which row(s) are returned?
SELECT top 10
 *
 FROM person.EmailAddress
 WHERE REGEXP_LIKE(EmailAddress, '^D', 'i')
 AND BusinessEntityID IN (7,8)

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)

Finding Trailing Spaces

I have some data in a SQL Server 2025 database. It looks like this for the dbo.Customer table:

CustomerID CustomerName PreferredName
1          Steve        Steve               
2          Andy         Andy               
3          Brian        Brian               
4          Allan        Allan               
5          Devin        Devin               
6          Steve        Steve               
7          Sally        Sally

I want to detect which names have a single trailing space. The CustomerName is a varchar() and the PreferredName is a CHAR(). Does this query detect the problem rows?

SELECT 
       CustomerID,
       CustomerName,
       PreferredName
FROM Customer
WHERE CustomerName <> RTRIM(CustomerName)
OR PreferredName <> RTRIM(PreferredName);

Answer: No, this doesn't work.

Explanation: This doesn't work for a few reasons. First, the char() columns will all have trailing spaces. This requirement doesn't make sense. For the varchar() columns, the comparison pads the shorter string to even them out, so if there is a trailing space, it's hidden. The best way is to compare LEN() to DATALENGTH() for varchar. For char, tell the client you can't tell. Ref:

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 2019 - Development
Querying Multiple Tables for the Same Information - I have about 100 Tables that are all suffixed with _Modify. These tables record changes made to these 100 tables. Each of these tables may or may not contain a column called 'User' to record the userid  of who made the change. I can get the names of all the tables with the following query: […]
Editorials
Designing for Teams - Comments posted to this topic are about the item Designing for Teams
Absolute and Relative References - Comments posted to this topic are about the item Absolute and Relative References
Get Along - Comments posted to this topic are about the item Get Along
Finely Tuned Models - Comments posted to this topic are about the item Finely Tuned Models
Make It Routine - Comments posted to this topic are about the item Make It Routine
Older Versions of SQL (v6.5, v6.0, v4.2)
Looking for old SQL Server 1.x - 4.21 disks, manuals, boxes, etc. - Hi everyone, I'm hoping some of the longtime SQL Server professionals here might be able to help me with something. I've been doing a lot of research into the earliest versions of SQL Server for SQL.FM, a SQL Server version and feature reference site I maintain, and as part of this effort I've also started […]
Article Discussions by Author
Checking the Error Log II - Comments posted to this topic are about the item Checking the Error Log II
Parameter Sniffing on SQL Server 2025: A Walkthrough with Real Numbers - Comments posted to this topic are about the item Parameter Sniffing on SQL Server 2025: A Walkthrough with Real Numbers
Moving Beyond the Reboot: Finding the Culprit Behind Memory Pressure - Comments posted to this topic are about the item Moving Beyond the Reboot: Finding the Culprit Behind Memory Pressure
Reserved Words I - Comments posted to this topic are about the item Reserved Words I
RegEx Functions III - Comments posted to this topic are about the item RegEx Functions III
Optimized Locking in SQL Server 2025: Fewer Locks, Less Blocking, and the Cases It Cannot Fix - Comments posted to this topic are about the item Optimized Locking in SQL Server 2025: Fewer Locks, Less Blocking, and the Cases It Cannot Fix
Finding Gaps in Sequential Data Using SQL Server - Comments posted to this topic are about the item Finding Gaps in Sequential Data Using SQL Server
Negative and Positive Numbers - Comments posted to this topic are about the item Negative and Positive Numbers
 

 

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

 

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