Http://www.cnblogs.com/dongzhiquan/archive/2011/11/21/2257629.html
1. Leveraging Oracle NET Manager tools
1) Open ORACLE NET MANAGER
2) Add "service naming"
First step NET service name: fill in any
Second Communication protocol: If you are connecting to Oracle on a remote machine, select TCP/IP (Internet Protocol)
Step three hostname: Enter IP address port number: The general default is 1521
Fourth Step SID: General and database names are the same
Fifth Step Test
3) Start PL/SQL connection
2, directly modify the configuration file:
1) Open the directory d:oracle file Tnsnames.ora in the installation directory ora92networkadmin.
2) Add the following code:
traffic_db = #NET服务名, can be any
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST = 192.168.1.143) (port = 1521)) #HOST is the IP address of the connected database server, port is the port number of the connected database server, and the default is 1521
)
(Connect_data =
(SID = Carsys) #数据库系统标识, typically with the same name as the database
)
)
3) Save the file. Start the PL/SQL Tool login
3, directly fill in the server address information (this is the first to try to pass on XP, Win7 seems to be not working, know how to use compatibility mode can be done):
192.168.1.106:1521/ORCDB or 192.168.1.106/ORCDB (using the default port condition)
192.168.1.106 is the server-side IP, 1521 is the server's port, and ORCDB is the server-side Oracle's global database name.
Also the specified database can be connected in sqlplus via Conn Scott/[email protected]:1521/orcdb.
Microsoft Client Setup Example Replace Oracle Client with Oracle's free instant client, eliminating the hassle of installation Download Instantclient-basiclite-nt-11.2.0.2.0.zip extract to any directory you want to put in, such as: D:\oracle\instantclient_11_2, create a name Tnsnames.ora files, put in this directory, you can first create a TXT document, save the following content and then the extension of. txt removed: MyDB =(DESCRIPTION =(address_list =(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.7.23) (PORT = 1521)) )(Connect_data =(SERVER = dedicated)(service_name = testdb) ))Note:MyDB to connect to the database alias HOST = 192.168.7.23 The database IP you are connecting to port = 1521 for your data service_name = TestDB is your DB instance name Right click on My Computer Select” attribute " advanced ", " environment variable "< Span style= "margin:0px; padding:0px; " > system variable " Add the following two variables tns_admin D:\oracle\instantclient_11_2
Nls_lang simplified Chinese_china. ZHS16GBK
Settings on software
In Plsql developer Select Tools > Preferences > Connection and fill in the following in the "Oracle Home" and "OCI Library" on the right: D:\oracle\ Instantclient_11_2d:\oracle\instantclient_11_2\oci.dll
PL/SQL Tools How to connect to a ORALCE database