ORACLE920与ASP的连接问题的解决办法,ORACLE920与ASP的连接问题的解决办法
【 tulaoshi.com - ASP 】
代码如下:<% on error resume next '连接数据库 Set OraSession = CreateObject("OracleInProcServer.XOraSession") set oradatabase=orasession.dbopendatabase("数据库名","用户名/密码",0) '出错处理 if err.number >0 then Response.Write "asp 错误控制" Response.Write "asp 错误来源:"&err.Source &"数据库连接失败,请与系统管理员联系!
(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/asp/)" Response.End end if end function %>解决办法:1、IIS要访问ORACLE数据库时,在OLEDB中赋于一个权限(是ORACLE的BUG)在ORACLE_HOME目录下ORA92目录的属性里的安全性上添加/编辑“Authenticated Users”用户,在其“读取及运行”权限上先点不选,再点选择,然后“应用”。2、在ORACLE_HOME目录下ORA92networkADMIN目录里有一个“sqlnet.ora”文件,内容如下:# SQLNET.ORA Network Configuration File: E:oracleora92networkadminsqlnet.ora# Generated by Oracle configuration tools.NAMES.DEFAULT_DOMAIN = jgc-new.localSQLNET.AUTHENTICATION_SERVICES= (NTS)NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)将其改为:# SQLNET.ORA Network Configuration File: E:oracleora92networkadminsqlnet.ora# Generated by Oracle configuration tools.NAMES.DEFAULT_DOMAIN = jgc-new.local# SQLNET.AUTHENTICATION_SERVICES= (NTS)NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)来源:http://www.tulaoshi.com/n/20160129/1507709.html
看过《ORACLE920与ASP的连接问题的解决办法》的人还看了以下文章 更多>>