How to connect from oracle sql developer ?

I've made one java class, to access UserRecord Data Base from sql developer.
My class file is :-
import java.sql.*;
import java.io.*;
public class SelectData{
public SelectData(){}
public void selectData(){
          String url="jdbc:oracle:thin:@10.1.236.10:1521:dev92i";//connection url
     Connection con= null; //connection create
          Statement stat = null; //prepared statement create
          ResultSet rs=null; //result set to hold result
          try{
          Class.forName("oracle.jdbc.driver.OracleDriver");
          con = DriverManager.getConnection(url,"scott","tiger");
          stat = con.createStatement();
          rs = stat.executeQuery("select Name from UserRecord");
          while (rs.next()) {               // Position the cursor                 
                    // Retrieve the first column value
                    System.err.println("Name= " +rs.getString("Name"));
                    // Retrieve the first column value
                    System.err.println("Pswd= " +rs.getString("Password"));
          rs.close();
          catch(SQLException e){
               System.err.println(e.getMessage());
          catch(ClassNotFoundException e){
               System.err.println(e.getMessage());
          catch(Exception e){
               System.err.println(e.getMessage());
          finally{     
                    try{
                    if(con!=null)
                         con.close();
                    catch(Exception e){
                         System.err.println(e.getMessage());
public static void main(String args[]){
     SelectData sd=new SelectData();
     sd.selectData();
When i run this class file it gives error :-
"oracle.jdbc.driver.OracleDriver"
Plz help me out from this problem and suggest any configuration if required in oracle sql developer to run my programs.

{color:#0000ff}hi,
add the jar for oracle jdbc to the libraries.
if you are using any IDE then just change the project properties adding the jar file.
if not edit the classpath of the envoirnment variables.
{color}{color:#ff0000}*manik*{color}

Similar Messages

  • How to conect to the Oracle 10 g Exp Edition from Oracle SQL Developer Tool

    Hi all,
    i have installed Oracle 10 g Exp Edition in my stand alone system(no internet connected to the system).
    I want to connect through Oracle SQL Developer tool.
    Can any one please tell me the steps involved in "how to connect to the Oracle 10 g Exp Edition from Oracle SQL Developer Tool ".
    Thanks in Advance.

    Creating a Database Connection
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev/r30/sqldev3.0_GS/sqldev3.0_GS.htm

  • Am not able to connect to oracle sql developer first time

    Hai all,
    am not able to connect  to oracle sql developer first time in my windows server.
    in my server sql developer icon is not showing in "all_programs>oracle_home>application development".
    am first time working in windows env..
    server : windows
    database_version:11.2.0.3
    please let me konw how to connect to the sql developer.
    Thanks,
    subbu

    am not able to connect  to oracle sql developer first time in my windows server.
    in my server sql developer icon is not showing in "all_programs>oracle_home>application development".
    am first time working in windows env..
    server : windows
    database_version:11.2.0.3
    please let me konw how to connect to the sql developer.
    Did you perhaps do a custom install? The DB software includes a version of sql developer and, by default, installs it in the sqldeveloper folder of the DB_HOME. Does that folder have sql developer in it?
    I suggest that you NOT use the version of sql developer that ships with the database. That version will NOT be the current version.
    Download the current version of SQL Developer, unzip it into a new folder and create a desktop icon for it.
    http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
    The current version includes many, many bug fixes from that earlier DB version and you will have far fewer probems with it.

  • Run sp from Oracle SQL Developer

    Hi,
    Anbody can help me to find why I cant' see output after running my simple sp lke below. When I ran create View from sql it's fine, I see <Statetement Output> window displayed, and see new View.
    Not the case when I do sp, I can compile it and get "compiled" status on Messages pane, not sure is't compiled sucessfully or not. But then pressing RUN green arrow, or right click - RUN nothing happenes, no new view, no any output.
    I defenetely has all rights to run sp as per our admin.
    Tx
    Trent
    create or replace
    PROCEDURE usp4 AS
    BEGIN
    execute immediate '
    CREATE OR REPLACE FORCE VIEW "USERMO"."V2c"
    AS
    SELECT "TDATE","AMOUNT","ESS" FROM TT_REG;';

    Tx, sb92075
    I see that you running it all from command line, right ?
    It's still different on my SQL Developer session, I don't have anything on messages pane and again I don't see output i.e. View created.
    Can anybody share opinions how to run this sp from Oracle SQL Developer? I expect to see newly created V2c View in my object list upon execution.
    create or replace
    PROCEDURE usp4 AS
    BEGIN
    execute immediate '
    CREATE OR REPLACE FORCE VIEW "USERMO"."V2c"
    AS
    SELECT "TDATE","AMOUNT","ESS" FROM TT_REG;';
    T
    Edited by: trento on May 4, 2010 1:29 PM

  • Favorites icon gone from Oracle SQL Developer Help screen

    Favorites icon gone from Oracle SQL Developer 3.0 Help Center screen
    How do I get it back?
    In Oracle SQL Developer 3.0 I clicked
    Help->Table of Contents
    to bring ut the Help Center window.
    It the Help Center window I used to have a Favorites tab next
    to the Contents TAB on the left side of the window.
    I did an unpin some how and now I can't get the Favorites
    TAB back.
    On the right side there is a Star + icon that does
    Add to Favorites.
    I can add links to favorites but I have no way to go to these
    saved favorites anymore.
    How do I get the Favorites TAB/Icon back?
    Thanks

    Hi John,
    SQL Developer depends on JDeveloper code for the Help. After closing the Favorites tab I see no way to re-open it in the UI, so I imagine there may be a bug on the JDev side. Fortunately, there is a manual fix:
    In file product-preferences.xml
    In directory C:\Documents and Settings\<userid>\Application Data\SQL Developer\system3.0.04.34\o.sqldeveloper.11.1.2.4.34
    use Notepad to look for the lines like:
          <value n="helpDynamicLinksNavigatorLocation" v="3"/>
          <value n="helpFavoritesNavigatorLocation" v="0"/>
    Just change the value "0" to "2"Regards,
    Gary
    SQL Developer Team

  • Copying from Oracle SQL Developer to Microsoft Word doesn't retain formatting (Font,colors etc)

    Copying from Oracle SQL Developer Worksheet doesn't retain formatting (font,color etc...)in Microsoft Word but copying from other programs such as
    visual studio, chrome browser etc works fine. This doesn't work even after changed the setting to Keep Source formatting of Options-> Copy and Paste Settings

    Hi,
    I notice that you have cross posted in Answers forum and Oracle forum. Have you tried Mr. Peter's suggestion?
    Then, I recommend we check the Word settings:
    1. Go to: Options > Advanced > Cut, Copy and Paste
    2.  Make sure that Use smart cut and paste is ticked. 
    3. Click the Settings button next to this option
    4. Make sure that Smart Style
    Behavior is checked.
    If the issue still exists, please upload a sample through One Drive, I want to test.
    Regards,
    George Zhao
    TechNet Community Support

  • Copying SQL Script from Oracle SQL Developer into Excel with formatting

    I need to copy a SQL Script into Excel in order to develop some VBA code. Is there any nice way that I can copy SQL Script from Oracle SQL Developer into Excel and retain its formatting? I am a stickler for having legible, readable SQL and like to have all my columns lined up and aliases lined up. When we used to use SQL Navigator, the tab formatting seemed to copy and paste just fine. Now that we have migrated to Oracle SQL Developer, the formatting seems to get all messed up.
    And suggestions are greatly appreciated and Thanks in advance for your review and am hopeful for an answer.
    Thanks.
    PSULionRP

    I suppose you want a real tabulator instead of spaces. You can configure this in the preferences (SQL Formatter - Oracle). You have to apply it then to your existing code (e.g. CTRL-F7), but new code should get it right from the start.
    Hope that helps,
    K.

  • How to connect from Oracle 11g to SQL Server 2008 R2

    Hi,
    Is it possible to connect from Oracle 11g on AIX to SQL Server 2008 R2? If so, what is the preferred method?
    SQL Server has the original table. From Oracle 11g, we want to access data which is in SQL Server real time.
    Thank You
    Sarayu

    Hi,
    Have a look at these Oracle notes for the full information on the gateways -
    Master Note for Oracle Gateway Products (Doc ID 1083703.1)
    Functional Differences Between DG4ODBC and Specific Database Gateways (Doc ID 252364.1)
    Gateway and Generic Connectivity Licensing Considerations (Doc ID 232482.1)
    How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX) (Doc ID 562509.1)
    How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install (Doc ID 561033.1)
    The Database Gateway for SQL*Server (DG4MSQL) needs a separate license but the Database Gateway for ODBC (DG4ODBC) is included in your RDBMS license. You only need to provide the third party ODBC driver needed by DG4ODBC.
    Regards,
    Mike

  • How to check the datfiles from oracle SQL Developer(enterprise Manager)

    hi,
    Iam using Oracle SQL Developer as enterprise manager in my local pc.I want to check the size of datafiles using this enterprise manager.could u pls help me out..
    Thanks in advance ,
    R.Ratheesh

    What?
    Sql developer is not enterprise manager.
    Size of datafiles? Read the documention, and read the concepts and administration manuals for your release.
    I am not going to provide links, because you have not given your database version number and secondly if you found this forum you can find the docs.
    But I will give you a clue....DBA_DATA_FILES...
    Message was edited by:
    bazzza

  • Configuring RAC-aware JDBC connection in Oracle SQL Developer?

    How can Oracle SQL Developer be configured to properly connect to an [Oracle RAC|http://en.wikipedia.org/wiki/Oracle_RAC] environment, I.E., not just setup to always connect to one of the individual nodes?
    [http://programmersjournal.blogspot.com/2008/08/jdbc-connection-string-for-oracle-rac.html] has an example of a classic and the equivalent RAC-aware version of a JDBC connection string. I've already been using a RAC connection string of the same format from within custom Java applications without issue. I thought the same should be configurable in Oracle SQL Developer by setting the "Connection Type" drop-down to "Advanced", then entering the RAC-aware JDBC connection string as the "Custom JDBC URL". However, upon testing the connection, the following error is displayed at the bottom of the dialog:
    Status : Failure -Test failed: Io exception: NL Exception was generated
    There is no additional information shown on the "Logging Page" view. Using Oracle SQL Developer 1.5.5.
    Thanks!

    Thanks, Barry. Just F.Y.I., it is working for me now that I upgraded to the 2.1 EA as -K- suggested. I had marked his reply as "Correct", but probably should have left a response indicating my success as well.
    Now, if there's anything you could do regarding the [issues around the display performance of CLOBs, etc., in the Query Result view|http://forums.oracle.com/forums/message.jspa?messageID=3906571] , it'd be very appreciated!

  • Able to connect via Oracle SQL Developer, but not sql plus

    Using Oracle 10.2.0.
    I can connect using the TNS connection type in SQL Developer, but cannot do so in SQL PLUS. SQL Plus gives me the error -- could not resolve the connect identifier.
    When I do tnsping USPO_ADHOC, I get:
    C:\oracle\product\10.2.0\client_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION =
    TNS-12533: TNS:illegal ADDRESS parameters
    So here is my tnsnames.ora file:
    INTL_ADHOC =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.239.162.108)(PORT = 1521))
    (CONNECT_DATA =
    (SID = intl1)
    USSYN_ADHOC =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.239.162.109)(PORT = 1521))
    (CONNECT_DATA =
    (SID = USSYN)
    USPO_ADHOC =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.239.162.107)(PORT = 1521))
    (CONNECT_DATA =
    (SID = uspo)
    Any assistance gratefully appreciated. Thanks.

    I actually did not have that environmental variable, so I added it, but nothing changed.
    I would note that if I do tnsping foo, I get: failed to resolve name.
    If I do tnsping USPO_ADHOC, I get: illegal address parameter.
    In both cases, the output correctly identified the path to my sqlnet.ora file, which is in the same directory as my tnsnames.
    So I would conclude from that, that the system was already able to find my tnsnames file.
    Anyway, here's my sqlnet.ora:
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    Thanks again for any ideas!

  • Create connection with Oracle SQL Developer

    Hello,
    my test to connect my Oracle database with SQL*PLUS works. Here I need only the username (I test with system), my password and the hostname (orcl).
    Now I want to create this connection with the SQL Developer.
    Here I need the Port. I don't know the port of my database. How can I find it out?

    Hi, the port must be the used by listener, review the $ORACLE_HOME/network/admin/listener.ora file or get the listener status(lsnrctl status) for get the correct port.
    You can try with the default port. (1521).
    Luck.
    Havea good day.
    Regards.

  • Problem in connection to Oracle SQL Developer

    Hi All,
    I am trying to connect to remote machine database through Oracle SQL Developer, it is giving me teh following error.
    Status: Faliure -Test failed :io connection :The Network Adapter could not establish the connection .
    I had given the hostname as the name which is assigned to that server, it didnt work.
    Later i tried with the IP address of the Server, it worked.
    Can anybody tell me how can i connect by giving hostname instead of the IP address.
    Thanks in advance,
    Vinay

    Hi Vinay,
    One way would be to add an entry in your hosts file. On windoze you can find this in
    %SystemRoot%\system32\drivers\etc
    Regards
    Peter

  • Able to connect to database from SQL plus but not from Oracle SQL developer

    Hi
    I have two database editions in my system Oracle XE and Oracle EE. I am able to connect to EE database through SQL plus but not through SQL developer.Please tell me how to do it.
    All settings are good.I am able to connect to the database before installing XE.I need both for my work(different projects).
    And the default listener started is XE's.Please tell me how to change the default one to EE or tell me how to connect through SQL developer??
    Regards
    Harsha

    I Solved it.
    I copied the text from listener.ora for EE
    and added it in the other one.
    It works after restart.

  • How to open new connection in Oracle SQL Developer ???

    Hi folks,
    I have installed SQL Developer Version 1.5.0.53 in a XP sp2 system. tried to open a Database Connection, with OR_OHCL connection name and 'hr' username & password, but when I click on Connect it showed me "Failure- Io Exception The network adapter could not establish the connection". How can i resolve this issue?
    Thanks in adavance. I need urgent reply, if not lot of replies!!!

    i need to mention that i have never used SQL Developer before. but i have done some oracle coding 1year ago when i had Oracle 9i installed in my computer. but i don't have any oracle installed in my computer. do i need to install any for using SQL Developer? i am not sure what to do?
    i want to use it for just learning. if i need to install Oracle DB which one do you guys suggest me to install ---
    1.Oracle Database 10g Express Edition (Western European)
    2.Oracle Database 10g Express Edition (Universal)
    3.Oracle Database 10g Express Client
    4. or anything else
    please help me out.
    Sarwar

Maybe you are looking for

  • 2 Dual core intel xeon vs quad core. Whats the difference??

    I came across someone who's selling his mac pro 1.1 (aprox 2-3 years old machine) which hosts 2 dual core intel xeon processors 2.66 Ghz (4 total cores) with an L2 cache of 4 MB per processor and 3 gb of RAM. He is asking for 1200.00 I wonder: 1. is

  • How do I copy and paste multiple keyframes?

    I've used previous versions of Final Cut in the past, but primarily have done my editing with Adobe Premiere.  One of the companies I am freelancing for only has Final Cut X on their machines.  I'm a bit confused about keyframes.  Keyframing in the i

  • Is there a talk aloud option ?

    Is there a talk aloud option ? If not is there likely to be?

  • Which is the table related in transaction f-28?

    hi, I want to know which table stored the bank code when I execute the transaction f-28 to record the account.pls tell me .thank you in advance!

  • MRP exception message 10

    Hello Experts, Could you give me a hint about following problem. I have two purchased materials with the same MM settings (mrp group, planned delivery time, MRP type, Lot size, planning time fence, GR processing time). We have the same settings in Sc