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

Local Agents

Recently I saw an interesting article, saying that someone could build a general purpose coding agent in 131 lines of Python code. That's a neat idea, though I'm not sure that this is better than just using Claude Code, especially as the agent still uses the online version of  the Claude model from Anthropic to generate code or perform other tasks. There's a video in the article showing how this code can be used to perform some quick tasks on a computer.

However, the code isn't specific to Anthropic. It can be used with any LLM, and I started doing just that, with a copy of the code from the article, but modified to use a local AI LLM running under Ollama. You can see my repo and feel free to download and play with it. It's expecting a local LLM on 11434.

I'm a big fan of local agents for a variety of reasons, but mostly because I know humans tend to do dumb things. Especially with new technology, and maybe even more especially in development areas.

That includes me.

I'll take shortcuts. I'll give an agent sysadmin on a dev database to try things. I want to be able to experiment, learn, and see what works. I want to learn how to use tools and fail using them. That's how I get better. That's how I get better in sports, in music, and in technology.

And that's not a project I can take time to work on. I don't get to dedicate time to just learn and then go back to work. Work never ends. It's a grinding, constant, continuous treadmill of things I need to deliver to others. I have to learn to experiment around those deliverables when I can find spare moments.

With AI, that means we'll do things that get InfoSec teams to cringe. I get the concerns over data transiting networks and going to who-knows-where to be used who-knows-how-by-others. I appreciate business subscriptions that guarantee that data won't be used, but I also want extra safeguards at times. That means local models. Not necessarily on my laptop, but in my data center.

Plus, that way I (or my org) can control the costs and manage expectations.

I hope local models and local agents catch on, I hope more vendors support them and more organizations are willing to run them. Even in something like AWS Bedrock or Azure Open AI or Vertex AI. Then I can rent the latest and greatest hardware, but have more control over how my organization uses it.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

Introducing the Relational Embedding Retrieval Pattern: Storing and Querying Vector Embeddings in SQL Server

SQL Expert from SQLServerCentral

Learn about using SQL Server to support AI-enhanced search queries with the Relational Embedding Retrieval Pattern (RERP).

External Article

Cross-database ownership chaining in SQL Server: security risks, behavior, and privilege escalation

Additional Articles from SimpleTalk

A dangerous privilege-escalation path exists in SQL Server when cross-database ownership chaining, system database defaults, and overly permissive permissions are combined.

Blog Post

From the SQL Server Central Blogs - Cultural Change: Fostering a Cost-Aware Culture in Your Organisation

HamishWatson from The Hybrid DBA's Blog

After working deep in cloud operations, I’ve learned that FinOps isn’t really about dashboards or optimisation scripts. Tools can highlight waste, but culture determines whether anyone acts on it....

Blog Post

From the SQL Server Central Blogs - Impactful Sessions I’ve Seen: T-SQL Tuesday #196

Steve Jones - SSC Editor from The Voice of the DBA

This month I’m thrilled that Steve Hughes is hosting. I’ve read this Data on Wheels blog for a long time and I appreciate all that he does, especially given...

Technical Article

Databricks Data Intelligence Platform: Unlocking the GenAI Revolution

Site Owners from SQLServerCentral

This book is your comprehensive guide to building robust Generative AI solutions using the Databricks Data Intelligence Platform. Databricks is the fastest-growing data platform offering unified analytics and AI capabilities within a single governance framework, enabling organizations to streamline their data processing workflows, from ingestion to visualization. Additionally, Databricks provides features to train a high-quality large language model (LLM), whether you are looking for Retrieval-Augmented Generation (RAG) or fine-tuning.

 

 Question of the Day

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

 

Detecting Deadlocks

By default, how often is the SQL Server Database Engine checking for deadlocks?

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 a JSON Document II

I want to create a JSON document that contains data from this table:

TeamID TeamNameCity         YearEstablished
1      Cowboys  Dallas       1960
2      Eagles   Philadelphia 1933
3      Packers  Green Bay    1919
4      Chiefs   Kansas City  1960

If I run this code, what document(s) is/are returned?

SELECT json_objectagg( n.city : n.TeamName)
FROM dbo.NFLTeams;

Answer: 1 row with 1 document with 4 key:value pairs

Explanation: This returns one row with a single document with the data from the rows aggregated as separate key:value pairs. Ref: JSON_OBJECTAGG() - https://learn.microsoft.com/en-us/sql/t-sql/functions/json-objectagg-transact-sql?view=sql-server-ver17

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.


Editorials
Who is Irresponsible? - Comments posted to this topic are about the item Who is Irresponsible?
Poor Names - Comments posted to this topic are about the item Poor Names
Don't Panic - Comments posted to this topic are about the item Don't Panic
Acting with Confidence - Comments posted to this topic are about the item Acting with Confidence
Article Discussions by Author
Creating a JSON Document I - Comments posted to this topic are about the item Creating a JSON Document I
Designing Database Changes Before Deployment: Level 1 of the Stairway to Reliable Database Deployments - Comments posted to this topic are about the item Designing Database Changes Before Deployment: Level 1 of the Stairway to Reliable Database Deployments
Removing TDE - Comments posted to this topic are about the item Removing TDE
The day-to-day pressures of a DBA team, and how we can work smarter with automation and AI - Comments posted to this topic are about the item The day-to-day pressures of a DBA team, and how we can work smarter with automation and AI
Creating a Simple and Flexible Random Password Generator in SQL Server - Comments posted to this topic are about the item Creating a Simple and Flexible Random Password Generator in SQL Server
SQL Art, Part 3: Happy Easter Fun in SSMS - Comments posted to this topic are about the item SQL Art, Part 3: Happy Easter Fun in SSMS
Identities and Sequences IV - Comments posted to this topic are about the item Identities and Sequences IV
SQL Server 2022 - Administration
Breaking SQL Server for disaster recovery practice - Hey all. I understand if this gets taken down due to the subject matter but I am at a point in my career where I am leading a team of 3 other DBA's and I want to get them some database DR practice. What I am hoping for are some ways to break SQL Server […]
SQL 2017 to SQL 2025. Good to Go ? - We need to replace our Windows server running SQL 2017. Any reason not to go to SQL 2025 ?  Any "gotchas" migrating databases from SQL 2017 to SQL 2025 ?
SQL Server 2022 - Development
Analysis Services Model w/ Direct Query and (Default Veritpaq) - Analysis Services (either the integrated workspace in Power BI or on a SQL Server) lets you interact with the data via: DirectQuery - runtime request transformed into SQL statements against data source Import Modes - runtime request applied against cached in-memory VertPaq data imported (processed) PowerBI and Azure Analysis Services support "composite" models, where some […]
Daily aggregation of Azure Blob Storage by tier (created/tier-change/deleted) - Hello all, I’m looking for advice on how to derive a daily snapshot table from a large fact table in SQL Server that tracks Azure Blob Storage metadata. In production this table can have tens of millions of rows, and its structure cannot be changed. To make the problem reproducible, I’ve created the simplified version […]
 

 

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

 

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