配置 Oracle 11g 客户端与 9i 一起使用,以便使用 ODP.NET for VS 2008 和 C# 或 ASP.net,出现问题
我只是在使用最新的 Oracle ODP.NET 客户端以及使用它通过 ASP.NET 2008 和 C# 连接到旧的 Oracle 9i 数据库时遇到一些问题。 正如 ODP.NET 安装说明中所述,它应该可以工作,但在配置 Oracle 时我有点生疏。 旧的 9i 客户端存在 .NET 问题,它根本无法工作,它会出现 ORA-01036: 非法变量名称/编号' ,是否需要更新。 所以我安装了 11g,运行了安装程序附带的 SQL 脚本,现在,我不太明白的棘手部分是 Network/ADMIN 上的文件 tnsnames.ora、sqlnet.ora ,我刚刚从重新启动的 9i 中复制它们,似乎通过在 VS 2008 上的服务器上建立一个新连接,它可以工作,然后创建一个 SQlDataConnection 运行一个查询,对其进行测试,我可以使用 Oracle.DataAccess.Client 看到检索到的行。 例如,当要在网格中检索相同的数据时,页面永远不会加载,并且超时,有些东西不起作用...添加了对 Oracle.DataAccess 的引用,甚至尝试使用连接和命令,它使用我在服务器中使用的相同连接字符串给我数据提供程序内部错误(-3000)[System.String]... 我确信某些事情与配置 11g 客户端以使用我现有的 9i 数据库有关。 注意:9i客户端仍然存在于系统上, Microsoft .net Oracle 提供程序根本不起作用,我宁愿不使用它,所以我想坚持使用 ODP.net 和旨在与其一起工作的框架 2.0。
我只是好奇我做错了什么,或者我如何调试并找出 Oracle 抱怨的内容。但这就像我说我不是 Oracle 专业人士,我只是将它与预先配置的东西一起使用,并且习惯了工作使用 MS SQL 或 MySQL,在这种情况下它们似乎工作得很好。
I just have some issues regarding the usage of the latest oracle ODP.NET client , and using it to connect with ASP.NET 2008 and C# to an old Oracle 9i database. As stated in the ODP.NET instalation instructuins it should work, but I'm a little bit rusty when it comes to configure oracle.
The old 9i client has issues for .NET, it simply doesn't work it does the ORA-01036: illegal variable name/number' , is it needs updating. so I've installed the 11g one, runned the SQL scripts that come with the installer, now , the tricky part which I don't quite understand, is the files that go on Network/ADMIN the tnsnames.ora, sqlnet.ora , I just copied them from the 9i restarted and , it seems that by making a new connection on Servers on VS 2008 it works, then made a SQlDataConnection runed a query , tested it , I could see the retrieved rows using Oracle.DataAccess.Client.
When it comes to retrieve the same data in a grid for example, the page never loads, and it timeouts, something doesn't work ... added the reference to Oracle.DataAccess, tried even to make some code with a connection and a command , and it gives me the Data provider internal error(-3000) [System.String] using the same connection string i used in servers...
I'm sure that something is related with configuring the 11g client to work with my existing 9i database.
Note: the 9i client still exists on the system ,
The Microsoft .net Oracle provider doesn't work at all, and i would preffer not to use it , so I want to stick with ODP.net and the framework 2.0 for which is intended to work with.
I'm just curios what am I doing wrong, or how can I debug and find out what Oracle is complaining about.But it's like I said I'm no pro in Oracle , I just used it with preconfigured things, and used to work with MS SQL or MySQL which in this case they seem to work fine.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只是我的进展更新。 似乎哪个版本并不重要。 你安装的 ODP.net 总是会遇到 SQLDataSource 的问题,它根本不起作用,所以如果你尝试任何其他数据源,如带有 DataSet 或其他实现的 ObjectDataSource ,它也可以工作并参数化,但请记住使用 :PARAM ,而不是@参数。
只是一条建议:记住正确配置您的 Network/Admin .ora 文件,否则它将无法工作。
我的方法是在 9 上安装 v10,然后在 11g 上安装,然后配置它。 这次它工作了,没有数据提供程序内部错误(-3000),但仍然出现 ORA-01036: SQLDataSource 上的非法变量名称/编号',所以我的建议不要使用它,永远不要,只是为了演示,为了真正的项目,思考不同。
有人对如何以不同的方式使用 Oracle 做事有不同的看法吗?
just an update on my progress. It seems that doesn't matter which vers. of ODP.net you install it will always have problems with SQLDataSource, it simly doesn't work, so if you try any other DataSource like ObjectDataSource with DataSet or other implementation, it's working and parametrized too but remember to use :PARAM , instead of @PARAM .
Jusst a piece of advice: remember to condifure your Network/Admin .ora files properly otherwise it won't work.
The way i did it was to install the v10 over the 9 then the 11g , then configure it. And this time it worked , no Data provider internal error(-3000) , but still with ORA-01036: illegal variable name/number' on SQLDataSource, so my advice don't uset it , never, just for demos, for a real project , think different.
Anyone has a different oppinion on how to do things with oracle differently ?