Showing posts with label odbc. Show all posts
Showing posts with label odbc. Show all posts

Friday, March 30, 2012

Link to Data

I have a superbase database i like to link to sql server 2005. MS access is not working. How do i link a ODBC data connection into SQL Server.

You can either use the create a linked server for the datasource and then acces it via the four part name with the following syntax

SELECT * FROM LinkedServername.Database.Schema.ObjectName

(Those parts that don′t exists on the target server can be left out like LinkedServerName...ObjectName if applicable)

...or you can use the OPENROWSET function which can take a connection string for adhoc querying

...or you can use the OPENQUERY function to use a linked server to query for (if you want to do more than just querying some data from tables like executing a stored procedure on the remote system)


HTH, Jens SUessmeyer.


http://www.sqlserver2005.de

|||

Hi, i tried linked server.This is the message i get.

LE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "superdata" returned message "Could not find installable ISAM.".

Msg 7303, Level 16, State 1, Line 1

Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "superdata".

|||Hi,

make sure that the right driver for the ISAM is installed:

http://support.microsoft.com/kb/209805/en-us

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Wednesday, March 28, 2012

Link tables from other database into SQL

I was wondering if anyone knew of a way to dynamically link a table from a
COBOL (I think) database into a SQL database. I have an ODBC driver that I
have been using to link the tables into Access, but would like to do the same
in SQL Server 2000.
Thanks in advance for any replies!
Cobol is a language so I'm not real sure what database you
are trying to connect to. But if you have a driver for the
database, install it on the SQL Server box. For the linked
server, you'll need to follow similar steps for the
configuration that you used in Access when linking the
tables. Look up linked servers in SQL Server books online to
find more information on creating linked servers in SQL
Server. You link to the server/database in SQL Server rather
than individual database objects as you do in Access.
-Sue
On Fri, 4 Mar 2005 07:49:09 -0800, "cjohnson300"
<cjohnson300@.discussions.microsoft.com> wrote:

>I was wondering if anyone knew of a way to dynamically link a table from a
>COBOL (I think) database into a SQL database. I have an ODBC driver that I
>have been using to link the tables into Access, but would like to do the same
>in SQL Server 2000.
>Thanks in advance for any replies!

Link tables from other database into SQL

I was wondering if anyone knew of a way to dynamically link a table from a
COBOL (I think) database into a SQL database. I have an ODBC driver that I
have been using to link the tables into Access, but would like to do the sam
e
in SQL Server 2000.
Thanks in advance for any replies!Cobol is a language so I'm not real sure what database you
are trying to connect to. But if you have a driver for the
database, install it on the SQL Server box. For the linked
server, you'll need to follow similar steps for the
configuration that you used in Access when linking the
tables. Look up linked servers in SQL Server books online to
find more information on creating linked servers in SQL
Server. You link to the server/database in SQL Server rather
than individual database objects as you do in Access.
-Sue
On Fri, 4 Mar 2005 07:49:09 -0800, "cjohnson300"
<cjohnson300@.discussions.microsoft.com> wrote:

>I was wondering if anyone knew of a way to dynamically link a table from a
>COBOL (I think) database into a SQL database. I have an ODBC driver that I
>have been using to link the tables into Access, but would like to do the sa
me
>in SQL Server 2000.
>Thanks in advance for any replies!

Link Table

I am able to create a link table MS Access to an ODBC datasource using
USQL Transoft.
Is it possible to create the same 'link table' in SQL.
MS Access takes to long to run the query, but I can only see how to import
the data into SQL.
Many thanks
You may be able to use OpenRowSet and OpenDataSource. Read all about
it from the BOL.
Aramid
On Wed, 6 Apr 2005 05:53:03 -0700, "MMouse99"
<MMouse99@.discussions.microsoft.com> wrote:

