Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Database/JDBC/SQL/JDO/Hibernate » Oracle  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 oracle9i自带jdbc驱动吗?
Gzd2003



发贴: 0
积分: 0
于 2003-11-12 21:58 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我在oracle9i安装后的目录H:\oracle\ora92\jdbc\lib下发现以下文件:
classes12.zip,classes12.jar,classes12_g.jar,classes12_g.zip
nls_charset12.jar,nls_charset12.zip
classes12_g.zip,classes12_g.jar
classes111.jar,classes111.zip,classes111_g.jar,classes111_g.zip
classes12dms.jar,classes12dms_g.jar
ocrs12.jar,ocrs12.zip
ojdbc14.jar,ojdbc14_g.jar
nls_charset11.jar,nls_charset11.zip
1.看里面的内容好象都是oracle的jdbc驱动程序,到底哪个是的呀?
2.为什么要分jar和zip两个文件?
3.加个_g后缀是什么含义?
4.各个文件是干什么用的?



作者 Re:oracle9i自带jdbc驱动吗? [Re:Gzd2003]
九佰



版主


发贴: 983
积分: 126
于 2003-11-13 08:58 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
在8i中jdbc的驱动程序在classes12.zip中
在jdbc目录里面,有一个readme.txt,里面说的很清楚
你看看吧,有什么收获希望能贴出来,大家学习学习 Smile




http://www.teamlet.org

海纳百川,有容乃大
壁立千仞,无欲则刚
智者不惑,勇者无惧
止戈为武,仁者无敌
作者 Re:oracle9i自带jdbc驱动吗? [Re:Gzd2003]
davidself

猫哥

CJSDN高级会员


发贴: 1506
积分: 333
于 2003-11-13 09:14 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
111的是用于jdk1.1
12的是用于jdk1.2&1.3
14的是用于jdk1.4

带g表示with debug and trace



--108的上铺--
davidself@twitter
作者 Re:oracle9i自带jdbc驱动吗? [Re:davidself]
Jove



CJSDN高级会员


发贴: 1228
积分: 194
于 2003-11-13 11:42 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
怎么用带debug&trace的驱动?


作者 Re:oracle9i自带jdbc驱动吗? [Re:Gzd2003]
Gzd2003



发贴: 0
积分: 0
于 2003-11-13 19:40 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
nls_charset*.*这些文件有什么用?


作者 Re:oracle9i自带jdbc驱动吗? [Re:Gzd2003]
davidself

猫哥

CJSDN高级会员


发贴: 1506
积分: 333
于 2003-11-13 22:09 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Gzd2003 wrote:
nls_charset*.*这些文件有什么用?

Additional National Language character set support
其实版主已经说的很清楚了,花点时间看看readme。



--108的上铺--
davidself@twitter
作者 Re:oracle9i自带jdbc驱动吗? [Re:Gzd2003]
lcdong828





发贴: 2
积分: 0
于 2003-12-04 11:13 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
在\oracle\ora92\jdbc\lib目录下,Readme.txt里讲的很清楚
classes111.jar是用于jdk1.1
12的是用于jdk1.2&1.3
14的是用于jdk1.4



作者 Re:oracle9i自带jdbc驱动吗? [Re:Gzd2003]
nothing

天外飞仙.....

CJSDN高级会员


发贴: 1636
积分: 131
于 2003-12-28 03:34 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Installation
------------

Please do not try to put multiple versions of the Oracle JDBC drivers
in your CLASSPATH. The Oracle installer installs the JDBC Drivers in
the [ORACLE_HOME]/jdbc directory.

Setting Up Your Environment
---------------------------

On Win95/Win98/NT:
- Add [ORACLE_HOME]\jdbc\lib\classes111.zip and
[ORACLE_HOME]\jdbc\lib\nls_charset11.zip to your CLASSPATH.
(Add classes12.zip and nls_charset12.zip if JDK 1.2.x or 1.3 is
used. Add ojdbc14.jar and nls_charset12.zip if JDK 1.4 is used.)
- Make sure [ORACLE_HOME]\bin is in your PATH.

On Solaris/Digital Unix:
- Add [ORACLE_HOME]/jdbc/lib/classes111.zip and
[ORACLE_HOME]/jdbc/lib/nls_charset11.zip to your CLASSPATH.
(Add classes12.zip and nls_charset12.zip if JDK 1.2.x or 1.3 is
used. Add ojdbc14.jar and nls_charset12.zip if JDK 1.4 is used.)
- Add [ORACLE_HOME]/jdbc/lib to your LD_LIBRARY_PATH.

On HP/UX:
- Add [ORACLE_HOME]/jdbc/lib/classes111.zip and
[ORACLE_HOME]/jdbc/lib/nls_charset11.zip to your CLASSPATH.
(Add classes12.zip and nls_charset12.zip if JDK 1.2.x or 1.3 is
used. Add ojdbc14.jar and nls_charset12.zip if JDK 1.4 is used.)
- Add [ORACLE_HOME]/jdbc/lib to your SHLIB_PATH and LD_LIBRARY_PATH.

On AIX:
- Add [ORACLE_HOME]/jdbc/lib/classes111.zip and
[ORACLE_HOME]/jdbc/lib/nls_charset11.zip to your CLASSPATH.
(Add classes12.zip and nls_charset12.zip if JDK 1.2.x 1.3 is
used. Add ojdbc14.jar and nls_charset12.zip if JDK 1.4 is used.)
- Add [ORACLE_HOME]/jdbc/lib to your LIBPATH and LD_LIBRARY_PATH.

Some Useful Hints In Using the JDBC Drivers
-------------------------------------------

Please refer to "JDBC Developer's Guide and Reference" for details
regarding usage of Oracle's JDBC Drivers. This section only offers
useful hints. These hints are not meant to be exhaustive.

These are a few simple things that you should do in your JDBC program:

1. Import the necessary JDBC classes in your programs that use JDBC.
For example:

import java.sql.*;
import java.math.*;

2. Register the Oracle driver before before calling other JDBC APIs.
(This is not needed if you are using the JDBC Server-side Internal
Driver because registration is done automatically in the server.)
To register the Oracle driver, make sure the following statement
is executed at least once in your Java session:

DriverManager.registerDriver(
new oracle.jdbc.OracleDriver());

3. Open a connection to the database with the getConnection call.
Different connection URLs should be used for different JDBC
drivers. The following examples demonstrate the different URLs.

For the JDBC OCI Driver:

Connection conn = DriverManager.getConnection(
"jdbc:oracle:oci:@<database>",
"my_user", "my_password");

where <database> is either an entry in tnsnames.ora or a SQL*net
name-value pair.

For the JDBC Thin Driver, or Server-side Thin Driver:

Connection conn = DriverManager.getConnection(
"jdbc:oracle:thin:@<database>",
"my_user", "my_password");

where <database> is either a string of the form
<host>:<port>:<sid>, a SQL*net name-value pair, or a service
name.

For the JDBC Server-side Internal Driver:

Connection conn = DriverManager.getConnection(
"jdbc:oracle:kprb:");

Note that the trailing ':' character is necessary. When you use
the Server-side Internal Driver, you always connect to the
database you are executing in. You can also do this:

Connection conn
= new oracle.jdbc.OracleDriver().defaultConnection();


nothing edited on 2003-12-30 20:21


躲得过的怪物,躲不过的刺激


flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923