连接到 Oracle 数据库以构建我自己的 IDE 的最佳方式是什么?

发布于 2024-09-03 07:17:03 字数 986 浏览 2 评论 0原文

在回答我之前,请考虑一下此类程序的未来并回答我。
我想从 Oracle 服务器获取一些数据,例如:

1-获取所有函数、包、过程等以显示它们或删除它们&等等...
2-编译我的*.sql文件,如果有问题就得到结果&等等...

因为我是oracle初学者,首先我为了解决第二个问题,我尝试通过RUN sqlplus连接到sqlPlus并跟踪输出(我的意思是,我更改shell的输出流并跟踪发生了什么并处理已将消息分配给客户。现在这部分成功了,我在获取所有结果时遇到了问题,因为输出是异步的。无论如何...
[在这种情况下,我通过在 C# 中创建一个进程,将参数发送到 sqlplus 来登录到 oracle 服务器]

之后,我尝试获取所有函数、包或过程名称,但速度有问题!所以我尝试使用 oracle .DataAccess.dll 用于连接数据库。 现在我很困惑: 哪种方法是构建像 Oracle Developer 一样工作的程序的正确方法!

我对这些程序如何工作没有任何经验。

如果您的答案是我必须使用第二种方式,请遵循本部分: 我搜索了一下 Golden,PLedit(Benthic 软件),我有一点问题,我必须如何创建连接字符串?因为我在想如何找到 Oracle 在它们上工作的主机名或端口号?我需要阅读 TNSNames.Ora 文件吗?

如果您的答案是我必须使用第一种方法,请遵循本部分: 你对如何解析输出有任何想法吗?因为例如表格的结果是如此令人困惑......[我可以处理 &编程,但我真的需要有人经验,因为对我来说重要的是了解这样的软件如何工作得这么好并且响应快速?]所有这些都有不同的输出风格......

如果你不确定你可以帮助我哪本书可以帮助我以这种方式成为专家吗? 因为例如所有 C# 都写了如何连接到数据库,而数据库书籍则写了如何使用这个数据库程序,我正在寻找一本可以给我一些想法的书,如何开发一个接口来在这两者之间进行事务处理。简单的发送和接收数据,例如如何为它们编写编译器。 这本书的语言对我来说没有什么不同我知道C#,java,VB,sql,Oracle 谢谢。

before answer me plz thinking about the futures of these kind of program and answer me plz.

I wanna get some data from oracle server like:

1-get all the function,package,procedure and etc for showing them or drop them & etc...
2-compile my *.sql files,get the result if they have problem & etc...

becuz I was beginner in oracle first of all I for solve the second problem I try to connect to sqlPlus by RUN sqlplus and trace the output(I mean,I change the output stream of shell and trace what happend and handle the assigned message to customer. NOW THIS PART SUCCEED. just a little bit I have problem with get all result because the output is asynchronous.any way...
[in this case I log in to oracle Server by send argument to the sqlplus by make a process in c#]

after that I try to get all function,package or procedure name,but I have problem in speed!so I try to use oracle.DataAccess.dll to connect the database.
now I m so confusing about:
which way is correct way to build a program that work like Oracle Developer!

I do not have any experience for like these program how work.

If Your answer is I must use the second way follow this part plz:
I search a little bit the Golden,PLedit (Benthic software),I have little bit problem how I must create the connection string?because I thinking about how I can find the host name or port number that oracle work on them?? am I need read the TNSNames.Ora file?

IF your answer is I must use the first way follow this part plz:
do u have any Idea for how I parse the output?because for example the result of a table is so confusing...[i can handle & program it but I really need someone experience,because the important things to me learn how such software work so nice and with quick response?] All of the has different style in output...

If you are not sure Can u help me which book can help me in this way i become expert?
becuz for example all the C# write just about how u can connect to DB and the DB books write how u can use this DB program,I looking for a book that give me some Idea how develop an interface for do transaction between these two.not simple send and receive data,for example how write a compiler for them.
the language of book is not different for me i know C#,java,VB,sql,Oracle
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

猫腻 2024-09-10 07:17:03

要构建像 Oracle SQL Developer 或 TOAD 这样的 IDE,您需要使用 OracleConnection() 或您选择的语言支持的任何语言直接连接到数据库。这将为您提供带有结构化输出和元数据的结果集。这些是构建动态显示组件的关键。

SQL*Plus 本身即使不完全是一个 IDE,也是一个完整的客户端。对于自称为“oracle 初学者”的人来说,抓取和解析其输出又增加了一层复杂性,这已经是一个极其雄心勃勃的项目了。

To build an IDE like Oracle SQL Developer or TOAD you need to connect directly to the database, using OracleConnection() or whatever your chosen language supports. This is will give you resultsets with structured outputs and metadata. These things are key to building dynamic display components.

SQL*Plus is itself, if not exactly an IDE, a complete client. Scraping and parsing its output adds another layer of complexity to what is already an extremely ambitious project for someone who describes themselves as "beginner in oracle".

赠我空喜 2024-09-10 07:17:03

构建一个类似于 SQL Developer 的程序将是一项非常困难的工作。

您可以从查看一些开源产品开始。

有几个用 Python 编写的 SQL*Plus 替代方案

http://pysql.sourceforge.net/

http://pypi.python.org/pypi/sqlpython

Squirrel SQL 客户端是一个基于 Java 的多数据库工具

http://squirrel-sql.sourceforge.net/

另一个是 SQL Workbench

http://sqlworkbench.mgm-tp.com/viewvc/

唯一的 C# 版本似乎旧且通用,但您可能可以从他们那里得到一些有用的想法

http://sqlbuddy.sourceforge.net/

http://dbcommander.sourceforge.net/

Building a program similar to SQL Developer will be a very difficult job.

You could start with reviewing some of the open source products.

There's a couple of SQL*Plus alternatives written in Python

http://pysql.sourceforge.net/

http://pypi.python.org/pypi/sqlpython

Squirrel SQL Client is a Java based multi-database tool

http://squirrel-sql.sourceforge.net/

Another is SQL Workbench

http://sqlworkbench.mgm-tp.com/viewvc/

The only C# versions seem old and generic, but you can probably get some useful thoughts from them

http://sqlbuddy.sourceforge.net/

http://dbcommander.sourceforge.net/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文