>I am able to create a link table MS Access to an ODBC datasource using
>USQL Transoft.
>Is it possible to create the same 'link table' in SQL.
>MS Access takes to long to run the query, but I can only see how to import
>the data into SQL.
>Many thanks
>
|||Hi Thanks aramid.
Whats BOL...sorry
"aramid" wrote:

> You may be able to use OpenRowSet and OpenDataSource. Read all about
> it from the BOL.
> Aramid
> On Wed, 6 Apr 2005 05:53:03 -0700, "MMouse99"
> <MMouse99@.discussions.microsoft.com> wrote:
>
>

Link Table

I am able to create a link table MS Access to an ODBC datasource using
USQL Transoft.
Is it possible to create the same 'link table' in SQL.
MS Access takes to long to run the query, but I can only see how to import
the data into SQL.
Many thanksYou may be able to use OpenRowSet and OpenDataSource. Read all about
it from the BOL.
Aramid
On Wed, 6 Apr 2005 05:53:03 -0700, "MMouse99"
<MMouse99@.discussions.microsoft.com> wrote:

>I am able to create a link table MS Access to an ODBC datasource using
>USQL Transoft.
>Is it possible to create the same 'link table' in SQL.
>MS Access takes to long to run the query, but I can only see how to import
>the data into SQL.
>Many thanks
>|||Hi Thanks aramid.
Whats BOL...sorry
"aramid" wrote:

> You may be able to use OpenRowSet and OpenDataSource. Read all about
> it from the BOL.
> Aramid
> On Wed, 6 Apr 2005 05:53:03 -0700, "MMouse99"
> <MMouse99@.discussions.microsoft.com> wrote:
>
>

Link Table

I am able to create a link table MS Access to an ODBC datasource using
USQL Transoft.
Is it possible to create the same 'link table' in SQL.
MS Access takes to long to run the query, but I can only see how to import
the data into SQL.
Many thanksYou may be able to use OpenRowSet and OpenDataSource. Read all about
it from the BOL.
Aramid
On Wed, 6 Apr 2005 05:53:03 -0700, "MMouse99"
<MMouse99@.discussions.microsoft.com> wrote:
>I am able to create a link table MS Access to an ODBC datasource using
>USQL Transoft.
>Is it possible to create the same 'link table' in SQL.
>MS Access takes to long to run the query, but I can only see how to import
>the data into SQL.
>Many thanks
>|||Hi Thanks aramid.
Whats BOL...sorry
"aramid" wrote:
> You may be able to use OpenRowSet and OpenDataSource. Read all about
> it from the BOL.
> Aramid
> On Wed, 6 Apr 2005 05:53:03 -0700, "MMouse99"
> <MMouse99@.discussions.microsoft.com> wrote:
> >I am able to create a link table MS Access to an ODBC datasource using
> >USQL Transoft.
> >
> >Is it possible to create the same 'link table' in SQL.
> >
> >MS Access takes to long to run the query, but I can only see how to import
> >the data into SQL.
> >
> >Many thanks
> >
>sql

Link SQL Server To Intersystem's Cache Database

Using ODBC, I can link to a Cache database using MS Access. I have tried to do the same with SQL Server 2000, but all I can do is copy tables, which I don't want to do. Is there a way to link SQL Server to Cache? The DB is read-only.

Cache is the DB for an Eclipsys Patient Accounting System used at the hospital where I work.

There are two ways to do it:

1. use ODBC + OLE DB Provider for ODBC you can create a linked server from SQL 2k to Cache

2. or if Cache supports its own OLE DB Provider, then you can directly use the OLE DB Provider to create a linked server to Cache

HTH.

sql

Link SQL Server To Intersystem's Cache Database

Using ODBC, I can link to a Cache database using MS Access. I have tried to do the same with SQL Server 2000, but all I can do is copy tables, which I don't want to do. Is there a way to link SQL Server to Cache? The DB is read-only.

Cache is the DB for an Eclipsys Patient Accounting System used at the hospital where I work.

There are two ways to do it:

