Home » SQL Server Error : 126, Error with SQL Server Linked Server

SQL Server Error : 126, Error with SQL Server Linked Server

sql server DBA 999

SQL Server Error : 126 Details


SQL Server Error: 126 Error with SQL Server Linked Server
Event Logged or not: No
Description:
SQL Server Error : 126, Error with SQL Server Linked Server.

 Description:
“System error 126” thrown when creating linked server from SQL Server Management Studio or using the Salesforce driver through any Windows service.
The test connect is successful using the ODBC Administrator.

Cannot initialize the data source object of OLE DB provider “NewSQL” for linked server “Newone”, OLE DB provider “New SQL” for linked server “Newone” returned message “Specified driver could not be loaded due to system error 126: The specified module could not be found (DataDirect 7.1 Salesforce, C:\Program Files\Progress\DataDirect\Connect_for_ODBC_71\Drivers\ivsfrc27.dll).”. (Microsoft SQL Server, error: 7303)

Cannot initialize the data source object of OLE DB provider “NewSQL” for linked server “Newone2”, OLE DB provider “NewSQL” for linked server “Newone2” returned message “Specified driver could not be loaded due to system error 126: The specified module could not be found (DataDirect 7.1 Salesforce, C:\Program Files\Progress\DataDirect\Connect64_for_ODBC_71\Drivers\ddsfrc27.dll).”. (Microsoft SQL Server, error: 7303)

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.

USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go

 

Cause:

The DataDirect installer adds the driver path installdir\Connect_for_ODBC_71\drivers to the system PATH. The Windows service does not automatically pick up the updated system PATH after the drivers are installed and Server/system needs to be restarted to pick it up.

Solution for Resolving the Error

Restart the Windows service to retrieve the system PATH, which contains the drivers directory.

Alternate Solutions

  1. Restarting SQL Server Service(non production instances only)

  • To Restart, Start or Stop the SQL Server instance by right click on sql server instance in SSMS or in SQL. You may need to open SSMS as administrator to start, stop the instance.

db-mail4

  • Other ways for restarting SQL server Service

  1. From SQL Configuration manager from Start menu
  2. From Services in Windows server
  3. From Cmd using net start and net stop

SQL Server Error Code and solution summary


SQL Server Error: 126
Severity: 15
Event Logged or not: No
Description:
Invalid pseudocolumn “%.*ls”.

 

Solution would be Restart of the Windows service to retrieve the system PATH, which contains the drivers directory.

Leave a Reply

Your email address will not be published. Required fields are marked *