Home » Developer & Programmer » Forms » Error ora-012546 TNS: Permission denied (Oracle Forms 12c)
Error ora-012546 TNS: Permission denied [message #678129] Tue, 12 November 2019 08:57 Go to next message
Goldaxe
Messages: 36
Registered: September 2019
Member
I try to connect from Oracle Forms 12c to a BBDD 12.1.0.2.0 and give "ORA-12546 TNS: permission denied".
The funny thing is, I do a tnsping on the BBDD alias and if I get there.

The Oracle Forms Builder versión is:

Forms [64 Bit] Versión 12.2.1.3.0 (Producción)
Oracle Toolkit Versión 12.2.1.3.0 (Producción)
PL/SQL Versión 12.1.0.2.0 (Producción)
Oracle Procedure Builder V12.2.1.3.0 - Production
PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
Oracle Query Builder 12.2.1.3.0 - Production
Oracle Virtual Graphics System Versión 12.2.1.3.0 (Producción)
Oracle Tools GUI Utilities Versión 12.2.1.3.0 (Producción)
Oracle Multimedia Versión 12.2.1.3.0 (Producción)
Oracle Tools Integration Versión 12.2.1.3.0 (Producción)
Oracle Tools Common Area Versión 12.2.1.3.0
Oracle CORE 12.1.0.2.0 Production
Java Version: Oracle Corporation, 1.8.0_131

I execute sqlpus and the result is:

c:\Oracle\Middleware\Oracle_Home\bin>sqlplus adm_azkar/adm_azkar@SAX

SQL*Plus: Release 12.1.0.2.0 Production on Mar Nov 12 15:38:46 2019

Copyright (c) 1982, 2016, Oracle. All rights reserved.

ERROR:
ORA-12546: TNS:permiso denegado


Introduzca el nombre de usuario:
ERROR:
ORA-12560: TNS:error del adaptador de protocolo


Introduzca el nombre de usuario:
ERROR:
ORA-12560: TNS:error del adaptador de protocolo


SP2-0157: no se puede CONNECT con ORACLE despuÚs de 3 intentos, saliendo de SQL*Plus
Re: Error ora-012546 TNS: Permission denied [message #678130 is a reply to message #678129] Tue, 12 November 2019 09:36 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
[oracle@localhost ~]$
[oracle@localhost ~]$ oerr ora 12546
12546, 00000, "TNS:permission denied"
// *Cause: User has insufficient privileges to perform the requested operation.
// *Action: Acquire necessary privileges and try again.
[oracle@localhost ~]$
[oracle@localhost ~]$ oerr ora 12560
12560, 00000, "TNS:protocol adapter error"
// *Cause: A generic protocol adapter error occurred.
// *Action: Check addresses used for proper protocol specification. Before
// reporting this error, look at the error stack and check for lower level
// transport errors. For further details, turn on tracing and reexecute the
// operation. Turn off tracing when the operation is complete.
[oracle@localhost ~]$


post results from OS commands below

lsnrctl status
lsnrctl service
Re: Error ora-012546 TNS: Permission denied [message #678131 is a reply to message #678130] Tue, 12 November 2019 09:59 Go to previous messageGo to next message
Goldaxe
Messages: 36
Registered: September 2019
Member
1. lsnrctl status

C:\Oracle\Middleware\Oracle_Home\bin>lsnrctl status

LSNRCTL for 64-bit Windows: Version 12.1.0.2.0 - Production on 12-NOV-2019 16:57:53

Copyright (c) 1991, 2014, Oracle. All rights reserved.

Conectßndose a (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no hay ning·n listener
TNS-12560: TNS:error del adaptador de protocolo
TNS-00511: No hay ning·n listener
64-bit Windows Error: 61: Unknown error

2. lsnrctl Service

C:\Oracle\Middleware\Oracle_Home\bin>lsnrctl service

LSNRCTL for 64-bit Windows: Version 12.1.0.2.0 - Production on 12-NOV-2019 16:59:15

Copyright (c) 1991, 2014, Oracle. All rights reserved.

Conectßndose a (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no hay ning·n listener
TNS-12560: TNS:error del adaptador de protocolo
TNS-00511: No hay ning·n listener
64-bit Windows Error: 61: Unknown error

Re: Error ora-012546 TNS: Permission denied [message #678132 is a reply to message #678131] Tue, 12 November 2019 10:21 Go to previous messageGo to next message
Goldaxe
Messages: 36
Registered: September 2019
Member
But this only happens to me if I connect from Oracle Forms 12c. If I connect from the plsql developer works OK
Re: Error ora-012546 TNS: Permission denied [message #678143 is a reply to message #678132] Wed, 13 November 2019 02:47 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Is forms and PL/SQL Developer using the same tnsnames.ora?
Re: Error ora-012546 TNS: Permission denied [message #678150 is a reply to message #678143] Wed, 13 November 2019 04:07 Go to previous messageGo to next message
Goldaxe
Messages: 36
Registered: September 2019
Member
Yes, using the same tnsnames.ora that the localization is C:\Oracle\Middleware\Oracle_Home\forms1\tnsnames.ora
Re: Error ora-012546 TNS: Permission denied [message #678151 is a reply to message #678150] Wed, 13 November 2019 05:05 Go to previous messageGo to next message
Goldaxe
Messages: 36
Registered: September 2019
Member

I have already resolved it. I deleted the environment variable ORACLE_HOME
Re: Error ora-012546 TNS: Permission denied [message #678268 is a reply to message #678151] Thu, 21 November 2019 09:49 Go to previous messageGo to next message
Goldaxe
Messages: 36
Registered: September 2019
Member
I'm sorry, I still have the same error when trying to connect to the BBDD from Forms 12c. Can you help me? Thank you
Re: Error ora-012546 TNS: Permission denied [message #678270 is a reply to message #678268] Thu, 21 November 2019 13:52 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
run OS commands below on the DB Server system

lsnrctl status
lsnrctl service

COPY the results from above then PASTE all back here
Re: Error ora-012546 TNS: Permission denied [message #678273 is a reply to message #678270] Fri, 22 November 2019 02:25 Go to previous messageGo to next message
Goldaxe
Messages: 36
Registered: September 2019
Member
[oracle@DascherBD ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 21-NOV-2019 08:58:31

Copyright (c) 1991, 2016, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 04-JUN-2019 15:11:09
Uptime 169 days 18 hr. 47 min. 22 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/12.2.0/dbhome_1/network/admin/list ener.ora
Listener Log File /opt/oracle/diag/tnslsnr/DascherBD/listener/alert/log. xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DascherBD)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=DascherBD)(PORT=5500))(Security=(my _wallet_directory=/opt/oracle/admin/SAX/xdb_wallet))(Presentation=HTTP)(Session= RAW))
Services Summary...
Service "SAX" has 1 instance(s).
Instance "SAX", status READY, has 1 handler(s) for this service...
Service "SAXXDB" has 1 instance(s).
Instance "SAX", status READY, has 1 handler(s) for this service...
The command completed successfully
Re: Error ora-012546 TNS: Permission denied [message #678274 is a reply to message #678273] Fri, 22 November 2019 02:27 Go to previous messageGo to next message
Goldaxe
Messages: 36
Registered: September 2019
Member
[oracle@DascherBD ~]$ lsnrctl service

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 21-NOV-2019 08:58:44

Copyright (c) 1991, 2016, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "SAX" has 1 instance(s).
Instance "SAX", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:22506 refused:0 state:ready
LOCAL SERVER
Service "SAXXDB" has 1 instance(s).
Instance "SAX", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: DascherBD, pid: 9725>
(ADDRESS=(PROTOCOL=tcp)(HOST=DascherBD)(PORT=65274))
The command completed successfully
Re: Error ora-012546 TNS: Permission denied [message #678275 is a reply to message #678268] Fri, 22 November 2019 05:28 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
You do need to have your ORACLE_HOME and PATH environment variables set appropriately. Where are you setting them? It looks as though you have at least two Oracle Homes, so relying on values picked up by your session from the registry is not going to be reliable. Better set them explicitly, in the cmd shell where you intend to run SQL*Plus and be sure, to run the correct copy of SQL*Plus.

These may help with diagnosis:

echo %ORACLE_HOME%
echo %PATH%
where sqlplus
Re: Error ora-012546 TNS: Permission denied [message #678277 is a reply to message #678129] Fri, 22 November 2019 07:35 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Goldaxe wrote on Tue, 12 November 2019 06:57
I try to connect from Oracle Forms 12c to a BBDD 12.1.0.2.0 and give "ORA-12546 TNS: permission denied".
The funny thing is, I do a tnsping on the BBDD alias and if I get there.

What is BBDD? Why is it relevant to this problem.

From windows client issue command below

tnsping SAX

COPY the results from command above then PASTE all back here.

Post content from TNSNAMES.ORA file from windows client system.
Re: Error ora-012546 TNS: Permission denied [message #678278 is a reply to message #678277] Fri, 22 November 2019 07:46 Go to previous messageGo to next message
Littlefoot_fan
Messages: 18
Registered: June 2019
Location: Uruguay
Junior Member
Quote:
What is BBDD? Why is it relevant to this problem.
BBDD means database in spanish, it is an abbreviation.
Re: Error ora-012546 TNS: Permission denied [message #678328 is a reply to message #678275] Mon, 25 November 2019 02:12 Go to previous messageGo to next message
Goldaxe
Messages: 36
Registered: September 2019
Member
I have 2 variables ORACLE_HOME (one for forms 6i and one for forms 12c). From the sql plus I connect perfectly. The problem is when connecting to the DB from forms 12c
Re: Error ora-012546 TNS: Permission denied [message #678330 is a reply to message #678328] Mon, 25 November 2019 02:35 Go to previous messageGo to next message
Goldaxe
Messages: 36
Registered: September 2019
Member
I execute the SQL Plus that comes with the Forms installation and it is not connect. I do not appear the conection chain.

Re: Error ora-012546 TNS: Permission denied [message #678331 is a reply to message #678328] Mon, 25 November 2019 02:43 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Goldaxe wrote on Mon, 25 November 2019 08:12
I have 2 variables ORACLE_HOME (one for forms 6i and one for forms 12c). From the sql plus I connect perfectly. The problem is when connecting to the DB from forms 12c
You can't have two variables with the same name.

You need these two variables: ORACLE_HOME and PATH. You need to set them in the same shell from which you are launching your client program. How are you doing this?
Re: Error ora-012546 TNS: Permission denied [message #678332 is a reply to message #678331] Mon, 25 November 2019 02:55 Go to previous messageGo to next message
Goldaxe
Messages: 36
Registered: September 2019
Member
I have 2 ORACLE_HOME. Regedit Data:

. Forms 6i: Equipo\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Oracle

ORACLE_HOME: C:\orant
SQLPATH: C:\orant\dbs;C:\orant\bin;C:\orant\report60\server\security
FORMS60: C:\orant\FORMS60
FORMS60_PATH: C:\Iker\LIB;C:\orant\TOOLS\OPEN60\PLSQLLIB

. Forms 12c: Equipo\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OracleHome1

ORACLE_HOME: C:\Oracle\Middleware\Oracle_Home
SQLPATH: C:\Oracle\Middleware\Oracle_Home\dbs
TNS_ADMIN: C:\Oracle\Middleware\Oracle_Home\forms1
FORMS_INSTANCE: C:\Oracle\Middleware\Oracle_Home\forms1
FORMS_PATH: C:\Iker\Mod
Re: Error ora-012546 TNS: Permission denied [message #678334 is a reply to message #678332] Mon, 25 November 2019 03:27 Go to previous message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Do you know how to set and query an environment variable? Do you understand what the PATH variable does?
Previous Topic: Tabular Block's Checkbox Issue
Next Topic: Forms 10g: FRM-10205: Menu my_erp.mmx not found
Goto Forum:
  


Current Time: Thu Mar 28 11:27:27 CDT 2024