1. use ODBC + OLE DB Provider for ODBC you can create a linked server from SQL 2k to Cache

2. or if Cache supports its own OLE DB Provider, then you can directly use the OLE DB Provider to create a linked server to Cache

HTH.

Monday, March 26, 2012

Link SQL Server 2005 Tables to external database through ODBC

Hi

I'm a newbie at SQL 2005 and I'm trying to create linked tables to our ERP system through ODBC. I can do this in MS Access or vb.net by using the ERP system's ODBC driver, but I am lost when it comes to SQL Server 2005.

Thanks for any help

Using a linked server, you will need to have either a OLEDB driver or a support for the OLEDB for ODBC provider. Using OPENDATASOURCE you will need to have the init string (connectionstring) for the database. You will find more information in the BOL under the topic OPENDATASOURCE.

Jens K. Suessmeyer

http://www.sqlserver2005.de

Link SQL Server 2005 Tables to external database through ODBC

Hi

I'm a newbie at SQL 2005 and I'm trying to create linked tables to our ERP system through ODBC. I can do this in MS Access or vb.net by using the ERP system's ODBC driver, but I am lost when it comes to SQL Server 2005.

Thanks for any help

Using a linked server, you will need to have either a OLEDB driver or a support for the OLEDB for ODBC provider. Using OPENDATASOURCE you will need to have the init string (connectionstring) for the database. You will find more information in the BOL under the topic OPENDATASOURCE.

Jens K. Suessmeyer

http://www.sqlserver2005.de

Link Server to MySQL Database

Hi

I ma trying to create a linked server to a MySQL database via ODBC. I am running SQL 2005 on Windows 2003 R2 (64-bit). Can any one point me in the right direction .

Any ideas|||MSDASQL (provider shipped with SS2005 which serves as OLEDB-ODBC bridge) is not supported in 64-bit. Check if there is an 64-bit OLEDB provider for MySQL that you can use directly.|||

Thanks for that i will look into it.

|||

Hi James,

Were you able to do that? I am having the trouble doing the same. If you have done, could you please post the procedure.

Thanks,

Neelesh:)

|||Unfortunatly I have not had much time to look at it. I have not managed to find a free / cheap OLE MYSQL driver. Sorry I was not much help|||Can you guys post your email? I can send you a documentation for creating linked servers with MySQL|||

My email address is jamesholmes@.greggs.co.uk

Thanks

|||

Have you tried email me ?

Thanks

Link Server to MySQL Database

Hi

I ma trying to create a linked server to a MySQL database via ODBC. I am running SQL 2005 on Windows 2003 R2 (64-bit). Can any one point me in the right direction .

Any ideas|||MSDASQL (provider shipped with SS2005 which serves as OLEDB-ODBC bridge) is not supported in 64-bit. Check if there is an 64-bit OLEDB provider for MySQL that you can use directly.|||

Thanks for that i will look into it.

|||

Hi James,

Were you able to do that? I am having the trouble doing the same. If you have done, could you please post the procedure.

Thanks,

Neelesh:)

|||Unfortunatly I have not had much time to look at it. I have not managed to find a free / cheap OLE MYSQL driver. Sorry I was not much help|||Can you guys post your email? I can send you a documentation for creating linked servers with MySQL|||

My email address is jamesholmes@.greggs.co.uk

Thanks

|||

Have you tried email me ?

Thanks

Link server error The provider did not give any information about the error

Hi!

We have a test server (win 2003) in which MSSQL server is installed.In my system (win XP)I installed MYSQL server ,MY sql odbc driver.Now all I want is to create a linked server on MSSQL server so that data on Both server can be in sync.When even a new record in inserted in MYSQL it should be replicated to MSSQL srvr tabl immeditely

I tried to create a linked server but every time I got this error

Error 7399:OLEDB PROVIDER'MSDASQL' reported an error.The provider did not give any information about the error.OLE DB error trace[OLE/DB provider 'MSDASQL' IDBInitilize ::Initialize returned 0x80004005: The provider did not give any information about the error.]

