ODBC Linked server in sql 2005 doesn’t work from remote box - sql-server-2005

I have a dev workstation with sql 2005 installed and in it I created a linked server to a odbc connection to a clarion database. I can run select statements against it inside sql Mgt studio. When I take a second workstation and connect to the sql on the first box using sql mgt studio, then try the exact same query I get
OLE DB provider "MSDASQL" for linked server "liveclarion" returned message "[SoftVelocity Inc.][TopSpeed ODBC Driver][ISAM]ISAM Table Not Found".
Any thoughts? It appears to have the same functionality on a second sql server. No remote sql mgt studio connect success in queries against my linked ODBC clarion DB.
All done with windows authentication and the same AD user.

The error returned by the ODBC driver is "SAM table not found".
So I'm assuming you have a table called SAM - presumably in a table called Sam.Tps?
I'm wondering if you need to set a path to that file - ie if there's some difference in path or file name validity between your two tests. One assumes not, but I'd look in that direction first.

Related

Apply SQL Server schema after 'schema compare' show error

Versions in use:
SQL Server 2016
Azure Data Studio 1.36.2
SQL Server Schema Compare 1.13.1
Problem: there is something wrong with my Azure Data Studio apply schema to SQL Server 2016.
It say I'm not the login manager but there is no login manager role in SQL Server.
And it has worked before updating Azure Data Studio to v1.36.X
https://imgur.com/a/JFWFOtn
Finally, I found the problem
Misused sqllinlinetablevaluedfunction and sqlmultistatementtablevaluedfunction
In my project There are many function use sqllinlinetablevaluedfunction instead of sqlmultistatementtablevaluedfunction but It's should be used sqlmultistatementtablevaluedfunction
so I change to Correct Type then It's worked. The error never show

How to retrieve records from server database into local database

I have a little problem. I want to create a query in my local database (tijdsregistratie.mdf) to retrieve rows from my server database (IT Solutions Develop.dbo) on server itshou-dev03\sql2008.
But I don't know how to connect to the server database. I tried it like this :
select TOP 10 * from [IT Solutions Develop].dbo.[IT Solutions BVBA$Planning]
.. but it gives me this error :
Invalid object name 'IT Solutions Develop.dbo.IT Solutions
BVBA$Planning'.
One way is to link the servers:
http://msdn.microsoft.com/en-us/library/ms188279.aspx?ppud=4
You can also define linked servers by using SQL Server Management
Studio. In the Object Explorer, right-click Server Objects, select
New, and select Linked Server. You can delete a linked server
definition by right-clicking the linked server name and selecting
Delete.
This is the process by which you tell SQL Server where another server is and how to connect to it. You can do this in SQL Server Management Studio or in T-SQL. You can then refer to the linked server by a four part name (similar to what is in your question):
[LinkedServerName].[Database].[Schema].[Object]

SQL Server 2000 sp? odbc vs OleDb

Our clients wnat us to retreive data from SQL Server 2000. It is unknown whether they have any service packs installed for that SQL Server. Assuming the worst (no sp), will there be a problem using OleDb driver to work with SQL Server 2000?
OleDb is working fine without any sp.

How do you setup a linked server to an Oracle database on SQL 2000/2005?

