From: Brian Candler Date: 2003-03-19T00:20:15+09:00 Subject: Re: a trivial Oracle OCI-8 question On Tue, Mar 18, 2003 at 09:58:00PM +0900, Armin Roehrl wrote: > this works: > require 'oci8' > conn = OCI8.new($dbuser, $dbpass) > > What do I have to change now connect to a different databaseserver? > Let's try it with localhost first: > conn = OCI8.new($dbuser, $dbpass, "localhost") > #-> complains about no listener (ORA-12541) The precise error message is: OCIError: ORA-12154: TNS:could not resolve service name which gives you a clue: 'TNS' means that the service name has to be listed in your tnsnames.ora file. See if you can get as far as using sqlplus to connect to a remote database, as: sqlplus user/passwd@dbname If you can get that working then the 'dbname' can also be passed to OCI8 as the third parameter. Just remember it's not a hostname, it's an index into tnsnames.ora Can't give you any more advice about the contents of tnsnames.ora - I try to get away with knowing as little Oracle as possible! Regards, Brian.