100分求asp连接oracle的问题!(在线等啊!大侠们请看看啊...)

「已注销」 2003-10-15 05:05:05
在asp中连接oracle的连接字符串为:(oracle版本为oracle 9i)
Provider=MSDASQL.1;DRIVER={Microsoft ODBC for ORACLE};UID=jdbhnew;PWD=oracle;Server=ora9i
用户密码都没有错,在公司同事的一台机子上运行正常但在我的机子上却出错了.
错误是弹出一个对话框:

microsoft odbc for oracle (这是对话框的标题)
未发现Oracle(TM)客户和网络组件,这些组件是由Oracle公司提供的,是Oracle7.3版(或更高)客户软件安装的一部份.
在安装这些组件之前,您无法使用此驱动程序.

还有用这个驱动程序也会出错(好像是同上的错误):
Provider=MSDAORA.1;Password=oracle;User ID=jdbhnew;Data Source=ora9i;Persist Security Info=True
这个也不行.
Provider=OraOLEDB.Oracle.1;Password=oracle;Persist Security Info=True;User ID=jdbhnew;Data Source=ora9i

可是在odbc中测试却是连接正常.还有在编写的程序中连接oracle的数据库也正常.
请问到底是怎么回事??很郁闷啊,把系统都格了重新安装了,oracle也重新安装了.
请大家帮帮忙啊,急啊!!!!!!!!!
...全文
373 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
beckhambobo 2003-12-10
  • 打赏
  • 举报
回复
http://211.99.196.144:8090/forum1/frontshow/dispbbs.jsp?boardid=106&id=5360
lengxue112 2003-12-10
  • 打赏
  • 举报
回复
我试过odbc
接続文字列 = "ODBC;DSN=GOKIGEN;DBQ=YABUZUKA_HOKEN_O8WS;UID=GOKIGEN;PWD=GOKIGEN;"
DBQ 服务名
lly_oldf 2003-12-10
  • 打赏
  • 举报
回复
我刚刚接触ASP。用ASP连接到oracle 8.1.7方式如下:

set orasession=createobject("OracleInprocServer.XOraSession")
set oradatabase=orasession.dbopendatabase("birddb","zjzx/zjzx",cint(0))

其中birddb服务名,zjzx/zjzx是用户和密码,不知道orasession.dbopendatabase()函数是不是这样用的。

连接后页面报错:

Unable to make connection, ORA-12154: TNS: 无法处理服务名
/aspTest/Find_test.asp,行6

什么问题??
lzlspb 2003-12-10
  • 打赏
  • 举报
回复
用oci控件
What is ASP and what is it used for?
Active(X) Server Pages (ASP) is a language-independent framework designed by Microsoft to generate dynamic web content. It allows coding of server-side scripts that are executed by a Web server in response to a user's request for a URL. ASP scripts are similar to other server-side scripting technologies like Java Server Pages, Perl Server Pages and so on.
An ASP page is a standard ASCII text file that contains both HTML tags and scripting code. Typical scripting languages that can be embedded into ASP pages are VBScript and JavaScript. All scripting portions are delimited by <% and %> tags. Example ASP page:

<html>
Current date and time is:
<%
' Start comments with "'"
response.write "<B>"
response.write Now() ' writes the current date and time.
%>
</html>

Back to top of file
--------------------------------------------------------------------------------

What is the difference between ASP and JSP?
Active Server Pages (ASP) is a Microsoft standard, which is easier to develop than Java Server Pages (JSP). ASP supports multiple scripting languages (VBScript, JavaScript, etc), but is limited to Microsoft supported platforms and software.
JSP supports customizable tags and is independent of platform and server technologies. Code is developed using the standard Java programming language. Either ODBC or JDBC is used to connect to Oracle (and other) databases. JSP is usually used for larger enterprise scale applications. For more information about JSP Pages, see the JDBC FAQ.


Back to top of file
--------------------------------------------------------------------------------

What Web Servers can be used for hosting ASP pages?
Active Server Pages are supported on the following Web Servers:
Microsoft Personal Web Server (PWS)

Microsoft Internet Information Services (IIS)

Some Unix Web Servers


Back to top of file
--------------------------------------------------------------------------------

How does one configure ASP servers for Oracle?
Follow these steps to ensure your server can connect to Oracle:
Make sure that you can use simple ASP pages. Upload (FTP) the example above to your server and see if you can access it via a Web Browser.

Install the Oracle Client CD on your server. This will install SQL*Net, OO4O (Oracle Objects for OLE) and the Oracle ODBC drivers on your system.

