r/SQLServer • u/ScaryDBA • Aug 01 '16
r/SQLServer • u/devperez • Apr 28 '16
RedGate's SQL Prompt now notifies you if you run a DELETE or UPDATE statement without a WHERE clause.
r/SQLServer • u/MatanYungman • Oct 12 '14
Five Ways to Improve Your Productivity with SSMS
r/SQLServer • u/venzann • Apr 03 '14
Free ebook: Introducing Microsoft SQL Server 2014 (pdf, epub & mobi)
r/SQLServer • u/Reasonable-Job4205 • Jul 14 '26
Question Accidentally deleted a stored procedure
I don't have backups of this database. Is there maybe any autologging that could have saved the SP somewhere? Running SQL Express 2022 on my laptop
r/SQLServer • u/Matze-de • Nov 25 '25
Community Share SQL2025 Express Edition 50GB per database
Hi there, Just reading about SQL Server 2025 Express. The size limitations are way better than in the past โ 50 GB per database instead of 10 GB. The other limitations are similar to the older versions.
r/SQLServer • u/[deleted] • Apr 09 '25
Is the future of DBAs still going down?
Hello, I was searching through the internet about demand for DBAs and stumbled upon this post on this subreddit from 3 years ago.
What is the sentiment 3 years after? Has the work of DBAs been automated? Has the demand gotten lower or changed to other kinds of jobs or skills? Is being a junior DBA today headed to a forceful skill/job switch in the future?
How do you see the job today and in the future?
Ty
r/SQLServer • u/TravellingBeard • Feb 17 '25
Question Long-term DBA with some creeping anxiety on AI...need some re-assurance or guidance.
I just read this post from last month: https://www.reddit.com/r/SQLServer/comments/1i28vf1/the_year_ahead_for_sql_server/
With all the changes coming, plus Copilot and AI capabilities, I'm trying to find a way to future-proof my career. I've started dabbling in LLM's but honestly looking for some sort of path towards integrating AI into my work. There is automation which we are prioritizing but at some point, I worry I will be let go and won't be hired because "oh, we have Azure and copilot doing everything for us now". I know if there are layoffs, I will be one of the last to be fired, so at least that's good, but still...I have this uneasy feeling.
At this point, I'll take any pivot I can get to leverage my sql skills (short of on-call support work which I have paid my dues with). Anyone else here with some real-life experience on dealing with AI? Or is this all overblown and I'm worrying for nothing?
r/SQLServer • u/Dats_Russia • Oct 23 '24
Question What are the most important non-SQL skills for being a DBA?
I want to make a transition to DBA, in my current role I essentially fill the role of a junior DBA, I do simple back up policies, I optimize indexes, and query tune.
I currently lack knowledge in the server upgrade process, setting up a server from scratch, VMs, and cloud hosting. These are things that I am trying to get via self study.
In addition to getting crucial knowledge about the previously mentioned stuff what are some non-SQLs I should get to accommodate the soon to be acquired knowledge?
r/SQLServer • u/Ima_Uzer • Jul 30 '24
Do you have your own "style" of writing SQL?
Over my years of writing C#, I've sort of developed my own "style", if that makes sense.
So do you have your own "style" (aside from the general "best practices" things) when you write SQL?
For instance, with me, I tend to like to capitalize almost everything. I keep field names consistent with how they may be in the database, though. To differentiate any User Defined functions, I usually use PascalCase.
And where possible, I don't like long strings of field names, so I will often break them over a few lines, as needed.
I also like to put clauses (i.e. a where clause) on separate lines, i.e.:
SELECT MyField1, MyField2FROM MyTableWHERE MyField1 = 'Some Value'
Just because I see it as more readable. I've seen some do indenting a certain way. I will indent, but for things like "nested" queries or for conditionals (i.e. BEGIN/END, IF, CASE, etc.) because I think it makes the code more readable and easier to follow. I get the feeling most of you probably do the same thing, but I'm always looking for better ways, and ways to refine my "style".
So what do you do?
r/SQLServer • u/microagressed • Jul 02 '24
Did I just get railroaded by an interviewer?
The tone from the very beginning was off. Interviewer came in almost hostile, never bothered to introduce himself, literally said "hello, can you hear me?" Then started firing tech screen Qs at me (this was my final -5th interview at a big tech company)
Several questions were suspect, entry level, almost trivial (I have 20 years experience ) Ex. What's your favorite join type? "I don't know that I have a favorite, they do different things, use the tool to fit the need. For example, most relational data is normalized so very often you need inner joins to reassemble the data" Next Q: if I wanted data from table 1 that didn't have matching data in table 2 how would you write that join? "Select t1.* from t1 left outer join t2 on t1.id=t2.fid where t2.fid is null" Next Q: So have you ever heard of an exclude join? "No, never heard of that" followed by big pause, and Ok moving on. Edit: that was the beginning and end of the SQL line of questions. Nothing about normalization,nothing about indexing, nothing about SPs, nothing about cursors vs set based, nothing about schemas, temp tables, session, security, hints, deadlocking, troubleshooting, profiling, triggers, xml, JSON, data types, dynamic SQL, nothing....
As far as I can tell exclude is not a SQL keyword, but I've seen some sites mention or call a where t2.fid is null type of join an exclude join (which is exactly my answer above) Is this some standard term I'm not aware of?
The whole interview was like this. Other tech, programming languages, etc. all entry level Qs, with weird wording to try to trip me up, followed by moving on to something else without any exploration of depth of knowledge What gives? Am I just unqualified living in an unskilled microcosm of ineptitude?
r/SQLServer • u/AnalysisParalysis93 • Oct 22 '22
Community Share 60 Second SQL Server Tutorials
I have a YouTube playlist of simple 60 second SQL Server tips that may help the novice get comfortable with certain elements. Iโll be adding to this playlist shortly. Check the whole playlist below or watch individual tutorials:
๐ฅ๐ 60 Second SQL Solutions
https://www.youtube.com/playlist?list=PLKXb3B8q0HcA-RrNIkRxdkViaDKdLsDZL
๐ฅ๐ 60 Second SQL: Simple Script to Search SQL Server Database Columns & Tables | INFORMATION_SCHEMA
๐ฅ๐ Display Line Numbers in SQL Server Management Studio | Catch Errors Fast
๐ฅ๐ 60 Second SQL Solutions: Hiding Query Results Pane & Commenting Blocks of Code in SSMS
๐ฅ๐ 60 Second SQL Solutions: The Identity Property in SQL Server
๐ฅ๐ 60 Second SQL Solutions: Dragging & Dropping Objects in SSMS
r/SQLServer • u/MihailoJoksimovic • Oct 04 '22
Community Share [Bitesized] B-Trees vs B+Trees - the most important differences
r/SQLServer • u/MihailoJoksimovic • Sep 28 '22
Community Share [Bitesized] A bit on HDDs, Data Fragmentation and BSTs vs B-Trees
r/SQLServer • u/flashmycat • Jun 30 '22
Question What is the easiest and elegant way to pivot this? (data in 'Name' should transform into new columns)
r/SQLServer • u/chaotic3quilibrium • Mar 07 '21
Architecture/Design Geohash Open-Source Library in TSQL for SQL Server
After searching for a SQL Server TSQL implementation of Geohash types and conversion functions, I finally just went and wrote a whole open-source library myself:
Github: QalGeohash-TSQL
I designed it for maximum accuracy, performance, and strong conversion consistency guarantees. It enables an average IT data warehouse analyst or report writer to efficiently use, process, and leverage simple GIS spatial proximity models and queries. Given the steep learning curve of finding and adopting a full GIS style solution for data-science/big-data/data-analytics, this library can enable a temporary or good-enough solution until new requirements require investing in a more fleshed out GIS solution like Mapbox, ESRI, etc.
It provides two Geohash implementation types; Integer (BIGINT) and String (VARCHAR). It also provides two coordinate types; Longitude+Latitude and DMS. And then it provides the conversions to and from these various types. It also provides conversions to/from the SQL Server spatial geography Point
type.
Please see the README.md for detailed information.
r/SQLServer • u/wasabiiii • Mar 17 '20
Automating Complex SQL Server Infrastructures
On the last project I was involved with we had a pretty complex SQL Server setup. 5 clusters. Over 40 individual databases. Each with multiple Linked Servers to each other (old various legacy names too). Transactional replication going all over the place. Databases replicated across servers with different names on the remote side. Stored Procedures that did cross database and cross linked server joins. A real mess. A 25 year old gigantic app that had grown out of control with no planning. Duplicated in 5 different environments (prod and pre-prod environments).
As part of my efforts to get this mess under control, I developed a utility that would enable us to reflect this mess in our CI/CD pipeline, and our Unit Tests. So we could replicate the mess, make changes to it, deploy those changes, and begin fixing and solving issues. Also, so we could develop unit tests that executed stored procedures. Basically, code to deploy a cluster of servers, configure them, and then deploy the databases, which we got under source control in SSDT (DACPACs).
Somebody on Reddit two weeks ago reminded me about this.
So I reimplemented a bunch of it.
https://github.com/wasabii/Cogito.SqlServer.Deployment
The basic idea here is that SqlDeployment takes an XML manifest file that describes your instances, their configuration, replication settings, loads it, then executes it. If you're pointing to (local)\DBINSTANCE, it will install it from setup.exe. If it's configured to point to (localdb)\INSTANCENAME it will bring LocalDB instances online. If pointing to a remote instance, it will simply connect to it. It will deploy DACPACs as specified. It will work in parallel, deploying multiple databases at the same time, depending on declared dependencies between them. And it's resumable, so you can cancel progress, and then restart it.
This makes it usable from within a CI/CD pipeline to bring an existing SQL Server infrastructure up to date. It makes it usable on developer machines to install the SQL Server infrastructure locally. It makes it useful to bring online new environments. And with it's LocalDB support, it makes it useful to use inside Unit Tests (provide SqlDeploymentPlan from the container, execute targets as configuration for EF core is acquired, etc).
You store the manifest in the source code. You execute it as part of your CI/CD pipeline. Or you execute it in your unit test setup. It's like a build script for SQL. You can build a C# project that contains and wraps the SqlDeployment instance. I also support ProjectReferences to SSDT projects from C# projects; importing the generated DACPACs into the project output. So you can build a single executable that deploys your infrastructure.
This goes way beyond DACPACs alone.
There is also a .NET Core Tool that you can install: Cogito.SqlServer.Deployment.Tool; this provides a sqldeploy command that can publish a manifest.
Here's an example of what a complex deployment might look like: https://github.com/wasabii/Cogito.SqlServer.Deployment/blob/develop/docs/examples/4_servers_with_replication.txt
r/SQLServer • u/JoshBurnsTech • Feb 27 '19
SQL Server Indexes โ Usage Script (Tutorial)
r/SQLServer • u/metalmilitia980 • Oct 26 '18
Free SQL Server and Database Fundamentals eBook! (Oct 26th and Oct 27th)
Free SQL Server and Database Fundamentals eBook! (Oct 26th and Oct 27th)
Hey guys,
I'm trying this again. I recently ran a promotion of my book and had some weird issues with Amazon, so some folks missed the promo slot. So, I'm running another promotion of my SQL Server and database Fundamentals eBook for the next two days. The promo runs from today (October 26th) to tomorrow, October 27th at 11:59 pm pdt. So, a two day free promotion really.
About the book:
I created a SQL Server and database fundamentals eBook to help folks in their journey of learning SQL. I wrote it with keeping my own pitfalls in mind and to help those folks avoid said pitfalls.
It goes over the fundamentals of databases and specifically focuses on SQL Server. If you're new to databases or have some experience with them and just want to know more from a fundamental standpoint, then this is a great choice!
This book goes over the basics (yet important aspects) of databases and SQL Server. You'll learn syntax, how to use SSMS, normalization, data types, database admin tasks and more. With the way I've written it, I created exercises for people to tackle and they can even check their answers with a link in the book (you build your own database, add to it and report off of it).
Like I've said before, I've put a year's worth of work into this and made it the best possible book I could. I'm trying to share it with as many people as possible, really. Also, if you have the chance to leave a review on Amazon, I'd really appreciate it! It'd help me out in understanding what I'm doing correct and what needs improvements. Also, it can help folks who are on the fence about grabbing the book make an informed decision.
TL;DR: I have a SQL Server eBook that's free from now (Oct 26th) to tomorrow, Oct 27th at 11:59 pm pdt. I'm trying to share this with as many people as possible.
Free SQL Server and Database Fundamentals eBook
If you have any questions, please let me know!
Thanks!
r/SQLServer • u/Elfman72 • Jun 20 '18
Did your database mail stop working after you installed SP2-CU1 for SQL 2016? Here is the frustratingly simple fix.
support.microsoft.comr/SQLServer • u/sqlrockstar • Mar 21 '18
I built a cheat sheet for Azure vs. AWS data services comparison purposes.
r/SQLServer • u/_subzer0_ • Feb 24 '18
What are some good DBA books for a complete noob?
So I've been given the responsibility, or idea, from my boss that I should brush up on DBA stuff during downtime. We went through scheduling a backup job yesterday (we both learned something new lol) and he told me I should start looking into DBA concepts.
Does anyone have any good recommendations for books? I've written SQL queries, some stored procedures, and views for the few months I've been here. But I would like to better understand what a DBA does and what are some challenges to this. The databases I work with are fairly large (~80 GB, ~ 70 GB, ~50 GB) and a few other ones that I don't touch.
I know there's documentation on Microsoft if I just Google, but I was wondering if there was something more structured than that.
r/SQLServer • u/thebeersgoodnbelgium • Feb 14 '17
I'm presenting online tomorrow! PowerShell โค SQL Server: Modern Database Administration with dbatools & dbareports โข /r/PowerShell
r/SQLServer • u/Saitama_Punch • Jun 29 '16
AMA [AMA] Microsoft SQL Server Tools - 6/30
Hi everyone, we're from the Microsoft SQL Server Tooling Team and we want you to ask us anything!
We're posting this a bit early so folks can start asking questions early in case they're working during our AMA tomorrow. Feel free to start asking and we'll start answering Thursday 6/30 at 10 AM PDT until 3 PM PDT.
ย We'll have members from the Engineering teams participating in the AMA all day. This includes folks working on
Database Tools for Microsoft SQL Server, Azure SQL Database, Azure Virtual Machines with SQL Server
SQL Server Management Studio (SSMS)
SQL Server Data Tools / Visual Studio (SSDT)
SQL Server Reporting Services (SSRS)
SQL Server Integration Services (SSIS)
SQL Server Analysis Services (SSAS)
SQL Server Migration Assistant (SSMA)
PowerShell with SQLPS/Command Line Tools
Azure Portal for Azure SQL DB, Azure Elastic Database Pools or Azure Virtual Machines with SQL Server
ย Here are some question/feature ideas:
Whatโs new in SQL Server Reporting Services?
How do I provide feedback for SSMS and SSDT?
What tools would I use to migrate my database to SQL Server?
Whatโs a cool trick you donโt think most customers know about?
ย You can ask us anything about our public products or about the team. If there's a tool that's not listed above, ask it anyways! We'll do our best to answer it. We cannot comment on unreleased features and future plans, though :)
ย Be sure to check out our latest tooling update blog post, A tour through tool improvements in SQL Server 2016 and follow @SQLToolsGuy to keep up to speed with what the SQL Tools team is working on. After this AMA, you can also tweet @AzureSupport any time, if you have questions.
ย ย Update @3 PM: We are wrapping up so we wonโt be able to answer in real time anymore but we will continue to get the remaining questions answered to them in the next few hours. You can also tweet your questions at the @AzureSupport and @SQLToolsGuy twitter handles. Definitely reach out if you have any questions. We love hearing your questions and feedback, as that helps us keep improving our SQL Server Tools! Thank you for your enthusiasm and interest! :) We'll definitely continue doing AMAs in the future!
ย ย The following folks will be responding during the AMA:
/u/AzureSupport is joining us - you can reach them otherwise at @AzureSupport
Ayo(/u/sqltoolspm), David (/u/Shueybubbles), Charles (/u/chgagnon) and Ken (/u/sqltoolsguy) are members of the SQL Server Management Studio (SSMS) Team
Eric(/u/sqldatatools) and Kevin(/u/kevcunnane) are members of the SQL Server Data Tools (SSDT) / Visual Studio Team
Brad(/u/bradsy) is a member of the SQL Server Reporting Services (SSRS) Team
Matt(/u/MattJonesMSFT) and Patrick(/u/pat_msft) are members of the SQL Server Analysis Services (SSAS) Team
Lonny (/u/lonnybastien) is a member of the SQL Server Migration Assistant (SSMA) Team
Vin (/u/saitama_punch) is a member of the Command Line Tooling for SQL Server Team (CLI Tools and PS)
Ninar (/u/ninar_sql) is a member of the Azure Portal Team for Azure SQL DB/Azure Elastic Database Pools/Azure Virtual Machines with SQL Server