How to connect Java to oracle Database Express Edition?

Anyone can help me?
How to connect JAVA TO ORACLE DATABASE EXPRESS EDITION?

I suggest you to read this article:
http://wiki.oracle.com/page/JDBC
Regards,
Ricky

Similar Messages

  • Connect Problems with Oracle Database Express Edition 11g Release 2

    Hello,
    I am a student trying to install Oracle Database Express Edition 11g Release 2 and SQL Developer on my home system, Win7 64Bit, in order to practice some things I've learned from me DBA class and Developer classes.
    Anyway, I have everything installed, but I am having difficulty connecting as SYS or SYSDBA in the 'Run SQL Command Line', I keep getting the ORA-01017: invalid username/password: logon denied.
    However, If i select the 'Start Database' I get this:
    C:\oraclexe\app\oracle\product\11.2.0\server\bin>
    and I can type sqlplus / as sysdba and it starts up just fine and show user lists me as "SYS".
    but if I go back to 'Run SQL Command Line' I still cannot connect as SYS or SYSDBA...I find this both confusing and frustrating. I don't know if I am in different instances or something like that, but I seem to be limited to connecting only as "SYSTEM". I need SYS because I want to practice creating datafiles, instances and things like that, but I seem to be lost.
    Also, I am trying to create a new DB connection with SQL Developer and I can only us SYSTEM for my login which, if I understand correctly, will limit my privileges. Again When I try to sign in with SYS or SYSDBA I get error'd out. When I installed Ora11gDBExpress I was prompted in input a single password that was supposed to grant me access as SYS or SYSTEM, but I am limited to only SYSTEM for some reason.
    So, I am looking for help/guidance as to what to do.
    Thanks in advance for any and all help,
    Warren

    General rule of thumb, don't use sysdba unless you want to shut down the database, or grant a database user privileges on a sys object.
    A SYSTEM connection is not "limiting", it has the DBA role which means a user with a system connection can do most anything needed, including select/update/delete/drop any user's objects as well as change parameters in the instance.
    The system user can indeed add datafiles, tablespaces, etc. The instance and database should already be created as long as the installer completed all its chores correctly. For XE, per the license agreement only one instance can run on one host. If you want to try creating a database, it will require shutting down the XE instance and creating a new database service, creating the database, and installing the system catalog and any other optional components desired. Good practice indeed, but a bit advanced for the new user.
    Do create users for schemas ... connect system; create user <username> identified by <password> and connect <username> for the schemas (a collection of objects) within the database. Grant the resource and create session privilege to <username> to allow the database user the ability to create tables, indexes, stored procedures, etc.
    There is no "or" in a sys as sysdba connection, from 10g onwards a sys connection requires using the sysdba privilege. To enable a sysdba connection, add your host user to the ORA_DBA group on the host. To verify the OS users in the ORA_DBA group, this might work for win7, in a cmd box ...
    $ net localgroup ora_dba
    ...If your OS user is in the ora_dba group the sys as sysdba password is not relevant, you can in fact type anything for a password. If you wish to connect with the sysdba privilege from a remote client, that is a bit different and requires knowing the password set in the instance password file. Which should be set the same as the system password defined in the installer, but you can change that by creating a new password file. Another slightly advanced topic.
    In Windows IMHO its better to leave the listener and database set to Manual start (in the services applet, Start/Run/services.msc) and start the listener, then the database, when its needed. At least for an XE instance, as its intended for practice and learning RDBMS management.
    Edited by: clcarter on Mar 2, 2012 6:19 PM
    fix typos

  • How to connect java with oracle

    can any body show me the code of how to connect java with oracle database.
    thank you

    To configure Oracle JDBC:
    1. Add Oracle JDBC JAR file classes12.zip or ojdbc14.zip to classpath.
    2. Load and register the JDBC driver.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    3. Obtain a connection:
    String url="jdbc:oracle:thin:@<host>:1521:<database>
    Connection con = DriverManager.getConnection(url,
    "myLogin", "myPassword");
    4. Create a SQL statement.
    Statement stmt = con.createStatement();
    5. Obtain a result set.
    ResultSet rs = stmt.executeQuery(
    "SELECT ...");

  • Oracle Database Express Edition 2 Day Plus Java Developer Guide??

    I posted in the JDeveloper forum, as well as sending email via your feedback link found on the tutorial but I am a little disappointed by this:
    The Oracle® Database Express Edition 2 Day Plus Java Developer Guide has some errors in it.
    in Windows, I simply chose, start
    -> programs -> Oracle Database Express Edition -> Go To Database Home Page -> click documentation from the link -> and run the Oracle® Database Express Edition 2 Day Plus Java Developer Guide tutorial.
    the problem is there are mistake(s) in the tutorial, for example: section 4-19 is this:
    "The complete code for the method should now be as follows:
    public boolean authenticateUser(String userid, String password,
    HttpSession session) throws SQLException { "
    it needs to be this:
    public boolean authenticateUser(String jdbcURL, String userid, String password,
    HttpSession session) throws SQLException {
    Also:
    there is no mention that :
    the port and SID must also be passed in the
    ds.setURL(jdbcUrl) found in the authenticateUser() method, or an exception is thrown. This differs from value of the jdbcUrl string found in the getDBConnection() , which makes it hard to figure out
    The tutorial is great even if it doesn't work out of the box, but I am disappointed that errata or completed code for this project is not available, especially when you explicitely point to it via the steps mentioned above.
    Thanks,
    Patrick

    The tutorial seems to be using the old JDeveloper 10.1.2.
    If you are aiming to learn JDeveloper then just use the tutorials linked from the JDeveloper home page.
    http://www.oracle.com/technology/obe/obe1013jdev/index.htm

  • Problem in connecting netbeans with oracle 10g express edition

    hi friends... i need help in connecting the database with netbeans..... in netbeans, under services option... i have a option for database... but am not getting any drop-down while right clicking to add a new database... i tried in both netbeans6.9 and netbeans7... what should i do to connect netbeans7 to oracle 1og express edition.... pls help me friends.... pls do reply

    First of all, I think your dot... button is broken, it keeps repeating which makes it SO much harder to read your post.
    Secondly, I suggest you take your question to the Netbeans mailing lists. This is a Java programming forum, not a technical support forum for the hundreds of tools available to support Java programming.
    http://netbeans.org/community/lists/index.html

  • Oracle Database Express Edition 10g Download Issue

    Hi everyone. I just downloaded the freeware Oracle Database Express Edition without any apparent problems. However, when I attempt to go to the Express Edition Homepage, which is location http://127.0.0.1:8080/apex,
    I get the message that my Internet Explorer cannot display the webpage. (It can, however, display other pages.) I cannot understand why this is the case since I successfully added Web site 127.0.0.1 in my Control Panel (as specified in the instructions.) Also, the instructions stated that HTTP port 8080 was the default port, unless my system said that this was not available (which it did not.) I also tried rebooting, which did not make a difference. Help!
    Thanks,
    Jason

    user13176791 wrote:
    Hi everyone. I just downloaded the freeware Oracle Database Express Edition without any apparent problems. However, when I attempt to go to the Express Edition Homepage, which is location http://127.0.0.1:8080/apex,
    I get the message that my Internet Explorer cannot display the webpage. (It can, however, display other pages.) I cannot understand why this is the case since I successfully added Web site 127.0.0.1 in my Control Panel (as specified in the instructions.) Also, the instructions stated that HTTP port 8080 was the default port, unless my system said that this was not available (which it did not.) I also tried rebooting, which did not make a difference. Help!There is a forum dedicated to Express Edition, in which we have discussed a lot of the variants in failure that causes this problem. At the top of the page you are reading, there should be links like "Forum Home » Database » Database - General". The middle one will get you to a list of all Oracle forums and after the first 5, the rest are alphabetical - XE is pretty far down that page.
    (You might also note that there is an Installation forum next to this one. That might be better suited to the task than the 'catch-all' general forum.)
    The most common issues are related to not preparing the operating system properly. For example, if you use a laptop you probably use DHCP to get a different address from the various sites you connect to. However, Oracle works as a server and depends on having a well known address. In fact, it tends to bind the IP address at install into it's configuration files. Therefore it is critical to use the loopback adapter in such situations.
    Other issues are dependent on the actual OS into which you install. For example, Ubuntu (Linux) has very differnet install philosophy as Red Hat / Fedora, and requires a different install technique. Then again, on Windows, it is nearly impossible to install anything Oracle on a Windows 'Home' OS, and XE generally has not even been tested against Windows 7.
    Other common reasons include anti-virus; firewall; not having appropriate operating system level permissions; in Windows - using a Domain-based userid instead of a local administrator; and just general finger issues.
    Express is considerably different in the install behaviour and runtime behaviour. For example. it uses RPM and MSI instead of Oracle Universal Installer. It does not include Java in the database, which limits a lot of functionality. And it uses the built-in PL/SQL Web Gateway instead of any external HTTP server. As a result, it can be quite a shock to mmany of the regular inhabitants in this forum.
    I strongly encourage reading the documentation for XE. In particular, reading the install doc. Start at http://tahiti.oracle.com and look for the Oracle Database 10g Release 2 Express Edition documentation. (Just below the Oracle Database 10g Release 2 documentation.)
    G'luk

  • Oracle Database Express Edition 11g Database home Page is not Displaying

    As I am Java Developer and wanted to do JDBC connection for Java.....
    So I Have Installed Oracle Database Express Edition 11g......
    But the home page on url...http://127.0.0.1:8080/apex/f?p=4950
    is Not Working.....
    I am Using Windows Xp....SP 3.....
    Help Me for this....
    Thanks & In Advance.....
    Jugal Thakkar

    972423 wrote:
    As I am Java Developer and wanted to do JDBC connection for Java.....For Java, JDBC and JDeveloper related discussions, you'll find plenty of forums:
    https://forums.oracle.com/forums/category.jspa?categoryID=285
    https://forums.oracle.com/forums/category.jspa?categoryID=500
    So I Have Installed Oracle Database Express Edition 11g......
    But the home page on url...http://127.0.0.1:8080/apex/f?p=4950
    is Not Working.....Just installed? Never worked before? Unreachable 'Get Started' page usually indicates that install was not completely successful, database creation failed because of OS misconfiguration.
    Before even trying that url you should see a endpoint with port 8080 in Endpoints summary from lsnrctl stat command.
    Use search and have a look through previous threads for this FAQ.
    E.g. https://forums.oracle.com/forums/search.jspa?threadID=&q=%2Bpage+%2B4950&objID=f251&dateRange=thisyear&userID=&numResults=15&rankBy=10001

  • Oracle Database Express Edition SQL Developer

    Hi all,
    I did download the Oracle Database Express Edition from Oracle's website and am trying to create a new connection with the following info
    Connection Name: myconnection
    Username: ora21
    Password: ora21
    Hostname: localhost
    Port: 1521
    SID: orcl
    Note: I even tried to use xe as the SID since it's a express edition but it keeps telling me test failed: ORA-01017: invalid/password; logon denied.
    Could it be because it's an Express edition? Please advice as am a new DBA and am practising on my own

    @Jim: thanks for the reply! I just created the user ora21 but when I try to creat the connection again it gives error ORA 01045 : user ORA21 lacks create session privilege; logon denied.

  • Upgrade Oracle Database Express Edition to (10.2.0.4 OR 11g) Release

    hello
    I plan to install the SOA, but need more than the database version 10.2.0.4. How to upgrade Oracle Database Express Edition to (10.2.0.4 OR 11g) Release?Thank you!!

    Hi,
    I plan to install the SOA, but need more than the database version 10.2.0.4. How to upgrade Oracle Database Express Edition to (10.2.0.4 OR 11g) Release?Thank you!!My i know the current version of your database?
    Refer:
    *316889.1 -- Complete Checklist for Manual Upgrades to 10gR2*
    *429825.1 -- Complete Checklist for Manual Upgrades to 11gR1*
    *837570.1 -- Complete Checklist for Manual Upgrades to 11gR2*
    thanks,
    X A H E E R

  • Unable to start Oracle Database Express Edition (XE) on window 7 - 64 bit

    I installed Oracle Database Express Edition (XE) on a WINDOWS 7 - 64 bit machine. I tried "Get Started" and http://localhost:8080/apex. It does not start/connect of anything. Please help.
    Thanks.
    Debbie

    I received the following message from lsnrctl status
    and sqlplus / as sysdba.
    C:\>lsnrctl status
    LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 20-JUL-2012 17:09
    :16
    Copyright (c) 1991, 2010, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    32-bit Windows Error: 2: No such file or directory
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MW777SXH4ITNY4.dir.svc.a
    ccenture.com)(PORT=1521)))
    TNS-12545: Connect failed because target host or object does not exist
    TNS-12560: TNS:protocol adapter error
    TNS-00515: Connect failed because target host or object does not exist
    32-bit Windows Error: 1004: Unknown error
    C:\>sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.2.0 Production on Fri Jul 20 17:10:04 2012
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    SQL> select sysdate from dual
    2 /
    SYSDATE
    20-JUL-12
    SQL>
    Does this mean I am up and running? I selected from dual. I will continue to play with the DB.
    If I download SQL Developer, should the version be for 32-bit or 64-bit for PC - Windows 7 - 64 - bit?
    Thanks.
    Edited by: 893328 on Jul 20, 2012 2:58 PM
    Edited by: 893328 on Jul 20, 2012 2:58 PM

  • Installing Oracle Database Express Edition 11g on UBUNTU

    Hello everyone,
    I want to install Oracle Database Express Edition 11g on UBUNTU. I followed the steps from this link created by Dude:
    https://forums.oracle.com/thread/2303639?start=0&tstart=0
    My problem becomes when I type in from the terminal:
    sudo /etc/init.d/oracle-xe configure
    I followed the instructions there, agreeing t HTTP port 8080, port database listener 1521,  specifying a password for my database account, and wanting Oracle Express to be started on boot. This is what I'm getting:
    Starting Oracle Net Listener...touch: cannot touch `/var/lock/subsys/listener': No such file or directory
    Done
    Configuring database...
    Database Configuration failed.  Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
    I have no idea what this means, so I went into the log's location and I found 4 of them, so I clicked on each of them, and this is what I'm getting:
    1. cloneDBCreation.log:
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    ORA-00845: MEMORY_TARGET not supported on this system
    Create controlfile reuse set database "XE"
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    alter system enable restricted session
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    alter database "XE" open resetlogs
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    alter database rename global_name to "XE"
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    alter system switch logfile
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    alter system checkpoint
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    2. CloneRmanRestore.log
    ORA-00845: MEMORY_TARGET not supported on this system
    select TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') from dual
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    declare
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    select TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') from dual
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    3. postDBCreation.log
    begin
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    File created.
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    ORA-00845: MEMORY_TARGET not supported on this system
    select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    BEGIN utl_recomp.recomp_serial(); END;
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    4. postScripts.log
    CREATE OR REPLACE LIBRARY dbms_sumadv_lib AS '/u01/app/oracle/product/11.2.0/xe/lib/libqsmashr.so';
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    BEGIN dbms_datapump_utl.replace_default_dir; END;
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    commit
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    create or replace directory XMLDIR as '/u01/app/oracle/product/11.2.0/xe/rdbms/xml'
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    DROP DIRECTORY ORACLE_OCM_CONFIG_DIR
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    DROP DIRECTORY ADMIN_DIR
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    DROP DIRECTORY WORK_DIR
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    BEGIN dbms_swrf_internal.cleanup_database(cleanup_local => FALSE); END;
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    commit
    Can somebody that knows this, or has installed Oracle Express on Ubuntu, to please explain it to me what does it mean and why am I getting those errors. Please explain thoroughly as if I am an amateur person, IN DETAIL, STEP-BY-STEP. I want to run it and make it work! I heard that it encourages people to answer for points. I am open for your suggestions and experiences, as long as it's not 'use common sense', 'you're dumb', or an answer that is vaguely explained.  Thank you for those that take the time to read it.
    ec557fac-f825-4356-a220-1ec941ce7cd0 

    Hi Pradeepcmst,
    Thanks for your suggestion, but I found it sometimes misunderstanding on what he's trying to say - his instructions are not step-by-step and precise. Instead, I found this link that helped me a lot:
    Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

  • Using Oracle Database Express Edition in development environment

    Hi All,
    I have doubt regarding the usage Oracle Database Express Edition in Development environment. I am not sure weather I can ask a non technical question here or not. Pleas forgive me if I have done any thing wrong.
    I am working in an IT company where we take up projects outsourced by our clients. As part of our current project we are making some modification to a web application used by an institution. Our client is using Oracle Data Base standard edition. Due to budgetary constraints of our Company we can not set up a Oracle standard edition data base in our development environment.
    So would it be illegal if we use  Oracle Database Express Edition in our development environment?  We can guarantee that  only our internal development team which comprise a maximum of 10 people will have access to this development database and this development data base will never be opened to our Client for their business purpose(Who have their own Oracle standard edition in their environment). As part of the project we delver only table DDL script and stored procedure to our client and they put it in their environment.The sole purpose of a internal Express database will be development only.
    Could some one please tell me if it would be violation of license agreement if we install Oracle Database Express Edition in our development environment.

    Hi Paul,
    Actually I have already gone through the Oracle Technology Network Developer License Terms for Oracle Database 11g Express Edition . But was not quiet clear about the content. It says in the license terms that "We grant you a nonexclusive, nontransferable limited license to use the programs for: (a) purposes of developing, prototyping and running your applications for your own internal data processing operations". Does the term "your application" includes an application we are developing for another company. Since the Express database  is installed in the development environment only and is not opened to any one else not even for Our client it definitely falls under the term "internal data processing operations" right?

  • Downloading Oracle Database Express Edition

    Hi everyone. I just downloaded the freeware Oracle Database Express Edition without any apparent problems. However, when I attempt to go to the Express Edition Homepage, which is location http://127.0.0.1:8080/apex,
    I get the message that my Internet Explorer cannot display the webpage. (It can, however, display other pages.) I cannot understand why this is the case since I successfully added Web site 127.0.0.1 in my Control Panel (as specified in the instructions.) Also, the instructions stated that HTTP port 8080 was the default port, unless my system said that this was not available (which it did not.) I also tried rebooting, which did not make a difference. Help!
    Thanks,
    Jason

    Hi,
    Use this forum to report problems with or suggestions for the download.oracle.com service or content.
    Please post your question in the appropriate forum for a better/faster response.
    Database - General
    General Database Discussions
    Thanks,
    Hussein

  • Upgrade oracle database express edition

    good morning
    i've a question i'm working with oracle database express edition but now the memory is full and i want to upgrade it to oracle enterprise edition but i don't know the steps please can you help me in this
    best regards

    I've a question i'm working with oracle database express edition but now the memory is full and i want to upgrade it to oracle enterprise edition Hi,
    Not to dissuade you from that, but that's quite a leap from XE to EE, are you sure that SE One or SE would not be a 'better option' for you?
    Also, by 'memory is full', I assume you mean you've reached the 4Gb data limit?

  • Oracle Database Express Edition maximum data size

    Hi
    We just need to know what is the maximum data(in gb) Oracle database express edition 10g can store in it?
    Thanks

    915071 wrote:
    Hi
    We just need to know what is the maximum data(in gb) Oracle database express edition 10g can store in it?
    Thanks4GB

Maybe you are looking for

  • Randomly monitor small office network

    Looking for a user-friendly, dummy-proof article on creating a small office network from a total of four Mac's (3 iMacs, one Air), allowing the administrator to randomly monitor without detection the real-time activities taking place on the other two

  • Problem in Mail Scenario

    Hi, I have configured a SAP --> PI --> Mail scenario with a receiver Mail Adapter. I have used the required mail message format for this interface. When I try to execute the scenario using a Message Mapping it is executed successfully and a mail is r

  • Defining a scatter chart with multiple series

    I am trying to create a scatter chart with two series.  I am using CR8.5 and CR2008. I am having difficulty with my data being presented correctly when I attempt to define the scatter chart.  The data is temperature and weather use/sqft for two diffe

  • Problem whit Update Operation, Error UPDATE_ROW_CONFLICT with Oracle DB

    Hello friends!, I have a problem whit UPDATE Operation with a Oracle DataBase, but it is rare because it works in "Java Sun Application Server" and not in Tomcat (5.5.12) , displaying the following error: "Error :Number of conflicts while synchronizi

  • Rounding wilst using Pop-up Menu's

    Hi, Is there a way to stop numbers rounding the numbers imputed by a Pop-up menu ? Thanks sampether