Showing posts with label create. Show all posts
Showing posts with label create. Show all posts

Monday, February 20, 2012

Linked Server to MYSQL using OLEDB Provider for MYSQL cherry

Good Morning

Has anyone successfully used cherry's oledb provider for MYSQL to create a linked server from MS SQLserver 2005 to a Linux red hat platform running MYSQL.

I can not get it to work.

I've created a UDL which tests fine. it looks like this

[oledb]

; Everything after this line is an OLE DB initstring

Provider=OleMySql.MySqlSource.1;Persist Security Info=False;User ID=testuser;

Data Source=databridge;Location="";Mode=Read;Trace="""""""""""""""""""""""""""""";

Initial Catalog=riverford_rhdx_20060822

Can any on help me convert this to corrrect syntax for sql stored procedure

sp_addlinkedserver

I've tried this below but it does not work I just get an error saying it can not create an instance of OleMySql.MySqlSource.

I used SQL server management studio to create the linked server then just scripted this out below.

I seem to be missing the user ID, but don't know where to put it in.

EXEC master.dbo.sp_addlinkedserver @.server = N'DATABRIDGE_OLEDB', @.srvproduct=N'mysql', @.provider=N'OleMySql.MySqlSource', @.datasrc=N'databridge', @.catalog=N'riverford_rhdx_20060822'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'collation compatible', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'data access', @.optvalue=N'true'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'dist', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'pub', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'rpc', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'rpc out', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'sub', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'connect timeout', @.optvalue=N'0'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'collation name', @.optvalue=null

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'lazy schema validation', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'query timeout', @.optvalue=N'0'

GO

EXEC master.dbo.sp_serveroption @.server=N'DATABRIDGE_OLEDB', @.optname=N'use remote collation', @.optvalue=N'false'

Many Thanks

David Hills

Have you tried to include password to initstring?|||No I have not, as there is no password set for testuser in the mysql database.|||


Have you tried to include user id like this @.UID='<my id>'? It shall work with MySQL OLE DB Provider|||

I got a reply from the software provider "cherry" they told me it won't work with

sqlserver 2005 as a linked server.

It should be quite straight forward to write a .net vb applet that uses the .net provider for mysql to

get the data out of mysql server, then use ado.net to write it into sqlserver 2005.

But what I wanted to do is to contain the code within sqlserver management studio so I don't

have external code.

Anyone know if I can write a VB.net or C## .net applet from with sqlserver 2005. It seems it's

the sort of intergrated solution that would be convient to be able to do?

|||I've setup a MySQL linked server in SQL 2005 using the ODBC driver for MySQL, and then using the OLEDB Provider for ODBC. Would you be apposed to doing it that way?

Linked Server to Indexing Service

Hello,

I have a problem... I need to create a linked server to an indexing service. I am trying to create the linked server through Enterprise Manager for SQL Server. The indexing service that I am trying to link to is located on a different server than the SQL Server database that will contain the linked server.

I don't know anything about creating a linked server. All my attempts have resulted in errors. I don't know the Provider Name, Product Name, Data Source, Provider String, Location, Catalog that needs to be used. I also don't have any clue as to setting the Security Options or the Server Options for the linked server.

Another thing, where is an explanation of how to set up a linked server. I tried SQL Server Books Online but I can't make heads or tails of it.

Thank you,
HeatherLook up sp_addlinkedserver in Books Online. There is an example of an Indexing Service linked server.|||Thanks. I've looked at the SQL Server Books Online and have done what is suggested. I still could not get any success. I think it's because the database server and the index server are on completely different machines.

Heather|||Be sure the account your SQL Server is running under has permission to connect to the other machine. The SYSTEM account does not have permission to see the network, so if you are using that, you have little chance of success. You can try changing it to run using your domain account to see if it will fix the problem.

Linked Server to IBM AS400

I need to create a linked server to communicate with an AS400 server by using
Client Access ODBC and then launch some query on particular files (inside
libraries).
How can I solve this issue?
I haven't founded any documentation about this subject.
Many thanks for your suggestsInstall Client Access on the SQL Server box and make sure
you have the client updated with whatever service pack level
based on updates to your AS400. Then configure the linked
server as described in books online under Linked Servers,
configuring.
For data source, use the IP address of the AS400.
For provider string, you need to include the library you are
using, connect timeout setting and code page. There is some
documentation for the settings in the Client Access help
files.
You'd set the provider string somewhat like:
InitCat=YourLibrary;CCSID=37;PCCodePage=1252;
Data Source=xxx.xxx.xxx.xxx
Settings will depend on how your AS400 is configured. Again,
the Client Access help files have information on the
necessary connection string settings.
-Sue
On Thu, 6 Jul 2006 06:56:01 -0700, Pasquale
<Pasquale@.discussions.microsoft.com> wrote:
>I need to create a linked server to communicate with an AS400 server by using
>Client Access ODBC and then launch some query on particular files (inside
>libraries).
>How can I solve this issue?
>I haven't founded any documentation about this subject.
>Many thanks for your suggests|||Oh thanks!
I have tried to create a Client Access ODBC link, then I create a linked
server by setting only the data source with the Client Access ODBC data
source and user id + pwd. Then I have executed a SELECT by indicating the
linkedserver.linkedserver.libraryname.filename and I have the correct results.
Many thanks
"Sue Hoegemeier" wrote:
> Install Client Access on the SQL Server box and make sure
> you have the client updated with whatever service pack level
> based on updates to your AS400. Then configure the linked
> server as described in books online under Linked Servers,
> configuring.
> For data source, use the IP address of the AS400.
> For provider string, you need to include the library you are
> using, connect timeout setting and code page. There is some
> documentation for the settings in the Client Access help
> files.
> You'd set the provider string somewhat like:
> InitCat=YourLibrary;CCSID=37;PCCodePage=1252;
> Data Source=xxx.xxx.xxx.xxx
> Settings will depend on how your AS400 is configured. Again,
> the Client Access help files have information on the
> necessary connection string settings.
> -Sue
> On Thu, 6 Jul 2006 06:56:01 -0700, Pasquale
> <Pasquale@.discussions.microsoft.com> wrote:
> >I need to create a linked server to communicate with an AS400 server by using
> >Client Access ODBC and then launch some query on particular files (inside
> >libraries).
> >How can I solve this issue?
> >I haven't founded any documentation about this subject.
> >
> >Many thanks for your suggests
>

