Quantcast
Channel: Foro de SQL Server Data Access
Viewing all articles
Browse latest Browse all 158

Create linked server to SYBASE ASA 9.0

$
0
0

 

Hi all,

 

I´m trying to create a linked server to a Sybase database (.db file) so i can create some reports in sql 2005 (with Reporting Services and Report Designer). After reading all articles I did the following.

 

1) Installe Adaptive Server Anyhwere (Interactive Sql) 9.0.2 on the server.

2) Created a USER DSN to the Db file (Control Panel - odbc connections) and it works fine: The Settings for the ODBC are:

  • ODBC Tab
    • Data Source Name: dbNOM
  • Login Tab
    • Supply userID and Password: (selected)
    • User ID: DBA
    • Password: SQL
  • Database Tab
    • Server Name: dbNOM
    • StartLine: C:\Program Files\Sybase\SQL Anywhere 9\win32\dbeng9.exe
    • Database Name: (blank)
    • Database File: c:\Project Folder\DataBase.db

As I said, when i go for "test connection", works fine.

 

3) Sql Management Studio - Object Explorer - Server Objects - New Linked Server, with settings as following:

  • General
    • Linked Server: lkDbNom
    • Server Type: Other Data Source
    • Provider: Sybase Adaptive Server Anywhere Provider 9.0
    • Product Name: Sybase
    • Product Name: dbNom (the dsn name, right?)
  • Security
    • Be made using this security context.- Remote Login: DBA; Password: SQL (same as DSN)

All other settings, as default, click in OK and shows no errors (aparently it creates the linked server successfully). But when i try to query the linked server with:

 

SELECT

*FROMOPENQUERY('SYBASE','SELECT * FROM nom_Robot')

 

And i get the following message:

 

Msg 102, Level 15, State 1, Line 1

Incorrect syntax near 'SYBASE'.

 

Even better, if i go to the Object Explorer - Server Objects, i test the connection and it´s ok, but when i try to retrieve the catalog an error displays:

 

TITLE: Microsoft SQL Server Management Studio
------------------------------

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

The OLE DB provider "ASAProv.90" for linked server "SYBASE" reported an error. Access denied.
Cannot obtain the required interface ("IID_IDBSchemaRowset") from OLE DB provider "ASAProv.90" for linked server "SYBASE". (Microsoft SQL Server, Error: 7399)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=7399&LinkId=20476


 

So, i really don´t understand what is missing in my linked server, i tried with MDASQL (OLEDB for ODBC) but it doesn´t even completes to create the linked server.

 

The database file is ok because, because in another server (one that doesn´t have SQL, only visual studio) i did the following:

 

1) Installe Adaptive Server Anyhwere (Interactive Sql) 9.0.2 on the server.

2) Created a DSN to the Db file, and it works fine. (copied the db file, so is local, no remote access), exactly the same setting as i did on the sql 2005 server.

3) C

reated a connection in visual studio 2008  (server explorer - data connections), i can retrieve sdata...but of course the provider is  .NET Framework Data Provider for ODBC and i cannot use the same connection string.

 

Any ideas?

 

P.S.


Viewing all articles
Browse latest Browse all 158

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>