The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
suzanne_smith
ServiceNow Employee
ServiceNow Employee

You can use the ServiceNow ODBC driver in SQL Server (2008 and 2012) as a linked server. This enables the SQL Server to query tables from a ServiceNow instance directly using the ODBC driver. However, if you integrate the ODBC driver with Microsoft SQL Linked Server, you may receive an error containing "MSDASQL" and related to one of the following:

  • obtaining the required interface
  • creating an instance of OLE DB provider
  • initializing the data source object

The result is that the ODBC driver is unable to access the application logs or file cache. For a list of exact error message text, see Resolving Linked Server Access Errors with ODBC Driver.


The %LOCALAPPDATA% environment variable is used by the ODBC driver to specify the location of log files and cache. When using the iSQL console, the %LOCALAPPDATA% variable is replaced with the user home directory, for example C:\Users\<user>\AppData\Local. However, when running Microsoft SQL Server, this variable is replaced with C:\Windows\System32\config\systemprofile\AppData\Local. Unlike the user local directory, the System32 local directory requires elevated privileges to access.

 

Resolving the issue


  1. Modify the ServiceDebugLogPath ODBC driver configuration property to replace %LOCALAPPDATA% with ${user.home} as shown in the following screenshot:
    ODBC_Microsoft_issue2.png
  2. Modify the ServicesSQLDiskCachePath ODBC driver configuration property to replace %LOCALAPPDATA% with ${user.home} as shown in the following screenshot:
    ODBC_Microsoft_issue1.png


ServiceNow offers more information about the ODBC driver and SQL Server:

Using ODBC Driver in SQL Server 2008 and 2012

Resolving Linked Server Access Errors with ODBC Driver

Troubleshooting Linked Server

Linked Server ODBC Driver Fix