Here is what I have done
sp_addlinkedserver @.server = 'localhost', @.srvproduct = 'MYSQL', @.provider= 'MSDASQL', @.datasrc ='localhost',@.location ='ipadd of my sqlserver',@.provstr ='DriverDriver={MySQL ODBC 3.51 driver};Server=ip add of mysql server;Port=3306;Option=131072;Stmt=;Database=testDB;Uid=root;Pwd=1234asdf' ,@.catalog = 'testDB'
Pls suggest what to do.I am trying for past 2 week but nothing came fruitful..sigh!!

Hi,

1. sp_addlinkedserver should not be returning this error. This error should occur when you try to access the linked server.

2. Can you check the permissions on the odbc driver files and make sure that they have the right permissions?

3. Can it be that the connection information that you specified in the connection string is incorrect?

4. You can also try to create a system DSN ( test the connection ) and use it in the linked server definition using the @.datasource parameter of sp_addlinkedserver( @.datasrc = N'YOU_DATASOURCE_NAME' ).

Hope this helps.

Thanks,
Rakesh

Friday, March 23, 2012

link a table with odbc into sql server?

is it possible to link a table with odbc into sql server?
it would be nice to link an MS Access table into sql server where i could use stored procedures to access the MS Access table.Yes you can create a Linked Server so that you can get at an Access table directly from Sql Server. To do it with an ODBC connection:

1. In Enterprise Manager expand the Security->Linked Server.
2. Right click the Linked Server node and select "New linked server..."
3. Under the General tab give the linked server a name. For Server type select the "Other data source" radio button. For Provider Name select "Microsoft Jet Ole Db Provider for ODBC".
Under Datasource enter the name of the ODBC driver.
4. If the Access db requires a username and password enter them under the Security Tab.
5. Click OK. You should see this linked server listed with nodes for Tables and Views.

I suggest using OpenQuery with syntax like: OpenQuery(LinkedServerName,'Select x,y,z FROM AccessTable'). It's not required that you use OpenQuery(...) but it seems more robust. When I've tried without using it I've gotten intermittant errors.

To simplify getting at the linked server data I create a view in Sql Server like:


CREATE VIEW dbo.ViewToAccessTable
AS
SELECT *
FROM OpenQuery( LINKDEDSERVERNAME, 'Select * from SomeAccessTable')

and then just refer to this view in all your Sql Server side code.

Note that when defining the linked server it is possible to use the "Microsoft Jet OLE DB Provider" instead of going through the ODBC driver. It's probably more efficient and reliable.

Friday, February 24, 2012

Limit? Rowid?