I am able to create and execute a DTS package that copies tables from a remote Oracle database to a local SQL server, but want to setup the connection to the Oracle database as a linked server.
The DTS package currently uses the Microsoft OLE DB Provider for Oracle with the following properties:
Data Source: SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.3.42)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=acc)));uid=*UserName*;pwd=*UserPassword*;
Password: UserPassword
User ID: UserName
Allow saving password: true
How do I go about setting a linked server to an Oracle database using the data source defined above?
I was able to setup a linked server to a remote Oracle database, which ended up being a multi-step process:
Install Oracle ODBC drivers on SQL Server.
Create System DSN to Oracle database on SQL Server.
Create linked server on SQL server using System DSN.
Step 1: Install Oracle ODBC drivers on server
a. Download the necessary Oracle Instant Client packages: Basic, ODBC, and SQL*Plus (optional)
b. Unzip the packages to a local directory on the SQL server, typically C:\Oracle. This should result in a [directory] like C:\Oracle\instantclient_10_2, which will be the value of [directory] referenced in the rest of this answer.
c. Create a text file named tnsnames.ora within the instant client [directory] that contains the following:
OracleTnsName =
(
DESCRIPTION=
(
ADDRESS = (PROTOCOL=TCP)(HOST=10.1.3.42)(PORT=1521)
)
(
CONNECT_DATA = (SERVICE_NAME=acc)
)
)
Note: Actual HOST, PORT, and SERVICE_NAME will vary based on Oracle server you are establishing a connection to. This information can often be found using the Oracle network client tools under the listeners.
The OracleTnsName can be any name you want to assign to the Oracle data source, and will be used when setting up the system DSN. You can also use the syntax above to define multiple TNS names in the same tnsnames.ora file if desired.
d. Add the [directory] to the system PATH environment variable.
e. Create a new system environment variable named TNS_Admin that has a value of [directory]
f. Execute the [directory]\odbc_install.exe utility to install the Oracle ODBC drivers.
g. It is recommended that you reboot the SQL server, but may not be necessary. Also, you may want to grant security permissions to this directory for the SQL server and SQL agent user identities.
Step 2: Create a System DNS that uses the Oracle ODBC driver
a. Open the ODBC Data Source Administrator tool. [ Administrative Tools --> Data Sources (ODBC) ]
b. Select the System DSN tab and then select the Add button.
c. In the drivers list, select Oracle in instantclient {version}. (e.g. 'Oracle in instantclient 10_2') and then select Finish button.
d. Specify the following:
Data Source Name: {System DSN Name}
Description: {leave blank/empty}
TNS Service Name: should have the OracleTnsName you defined in the tnsnames.ora file listed, select it as the value.
User ID: {Oracle user name}
e. Select Test Connection button. You should be prompted to provide the {Oracle user password}. If all goes well the test will succeed.
Step 3: Create linked server in SQL to the Oracle database
Open a query window in SQL server and execute the following:
EXEC sp_addlinkedserver
#server = '{Linked Server Name}'
,#srvproduct = '{System DSN Name}'
,#provider = 'MSDASQL'
,#datasrc = '{System DSN Name}'
EXEC sp_addlinkedsrvlogin
#rmtsrvname = '{Linked Server Name}'
,#useself = 'False'
,#locallogin = NULL
,#rmtuser = '{Oracle User Name}'
,#rmtpassword = '{Oracle User Password}'
Note: The {Linked Server Name} can be anything you want to use when referencing the Oracle server, but the {System DNS Name} must match the name of the system DSN you created previously.
The {Oracle User Name} should be the same as the User ID used by the system DSN, and the {Oracle User Password} should be the same as you used to successfully test the ODBC connection. See KB 280106 for information on troubleshooting Oracle linked server issues.
Querying the Oracle linked server
You may use OPENQUERY to execute pass-through queries on the Oracle linked server, but be aware that for very large recordsets you may receive a ORA-01652 error message if you specify a ORDER BY clause in the pass-through query. Moving the ORDER BY clause from the pass-through query to the outer select statement solved this issue for me.
I had the same problem. I was on the phone with Microsoft for hours, and they did not have a solution. None of those "connection timeout" settings helped me.
To resolve it, I created a DTS job that runs a proc which only updates the time on one row, in one column, every two minutes. Then I setup a replication between SQL Server and Oracle, scheduled to replicate that single cell change, from SQL to Oracle, every 3 minutes. It keeps the connection alive!

MS SQL Server 2008 "linked server" to Oracle : schema not showing

I have a Windows 2008 Server (x64) running Microsoft SQL 2008 (x64) and I'm creating a Linked Server connection to an Oracle server. I'm able to make the connection, but I cannot see any information regarding which schema a table belongs to.
In SQL 2005, my linked servers show the schema information as I would expect.
Does anyone know how to resolve this issue? Is it an issue with the provider, OraOLEDB.Oracle?
Any help or pointers would be appreciated.
#Boojiboy - When you are looking at the tables via a linked server, there used to be a column for what schema. It appears that in the latest the new Oracle OLEDB drivers don't show this information any longer.
It looks like sp_tables_ex will do the trick, it came from the below article.
--verify tables OK exec sp_tables_ex #table_server = 'LINKED_ORA',
#table_schema='MySchema'
#table_schema is optional. If not
provided, you will get a list of all
tables in all schemas.
http://it.toolbox.com/blogs/daniel-at-work/linking-sql-server-2005-to-oracle-26791
Also in the SQL 08 > Server Objects > Providers
make sure your OraOLEDB.Oracle provider is allowing inprocessing