No subject


Thu Nov 23 16:36:19 EST 2017


|-------------------+-----------------------------------------------------|
| ORA-12154:        | Cause: Net8 could not locate the net service name   |
| TNS:could not     | specified in the TNSNAMES.ORA configuration file.   |
| resolve service   |                                                     |
| name              |                                                     |
|                   | Actions:                                            |
|                   |   1. Verify that a TNSNAMES.ORA file exists and that|
|                   |      it is accessible.                              |
|                   |   2. Verify that there are not multiple copies of   |
|                   |      the TNSNAMES.ORA file.                         |
|                   |   3. In your TNSNAMES.ORA file, verify that the net |
|                   |      service name specified in your connect string  |
|                   |      is mapped to a connect descriptor in the       |
|                   |      TNSNAMES.ORA file. Also, verify that there are |
|                   |      no syntax errors in the file.                  |
|                   |   4. Verify that there are no duplicate copies of   |
|                   |      the SQLNET.ORA file.                           |
|                   |   5. If you are using domain names, verify that your|
|                   |      SQLNET.ORA file contains a NAMES.DEFAULT_DOMAIN|
|                   |      parameter. If this parameter does not exist,   |
|                   |      you must specify the domain name in your       |
|                   |      connect string.                                |
|                   |                                                     |
|                   |                                                     |
|                   |      If you are not using domain names, and this    |
|                   |      parameter exists, delete it or disable it by   |
|                   |      commenting it out.                             |
|                   |   6. If you are connecting from a login dialog box, |
|                   |      verify that you are not placing an "@" symbol  |
|                   |      before your connect net service name.          |
|                   |   7. Activate client tracing and re-execute the     |
|                   |      operation.                                     |
|-------------------+-----------------------------------------------------|



Also check out: http://technet.oracle.com/doc/network.815/a67440/ch11.htm

Hope this helps.

Regards,
-bill



=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20
                    Gongya Yu <yu at ...4361...>=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20
                    Sent by:                            To:     Melvin Robi=
nson <mrobinso at ...4419...>,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
                    snort-users-admin at ...635...        snort-users at ...4422...=
urceforge.net=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20
                    eforge.net                          cc:=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
                                                        Subject:     Re: [S=
nort-users] snort with Oracle=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20
                    01/25/2002 10:57 PM=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20




Hi, thanks so much for your feedback.

I still can't make it work.

