[DB-SIG] Remote connection to Oracle DB possible?

Jēkabs Andrušaitis j.andrusaitis@konts.lv
Fri, 28 Apr 2000 14:15:03 +0300


If you have Oracle Net installed and have properly configured TNS listener
to access
remote databases (you need things configured on both machines - server where
Oracle runs and client machine as well) (if you can connect to database
using
Oracle 'sqlplus' program), you can also connect to it using DCOracle.

Main environment variable, which should be used is ORACLE_SID, which
is alias for instance configured in (see below).

Listener configuration is stored in the
$ORACLE_HOME/network/admin/tnsnames.ora file,
and each record has following example structure:

BIGBOYMAIN =
	(DESCRIPTION =
 		(ADDRESS_LIST =
			(ADDRESS (PROTOCOL = TCP)(HOST = bigboy)( PORT = 1521 ))
			(ADDRESS (PROTOCOL = TCP)(HOST = bigboy)( PORT = 1526 ))
		)
		(CONNECT_DATA =
			( SID = MAIN )
		)
	)

Where:
	BIGBOYMAIN is name of alias (used in ORACLE_SID)
	bigboy is Oracle server machine host/ip
	1521/1526 are port numbers to connect to Oracle on server machine
	MAIN is Oracle instance name to use on server machine

If you set ORACLE_SID in environment, then you can use 'username/password'
in
your connect string, otherwise you have to use 'username/password@instance'.

Jekabs Andrušaitis
Sistemu analitikis
Tieto Konts Financial Systems
Kr.Barona 30, Riga, LV-1011, Latvia
tel.: (371) 7286660, (371) 7283689
fax: (371) 7243000
e-mail: J.Andrusaitis@konts.lv
http://www.konts.lv