Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
304 views
in Technique[技术] by (71.8m points)

What is provider string when configuring Linked Server

I am configuring a linked server in SQL Server in order to send data from a SQL Server database to a MySQL database. While creating the linked server, in the fields to fill, I am asked the Provider string, unfortunately, I do not know what the Provider String is. Can somebody tell me what the Provider String is and how I can get it?

Here is a screenshot of the window where I need the Provider String

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

From the documentation Create Linked Servers (SQL Server Database Engine):

Provider string

Type the unique programmatic identifier (PROGID) of the OLE DB provider that corresponds to the data source. For examples of valid provider strings, see sp_addlinkedserver (Transact-SQL).

And then from that linked documentation:

[ @provstr = ] 'provider_string'
Is the OLE DB provider-specific connection string that identifies a unique data source. provider_string is nvarchar(4000), with a default of NULL. provstr is either passed to IDataInitialize or set as the DBPROP_INIT_PROVIDERSTRING property to initialize the OLE DB provider.

...

Remarks

The following table shows the ways that a linked server can be set up for data sources that can be accessed through OLE DB. A linked server can be set up more than one way for a particular data source; there can be more than one row for a data source type. This table also shows the sp_addlinkedserver parameter values to be used for setting up the linked server.

Remote OLE DB data source OLE DB provider product_name provider_name data_source location provider_string catalog
SQL Server Microsoft SQL Server Native Client OLE DB Provider SQL Server 1 (default)
SQL Server Microsoft SQL Server Native Client OLE DB Provider SQLNCLI Network name of SQL Server (for default instance) Database name (optional)
SQL Server Microsoft SQL Server Native Client OLE DB Provider SQLNCLI servernameinstancename (for specific instance) Database name (optional)
Oracle, version 8 and later Oracle Provider for OLE DB Any OraOLEDB.Oracle Alias for the Oracle database
Access/Jet Microsoft OLE DB Provider for Jet Any Microsoft.Jet.OLEDB.4.0 Full path of Jet database file
ODBC data source Microsoft OLE DB Provider for ODBC Any MSDASQL System DSN of ODBC data source
ODBC data source Microsoft OLE DB Provider for ODBC Any MSDASQL ODBC connection string
File system Microsoft OLE DB Provider for Indexing Service Any MSIDXS Indexing Service catalog name
Microsoft Excel Spreadsheet Microsoft OLE DB Provider for Jet Any Microsoft.Jet.OLEDB.4.0 Full path of Excel file Excel 5.0
IBM DB2 Database Microsoft OLE DB Provider for DB2 Any DB2OLEDB See Microsoft OLE DB Provider for DB2 documentation. Catalog name of DB2

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...