Galera, I have a little problem. I am trying to set Oracle connection with NetBeans and gives the message:
ORA-12505, TNS: Listener of the NOR Currently Know of Sid Given in Connect Descriptor.
I have in my machine the Oracle Client installed and an TNS configuration to access the PL / SQL.
NetBeans has any own TNS ??? Where should I get the TNS ??
Thanks
Oracle Connection with NetBeans
-
- Rank: DBA Pleno
- Posts: 252
- Joined: Fri, 06 Feb 2009 3:02 pm
- Location: ERECHIM - RS
-
- Moderador
- Posts: 1396
- Joined: Fri, 01 Feb 2008 2:06 pm
- Location: Rio de Janeiro - RJ
- Contact:

Dude ..
Which connection URL are you using?
Connecting on Oracle Xe?
The SID is wrong ... Use Xe
Answering you ..
NetBeans has no names, who has is your oracle client .. but if you are trying to connect Java in Oracle via jdbc your tns names will not be used because the java jdbc framework will open a connection with your oracle using the driver made available by Oracle
You can find in ..
I hope I have helped
Which connection URL are you using?
Connecting on Oracle Xe?
The SID is wrong ... Use Xe
Answering you ..
NetBeans has no names, who has is your oracle client .. but if you are trying to connect Java in Oracle via jdbc your tns names will not be used because the java jdbc framework will open a connection with your oracle using the driver made available by Oracle
You can find in ..
$ORACLE_HOME/ora92/network/ADMIN
-
- Rank: DBA Pleno
- Posts: 252
- Joined: Fri, 06 Feb 2009 3:02 pm
- Location: ERECHIM - RS
Look: We have here Oracle 10g Release 2. My connection is like this:
In case, Newprod is the SID I currently use on my TNS to connect to the bank.
Sorry for lack of experience, but start is beginning (rsrsrs)
jdbc:oracle:thin:@192.168.200.132:1521:NEWPROD
Sorry for lack of experience, but start is beginning (rsrsrs)
-
- Moderador
- Posts: 1396
- Joined: Fri, 01 Feb 2008 2:06 pm
- Location: Rio de Janeiro - RJ
- Contact:

It feels free to ask .. rsrsrs
Your error http://ora-12505.ora-code.com/
How to connect http://www.oracle.com/technology/sample ... _j2ee.html
This error are you having on your machine trying to connect to another that is where the bank is?
Have you ever been able to connect?
Do you have Oracle Client installed on your machine?
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@<hostname>:<port>:<sid>","<username>","<password>");
Your error http://ora-12505.ora-code.com/
How to connect http://www.oracle.com/technology/sample ... _j2ee.html
This error are you having on your machine trying to connect to another that is where the bank is?
Have you ever been able to connect?
Do you have Oracle Client installed on your machine?
-
- Rank: DBA Pleno
- Posts: 252
- Joined: Fri, 06 Feb 2009 3:02 pm
- Location: ERECHIM - RS
Yes, the bank is on a server. We use all Oracle's EBS Suite.
On my machine I have the client installed because I use some development tools in PL / SQL and Reports. Connection with the bank operates normally.
Do you have to set up any other NetBeans file ???. The drive I downloaded on the same Oracle website (Classes12.jar).
On my machine I have the client installed because I use some development tools in PL / SQL and Reports. Connection with the bank operates normally.
Do you have to set up any other NetBeans file ???. The drive I downloaded on the same Oracle website (Classes12.jar).
-
- Rank: DBA Pleno
- Posts: 252
- Joined: Fri, 06 Feb 2009 3:02 pm
- Location: ERECHIM - RS
On NetBeans 6.7.1 I do the following:
- New project
- Java
- Java Desktop Application
- Bank application Data
- New database connection
- Oracle Thin (with service ID (SID))
In the Connection Colo:
- New project
- Java
- Java Desktop Application
- Bank application Data
- New database connection
- Oracle Thin (with service ID (SID))
In the Connection Colo:
jdbc:oracle:thin:@192.168.200.132:1521:NEWPROD
-
- Moderador
- Posts: 1396
- Joined: Fri, 01 Feb 2008 2:06 pm
- Location: Rio de Janeiro - RJ
- Contact:

Good try to see your tnsnames then ..
Are you passing user and password?
Do you connect on this basis for other tools without problem?
I connect this ...
TNSNames
URL
Java
Are you passing user and password?
Do you connect on this basis for other tools without problem?
I connect this ...
TNSNames
ABC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SID = ABC)
)
)
URL
jdbc:oracle:thin:@ 127.0.0.1:1521:ABC
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
DriverManager.getConnection(url, user, pass)
-
- Rank: Estagiário Júnior
- Posts: 1
- Joined: Tue, 14 Sep 2010 5:10 pm
- Location: Criciuma - SC
Hi, I have a similar problem, I can not connect, as I could not create a new type of connection in the oracle use 10g, I used the sys with password default sysdba, but when I try to connect with netbeans this appears:
0]]]
0]]]
-
- Moderador
- Posts: 1396
- Joined: Fri, 01 Feb 2008 2:06 pm
- Location: Rio de Janeiro - RJ
- Contact:

ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
Symtompts of the Problem:
---------------------------
Whenever you try to conenct to database by providing SYS user name and password it retuens error.
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
Cause of The Problem:
--------------------
This is because of the parameter O7_DICTIONARY_ACCESSIBILITY settings to FALSE.
Access to dictionary objects is restricted to the users with the system privileges SYSDBA and SYSOPER. Connecting as SYSDBA gives a user unrestricted privileges to perform any operation on a database or the objects within a database. Data dictionary objects is under SYS schema and is protected by O7_DICTIONARY_ACCESSIBILITY to FALSE settings.
Workaround Example:
---------------------
1)Try to connect by user sys without sysdba privilege.
SQL> conn sys/a
ERROR:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
Warning: You are no longer connected to ORACLE.
2)Connect as sysdba and change O7_DICTIONARY_ACCESSIBILITY
SQL> conn / as sysdba
Connected.
SQL> SHOW PARAMETER O7_DICTIONARY_ACCESSIBILITY
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
O7_DICTIONARY_ACCESSIBILITY boolean FALSE
SQL> ALTER SYSTEM SET O7_DICTIONARY_ACCESSIBILITY=TRUE scope=spfile;
System altered.
3)Since O7_DICTIONARY_ACCESSIBILITY is static parameter restart is necessary.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 2019288 bytes
Variable Size 109051944 bytes
Database Buffers 50331648 bytes
Redo Buffers 6369280 bytes
Database mounted.
Database opened.
4)Now connect as sys with only password.
SQL> conn sys/a
Connected.
SQL> show parameter O7_DICTIONARY_ACCESSIBILITY
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
O7_DICTIONARY_ACCESSIBILITY boolean TRUE
5)Though you are SYS user but you have not currently have SYSDBA privilege. So, you can't do SYSDBA privilege tasks.
SQL> shutdown immediate;
ORA-01031: insufficient privileges
SQL> show user
USER is "SYS"
Caution:
-----------
Oracle Strongly recommends not to use O7_DICTIONARY_ACCESSIBILITY to TRUE.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest