Author: Peter Whyte
-
Count Rows within CSV Files using PowerShell
This post contains a script that will help count rows within multiple CSV files using PowerShell. If you have a directory containing CSV files, this demo will walk you through how to count the rows of all CSV files within a folder. Counting rows within CSV files may…
-
Exporting SQL Server Query Results to CSV
This post contains a guide on how to export data from a SQL Server database using SSMS. SSMS, SQL Server Management Studio, is the standard application that most people use to run queries for a Microsoft SQL Server Database. The default export option in SSMS is set as…
-
How to Check Table Sizes in SQL Server
There are many ways to check the size of a table in SQL Server. The way you will do it will likely depend on what your task at-hand is. For example, a quick look at the Disk Usage by Top Tables report on a database you’ve never seen…
-
Backing Up a SQL Server Database
Backing up a database is something I’ve always found easier done within a query window. There’s not much to it; That’s what I’m used to writing. I’ve no need to worry about the copy_only option these days, or check SQL Server Editions to see if I can use…
-
Restoring a SQL Server Database
This is a simple guide to restoring a full backup file in SQL Server, providing an overview of a few options that are available during the process. It is always a good idea to read through Microsoft’s documentation on database restores before proceeding. This will ensure that you…
-
Copying Dates into Excel
There’s often a need to quickly copy/paste a database query output into an Excel sheet, rather than exporting as a .csv file. When you do this for a DATETIME column though, it’ll show up in Excel looking something like this. I don’t think Excel likes the milliseconds. This…
-
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…
-
Show Line Numbers in SQL Server Management Studio (SSMS)
This is a tip on how to show line numbers in the SQL Server Management Studio (SSMS) query window. This is useful when you receive an error message with reference to a line in your code, although it’s not a necessity to have it enabled as you’ll see…
-
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…
Recent Posts
- Quick Performance Troubleshooting Script for SQL Server
- Checking SQL Server Mirroring Health & Latency
- SQL Server Replication Monitoring Scripts
- Get Last Node Blip in SQL Server FCI
- SQL Script to Get AAG Latency
Categories
– AWS
– DBA Stories
– Linux
– MySQL
– Other
– Postgres
– PowerShell
– Redshift
– SQL Server
– Windows Server
Tags
Always On Availability Groups (AAG) Certificates & Encryption Change Data Capture (CDC) Database Admin Database Backups & Recovery Database Mirroring Deleting Data Error Messages Git Commands Importing & Exporting Data Linked Servers Linux Admin Logging & Monitoring Measuring Databases Microsoft Patching PowerShell Scripts SQL Server Agent SQL Server Database Files SQL Server Data Types SQL Server Management Studio (SSMS) SQL Server Network Connectivity SQL Server on Linux SQL Server Patching SQL Server Performance SQL Server Permissions SQL Server Processes SQL Server Replication SQL Server Scripts Windows Admin Windows Authentication Windows Automation Windows Events Windows Firewall Windows Subsystem for Linux (WSL)