-
How to Quickly Get Table Sizes in SQL Server
Monitoring table sizes in SQL Server is crucial for effective database management. For a detailed guide covering various methods, including built-in reports and custom scripts, please refer to my latest article on this: How to Check Table Sizes in SQL Server. In this guide, we’ll show a few…
-
How to Backup a SQL Server Database
Ensuring regular backups of your SQL Server database is essential for data protection and disaster recovery. Whether you prefer using SQL commands or SQL Server Management Studio (SSMS), this guide will walk you through both methods. Backing Up a SQL Server Database Using T-SQL If you want a…
-
Restoring Full Database Backup in SQL Server
Restoring a full backup file in SQL Server is a fundamental task for database administrators and developers. This guide walks you through the process step by step, highlighting some key options to use. Full backups capture the entire database, including all data and the transaction log necessary for…
-
How to Properly Copy SQL Dates into Excel
When copying a SQL query result directly into Excel, DATETIME columns often don’t display as expected. Excel doesn’t seem to handle milliseconds well, making the dates appear messy. The Issue: Excel Precision Struggles Here’s an example of data I copied over from SQL Server into an Excel sheet.…
-
Stack Exchange Data Explorer
As a DBA, I’ve found Stack Exchange Data Explorer to be a really useful tool for exploring and analyzing the data from the Stack Exchange network of websites. It’s kind of like having a SQL playground where you can run all sorts of queries and see what insights…
-
Monitoring Database Growth Events in SQL Server
Database growth events occur when a SQL Server database file reaches its capacity and automatically grows to accommodate more data. These events are configured in the database properties, where you can define growth increments in MB or GB. Properly configuring these settings is important for maintaining performance, as…
-
Understanding Implicit vs. Explicit Data Conversion in SQL Server
This post is here to help you understand implicit vs explicit data conversions in SQL Server. What is Data Conversion? Data conversion involves transforming data from one type to another. SQL Server facilitates this through two primary methods: Implicit Conversion> Occurs automatically when SQL Server can safely convert…
-
Show Line Numbers in SQL Server Management Studio (SSMS)
This is a quick tip on how to show line numbers in SQL Server Management Studio (SSMS) query windows. Enabling line numbers can be useful, especially when you get an error message that points to a specific line in your code. While not strictly necessary, some developers prefer…
-
Reset Default PostgreSQL User Password
A common scenario working with Postgres is when you have forgotten your default Postgres user password. This is the password you will have entered during your Postgres installation. This is a guide on how to reset the default Postgres user password. This should hopefully help you resolve this…
-
How To Install PostgreSQL on Windows
PostgreSQL is a free open-source RDMS that is widely used and forked. Other than PostgreSQL itself, Redshift is the only other forked database I’ve ever touched. This blog post is a very simple wizard run-through of installing PostgreSQL and Stack Builder on Windows for testing. # Install PostgreSQL…
Useful SQL DBA Posts
Performance & High Availability
– Get Full SQL Server System Info Fast
– Quick Performance Troubleshooting Scripts
– Identify Missing & Unused Indexes
– Get Wait Stats & Top Consuming Queries
– Get Exclusive Locks on Tables
– Get Always On Availability Group (AAG) Latency
– Get Mirroring Status & Latency
– Get Replication Latency
– Get Last Node Blip in SQL Server FCI
Security & Maintenance
– Get Estimated Database Backup/Restore Time
– Get Last Database Backup Dates/Times
– Get Database Sizes & Space Used
– How to Get Table Sizes
– Get Index & Heap Fragmentation Levels
– Get SQL User Permissions and Roles
– Creating SQL Users on Availability Groups
– Audit Failed Login Attempts
Categories
– Microsoft SQL Server
– Windows Server
– PowerShell
– Linux & WSL
– Other
Tags
Always On Availability Groups (AAG) (4) Certificates & Encryption (3) Change Data Capture (CDC) (2) Database Admin (76) Database Backups & Recovery (14) Database Mirroring (2) Deleting Data (1) Error Messages (5) Git Commands (5) Importing & Exporting Data (2) Linked Servers (3) Linux Admin (2) Logging & Monitoring (1) Measuring Databases (10) Microsoft Patching (2) PowerShell Scripts (1) SQL Server Agent (5) SQL Server Database Files (1) SQL Server Data Types (2) SQL Server Management Studio (SSMS) (15) SQL Server Network Connectivity (3) SQL Server on Linux (1) SQL Server Patching (2) SQL Server Performance (5) SQL Server Permissions (2) SQL Server Processes (5) SQL Server Replication (2) SQL Server Scripts (13) Windows Admin (21) Windows Authentication (2) Windows Automation (1) Windows Events (2) Windows Firewall (4) Windows Subsystem for Linux (WSL) (19)