Hi,
I am writing a "universal" db-Interface and just finished the postgres
and mysql part. I got somehow stuck on the MS SQL Server part (via
ODBC).
I have no access to the SQL Server CD or the machine where it is
running, I access the database only via a VPN tunnel and ODBC.
My question is:
How can I use something like the "LIMIT " command?
How can I get the actual "_rowid" (not the primary key, but the row-id
of the result set.)
Something like:
Select * from article Limit 5,10
Select _rowid from article where id = "XYZ-123"
Update article set amount = 15 where _rowid = 23
And how to get the table definition, something like "Describe article;"
oder "Show create table article;" ?
Is there a simple online reference for this SQL dialect that SQL Server
via ODBC uses?
Thank you for your help
RobertRobert
What vesrion are you using?
SQL Server 2005
There is new function ROW_NUMBER()
SELECT * FROM
(
SELECT ROW_NUMBER() OVER(ORDER BY score DESC) AS rownum,
columns
FROM Table
) AS Der WHERE rownum BETWEEN 5 AND 10
SQL Server 2000
SELECT * FROM Table WHERE (SELECT COUNT(*) FROM Table t WHERE
t.PK<=Table.PK)
BETWEEN 5 AND 10
pk-Primary keys
Actualy if it does not help you ,please post DDL+ sample data + an expected
result
"Robert Eisig" <quantumchaos666@.gmx.net> wrote in message
news:1143380427.955422.222930@.u72g2000cwu.googlegroups.com...
> Hi,
> I am writing a "universal" db-Interface and just finished the postgres
> and mysql part. I got somehow stuck on the MS SQL Server part (via
> ODBC).
> I have no access to the SQL Server CD or the machine where it is
> running, I access the database only via a VPN tunnel and ODBC.
> My question is:
> How can I use something like the "LIMIT " command?
> How can I get the actual "_rowid" (not the primary key, but the row-id
> of the result set.)
> Something like:
> Select * from article Limit 5,10
> Select _rowid from article where id = "XYZ-123"
> Update article set amount = 15 where _rowid = 23
> And how to get the table definition, something like "Describe article;"
> oder "Show create table article;" ?
> Is there a simple online reference for this SQL dialect that SQL Server
> via ODBC uses?
> Thank you for your help
> Robert
>|||Robert Eisig wrote:
> Hi,
> I am writing a "universal" db-Interface and just finished the postgres
> and mysql part. I got somehow stuck on the MS SQL Server part (via
> ODBC).
> I have no access to the SQL Server CD or the machine where it is
> running, I access the database only via a VPN tunnel and ODBC.
> My question is:
> How can I use something like the "LIMIT " command?
> How can I get the actual "_rowid" (not the primary key, but the row-id
> of the result set.)
> Something like:
> Select * from article Limit 5,10
> Select _rowid from article where id = "XYZ-123"
> Update article set amount = 15 where _rowid = 23
> And how to get the table definition, something like "Describe article;"
> oder "Show create table article;" ?
> Is there a simple online reference for this SQL dialect that SQL Server
> via ODBC uses?
> Thank you for your help
> Robert
There is no such "rowid" concept in SQL Server. An exposed row number
based on anything other than values in the table violates the
relational Information Principle. So it's not a feature we should
expect or desire from a well-designed SQL DBMS - something you should
bear in mind if you want to create an app that is portable across many
database products.
SQL Server 2005 does support the ANSI standard RANK() and ROW_NUMBER()
functions, which derive their values from the column(s) specified with
the ORDER BY syntax. Make sure you specify a unique key for ORDER BY so
as to guarantee a deterministic result.
See my signature for a link to the SQL Server docs.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Limit is what we use in MYSQL no?
We can consider TOP clause of Sql Server similar to LIMIT.
Like,
Select * from article Limit 5
select top 5 * from article
For a specific range...
Select * from article Limit 5,10
Playing with 'IN' clause you can get LIMIT 5-10.
select TOP 5 * from article where articleid in (Select TOP 10 articleid
from article ) ORDER BY DESC
--
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"Robert Eisig" wrote:
> Hi,
> I am writing a "universal" db-Interface and just finished the postgres
> and mysql part. I got somehow stuck on the MS SQL Server part (via
> ODBC).
> I have no access to the SQL Server CD or the machine where it is
> running, I access the database only via a VPN tunnel and ODBC.
> My question is:
> How can I use something like the "LIMIT " command?
> How can I get the actual "_rowid" (not the primary key, but the row-id
> of the result set.)
> Something like:
> Select * from article Limit 5,10
> Select _rowid from article where id = "XYZ-123"
> Update article set amount = 15 where _rowid = 23
> And how to get the table definition, something like "Describe article;"
> oder "Show create table article;" ?
> Is there a simple online reference for this SQL dialect that SQL Server
> via ODBC uses?
> Thank you for your help
> Robert
>|||The concept of rowid or recid on other database products and row_number() in
SQL Server have nothing in common. rowid is permanent on a record event after
database shutdown. row_number() in SQL Server is just a sequential number
within a partition of a result set.
Ben Nevarez, MCDBA, OCP
Database Administrator
"David Portas" wrote:
> Robert Eisig wrote:
> > Hi,
> >
> > I am writing a "universal" db-Interface and just finished the postgres
> > and mysql part. I got somehow stuck on the MS SQL Server part (via
> > ODBC).
> >
> > I have no access to the SQL Server CD or the machine where it is
> > running, I access the database only via a VPN tunnel and ODBC.
> >
> > My question is:
> >
> > How can I use something like the "LIMIT " command?
> >
> > How can I get the actual "_rowid" (not the primary key, but the row-id
> > of the result set.)
> >
> > Something like:
> >
> > Select * from article Limit 5,10
> >
> > Select _rowid from article where id = "XYZ-123"
> >
> > Update article set amount = 15 where _rowid = 23
> >
> > And how to get the table definition, something like "Describe article;"
> > oder "Show create table article;" ?
> >
> > Is there a simple online reference for this SQL dialect that SQL Server
> > via ODBC uses?
> >
> > Thank you for your help
> > Robert
> There is no such "rowid" concept in SQL Server. An exposed row number
> based on anything other than values in the table violates the
> relational Information Principle. So it's not a feature we should
> expect or desire from a well-designed SQL DBMS - something you should
> bear in mind if you want to create an app that is portable across many
> database products.
> SQL Server 2005 does support the ANSI standard RANK() and ROW_NUMBER()
> functions, which derive their values from the column(s) specified with
> the ORDER BY syntax. Make sure you specify a unique key for ORDER BY so
> as to guarantee a deterministic result.
> See my signature for a link to the SQL Server docs.
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
>|||Ben Nevarez wrote:
> The concept of rowid or recid on other database products and row_number() in
> SQL Server have nothing in common. rowid is permanent on a record event after
> database shutdown. row_number() in SQL Server is just a sequential number
> within a partition of a result set.
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
That's correct. A permanent "rowid" violates the Information Principle.
A ROW_NUMBER() function (provided it is generated deterministically
from data in the table) does not.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--

