由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - question on JOIN on Oracle
相关主题
我的oracle 怎么了?SQL Developer ORA-01017 错误
servlet调用sql 访问oracle的问题【已解决】oracle db link
求救,咋样架起来自己的database?how to connect to remote Oracle database, help me!!!
found a way to corrupt oracle on NT怎么设置多个用户 (Oracle 10g)?
Error Code 01034?问一下oracle高手
connect to an oracle server on anoter machinehow to test the database, or test SQL?
How to creat user in Oracle?求教:
如何在Unbuntu下启动oracle1. Oracle vs. SQL92 Re: Just
相关话题的讨论汇总
话题: oracle话题: join话题: database话题: link话题: jdbc
进入Database版参与讨论
1 (共1页)
l***r
发帖数: 459
1
Greetings,
Can I do JOIN between different database in oracle? I know it can do between
different schema for sure. But not sure for different databases.
Thanks in advance!
n********a
发帖数: 68
2
use db link.

【在 l***r 的大作中提到】
: Greetings,
: Can I do JOIN between different database in oracle? I know it can do between
: different schema for sure. But not sure for different databases.
: Thanks in advance!

l***r
发帖数: 459
3
Does JDBC support that?
I Google it and found this
http://www.roguewave.com/support/docs/xml/xdbug/1-1.html
It seems JDBC doesn't support it, right? Since my product is Java based, does
any XML package support this?
Thanks!

between

【在 n********a 的大作中提到】
: use db link.
n********a
发帖数: 68
4
The link you referred is not the same DB link I referred to.
In oracle, you can create Database Link object.
CREATE DATABASE LINK sales.hq.acme.com
CONNECT TO hr IDENTIFIED BY hr
USING 'sales';
Of course, you have to setup Oracle Net properly to have the
correct Net Service Name.
Then you can do:
SELECT * FROM e*******[email protected];
Of course, JDBC supports it. It's purely SQL. Just write
PreparedStatement ps = con.prepareStatement("SELECT * FROM
e*******[email protected]");
Detail

【在 l***r 的大作中提到】
: Does JDBC support that?
: I Google it and found this
: http://www.roguewave.com/support/docs/xml/xdbug/1-1.html
: It seems JDBC doesn't support it, right? Since my product is Java based, does
: any XML package support this?
: Thanks!
:
: between

l***r
发帖数: 459
5
Thanks. I believe this should work.
I create a database link and succeed. However, I test it and the message say
"database link is not active". I think the service name should be right. Do
you have any idea about this?
Thanks again!

【在 n********a 的大作中提到】
: The link you referred is not the same DB link I referred to.
: In oracle, you can create Database Link object.
: CREATE DATABASE LINK sales.hq.acme.com
: CONNECT TO hr IDENTIFIED BY hr
: USING 'sales';
: Of course, you have to setup Oracle Net properly to have the
: correct Net Service Name.
: Then you can do:
: SELECT * FROM e*******[email protected];
: Of course, JDBC supports it. It's purely SQL. Just write

n********a
发帖数: 68
6
It could be, as you guessed, net service name is not setup properly
or simply the username/password used is not authenticated.
To figure this out, look for the error code.
If you are in SQLPlus, you should see the error code starting with ORA-.
If you use JDBC, you should be able to get it by
java.sql.SQLException.getErrorCode()
And look up the error code in the Oracle Error Messages documentation.
http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a
96525/toc.htm

【在 l***r 的大作中提到】
: Thanks. I believe this should work.
: I create a database link and succeed. However, I test it and the message say
: "database link is not active". I think the service name should be right. Do
: you have any idea about this?
: Thanks again!

1 (共1页)
进入Database版参与讨论
相关主题
1. Oracle vs. SQL92 Re: Just Error Code 01034?
ORACLE Pro*C 远程接续一问?connect to an oracle server on anoter machine
Oracle急问How to creat user in Oracle?
SQL SERVER 2K5 schema vs. Oracle schema如何在Unbuntu下启动oracle
我的oracle 怎么了?SQL Developer ORA-01017 错误
servlet调用sql 访问oracle的问题【已解决】oracle db link
求救,咋样架起来自己的database?how to connect to remote Oracle database, help me!!!
found a way to corrupt oracle on NT怎么设置多个用户 (Oracle 10g)?
相关话题的讨论汇总
话题: oracle话题: join话题: database话题: link话题: jdbc