1 References System.Data.OracleClient
Path:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.OracleClient.dll
2 Installing the Oracle client
1 website Download
Win32_11gr2_client.zip
Note the version and installation steps.
2 configuration file Sqlnet.ora Tnsnames.ora
Path: This machine is : D:\app\Administrator\product\11.2.0\client_1\network\admin\sqlnet.ora
Note the installation path for Oracle client
Content
Sqlnet.ora:
Sqlnet. Authentication_services= (NONE)
NAMES. Directory_path= (TNSNames, Ezconnect)
Tnsnames.ora:
SDEORCL =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = vastscene_xp_01) (PORT = 1521))
)
(Connect_data =
(SERVER = dedicated)
(service_name = SDEORCL)
)
)
SDE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = vastscene_xp_01) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = ORCL)
)
)
ORCL =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.20) (PORT = 1521))
)
(Connect_data =
(service_name = ORCL)
)
)
3 Installing plsql Developer
If successful, you can connect successfully
The server is turned on but cannot connect successfully (that is , it can ping but cannot access the SDE)
Possible causes :
Server does not start SDE and Oracle related services
Workaround
To start Oracle SDE-related services:
Cmd->services.msc start the ARCSDE service and start the Oracle-related service
C # code access to Oracle database