Configure SQL*Net and ensure you can tnsping and connect your Oracle database. This is done by adding an entry to the TNSNAMES.ORA file or by using utilities like the "Net Easy Configurator" to do it for you. See the SQL*Net FAQ for details.

Optionally configure ODBC by creating a System DSN (Data Source Name). This can be done from the "32-Bit ODBC Administrator" in the Control Pannel. Alternatively one can use OO4O (no configuration required), or "DSNless" ODBC connection. See the ODBC FAQ for details.

You are ready to GO!!!


Back to top of file
--------------------------------------------------------------------------------

How does one connect to Oracle from an ASP page?
One can connect to Oracle from ASP Pages using the Oracle ODBC driver or OO4O (Oracle Objects for OLE) calls. Look at this OO4O example:
<%
Set OraSession = Server.CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase = OraSession.DbOpenDatabase("connect_str.world", "hr/hr",cint(0))

Response.Write "OO4O Version: " & OraSession.OIPVersionNumber & "<BR>" & _
"Username: " & OraDatabase.connect & "<BR>" & _
"Database Name: " & OraDatabase.DatabaseName & "<BR>" & _
"Oracle Version: " & OraDatabase.RDBMSVersion & "<BR>"

Set osRecordSet = OraDatabase.DbCreateDynaset("SELECT TNAME FROM TAB", cint(0))
Response.write("<H1>Tables:</H1>")

Do While(osRecordset.EOF = FALSE)
Response.write(osRecordset.Fields("TNAME") & "<BR>")
osRecordSet.MoveNext
Loop
%>

The following example domonstrated ODBC connectivity:
<%
Set OraDatabase = Server.CreateObject("ADODB.Connection")
OraDatabase.Open "dsn=OracleDSN;uid=userid;pwd=password;"
Set osRecordSet = OraDatabase.Execute("SELECT * FROM EMPLOYEE")
Response.Write "<table border=1 cellpadding=4>"
Response.Write "<tr>"

For I = 0 To osRecordSet.Fields.Count - 1
Response.Write "<td><b>" & osRecordSet(I).Name & "</b></td>"
Next

Response.Write "</tr>"

Do While Not osRecordSet.EOF
Response.Write "<tr>"
For I = 0 To osRecordSet.Fields.Count - 1
Response.Write "<td>" & osRecordSet(I) & "</td>"
Next
Response.Write "</tr>"
osRecordSet.MoveNext
Loop

Response.Write "</table>"

osRecordSet.Close
OraDatabase.Close
%>
以前档案管理用他做地
JerryLis 2003-12-10
  • 打赏
  • 举报
回复
十分感谢 听潮 呵呵
bzszp 2003-10-16
  • 打赏
  • 举报
回复
tingchao (听潮) 的做法非常好
如果问题的回复没有解决而自己解决了
最好是能把解决问题的办法写出来

seaofsoul 2003-10-16
  • 打赏
  • 举报
回复
Asp.Net 连接Oracle数据库 出现"找到 Oracle 客户端和网络组件" 彻底解决方法!

