-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Accessing Oracle with DB Link
PostPosted: Wed Jul 06, 2005 6:04 pm 
Newbie

Joined: Thu Mar 17, 2005 8:15 pm
Posts: 19
HI
I am using MS SQL Server 2000 as my transaction data but I need to access Oracle Database at run time . SO I defined DB Link in MS SQL Server to access Oracle and the query in MS SQL Server

select * from ORACLEDB..EMPLOYEE.

Now How can I access OracleDB..Employee table using MSSQL server dialect. I need to perform join operation on this two different databases.


Regards
Nagesh G.


Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 07, 2005 12:12 am 
Beginner
Beginner

Joined: Wed Jul 06, 2005 8:18 pm
Posts: 23
What is the problem you encountered? Try to escape your table name as `ORACLEDB..EMPLOYEE`.

(haven't tried this myself so good luck :)


Top
 Profile  
 
 Post subject: Following Error
PostPosted: Thu Jul 07, 2005 12:19 pm 
Newbie

Joined: Thu Mar 17, 2005 8:15 pm
Posts: 19
Hi I am getting the following error.

12:02:53,816 INFO [STDOUT] Final Query------ select * from 'MYDB..ESS.Employee'
12:02:53,816 ERROR [PARSER] *** ERROR: line 1:9: unexpected token: *
12:02:53,826 ERROR [PARSER] *** ERROR: line 1:16: expecting IDENT, found ''MYDB..ESS.Employee''
12:02:53,826 INFO [STDOUT] org.hibernate.hql.ast.QuerySyntaxError: unexpected token: * near line 1,
column 9 [ select * from 'MYDB..ESS.Employee']
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:215)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:414)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:821)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:779)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.