如果你只是在主机上连接到远程的服务端里的数据库上的话,没有必要安装像服务端的那样很大的oracle软件(例如,),而是要安装一个oracle客户端软件即可。 安装在服务端的oracle软件就是oracle公司自己开发的提供给用户使用的一种软件。例如,下面就是我们说
如果你只是在主机上连接到远程的服务端里的数据库上的话,没有必要安装像服务端的那样很大的oracle软件(例如,),而是要安装一个oracle客户端软件即可。
安装在服务端的oracle软件就是oracle公司自己开发的提供给用户使用的一种软件。例如,下面就是我们说的服务端的oracle软件:
适用于 Microsoft Windows(32 位)的 Oracle Database 11g 第 2 版 (11.2.0.1.0) | ||
![]() |
win32_11gR2_database_1of2.zip(1,625,721,289 字节) | |
![]() |
win32_11gR2_database_2of2.zip(631,934,821 字节) |
参考:http://www.oracle.com/technetwork/cn/database/enterprise-edition/downloads/112010-win32soft-098630-zhs.html
说明:
安装该软件,就是同时安装了oracle客户端软件和oracle服务端软件。
而oracle客户端软件有很多,可以选择oracle公司自己开发的,也可以选择别的公司的oracle客户端软件。
别的公司的oracle客户端软件,一般有:TOAD、PL/SQL DEVELOPER等。
这里主要介绍下oracle公司自己开发的oracle客户端软件,具体如下:
1、Oracle SQL Developer 4.0 (4.0.0.13.80)
感谢您接受 OTN 许可协议;现在可以下载该软件。
|
|||||||||||||||||||
从这里下载早期版本 |
参考:http://www.oracle.com/technetwork/cn/developer-tools/sql-developer/downloads/index.html
下面是Windows 32/64 位的安装说明:
Windows 32-bit and 64-bit Installation Notes
This download does not include the JDK. You can connect to and use any JDK 1.7 or above.
To install and run:
- Ensure you have a JDK installed, if not, download
here
- Download the file above
- Extract sqldeveloper.zip into any folder, using folder names
- Within that folder, open the sqldeveloper folder
- Double-click sqldeveloper.exe
- You will be prompted to enter the path to the Java JDK home. This only occurs the first time
you launch SQL Developer.
2、Instant Client(即时客户端)
以 oracle Version 11.2.0.1.0为例,具体如下:
Version 11.2.0.1.0
Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications
*Instant Client Package - Basic Lite: Smaller version of the Basic, with only English error messages and Unicode, ASCII, and Western European character set support
*Instant Client Package - JDBC Supplement: Additional support for XA, Internationalization, and RowSet operations under JDBC
*Instant Client Package - SQL*Plus: Additional libraries and executable for running SQL*Plus with Instant Client
*Instant Client Package - SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client
*Instant Client Package - ODBC: Additional libraries for enabling ODBC applications
*Instant Client Package - WRC: Workload Replay Client used to replay workload for RAT's DB Replay Feature
*Instant Client Package - Precompiler:Additional files for "proc" binary and related files to precompile a Pro*C application and demo |
一般,我们下两个包即可实现连接到远程的数据库上,即instantclient-basic-win32-11.2.0.1.0.zip(All
files required to runOCI, OCCI, and JDBC-OCI applications,即该包的文件里有用于支持oracle的连接等的
oracle API接口,如果操作系统上没有这些文件(其实就是软件运行时要用到链接库文件),则用OCI, OCCI, and JDBC-OCI 这些库(这些库就是包含有该包的文件(里的内容))开发的应用程序(用到oracle连接)就不可能正常运行),还有instantclient-sqlplus-win32-11.2.0.1.0.zip(sqlplus工具估计是用oci(库)开发出来的)。然后,将他们解压缩后的文件合并到一个文件夹下即可使用。如果,想在cmd.exe上使用sqlplus命令登陆的话,只要在操作系统的环境变量path上添加该文件夹的路径即可。
参考:http://www.oracle.com/technetwork/topics/winsoft-085727.html
Oracle Database Instant Client
利用 Instant Client,您无需安装标准的 Oracle 客户端(指的是本文的第3大点里提到的)或拥有 ORACLE_HOME 就可运行应用程序。OCI、OCCI、Pro*C、ODBC 和 JDBC 应用程序无需进行修改即可运行,同时显著节省磁盘空间。甚至 SQL*Plus 也可与 Instant Client
一起使用。无需重新编译,也就没有烦恼。
独立软件供应商与合作伙伴通过将 Instant Client 与应用程序打包在一起,为客户省去了安装和配置 Oracle 客户端的额外步骤,这使得独立软件供应商和合作伙伴获益颇丰。其中 Oracle ISV 与合作伙伴提供的功能完善的高性能应用程序将不受任何影响,工作如常。
客户可以快速试用新的打包应用程序和 Oracle 客户端特性,而无需担忧其他的安装事项。较大的企业可以通过使用安装脚本来访问中央 IT 信息库,以自动进行 Instant Client 的安装和配置。总而言之,空间使用减少后,每个人都可从中受益。
特别适用于生产用途。完全免费。
常见问题解答
白皮书:Instant Client 概述
白皮书:Oracle Database 11g 中的应用程序故障切换

