What is Oracle Easy Connect Naming?
If you don’t have a database entry specified in your Oracle TNSNAMES.ora, you can make a connection using easy connect naming. This lets you connect to an Oracle database using only a TCP/IP connect string made up of a host name, port, and service name. You can run a test of OCI8 using Easy Connect Naming as follows (substituting the appropriate values for your password, server, port, and database): ruby -r oci8 -e “OCI8.new(‘hr’, ‘hr_password’, ‘//server.company.com:1521/orcl’).exec(‘SELECT * FROM jobs order by 1) do |r| puts r.