“Windows could not start the SQL Server”

The “Windows could not start the SQL Server on 127.0.0.1” is a generic error message when the SQL Server service cannot start-up. Windows Event Viewer will give you the actual error, and from there you can troubleshoot the reason for failure. SQL Server 2019 evaluation period expired in this case. My mistake for not selecting […]

Index Was Out of Range
April 15, 2019
“Index was out of range” SQL Server Management Studio

I’ve seen this Index was out of range error within SQL Server Management Studio (SSMS) when trying to change the order of Agent Jobs. Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index (mscorlib) If I create a new SQL Agent Job, and add in […]

Create Linked Server with Postgres
March 10, 2019
Creating a Linked Server with a Postgres Database

In my previous post, I created a Link Server to another SQL Server instance This time, it’s a link to a Postgres database! This guide can be followed from start to finish using the links below. # Install SQL Server (separate post).# Install PostgreSQL (separate post).# Test Connectivity to Remote Server (previous Linked Server post).# […]

Configuring Linked Servers in SQL Server
March 4, 2019
Configuring Linked Servers in SQL Server

Linked Servers in SQL Server allows you to query external databases, such as remote SQL Server instances, Oracle, ODBC or MS Access databases. This is a quick guide on how to link one SQL Server instance to another, which will include the following: # Test Connectivity to Remote Server# Create Linked Server Login# Create Linked […]

Database Growth Events in SQL Server
February 23, 2019
Database Growth Events in SQL Server

When a database file gets full and it needs more space, a growth event will happen. The size of said database growth can be set within the database options, or can be done using the ALTER DATABASE statement as shown below. When considering growth event sizes for log (.ldf) files, you may want to have […]

Set Max Database Size in SQL Server
February 21, 2019
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 size cap on the database. However, if […]

How to run Update-Help in PowerShell
February 19, 2019
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 irrelevant info. And when you do run […]

Moving TempDB Files in SQL Server
February 17, 2019
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) files. This post is a quick tutorial […]

January 24, 2019
The (SSMS) Import Flat File Feature

The Import Flat File wizard within 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 save the import as a .DTS package. This makes it a […]

January 22, 2019
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) file in SQL Server. This post will […]