Linked Server to IBM AS400

I need to create a linked server to communicate with an AS400 server by usin
g
Client Access ODBC and then launch some query on particular files (inside
libraries).
How can I solve this issue?
I haven't founded any documentation about this subject.
Many thanks for your suggestsInstall Client Access on the SQL Server box and make sure
you have the client updated with whatever service pack level
based on updates to your AS400. Then configure the linked
server as described in books online under Linked Servers,
configuring.
For data source, use the IP address of the AS400.
For provider string, you need to include the library you are
using, connect timeout setting and code page. There is some
documentation for the settings in the Client Access help
files.
You'd set the provider string somewhat like:
InitCat=YourLibrary;CCSID=37;PCCodePage=
1252;
Data Source=xxx.xxx.xxx.xxx
Settings will depend on how your AS400 is configured. Again,
the Client Access help files have information on the
necessary connection string settings.
-Sue
On Thu, 6 Jul 2006 06:56:01 -0700, Pasquale
<Pasquale@.discussions.microsoft.com> wrote:

>I need to create a linked server to communicate with an AS400 server by usi
ng
>Client Access ODBC and then launch some query on particular files (inside
>libraries).
>How can I solve this issue?
>I haven't founded any documentation about this subject.
>Many thanks for your suggests|||Oh thanks!
I have tried to create a Client Access ODBC link, then I create a linked
server by setting only the data source with the Client Access ODBC data
source and user id + pwd. Then I have executed a SELECT by indicating the
linkedserver.linkedserver.libraryname.filename and I have the correct result
s.
Many thanks
"Sue Hoegemeier" wrote:

> Install Client Access on the SQL Server box and make sure
> you have the client updated with whatever service pack level
> based on updates to your AS400. Then configure the linked
> server as described in books online under Linked Servers,
> configuring.
> For data source, use the IP address of the AS400.
> For provider string, you need to include the library you are
> using, connect timeout setting and code page. There is some
> documentation for the settings in the Client Access help
> files.
> You'd set the provider string somewhat like:
> InitCat=YourLibrary;CCSID=37;PCCodePage=
1252;
> Data Source=xxx.xxx.xxx.xxx
> Settings will depend on how your AS400 is configured. Again,
> the Client Access help files have information on the
> necessary connection string settings.
> -Sue
> On Thu, 6 Jul 2006 06:56:01 -0700, Pasquale
> <Pasquale@.discussions.microsoft.com> wrote:
>
>

Linked Server to DBASE 5 Tables

I am trying to create a linked server to some dbase 5 tables. I have read several other posts about using the OPENROWSET option and that does work however, I would like to be able to create a linked server for easier access.

End Goal: I am developing an ASP based app that needs to join a DB5 table to a SQL table.

Any help on the linked server properties in Enterprise Manager for dbase5 or on the proper sp_addlinkedserver function for dbase5 would be highly appreciated.

JoeCan't you use DTS to get the data from DBase5.|||I have pulled the tables in with a DTS package very easily however, I would like to be able to access the data real time in it's current place. for example:

Select sqltable.Name, dbasetable.BillCharges
From sqltable
Inner Join database...dbasetable On
sqltable.AcctNum = dbasetable.AcctNum

--------------------
By using an example in one of these forums I do have another work around:

SELECT sqltable.Name, dbasetable.BillCharges
FROM OPENROWSET('MSDASQL','DRIVER={Microsoft Dbase driver(*.dbf)}' ,'SELECT Name, AcctNum FROM \\Server\Data\dbasetable.dbf') dBase
Inner Join sqltable On
sqltable.AcctNum = dbase.AcctNum

But this is a little too slow for an asp application.

Thanks for the reply ....

Linked Server to dBASE