下载与安装
参见适用于所有平台的 Instant Client 下载
程序包说明
Instant Client 程序包 | 描述 | 说明 |
Basic | 运行 OCI、OCCI 和 JDBC-OCI 应用程序所需的所有文件 | OCI
OCCI JDBC |
Basic Lite | Basic 的精简版本,其中仅包含英文错误消息和 Unicode、ASCII 以及西欧字符集支持(仅 10.2) | OCI
OCCI JDBC |
JDBC Supplement* | 对 JDBC 下的 XA、国际化和 RowSet 操作的额外支持 | JDBC |
SQL*Plus* | 为通过 Instant Client 运行 SQL*Plus 而提供的额外的库和可执行文件 | SQL*Plus 10.2 SQL*Plus 11.2 |
ODBC Supplement* | 通过 Instant Client 支持 ODBC 应用程序的附加资料库(并非所有平台) | ODBC |
SDK* | 为通过 Instant Client 开发 Oracle 应用程序而提供的额外的头文件与示例 makefile | |
ODAC* | 包括 ODP.NET、Oracle Services for MTS、Oracle Providers for ASP.NET、Oracle Provider for OLE DB 和 OO4O with Oracle Instant Client |
安装说明
安装步骤:
1. 下载适用于您平台的相应 Instant Client 程序包。所有安装都要求 Basic 或 Basic Lite 程序包。
2. 将程序包解压缩到一个目录中,如“instantclient”。
3. 在您环境中设置资料库加载路径,使其指向第 2 步中确定的目录(“instantclient”)。在许多 UNIX 平台上,LD_LIBRARY_PATH 为相应的环境变量。在 Windows 上,应当使用 PATH。
4. 启动您的应用程序并开始使用。

