Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Oracle linked server error

Posted on 2010-09-01
6
Medium Priority
?
305 Views
Last Modified: 2012-05-10
Hello All,

I am trying to query an Oracle database from a linked 2005 SQL Server. I am pretty sure the error has something to do with the table name being DOCUMENT. I can query all other tables in the server except this one one, I even put the table name in brackets and get the same error(s). Code
0
Comment
Question by:Lobregon
  • 3
5 Comments
 
LVL 2

Expert Comment

by:MaxterJF
ID: 33582105
It's true that DOCUMENT is a reserved word in Oracle.  If you call "SELECT * FROM "EMRTST2".."ML"."DOCUMENT" that should be working (it's true that it's Pervasive way to call objects but oh well.... why not to try it?)
0
 
LVL 1

Author Comment

by:Lobregon
ID: 33582147
No that didn't work... I can query it just fine within an Oracle SQL Developer Screen.
PrtScr-capture-15.jpg
0
 
LVL 13

Expert Comment

by:riazpk
ID: 33584174
If you have SQL Server Management Studio, just check whether you can see the table when you choose the following options:
Linked Servers -> EMRTST2 -> Catalogs -> default -> tables
0
 
LVL 1

Author Comment

by:Lobregon
ID: 33588930
Yeah I can see it... Just cant Query it....
PrtScr-capture-16.jpg
0
 
LVL 1

Accepted Solution

by:
Lobregon earned 0 total points
ID: 33589121
I ended up making of a view of the table in Oracle and querying that view via SQL Server... I know just a band-aid but it works.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question