本人用Asp.Net做的程序本地访问oracle数据库时,在自己机器上好好的能访问,但是当放到服务器时
就不能出现如下的错误:
"Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed. "
本人查询了CSDN发现不下二十人问过这个问题,但是没有一个人真正的给出了一个解决办法,但是项目马上就要交工了,问题还没有解决,最后请教我们公司的技术总监——”Oracle专家“终于搞定这个问题:
据我的理解:1.是在 Oracle 9.02i 版的问题,2.你的 ORACLE_HOME 路径所在的分区格式是:NTFS格式;解决方法 到Oracle\ora92 打开Ora92的-》属性-》安全,选Authenticated Users 看下面的属性 将Read and Execute 的勾去掉,然后又勾上,确定重新启动机器 ,ok 搞定,就是这么简单,
当然要避免这种问题,您可以这么做:不要安装Oracle9.02 或者不要安装在NTFS格式的分区
附上
Oracle 公司的原版资料:
Problem Description ------------------- When running an application that connects to Oracle and uses the Authenticated User privilege (such as Microsoft's Internet Information Server (IIS)) via Oracle's 9.2 client software and any of these programmatic interfaces 1. Oracle Provider for OLE DB 2. Microsoft OLE DB Provider for Oracle 3. Oracle ODBC Driver 4. Microsoft ODBC for Oracle 5. Oracle Objects for OLE (OO4O) you will receive one of the following errors: (1) Oracle Provider for OLE DB Error Type: Microsoft OLE DB Service Components (0x80070005) Access is denied. (2) Microsoft OLE DB Provider for Oracle Error Type: Microsoft OLE DB Provider for Oracle (0x80004005) Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed. Or Error Type: Microsoft OLE DB Provider for Oracle (0x80004005) Oracle error occurred, but error message could not be retrieved from Oracle. (3) Oracle ODBC Driver Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) Specified driver could not be loaded due to system error 5 (Oracle in OraHome92). (4) Microsoft ODBC for Oracle The Oracle(tm) client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3 (or greater) client software installation. You will be unable to use this driver until these components have been installed. (5) Oracle Objects for OLE (a) while using a GLOBAL.ASA file Error Type: Active Server Pages (0x0) An error occurred while creating object 'OraSession'. (b) not using a GLOBAL.ASA file Error Type: Microsoft VBScript runtime (0x800A0046) Permission denied: 'CreateObject' (6) Other miscellaneous errors (a) The Specified Module Could Not Be Found Solution Description -------------------- You need to give the Authenticated User privilege to the Oracle Home by following these steps: 1. Log on to Windows as a user with Administrator privileges. 2. Launch Windows Explorer from the Start Menu and and navigate to the ORACLE_HOME directory. 3. Right-click on the ORACLE_HOME folder and choose the "Properties" option from the drop down list. A "Properties" window should appear. 4. Click on the "Security" tab on the "Properties" window. 5. Click on "Authenticated Users" item in the "Name" list (on Windows XP the "Name" list is called "Group or user names"). 6. Uncheck the "Read and Execute" box in the "Permissions" list (on Windows XP the "Permissions" list is called "Permissions for Authenticated Users"). This box will be under the "Allow" column. 7. Check the "Read and Execute" box. This is the box you just unchecked. 8. Click the "Apply" button. 9. Click the "OK" button. 10. You may need to reboot your computer after these changes have been made. Re-execute the application and it should now work. Explanation ----------- If you install Oracle9i Release 2 (9.2.0.1) on a computer running Windows with an NTFS partition, the contents of ORACLE_HOME directory will not be visible to users who are authenticated on that machine. These permissions were not set properly when the software was installed. Applications that were working fine with previous versions of Oracle software will stop working when they upgrade to Oracle 9.2. NOTE: The application will continue to work if the user has logged onto the machine as an Administrator. Any application that is using the Authenticated User privilege will not work. A notable example would be IIS which might service some of the requests based on the Authenticated User privileges. To demonstrate the problem in further detail, you can log on to the operating system as an authenticated machine user. You won't be able browse the contents of the ORACLE_HOME directory demonstrating your inability to load any Oracle DLLs or make a connection. References ---------- Bug:2498880 - Oracle 9I Release 2 Installation Issue on Windows 2000 NTFS File System Additional Search Words ----------------------- OLEDB




「已注销」 2003-10-16
  • 打赏
  • 举报
回复
Asp.Net 连接Oracle数据库 出现"找到 Oracle 客户端和网络组件" 彻底解决方法!

