Connecting without environment variables or tnsname.ora file If you use the host=$host;sid=$sid style syntax, for example: $dbh = DBI->connect("dbi:Oracle:host=myhost.com;sid=ORCL", $user, $passwd); then DBD::Oracle will construct a full connection descriptor string for you and Oracle will not need to consult the tnsname.ora file.