I even added the following code just before the OCIInitialize.
=A0=A0=A0=A0=A0=A0=A0=A0=A0 putenv("ORACLE_HOME=3D/app02/oracle8.1.7");
=A0=A0=A0=A0=A0=A0=A0=A0=A0 putenv("TNS_ADMIN=3D/app02/oracle8.1.7/network/=
admin");
=A0=A0=A0=A0=A0=A0=A0=A0=A0 putenv("ORACLE_SID=3Ddream");
Here is the output from env command
......
ORACLE_SID=3Ddream
ORACLE_HOME=3D/app02/oracle8.1.7
ORACLE_BASE=3D/app02/oracle8.1.7
TNS_ADMIN=3D/app02/oracle8.1.7/network/admin

I can use sqlplus to connect to database. So I guess the environment
variables are right.

Here is the output from running snort
..............
Back Orifice detection brute force: DISABLED
Using LOCAL time
database: compiled support for ( oracle )
database: configured to use oracle
database:=A0=A0=A0=A0=A0=A0=A0=A0=A0 user =3D snort
database: password is set
database: database name =3D dream
database:=A0=A0 sensor name =3D 192.168.1.5
ORACLE_HOME =3D /app02/oracle8.1.7
TNS_ADMIN =3D /app02/oracle8.1.7/network/admin
ORACLE_SID=3D dream
database: oracle_error: Error while trying to retrieve text for error
ORA-12154

database: Connection to database 'dream' failed
Fatal Error, Quitting..

Also in the original code from spo_database.c copied in the following.
if (OCIInitialize(OCI_DEFAULT, NULL, NULL, NULL, NULL) ||
=A0=A0=A0=A0=A0=A0=A0=A0 OCIEnvInit(&data->o_environment, OCI_DEFAULT, 0, N=
ULL) ||
=A0=A0=A0=A0=A0=A0=A0=A0 OCIEnvInit(&data->o_environment, OCI_DEFAULT, 0, N=
ULL) ||
=A0=A0=A0=A0=A0=A0=A0=A0 OCIHandleAlloc(data->o_environment, (dvoid **)&dat=
a->o_error,
OCI_HTYPE_ERROR, (size_t) 0, NULL) ||
=A0=A0=A0=A0=A0=A0=A0=A0 OCILogon(data->o_environment, data->o_error,
&data->o_servicecontext,data->user, strlen(data->user), data->password,
strlen(data->password), data->shared->dbname, strlen(data->shared->dbname))
||
=A0=A0=A0=A0=A0=A0=A0=A0 OCIHandleAlloc(data->o_environment, (dvoid **)&dat=
a->o_statement,
OCI_HTYPE_STMT, 0, NULL))
=A0=A0=A0=A0=A0 {
=A0=A0=A0=A0=A0=A0=A0=A0 OCIErrorGet(data->o_error, 1, NULL, &data->o_error=
code,
data->o_errormsg, sizeof(data->o_errormsg), OCI_HTYPE_ERROR);
=A0=A0=A0=A0=A0=A0=A0=A0 ErrorMessage("database: oracle_error: %s\n", data-=
>o_errormsg);
=A0=A0=A0=A0=A0=A0=A0=A0 FatalError("database: Connection to database '%s' =
failed\n",
data->shared->dbname);
=A0=A0=A0=A0=A0 }

Is there an extra OCIEnvInit or should be like that ?

Anyway to print the elements of OCIEnv struct?

I really appreciate any suggestions.
Melvin Robinson wrote:
I have had this error before and it usually involves the Oracle environment
variables not being set correctly for some reason or another.=A0 The ones to
make sure that you have set properly are ORACLE_SID and ORACLE_HOME.
Gongya Yu <yu at ...4361...>
Sent by: snort-users-admin at lists.sourceforge.net
01/24/2002 10:32 PM PST

To: snort-users at lists.sourceforge.net
cc:
bcc:
Subject: [Snort-users] snort with Oracle



Hi, anyone has succeeded in using Oracle as snort output plugin ? I am
trying to use Oracle, but it failed to connect to Oracle with the
following messages;

database: compiled support for ( oracle
database: configured to use oracle
database:=A0=A0=A0=A0=A0=A0=A0=A0=A0 user =3D snort
database: password is set
database: database name =3D DREAM
database:=A0=A0 sensor name =3D 192.168.1.5

database: oracle_error: Error while trying to retrieve text for error
ORA-12154

database: Connection to database 'DREAM' failed
Fatal Error, Quitting..

After checking the source code, I located the problem in spo_database.c

#ifdef ENABLE_ORACLE
=A0=A0 if(!strcasecmp(data->shared->dbtype,ORACLE))
=A0=A0 {
=A0=A0=A0=A0 if (OCIInitialize(OCI_DEFAULT, NULL, NULL, NULL, NULL) ||
=A0=A0=A0=A0=A0=A0=A0 OCIEnvInit(&data->o_environment, OCI_DEFAULT, 0, NULL=
) ||
=A0=A0=A0=A0=A0=A0=A0 OCIEnvInit(&data->o_environment, OCI_DEFAULT, 0, NULL=
) ||
=A0=A0=A0=A0=A0=A0=A0 OCIHandleAlloc(data->o_environment, (dvoid **)&data->=
o_error,
OCI_HTYPE_ERROR, (size_t) 0, NULL) ||
=A0=A0=A0=A0=A0=A0=A0 OCILogon(data->o_environment, data->o_error,
&data->o_servicecontext,
data->user, strlen(data->user), data->password, strlen(data->password),
data->shared->dbname, strlen(data->shared->dbname)) ||
=A0=A0=A0=A0=A0=A0=A0 OCIHandleAlloc(data->o_environment, (dvoid
**)&data->o_statement, OCI_HTYPE_STMT, 0, NULL))
=A0=A0=A0=A0 {
=A0=A0=A0=A0=A0=A0=A0 OCIErrorGet(data->o_error, 1, NULL, &data->o_errorcod=
e,
data->o_errormsg, sizeof(data->o_errormsg), OCI_HTYPE_ERROR);
=A0=A0=A0=A0=A0=A0=A0 ErrorMessage("database: oracle_error: %s\n", data->o_=
errormsg);

=A0=A0=A0=A0=A0=A0=A0 FatalError("database: Connection to database '%s' fai=
led\n",
data->shared->dbname);
=A0=A0=A0=A0 }
=A0=A0 }
#endif

Question 1:=A0 OCIEnvInit(&data->o_environment, OCI_DEFAULT, 0, NULL) ||
is extra ?

Question 2: Do I have to use OCIEnvCreate to replace OCIInitialize and
OCIEnvInit if I use Oracle 8.1.7. I read the documentation that says the
OCIInitialize and OCI EnvInit still can be used as backward.

thanks in advanced !!




_______________________________________________
Snort-users mailing list
Snort-users at lists.sourceforge.net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=3Dsnort-users







More information about the Snort-users mailing list