本人用Asp.Net做的程序本地访问oracle数据库时,在自己机器上好好的能访问,但是当放到服务器时
就不能出现如下的错误:
"Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed. "
本人查询了CSDN发现不下二十人问过这个问题,但是没有一个人真正的给出了一个解决办法,但是项目马上就要交工了,问题还没有解决,最后请教我们公司的技术总监——”Oracle专家“终于搞定这个问题:
据我的理解:1.是在 Oracle 9.02i 版的问题,2.你的 ORACLE_HOME 路径所在的分区格式是:NTFS格式;解决方法 到Oracle\ora92 打开Ora92的-》属性-》安全,选Authenticated Users 看下面的属性 将Read and Execute 的勾去掉,然后又勾上,确定重新启动机器 ,ok 搞定,就是这么简单,
当然要避免这种问题,您可以这么做:不要安装Oracle9.02 或者不要安装在NTFS格式的分区
附上
Oracle 公司的原版资料:
Problem Description ------------------- When running an application that connects to Oracle and uses the Authenticated User privilege (such as Microsoft's Internet Information Server (IIS)) via Oracle's 9.2 client software and any of these programmatic interfaces 1. Oracle Provider for OLE DB 2. Microsoft OLE DB Provider for Oracle 3. Oracle ODBC Driver 4. Microsoft ODBC for Oracle 5. Oracle Objects for OLE (OO4O) you will receive one of the following errors: (1) Oracle Provider for OLE DB Error Type: Microsoft OLE DB Service Components (0x80070005) Access is denied. (2) Microsoft OLE DB Provider for Oracle Error Type: Microsoft OLE DB Provider for Oracle (0x80004005) Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed. Or Error Type: Microsoft OLE DB Provider for Oracle (0x80004005) Oracle error occurred, but error message could not be retrieved from Oracle. (3) Oracle ODBC Driver Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) Specified driver could not be loaded due to system error 5 (Oracle in OraHome92). (4) Microsoft ODBC for Oracle The Oracle(tm) client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3 (or greater) client software installation. You will be unable to use this driver until these components have been installed. (5) Oracle Objects for OLE (a) while using a GLOBAL.ASA file Error Type: Active Server Pages (0x0) An error occurred while creating object 'OraSession'. (b) not using a GLOBAL.ASA file Error Type: Microsoft VBScript runtime (0x800A0046) Permission denied: 'CreateObject' (6) Other miscellaneous errors (a) The Specified Module Could Not Be Found Solution Description -------------------- You need to give the Authenticated User privilege to the Oracle Home by following these steps: 1. Log on to Windows as a user with Administrator privileges. 2. Launch Windows Explorer from the Start Menu and and navigate to the ORACLE_HOME directory. 3. Right-click on the ORACLE_HOME folder and choose the "Properties" option from the drop down list. A "Properties" window should appear. 4. Click on the "Security" tab on the "Properties" window. 5. Click on "Authenticated Users" item in the "Name" list (on Windows XP the "Name" list is called "Group or user names"). 6. Uncheck the "Read and Execute" box in the "Permissions" list (on Windows XP the "Permissions" list is called "Permissions for Authenticated Users"). This box will be under the "Allow" column. 7. Check the "Read and Execute" box. This is the box you just unchecked. 8. Click the "Apply" button. 9. Click the "OK" button. 10. You may need to reboot your computer after these changes have been made. Re-execute the application and it should now work. Explanation ----------- If you install Oracle9i Release 2 (9.2.0.1) on a computer running Windows with an NTFS partition, the contents of ORACLE_HOME directory will not be visible to users who are authenticated on that machine. These permissions were not set properly when the software was installed. Applications that were working fine with previous versions of Oracle software will stop working when they upgrade to Oracle 9.2. NOTE: The application will continue to work if the user has logged onto the machine as an Administrator. Any application that is using the Authenticated User privilege will not work. A notable example would be IIS which might service some of the requests based on the Authenticated User privileges. To demonstrate the problem in further detail, you can log on to the operating system as an authenticated machine user. You won't be able browse the contents of the ORACLE_HOME directory demonstrating your inability to load any Oracle DLLs or make a connection. References ---------- Bug:2498880 - Oracle 9I Release 2 Installation Issue on Windows 2000 NTFS File System Additional Search Words ----------------------- OLEDB




intelcao 2003-10-15
  • 打赏
  • 举报
回复
楼主的问题我遇到过,楼主的是不是9.2.0.1版本的,如果数据库安装在ntfs下,可能就有这个问题。建议把web服务器与数据库分离,或者安装其它的操作系统,就不会有问题了。
hotseaboy 2003-10-15
  • 打赏
  • 举报
回复
重新配置一下数据源ODBC。
beckhambobo 2003-10-15
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/topic/2107/2107347.xml?temp=.6494257
http://expert.csdn.net/Expert/topic/1466/1466932.xml?temp=.7122309
「已注销」 2003-10-15
  • 打赏
  • 举报
回复
用这个连接:
Provider=MSDASQL.1;DRIVER={Microsoft ODBC for ORACLE};UID=jdbhnew;PWD=oracle;Server=ora9i

错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
/jdbhnew/Includes/ConnDb.asp, 第 6 行
「已注销」 2003-10-15
  • 打赏
  • 举报
回复
用这个连接:
Provider=OraOLEDB.Oracle.1;Password=oracle;Persist Security Info=True;User ID=jdbhnew;Data Source=ora9i
提示的错误如下:
错误类型: (浏览器中提示的错误,还有弹出对话框,如上.)
ADODB.Connection (0x800A0E7A)
/jdbhnew/Includes/ConnDb.asp, 第 6 行
用这个连接:
Provider=MSDAORA.1;Password=oracle;User ID=jdbhnew;Data Source=ora9i;Persist Security Info=True

错误类型:
Microsoft OLE DB Provider for Oracle (0x80004005)
/jdbhnew/Includes/ConnDb.asp, 第 6 行

帮我解决啊..

17,078

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