Results 1 to 3 of 3

Thread: Applications to Database

  1. #1
    BrooksGray is offline Senior Member
    Join Date
    Dec 2009
    Posts
    231
    Rep Power
    3

    Default Applications to Database

    Connection of Java applications to Database

    Can anybody give me information about connection of java application to database and what are the thing should be available to construct this project. I would like to use oracle database and for oracle which type of driver would be used. I don’t know which driver is use for java application. Which kind of driver possible used for various java applications?

  2. #2
    CruzPowell is offline Senior Member
    Join Date
    Dec 2009
    Posts
    224
    Rep Power
    3

    Default

    Try the following code for Connection of Java applications to Database, it uses JDBC driver for connection.


    import java.sql.*;
    class javatooracle
    {
    public static void main (String args []) throws SQLException
    {
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());

    Connection con = DriverManager.getConnection
    ("jdbcracle:thin:@hostname:1526:mydb", "Hr", "Hr");
    // @IP address ortname:databaseID, userid,password

    Statement stmt = con.createStatement();
    ResultSet rset = stmt.executeQuery("select * from SYS.V_$VERSION");
    while (rset.next())
    System.out.println (rset.getString(1));
    stmt.close();
    }
    }

  3. #3
    MoralesMyers is offline Senior Member
    Join Date
    Dec 2009
    Posts
    202
    Rep Power
    3

    Default

    JServer:

    The oracle record helps to the java programmer a tool JServer hasten or which speeds up the code execution of java applications.

    Configuring JServer:

    1. Make sure, your instance must be started with more than 20M
    of java_pool_size and 50M for shared_pool_size space for this configuration

    2. Run the $ORACLE_HOME/javavm/install/initjvm.sql file as well as the sys account.

    3. Type the statement given below:

    SQL> GRANT JAVAUSERPRIV TO SCOTT;

    Now "scott" user can use this advantage to run the script regarding JVM and follow the "Oracle Migrations Guide" to understand more about this.

Similar Threads

  1. Database .NET
    By Izaiah Lopez in forum Download Tools and Softwares
    Replies: 0
    Last Post: 10-20-2010, 06:54 PM
  2. Database Normalization in SQL Database
    By Millerjames in forum Programming
    Replies: 1
    Last Post: 01-23-2010, 03:17 PM
  3. Database
    By adlina in forum Everything Else
    Replies: 0
    Last Post: 03-23-2009, 11:21 AM
  4. Database
    By MACONAQUEA77 in forum Everything Else
    Replies: 0
    Last Post: 03-21-2009, 09:51 AM
  5. DataBase
    By niks54 in forum Everything Else
    Replies: 0
    Last Post: 01-21-2009, 12:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48