DEV Community

Cover image for Troubleshooting SQL Server Errors - A Comprehensive Guide
Emediong Harrison
Emediong Harrison

Posted on

Troubleshooting SQL Server Errors - A Comprehensive Guide

Introduction:

Experiencing errors while setting up the SQL Server Management Studio?

I understand the mix of frustration and urgency that accompanies these issues as I have been there before. You've taken the proactive step of seeking a solution, and I want to assure you that you're in the right place.

In this article. I will provide step-by-step solutions to help users overcome these challenges and ensure a smoother database experience.

Table Of Content

1. Setting up SQL Server studio
2. Network-related or Instance-specific Error
- Cause 1: Connecting with the wrong instance Name
- Cause 2: SQL Server service instance is not running
- Cause 3: SQL Server browser is disabled
- Cause 4: TCP/IP of your server instance is disabled
3. Microsoft OLEDB Error
4. Culture is not supported Error
Enter fullscreen mode Exit fullscreen mode

Prerequisites

This article is for anyone who is just starting in SQL, Intermediate SQL users as well as experienced SQL users.

1.Setting Up SQL Server Studio

To set up SQL Studio, you need to download 2 things:

To connect to the server, open the SQL Server Management Studio(SSMS).

  1. Click on Connect - Choose database engine. A pop-up appears.
  2. Hit the dropdown for the server name -  hit the "browse" option - click the + sign next to “database engine” -  select the  “computer name\SQLEXPRESS” - Click OK.
  3. Before hitting connect, select the options button and make sure "Trust server certificate" is checked off near the bottom. If you don’t check the trust server certificate you will get an error like this:

Image description

A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) (Microsoft SQL Server, Error: -2146893019)

The certificate chain was issued by an authority that is not trusted

2.Network-related Or Instance-specific Error

Image description

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

CAUSES

The following can be the cause of this error:

  1. Connecting with the wrong instance Name
  2. SQL Server service instance is not running
  3. SQL Server browser is disabled
  4. TCP/IP of your server instance is disabled

CAUSE 1: Connecting with the wrong instance name

SOLUTION:

Check that you have specified the correct server name and instance name (if connecting to a named instance) in your connection string.

Get the instance name from Configuration Manager
On the server that hosts the SQL Server instance, use SQL Server Configuration Manager to verify the instance name:

Image description

  1. Start SQL Server Configuration Manager
  2. In the left pane, select SQL Server Services.
  3. Click on services, and verify the name of the instance of the database engine.
  • SQL SERVER (MSSQLSERVER) indicates a default instance of SQL Server. The name of the default instance is .
  • SQL SERVER () indicates a named instance of SQL Server. The name of the named instance is <instance name>.

Image description

CAUSE 2: SQL Server service instance is not running

SOLUTION:

To start SQL Service

  1. Start SQL Server Configuration Manager.
  2. In the left pane, select SQL Server Services.
  3. In the right pan select SQL Server(SQLSERVER) or SQL Server(SQLEXPRESS)
  4. Then click the start service triangular button
  5. The service has been started

Image description

CAUSE 3: SQL Server browser is disabled

For named instances, the SQL Server Browser service is required to provide the port number to connect. Ensure this service is started.

SOLUTION:

To start the SQL Server browser

  • Start SQL Server Configuration Manager.
  • In the left pane, select SQL Server Services
  • In the right pane double-click on SQL Server Browser - click on Services - click on the drop-down arrow - click on Automatic - click on Apply.

Image description

  • Select “Log On” -  click on “Start” - Click on Ok
  • The service has been started

Image description

CAUSE 4: TCP/IP of your server instance is disabled

SOLUTION:

To  enable the TCP/IP

  1. Start SQL Server Configuration Manager.
  2. In the left pane, Click on the drop-down arrow by “SQL Server Network Configuration”.

Image description

3.Microsoft OLEDB Error

Image description

"The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine"

This happens when you are trying to import your Excel file into your SQL Server.

To fix this error, download the Microsoft Access Database Engine 2016 Redistributable and install it in your system.

Click on this link to download the Access Database Engine Setup: Download Microsoft Access Database Engine 2016 Redistributable

NOTE: You are to download the 32-bit version even though you run a 64-bit Machine.

Image description

If you already had the 64bit installed you will run into this type of error when attempting to install the 32bit version.

Image description

If you run into this error, close and abort the process.

We will install the setup quietly using cmd.

To open your cmd, click on Windows key + R. Type in “cmd” and click OK.

This will automatically open the command line interface

To run the setup quietly follow these steps:

  • Cd to the directory where you downloaded the setup. To get the directory, Right-click on the downloaded file - Click on properties - Copy the location details.

Image description

  • Type the name of the setup file including the extension .exe
  • Add a space + "/quiet" to bypass the error and get the 32-bit version installed.
accessdatabaseengine.exe /quiet
Enter fullscreen mode Exit fullscreen mode

Image description

  • Click enter and wait for some time for installation to be complete.
  • Close your SQL Server Studio to enable it to pick up the new update.
  • Open your SQL server and connect.

4.Culture Is Not Supported Error

Image description

An error occurred during local report processing Culture is not supported Parameter name: culture 3072 (0x0c00) is invalid culture identifier.

To fix the “culture is not supported” error while importing your Excel file do this:

Go to control panel - Clock and Region - format and change to “English (United States)

This will fix the error.

Image description

Conclusion:

In this article, we covered three common types of SQL Server Errors:

  1. Network-related or Instance-specific Error
  2. Microsoft OLEDB Error
  3. Culture is not supported Error

By following the step-by-step solutions provided, you'll be better equipped to address these errors and maintain a smooth and efficient database experience. Remember, troubleshooting requires patience and careful attention to detail, and with practice, you'll become adept at resolving OLE DB errors and ensuring the reliability of your database interactions.

Top comments (1)

Collapse
 
davboy profile image
Daithi O’Baoill

Nice article, thanks