u/pulokjk

▲ 0 r/dotnet

How do you guys use Claude (or similar AI) to interact with your MSSQL database?

Hey everyone, I'm working on a .NET 4.6 project with Entity Framework and an MSSQL Server database that's getting pretty complex. We have a bunch of stored procedures that I suspect could use some optimization work, but I'm looking for a better workflow to actually make that happen.

Here's my situation:

  • I have a legacy .NET 4.6 project with EF and a connection string in the config
  • Database has a decent schema with multiple tables and some SPs that are getting slower
  • I've tried using Claude Code to interact with the DB directly, but it can't actually execute queries since it's sandboxed

What I'm trying to achieve: I want to give Claude actual read/execute access to my database so it can:

  1. Analyze the current schema and business logic
  2. Write and test optimized queries
  3. Actually run the queries and compare execution times
  4. Understand the business logic from both the database structure and my C# project
  5. Come back with recommendations or even write the optimized code

My current plan: Use SQLCMD to let Claude execute queries directly against my database, but I'm wondering:

  • How are you guys using Claude or LLM for database work? Are you just sharing schema dumps and asking for optimization tips or do you have something more integrated?
  • What other tools do you use for this kind of DB operations?
  • Have you had success with AI actually optimizing your queries? Or is it more of a "get suggestions and test manually" kind of thing?

I'm open to other approaches too – whether it's exporting execution plans, schema documentation or something else entirely. Just looking for a workflow that actually works in practice.

Appreciate any insights! 🙌

reddit.com
u/pulokjk — 11 hours ago

Hi,

I’m planning to visit the outdoor furniture market outside Bashundhara City Complex in Panthapath today. Does anyone know if it stays open after 7 PM?

If you’ve been there recently or know the usual closing time, please let me know.

Thanks!

reddit.com
u/pulokjk — 21 days ago
▲ 2 r/Dhaka

Hi,

I’m planning to visit the outdoor furniture market outside Bashundhara City Complex in Panthapath today. Does anyone know if it stays open after 7 PM?

If you’ve been there recently or know the usual closing time, please let me know.

Thanks!

reddit.com
u/pulokjk — 21 days ago