Monday, February 20, 2012

limit on sp's through an odbc connection

To all the gurus,
Is there a limit on the number of queries that can be run through an
odbc connection to another SQL server?
The primary server is running abinitio to query a sql server.
When we run the set of sps that is needed the server essetially grind to
a halt...
thanx
Bill
*** Sent via Developersdex http://www.codecomments.com ***ok how about this one,
is there a limit on the number of threads that can be used on one odbc
source?
Bill
*** Sent via Developersdex http://www.codecomments.com ***|||Does this article from MSoft help you at all...
http://msdn2.microsoft.com/en-us/library/ms187024.aspx
Should help you get the Maximum out of worker threads.
thanks,
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
"Bill" <nospam@.devdex.com> wrote in message
news:ustGql01GHA.4924@.TK2MSFTNGP05.phx.gbl...
> ok how about this one,
> is there a limit on the number of threads that can be used on one odbc
> source?
>
> Bill
>
> *** Sent via Developersdex http://www.codecomments.com ***|||Bill,
Regarding this:
>When we run the set of sps that is needed the server essetially grind to
>a halt...
My question is what diagnostics, monitoring were done to
determine that this was related to some type of limits on
connections? That would really be the starting point -
monitoring where the bottlenecks are, monitoring for
locking/blocking issues, what's going on in SQL Server when
these are run, etc. Were those done?
-Sue
On Wed, 13 Sep 2006 07:29:56 -0700, Bill <nospam@.devdex.com>
wrote:

>To all the gurus,
>Is there a limit on the number of queries that can be run through an
>odbc connection to another SQL server?
>The primary server is running abinitio to query a sql server.
>When we run the set of sps that is needed the server essetially grind to
>a halt...
>
>thanx
>Bill
>
>*** Sent via Developersdex http://www.codecomments.com ***|||Mr. Brunk,
thank you very much
this answered my question totally
BillO
*** Sent via Developersdex http://www.codecomments.com ***