ODAC Application Tips (1) NET method using ODAC

zhaozj2021-02-16  46

NET method using ODAC

nxyc_twz@163.com

Most applications use OCI's ODAC standard way to connect Oracle database servers. This is the most common way to design the Oracle application using third-party development languages. All OCI interfaces are used as internal libraries, making it very small for compilation and generated applications. However, this requires installation of Oracle client software on the client, which makes additional overhead installed and managed. Sometimes, installing Oracle client programs is even impossible. For example, if you need to set your app on a remote computer, you cannot provide special file support. The ODAC NET allows your application to connect to Oracle directly through the TCP / IP protocol, without the need for Oracle client software. Running an application using ODAC NET, only requires an operating system that supports TCP / IP protocol. Use the ODAC NET to connect to the Oracle server, you need to know the address, listening port number, and database instance name of the Oracle server. Before using the NET option in your application, you only need to set the option NET for the Torasession object to True and specify its Server property as the specified database. If you use ODAC to connect to the database through OCI, you must set the server attribute as the TNS alias, but now use ODAC's NET option, you only need to specify the database string, the format is as follows: Host: port: SID. Here, Host finger The server address, the Port is a server listening port number, and the SID refers to a specific system instance name. Here is an example demonstration that does not use OCI to connect to the database: VARSession: torasession ;.. .Session.Options.net: = true; session.username: = 'scott'; session.password: = 'tiger'; session.server: = '205.227.44.44:1521:orcl'; sentenceion.connect; Note: These are required when your application is supported by the NET option. You don't need to rewrite other parts of the application. In addition, you can also connect Oracle through OCI at any time. To implement it, you only need to set the Torasession.Options.net option to false.oci and NET:

Applications with ODAC standards and NET methods are very similar to the program size and running speed. Using NET options in terms of security, it is not the same as the Oracle using OCI. NET uses DES to verify security, and now it does not support oracle encryption.

The advantage of ODAC NET:

转载请注明原文地址:https://www.9cbs.com/read-26419.html

New Post(0)