Re: Error while trying to retrieve text for error ORA-12154
| From: | feza | Date: | Wed, 07 Apr 1999 02:10:12 +0000 |
| Subject: | Re: Error while trying to retrieve text for error ORA-12154 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-4968@lists.php.net to get a copy of this message | ||
Problem solve.
Permission for tnsnames.ora is belong to root. Have change it to oracle:dba. Rerun
the database and listener. After that it seem akay.
Thanks a lot.
"Thies C. Arntzen" wrote:
> make sure that you have setted ORACLE_HOME and ORACLE_SID in your
> environment!!!
>
> tc
>
> oerr ORA 12154
> 12154, 00000, "TNS:could not resolve service name"
> // *Cause: The service name specified is not defined correctly in the
> // TNSNAMES.ORA file.
> // *Action: Make the following checks and correct the error:
> // - Verify that a TNSNAMES.ORA file exists and is in the proper
> // place and accessible. See the operating system specific manual
> // for details on the required name and location.
> // - Check to see that the service name exists in one of the
> // TNSNAMES.ORA files and add it if necessary.
> // - Make sure there are no syntax errors anywhere in the file.
> // Particularly look for unmatched parentheses or stray characters.
> // Any error in a TNSNAMES.ORA file makes it unusable. See
> // Chapter 4 in the SQL*Net V2 Administrator's Guide. If
> // possible, regenerate the configuration files using the Oracle
> // Network Manager.
>
> >
> > Yusri Mahadi
> >
> >
> >
> > ---------------------------------------------------------------------------
> >
> > genius : /usr/local/WWW/TIOMS # more opendatabase.phtml
> >
> > <HTML>
> > <TITLE> TIOMS Open Database </TITLE>
> > <BODY>
> >
> > <?
> >
> > PutEnv("ORACLE_BASE=/local");
> > PutEnv("ORACLE_HOME=/local/oracle");
> > PutEnv("ORACLE_SID=tioms2nd");
> > PutEnv("ORA_NLS=/local/oracle/ocommon/nls/admin/data");
> >
> > $connTIOMS=Ora_Logon("system@tioms2nd", "password");
> >
> > $ora_base=GetEnv(ORACLE_BASE);
> > echo "<BR>connTIOMS = $connTIOMS";
> > echo "<BR>ORACLE_BASE=$ora_base";
> >
> > if ($connTIOMS < 0) {
> > echo "<BR>Could not connect to ORACLE TIOMS";
> > exit;
> > }
> >
> > $cursor = Ora_Open($connTIOMS);
> >
> > if ($cursor < 0 ) {
> > echo "<BR>Could not open cursor.";
> > Ora_LogOff($connTIOMS);
> > exit;
> > }
> >
> > // ora_CommitOn($connGNS1);
> > ?>
> >
> > </BODY>
> > </HTML>
> >
> > ---------------------------------------------------------------------------
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net