Author: Peter Whyte
-
Creating a Linked Server to SQL Server
Linked Servers in SQL Server allow you to query external databases, such as remote SQL Server instances, Oracle, ODBC or MS Access databases. It provides easy query access to another database server for users, however it’s not the most efficient ways to do it. The following steps should…
-
Database Growth Events in SQL Server
When a database file reaches its maximum allocated size, a growth event is triggered to expand the file and allow for more data storage. The size of these growth events can be configured in the database options or by using the ALTER DATABASE statement, as demonstrated below. Properly…
-
Setting Maximum Database File Sizes in SQL Server
Setting maximum database file sizes in SQL Server is something you’d ideally not have to set, but it’s a good last resort option available if you need it. The reason I say this is because, you never want a production database to stop updating/inserting data due to a…
-
Updating Help Documentation in PowerShell
The Update-Help cmdlet in PowerShell will download the latest help files for PowerShell modules installed on your machine. Running PowerShell as Administrator is a requirement for this one, else you’ll get the following error. “Access is denied” is the key part in this error, amongst a lot of…
-
Moving TempDB Files in SQL Server
It’s a solid best practise to have TempDB files stored in separate drive, away from your C: drive. This is because TempDB can grow very large, very quickly (within minutes); depending on workloads of course, and this can happen on both the TempDB data (.ndf) and log (.ldf)…
-
The SSMS Import Flat File Feature
The Import Flat File feature within SQL Server Management Studio (SSMS) was introduced in December 2017 (14.0.17213.0). This is a streamlined version of the Import Data feature and it minimises the user intervention during a file import. Unlike the Import data feature, you don’t have the option to…
-
Attaching SQL Databases Without Log Files
If you’ve lost a database log file and you’re in critical need of the data, well… that would never happen ( ͡° ͜ʖ ͡°) Nevertheless, this is might be a handy random fact to know, that you can attach a data (.mdf) file without the associated log (.ldf)…
-
Backup & Restore (WITH FILE)
In this post I’m going to show what the WITH FILE = X option does when backing-up or restoring a SQL Server database. microsoft_documentation The first thing we need to know is that a backup file can contain multiple databases, and even multiples of the same database. If you…
-
Applying Data Retention to a SQL Table
In SQL Server, there’s often a need to delete old data from a database table. This could be for reasons like adhering to GDPR policies, managing oversized tables that are slowing down operations, staying within SQL Server Express’s 10GB limit, or simply cleaning up application logs and errors.…
-
Using Custom Connection Colours in SSMS
SQL Server Management Studio (SSMS) is the tool that most SQL Server user queries are run from. It has an option that allows you to change the colour of your query banner, which is useful if you want visually mark a server that you work with every day.…
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)