2 Ways to connect Oracle using PL/SQL for free installation of Oracle clients
Netshuai Source: Blog Park Published: 2009-10-23 09:19 read: 171 times original link [favorites]
Method One:
As we all know, it is necessary to install Oracle client software to connect Oracle with PL/SQL. Have you ever thought about not installing Oracle clients directly connected to Oracle?
In fact, I always want to do this, because this client is so annoying!!! Not only does it install a JDK, but it also puts itself at the front of the environment variable, which can be a hassle.
I've actually asked a lot of people before, but they all say they need to install the Oracle client .... It was not until yesterday that I stumbled upon the following method:
Only need to download a software called Instant Client package in Oracle, this software does not need to install, as long as the decompression can be used, very convenient, even if the system is re-installed can be used.
: http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
Download this, Instant Client package-basic package. Then extract to any directory, in this directory to establish the network folder, then this folder and then create the Admin folder, and then create the Tnsnames.ora file, the contents are as follows:
Oracledata =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = Yourhostip) (PORT = 1521))
)
(Connect_data =
(service_name = yoursid)
)
)
Here according to their actual situation configuration. Then open PL/SQL, set the OCI Library and Oracle_home in Perference, my settings are OCI library=c:\oracleclient\oci.dll,oracle_home=c:\ OracleClient.
According to their actual situation configuration, is actually just download down the path of the package. There is one last problem, you need to set a character set, so that the query out of the data will not be garbled, write a batch processing Pldev. BAT is placed in the PL installation directory with the following contents:
Set Nls_lang=simplified Chinese_china. Zhs16gbk
PLSQLDev.exe
This character set, refers to the server side of the character set, please configure according to the actual situation.
Finally, just double click on this batch, then fill in the account number and password can be
Method Two:
A few days ago a free install Oracle client uses PL/SQL to connect Oracle's article, the bus flew and I said he'd already used another better green version of the Oracle client without the need for too complex configurations.
I compared a bit, the method in my article, the client is relatively large, about 30M. Settings are complex, but should be stable. The package provided by the bus is a little more than 3M, the decompression of 10M, it should be an expert to do.
Green version of Oracle client download (courtesy of Bus Flying Friendship): Oracle Client
We also say that which is easy to use!!!
Use special attention:
When used, just copy to any directory, but the default directory is: "C:\\ora90".
If you need to change the default settings, you need to modify the default "Oracle_home" in the file "Oracle9i.reg"
Change the associated path to the "actual" Oracle path.
This green installation is also suitable for the new installation of the operating system, if your Oracle is installed in a non-system disk, you can use the obsolete installation directory, with the modified "Oracle9i.reg" registration can be. Very convenient. I have tried to succeed.
Here according to their actual situation configuration. Then open PL/SQL, set the OCI Library and Oracle_home in Perference, my settings are OCI library=c:\oracleclient\oci.dll,oracle_home=c:\ OracleClient.
According to their actual situation configuration, c:\oracleclient is actually just download down the path of the package.
The configuration work is basically complete, and then do a bat batch to solve the character set garbled problem:
Write a batch processing plsql. BAT to the Plsqldeveloper installation directory with the following content:
Set Nls_lang=simplified Chinese_china. Zhs16gbk
PLSQLDev.exe
This character set refers to the server-side character set.
—-
A permanent character set:
Set Nls_lang=simplified chinese_china.zhs16cgb231280
Set Nls_lang=simplified Chinese_china. Zhs16gbk
Set Nls_lang=simplified Chinese_china. Utf8
Note:
Instantclient-basic-win32-11.1.0.6.0.zip-This is supported for Oracle 9i and above (excluding oracle9i)
Instantclient-basic-win32-10.2.0.1.zip-This is supported by Oracle8i and Oracle9i.
1. Open cmd input netca.
2. Select "Local NET service name configuration" → Next step.
3. Select "Add" → next step.
4. Enter the name of the Oracle service on the server you want to connect to in the service name → next.
5. Select "TCP" → next.
6. In the hostname, enter the server IP you want to connect to, and the port number is the next step.
7. Select "Test" → next step. (Of course you can also choose not to test)
If the test does not pass, click "Change Login" to enter a "username" and "password" to be sure to login → OK, "connecting ..." appears. The test was successful. "Indicates that the test was successful.
If the test does not pass, click "Back" to confirm that you write "service name" and "hostname", confirm the error, confirm that the server you want to connect to the Oracle monitoring service is open.
8. In the "NET Service name", enter the local service name you want to use → next.
※ is "Sqlplus user/passwd @ Local Service name".
9. Select "No" → next step.
10, the "NET Service configuration complete" word → next.
11. Click "Finish" to complete the service configuration.
12, after the above service configuration is completed, enter the following command in CMD to telnet to the Oracle server:
Sqlplus User_name/[email protected] Local service name
Be sure to remember that the local service name above is the name of the service you wrote in the 8th step.
2 Ways to connect Oracle using PL/SQL for free installation of Oracle clients