时间:2021-05-19
1. 下载适用于Oracle10G的Instant Client Package 32Bit,instantclient-basic-win32-10.2.0.5.zip,(如果你是64Bit系统,下载),解压。
2.如果不修改系统PATH,那么解压出来的9个文件,全部放到php的bin目录下,也就是含有php二进制文件的那个目录下,如果有洁癖,那就改个PATH。
3.在IIS的FASTCGI下面选择环境变量编辑 添加如下三个变量
复制代码 代码如下:
NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
ORACLE_HOME=\path\to\php-bin
TNS_ADMIN=\path\to\the-location-of-tnsnames.ora-file
4.在php.ini里面把php_oci8.dll扩展启用
5.结束掉老的php-cgi进程重新访问就可以了
番外:
PHP官方对于Oracle的连接时候的一些变量有说明,这里的环境变量,除了ORACLE_HOME之类的也不是必须的,官方都有对应的写法,可以看说明
Common Oracle Environment Variables NAME PURPOSE ORACLE_HOME Contains the directory of the full Oracle Database software. Do not set this when using Oracle Instant Client as it is unnecessary and may cause installation problems. ORACLE_SID Contains the name of the database on the local machine to be connected to. There is no need to set this if you using Oracle Instant Client, or always pass the connection parameter tooci_connect(). LD_LIBRARY_PATH Set this (or its platform equivalent, such asDYLD_LIBRARY_PATH,LIBPATH, orSHLIB_PATH) to the location of the Oracle libraries, for example$ORACLE_HOME/libor/usr/lib/oracle/11.1/client/lib. This variable is not needed if the libraries are located by a different search mechanism, such as withldconfigor withLD_PRELOAD. NLS_LANG This is the primary variable for setting the character set and globalization information used by the Oracle libraries. ORA_SDTZ Sets the Oracle session timezone. TNS_ADMIN Contains the directory where the Oracle Net Services configuration files such astnsnames.oraandsqlnet.oraare kept. Not needed if theoci_connect()connection string uses the Easy Connect naming syntax such aslocalhost/XE. Not needed if the network configuration files are in one of the default locations such as$ORACLE_HOME/network/adminor/etc.Less frequently used Oracle environment variables includeTWO_TASK,ORA_TZFILE, and the various Oracle globalization settings likeNLS*and theORA_NLS_*variables.
oci_connect的时候,如果使用完整的TNS语法或者简略的写法,比如8.8.8.8/abc的时候,TNS_ADMIN也不是必须的。具体的还是看官方文档吧,不多说了。
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
一、Oracle11g安装安装之前要先确定自己的电脑配置,以windows为例,如果是win7以下系统如xp等,可以选择Oracle10g。因为10g的程序文件
oracle初始用户名有:internal、system、sys。 OracleRAC主要支持Oracle9i、10g、11g,12C版本,可以支持24乘以7
联想、浪潮、曙光等公司的服务器硬件产品,兼容达梦、人大金仓数据库、Oracle9i/10g/11g和Oracle9i/10g/11gRAC数据库、IBMWebs
很多DBA目前还停留在Oracle9i或者10g,究其原因有可能是Oracle11g的价格问题。本文将为大家讲解在Windows7下安装Oracle11g,也希
oracle默认密码有:oracle、manager、change_on_install。 OracleRAC主要支持Oracle9i、10g、11g,12C