I'm trying to create a "Linked Server" in QA to a dBASE file. Below are some
examples I've tried. They seem to create the "Linked Server" in Ent.
Manager, but give errors when i run a SELECT .. OPENQUERY statement. They
also give errors with Ent. Manager when trying to expand the linked server's
node.
The errors say the path is wrong, which it isn't. Other errors when clicking
"tables" under the linked server are "OLE DB" errors.
Does anyone have the correct syntax for creating a linked server to a dBASE
file? Which provider should I use?
-- Example 1:
Exec sp_addlinkedserver @.server ='alarm_dBASE',
@.srvproduct ='DBASE',
@.Provider ='Microsoft.Jet.OLEDB.4.0',
@.datasrc='E:\data\databases\myDBASEfile.dbf'
-- example 2
exec sp_addlinkedserver 'alarm_dBASE2',
'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'E:\data\databases\myDBASEfile.dbf',
NULL,
'dBase IV'
go
exec sp_addlinkedsrvlogin @.rmtsrvname='alarm_dBASE2',
@.useself = 'FALSE',
@.locallogin = NULL,
@.rmtuser = NULL,
@.rmtpassword= NULL
goscott (sbailey@.mileslumber.com) writes:
> I'm trying to create a "Linked Server" in QA to a dBASE file. Below are
> some examples I've tried. They seem to create the "Linked Server" in
> Ent. Manager, but give errors when i run a SELECT .. OPENQUERY
> statement. They also give errors with Ent. Manager when trying to expand
> the linked server's
> node.
> The errors say the path is wrong, which it isn't. Other errors when
> clicking "tables" under the linked server are "OLE DB" errors.
Note that the path is from the SQL Server machine, not on your local
machine. (Unless SQL Server runs on your local machine.)
Since I don't know anything about dBase, this is all I can contribute
with.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||i'm doing all of this from the server.
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97BCD2B8BF520Yazorman@.127.0.0.1...
> scott (sbailey@.mileslumber.com) writes:
> Note that the path is from the SQL Server machine, not on your local
> machine. (Unless SQL Server runs on your local machine.)
> Since I don't know anything about dBase, this is all I can contribute
> with.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||You're using the wrong driver so it cannot work. You're trying to use the
Jet engine (Microsoft Access .mdb engine).
You have an ODBC driver for .dbf files. I'm not shure if it works with Dbase
IV (most probably it'll do the trick).
Go to Control Panel - Data Sources (ODBC) and make a DSN.
change @.Provider to OLEDB for ODBC and supply your DSN (search the web on
exact syntax)
Milan|||Use "Microsoft OLE DB Provider for ODBC Drivers" instead of MS.Jet
NO "@.datasrc" but use provider string as of "Driver={Microsoft dBASE Driver
(*.dbf)};DriverID=21;Dbq=(you file, no filename);Mode=Read;
i.e. @.provstr = 'c:\' if you file is under c drive

Linked server to DB2

Hi all. I have tried everything I know (which isn't much) and I am
all out of ideas.
I am trying to create a linked server from SQL Server 2000 to a DB2
server. I am using IBM OLE DB Provider for DB2 and I get the
following error:
Error 7330: OLE DB Provider 'IBMDADB2' reported an error.
OLE DB error trace [OLE/DB Provider 'IBMDADB2'
IDBInitialize::Initialize returned 0x80004005: ]
All my research has led me nowhere. I have another instance of SQL
Server 2000 on another machine and creating a linked server there
with the same provider worked fine. Where could I be going wrong?
Any help will be greatly appreciated. I will be more than happy to
provide more info if you need it.
Thanks in advance.Hi
I have never tried doing this but googling turned up this article
http://www.windowsitpro.com/SQLServ...7639/37639.html
which may/may not help you. As one system works you may want to see what is
different, e.g things to check such as MDAC versions, MDAC is installed
correctly, security/domains/trusts...
John
"svenpurple7" wrote:

> Hi all. I have tried everything I know (which isn't much) and I am
> all out of ideas.
> I am trying to create a linked server from SQL Server 2000 to a DB2
> server. I am using IBM OLE DB Provider for DB2 and I get the
> following error:
> Error 7330: OLE DB Provider 'IBMDADB2' reported an error.
> OLE DB error trace [OLE/DB Provider 'IBMDADB2'
> IDBInitialize::Initialize returned 0x80004005: ]
> All my research has led me nowhere. I have another instance of SQL
> Server 2000 on another machine and creating a linked server there
> with the same provider worked fine. Where could I be going wrong?
> Any help will be greatly appreciated. I will be more than happy to
> provide more info if you need it.
> Thanks in advance.
>|||Thanks for the reply John.
The two instances of SQL Server are identical. The only difference is
in operating systems. The one that doesn't work is Windows 2003
server and the one that does work is Windows 2000 server.
I'll take a look at the linkyou sent.
Thanks again.|||Hi
Windows 2003 has more secure default settings therefore you may need to
enable something such as a service or port that is on by default in Windows
2000.
John
"svenpurple7" wrote:

> Thanks for the reply John.
> The two instances of SQL Server are identical. The only difference is
> in operating systems. The one that doesn't work is Windows 2003
> server and the one that does work is Windows 2000 server.
> I'll take a look at the linkyou sent.
> Thanks again.
>