相关技术
- OCI
- OCCI
- JDBC
- ODBC
- SQL*Plus
论坛
- Instant Client
- OCI
- OCCI
- JDBC
- ODBC
http://www.oracle.com/technetwork/cn/database/features/instant-client/index-092537-zhs.html
3、oracle客户端(即程序名叫oracle client)
适用于 Microsoft Windows(32 位)的 Oracle Database 11g 第 2 版 Client (11.2.0.1.0)
![]() |
win32_11gR2_client.zip(684,581,290 字节) 包含 Oracle Client(连接) 库。如果您只需要客户端库库,则需要下载该文件。 |
参考:http://www.oracle.com/technetwork/cn/database/enterprise-edition/downloads/112010-win32soft-098630-zhs.html
另见:
Oracle客户端工具连接数据库服务器问题汇总
附加:
oracle客户端(即程序名叫oracle client)安装包里已经封装包含了oracle instant client安装包,即oracle客户端里已经包含了oracle instant client的功能:
下面是oracle客户端以管理员为安装类型安装后的目录:
oracle客户端(即程序名叫oracle client)和oracle instant client两个功能的区别从下面例子也可以分辨出:
不安装oracle客户端,用plsql连接oracle
plsql远程连接linuxoracle
常用的Oracle开发的工具有SQL Developer和PL/SQL Developer,个人感觉前者虽然跨平台性优于后者,但比较大(大于300M)占用资源,而且用户体验也一般,而后者相对就小很多(小于30M),用起来也比较顺手。
用PL/SQL连接oracle数据库,不管是本地的还是远程的,一般都需要安装oracle客户端(500M左右)比较大,而且在各个系统上安装也有些讲究,需要修改相应配置文件,有点麻烦。
如何达到不安装oracle客户端,又能使用PL/SQL工具?本人做了如下测试并达到目的。
测试环境:win7系统,未安装过oracle包括客户端,本机虚拟机linux中装有oracle,并有一个可用的orcl实例;
1. oracle官网提供了instantclient,下载instantclient-basic包,将包解压存放到本地,本测试为
D:\STUDY\instantclient_10_2;
2. 在这个目录下新建sqlnet.ora和tnsnames.ora两个文件
sqlnet.ora文件内容
---------------------
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
tnsnames.ora文件内容
-------------------------
orcl =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.146.143 )(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl )
)
)
注:斜体部分需要按需配置,如果端口是自定义的也需要相应变更。
3. 配置环境变量
变量名 变量值
TNS_ADMIN D:\STUDY\instantclient_10_2
注:这里变量值即为instantclient在本地的主目录;如果不配置该变量,
连接时会报错ORA-12154: TNS:could not resolve the connect identifier specified。
4. 安装PL/SQL Developer,并配置oracle的连接参数:
打开PL/SQL,Tools-->Preferences,配置Connection的Oracle Home和OCI library,如下图所示
5. 重新启动PL/SQL,登录测试,OK!
如果出现乱码问题,请点击:http://gang-chen.iteye.com/blog/2005546
另附下载地址:
PL/SQL Developer:http://www.allroundautomations.com/bodyplsqldevreg.html
instantclient-basic-win32:http://pan.baidu.com/share/link?shareid=514153&uk=3255414737
也可以去oracle官网下载instantclient其他版本,只是不太稳定,有时会下载失败。
参考资料:
http://wenku.baidu.com/link?url=HdNSsEe21lyBVzoE7Ih2-BUaw-2HM7pOkQU23i6LkZad-I3nepjPrCtzTlYo1Egvm4NfCVDRA7DQq9FwwTvL2yjP06B4AqZVim9TjMkO9lW
参考:
oracle client 安装 谷歌
本机不安装Oracle客户端就可使用PL/SQL Developer连接远程数据库

方法:1、利用“select*from user_indexes where table_name=表名”语句查询表中索引;2、利用“select*from all_indexes where table_name=表名”语句查询所有索引。

oracle asm指的是“自动存储管理”,是一种卷管理器,可自动管理磁盘组并提供有效的数据冗余功能;它是做为单独的Oracle实例实施和部署。asm的优势:1、配置简单、可最大化推动数据库合并的存储资源利用;2、支持BIGFILE文件等。

在oracle中,可以利用“TO_SINGLE_BYTE(String)”将全角转换为半角;“TO_SINGLE_BYTE”函数可以将参数中所有多字节字符都替换为等价的单字节字符,只有当数据库字符集同时包含多字节和单字节字符的时候有效。

在Oracle中,可利用lsnrctl命令查询端口号,该命令是Oracle的监听命令;在启动、关闭或重启oracle监听器之前可使用该命令检查oracle监听器的状态,语法为“lsnrctl status”,结果PORT后的内容就是端口号。

方法:1、利用“LOWER(字段值)”将字段转为小写,或者利用“UPPER(字段值)”将字段转为大写;2、利用“REGEXP_LIKE(字符串,正则表达式,'i')”,当参数设置为“i”时,说明进行匹配不区分大小写。

在oracle中,可以利用“drop sequence sequence名”来删除sequence;sequence是自动增加数字序列的意思,也就是序列号,序列号自动增加不能重置,因此需要利用drop sequence语句来删除序列。

在oracle中,可以利用“select ... From all_tab_columns where table_name=upper('表名') AND owner=upper('数据库登录用户名');”语句查询数据库表的数据类型。

方法:1、利用“alter system set sessions=修改后的数值 scope=spfile”语句修改session参数;2、修改参数之后利用“shutdown immediate – startup”语句重启服务器即可生效。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6
Visual web development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment