r/SQLServer • u/Arkiteck • Aug 21 '19
r/SQLServer • u/SQLSQLAndMoreSQL • Feb 11 '19
I see no reason why I should stop developing for SQL Server - Change my mind
r/SQLServer • u/[deleted] • Jul 06 '18
SQL Query for DBAs working today...
SELECT
UPPER(SUBSTRING(a.b,a.c,1)) +
LOWER(SUBSTRING(a.b,a.c+1,a.d-1) +
SUBSTRING(a.b,a.e,a.f)) as Message
FROM (
select 2 as id, 9 as c, 2 as d, 12 as e, 1 as f, 'All the goodness in the world' as b UNION ALL
select 1 as id, 20 as c, 4 as d, 1 as e, 1 as f, 'Kindness is better than openness' as b UNION ALL
select 4 as id, 25 as c, 3 as d, 3 as e, 3 as f, 'Today we will eat frenchfries and cheese' as b UNION ALL
select 3 as id, 37 as c, 2 as d, 18 as e, 2 as f, 'Poetry is a human''s endeavour to merit' as b
) a
order by idHave a great weekend!
r/SQLServer • u/ruinedsock • Jun 21 '18
I Had My First Big SQL F*ck up This Morning
So, I was checking a list of contacts we had identified as having left a business but didn’t have a tick box ticked on their profile to show that they had left. It was sitting at around 100 people that needed to be updated.
I’ve been using SQL to manage our database for a couple of years now, so I was confident in my abilities and thought that just updating the column would work. It’d certainly save someone in the Admin dept (or me) having to go through each profile manually ticking boxes.
To test out the process I wrote out the following to update a dummy record I conduct tests on whenever I do something new. The record lives in a sector by himself so if anything weird happened I’d know it would impact one record:
UPDATE clientcontacts
SET HasLeft = 'Y'
WHERE EXISTS
(SELECT * FROM clientcontacts
JOIN sectorobjects
ON (sectorobjects.objectid = clientcontacts.contactpersonid)
WHERE sectorobjects.sectorid = '62'
AND clientcontacts.contactpersonid = '5553'
AND clientcontacts.hasleft = 'N');50049+ records affected. Across all our sectors.
WTF!?
Simultaneously my heart stopped, and my brain went into meltdown. I quickly checked the back-up of the table on the database, only to find that it hadn’t backed up in weeks. As of that moment, all our contacts were showing that they had left every company they were assigned to. After speaking with my manager and the speaking to our IT the decision was made to roll the server back to a backup taken at 7:00 am but given the time that would take to roll out on our CRM it wouldn’t be done until the end of the day. Annoying as now everyone can’t update stuff in the database and has had to take notes of anything needing to be updated and will have to do that first thing tomorrow morning.
I beat myself up for most of the morning whilst my manager contacted IT to get a backup restore actioned for later today; I stepped back because I didn’t want to make things any worse. By lunch, I was feeling better and accepted that it was a fuck up of my own making, albeit unintentional and it was done to help the company out. Our Ops Director and I are inevitably going to have a chat in the morning, let’s hope time, my solid work record and the fact this was my first fuck up in my five and a half years with the company (that I’m aware of anyway) goes in my favour.
Lessons I’ve learned: check for a backup, if not up to date, run a backup and if I don’t have a clue what I’m doing, ask!
My question to you all is, what happened? Why didn’t my code work? Having selected a specific sector and ID I was certain it would just update that one contact. For my own peace of mind and my own development, I’d mean a lot to me to understand where I went wrong (other than not checking that there was a backup before I did anything).
Thanks!
r/SQLServer • u/Arkiteck • Mar 28 '18
The March release of SQL Operations Studio is now available
r/SQLServer • u/bobwardms • Mar 31 '26
Community Share Introducing Automatic Index Compaction
For my entire career index maintenance, specifically index reorganization, has required some manual effort or some scheduled work. We have now introduced in #azuresql an option called Automatic Index Compaction. I'm sure you will have questions. And the very capable u/dfurmanms has them in our documentation at https://learn.microsoft.com/sql/relational-databases/indexes/automatic-index-compaction.
r/SQLServer • u/flinders1 • Aug 05 '25
Community Share I forced my AI assistant to partition a 250GB table for me and performance test it and here’s what happened
r/SQLServer • u/JustSaying367 • Jul 19 '22
Question Where did all of the SQL Server DBAs go?
For 15 years, I was a Microsoft SQL Server DBA, Developer, etc with all of the accompanying Microsoft certifications (up to SQL Server 2012). Had to take a sabbatical for family reasons beginning in 2014.
Now that I am attempting to re-enter job market, I have learned that ALL of my Microsoft certifications have gone away and it’s now (1) Data Engineer, (2) Data Science or (3) Data Analyst. Even the US Federal Government job site, usajobs, no longer lists Database Administrator as a job classification!
Which leads to the question: what happened to the DBAs?
r/SQLServer • u/TravellingBeard • Dec 17 '21
Any seasoned SQL Devs or DBAs feel this way about date format debates around the world?
I've been doing this so long, that YYYYMMDD is ingrained as my default format, so much so that when writing out cheques or signing documents, I'd rather spell the month out than go with ddmm vs mmdd. It may be because I'm in Canada and we have this weird hybrid of U.S. and European/British customs, so me defaulting to yyyymmdd or spelling it out may be a defense mechanism as well.
I just roll my eyes now when I hear people arguing about US vs the world date formats.
r/SQLServer • u/Arkiteck • May 08 '20
Blog Announcing mssql-cli is now generally available on macOS and Linux
r/SQLServer • u/six-acorn • Apr 05 '19
Accidental DBA -- what's the most cost-efficient way to learn the Fundamentals, quickly?
I have no formal training in SQL Sever. I've been "querying" various SQL flavors for years and have become very good at that - analyzing the Showplan, creating and dropping clustered/ non clustered indexes, building tables and views and sps -- the system tables, Profiler/ extended events. Building out 'snowflake' like models.
Basically I just learned by doing and iterating but I'd say I'm more of a db 'developer' type.
Now we have no DBA (and a low budget and resources, as usual) --- until/ if we hire someone I'd like to have the absolute fundamentals down. I assume the proper backup and recovery procedures would be more essential that maximizing hardware performance, for instance, but idk.
Anyone have any recommendations for good resources? I have access to PluralSights and Safari Online Books, there's a lot of videos and books there. Do you think that would be enough? Any particular picks from those? Or free resources of course.
I'm also tempted/ heard of Brent Ozar's recorded courses on here -- seems cheap enough but only if my employer pays for it. Anyone have experience/ insight on how good that would be? Is it worth it beyond the existing resources I have access to?
Let's say my employer would give me $500 for any combination of training resources here. How would you spend that?
r/SQLServer • u/InternetBowzer • Mar 08 '19
Blog Wait Statistics in SQL Server - Performance Troubleshooting – MlakarTechTalk
r/SQLServer • u/dantheflipman • Jan 09 '18
Any interest in a SQL Server Agent Job schedule viewer?
r/SQLServer • u/MeGustaDerp • Sep 25 '17
Kalen Delaney is starting to do webinars on SQL Server internals - one a week
Announcement: https://www.dbbest.com/blog/sql-server-internals-webinar-series/
First recorded webinar from last week: https://www.youtube.com/watch?v=C2JBvH3GFis
I'm stoked to watch these.
r/SQLServer • u/MidnightDBA • Jul 13 '16
My startup company is giving away enterprise software this week
Final edit: Thanks very much, folks! FYI, We're going to have a webinar Wednesday, July 20 at 11:00am Central Time, for all the new Minion Enterprise owners (and those who are doing the 90 day trial). Register here. Anyone who didn't get in on the giveaway can still get a trial edition on MinionWare.net.
Hi all, I'm Jen McCown...co-head honcho of a 1 year old startup company, MinionWare. My partner and I have been SQL Server DBAs for about forever, and now we're making stuff for DBAs. (No, that's not the new tagline.)
Now that we've hit one year, we wanted to give back AND do a shameless self promotion, so we decided to give away three licenses of our flagship software - Minion Enterprise - to anyone who asks before the deadline. They're lifetime licenses, and you get free support for three months.
"ME" is the enterprise management solution for centralized SQL Server management and alerting. The idea is to be able to manage all your servers from a single location, with tons of information, reporting, config, extra features, etc. etc. Kind of like SCOM (ish, sorta, I guess), but with way, way less suck, and with extra added awesome.
One of my favorite things is, ME collects Active Directory information, along with SQL security info. We've created stored procedures to easily show you things like "how many SAs do I have on this box?", and "What servers does BillTheJerk have access to?" And, because all collected data is stored in tables, you can track changes over time, be compliant for audits, etc. The security portion is just one among many, but this post is gonna get too long fast.
There's a ton of information on MinionWare.net, and I'll answer questions til the end of time...we adore this product. I figured several of you might adore it, too.
r/SQLServer • u/AaronBuma • Mar 25 '15
SQL Basics – Explaining Eleven Join Types
r/SQLServer • u/pmpjr-msft • Jun 01 '26
Community Share MSSQL May Newsletter
Hi Folks,
My name is Paul and I am a CSA here at Microsoft.
I have wrote a newsletter on and off for a bit now consolidating SQL updates and I am now maintaining a public one via a LinkedIn newsletter publication.
I wanted to drop it here for anyone interested, Ill do my best to round up all the news of the month so you dont have to.
Hope you enjoy and have a great day
r/SQLServer • u/jdanton14 • May 07 '26
Discussion "Low Effort" Posts--Reporting?
There's been a lot of, what I'd call "low effort" posts in the last week on this sub. Things that could be easily verified by a basic docs or pricing check. In the spam reporting for this sub, that isn't an option.
I wanted to open this up to community discussion--do we want posts like "How much does Azure SQL cost" or "What is SSAS"? I'd rather posts like this get nuked, but I wanted to open it to discussion for the opinions of others.
r/SQLServer • u/Prophetic_Platypus • May 01 '25
May 1st issues?
We just started receiving these error messages in Windows Application logs this morning. All MS SQL servers, 2016-2022.
2022 only:
EventId: 17821
A valid TLS certificate is not configured to accept strict (TDS 8.0 and above) connections. The connection has been closed.
All:
EventId: 17836
Message: Length specified in network packet payload did not match number of bytes read; the connection has been closed. Please contact the vendor of the client library. [CLIENT: 127.0.0.1]
EventId: 9642
Message: An error occurred in a Service Broker/Database Mirroring transport connection endpoint, Error: 8474, State: 11. (Near endpoint role: Target, far endpoint address: '')
r/SQLServer • u/bobwardms • Feb 05 '25
SQL Server 2025 Private Preview continues
We continue to get feedback from our private preview customers for SQL Server 2025. To give you a sneak peek on a few features that are coming check out optimized locking (https://learn.microsoft.com/en-us/sql/relational-databases/performance/optimized-locking), ABORT_QUERY_EXECUTION query hint (https://techcommunity.microsoft.com/blog/azuresqlblog/announcing-a-limited-public-preview-of-the-abort-query-execution-query-hint/4354801), and optimized sp_executesql (https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-executesql-transact-sql). We are still looking for customers to work with us. Sign-up today at https://aka.ms/sqleapsignup
r/SQLServer • u/agiamba • May 21 '24
.NET framework patch last week breaks SQL Server CLR decryption/encryption
This is very niche, but Microsoft released two .NET framework updates last week that breaks some CLR functionality, including some encryption methods:
https://support.microsoft.com/en-au/topic/may-14-2024-kb5037932-cumulative-update-for-net-framework-3-5-and-4-7-2-for-windows-10-version-1809-and-windows-server-2019-4085915c-1ba7-4306-9a63-2267537bf586
I work for a software product company, and it broke website functionality for some clients with SSO. Uninstalling it and replacing it with the patch released today resolved the issue. Hoping this saves someone a lot of aggravation.
r/SQLServer • u/thats4metoknow • Oct 06 '21
Blog Question, what is the worst practice you have encountered?
late 90's, in a tech shop, team next to me were having performance and db consistency nightmares, and had for weeks. I stuck my big nosey beak in and pointed out they has used floating point numbers for their primary keys, and for 'performance' had fitted an index to every single column. This was for a loyalty card program for a supermarket chain, it wasn't going to end well. FWIW I walked out after they asked me to falsify test data to pass client acceptance tests. Ho hum. It has led to interesting conversations since then with trainees as to why these two things (fp primary, and index on each column) were such no noes.
r/SQLServer • u/SQLvariant • May 12 '21
Free Training Event 😀 GroupBy Conference - Spring 2021 Edition
TL; DR: I just wanted to share that there's 20+ FREE data sessions May 25-26 you can access by registering for GroupBy, and it will feature speakers you'd usually have to pay to see at most data conferences. Check it out!
You can register for the event and checkout the session details here: https://mailchi.mp/groupby/may-2021-reg-a
I wanted to share this awesome (and free) conference coming up called GroupBy. If you haven’t heard of it before, it was founded by Brent Ozar back in the day and features some big speakers in the SQL Server community each year.
It'll have sessions for Americas' time zones on May 25 and European time zones on May 26.
Basically, it’s a crowd-sourced conference that has people in the data community submit the topics they want to talk about, then everyone voted on the sessions they most want to see. Check out the schedule here: https://groupby.org/
After the live event, we upload all the content onto YouTube for anyone who missed a session or just wants to check it out after the fact. (You don’t need to be signed up – you can see all the previous sessions here: https://www.youtube.com/channel/UCEHf_UKwG3GMkb9wIVBTeQA) Hope to see y'all there.
