Acess to oracle

Hi I tried to get acess to oracle using the following code but when I tried to run it I got the following error message and I do not know why:
D:\>javac dbAccess.java
D:\>java dbAccess
Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.
OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:130)
at dbAccess.main(dbAccess.java:9)
==================================================================
import java.sql.*;
import java.util.*;
class dbAccess {
public static void main (String args []) throws Exception
//DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@localhost:1516:ORAL", "name", "ps");
// @machineName:port:SID, userid, password
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select id from sample_table");
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
stmt.close();
}

// Test of Oracle JDBC/OCI connectivity
// import the java.sql package to use JDBC
// need to set classpath to /jdk1xxx/jre/lib/ext/classes12.zip;.
// to run
Hope that helps.

Similar Messages

  • Equivalent of dateadd(MS Acess) in oracle

    I want the equivalent of
    (DateAdd("s",[OBJ_M_DOCUMENTS.M_DOC_N_DATE],"12/15/1970")) which is Acess in oracle.
    [OBJ_M_DOCUMENTS.M_DOC_N_DATE] is the column name.

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#i48042

  • Live migration (Data transfer) from MS-Acess to Oracle? please look.

    Dear Members,
    we have our buses GPS system installed, the application gives data in to MS-Access. based on satellite movement once it catches our devices installed in Buses it produces a current position record the current place (GPS software used world places and give names of each small town),speed, etc there is upto 10 columns.
    i'm looking for the possibility of extracting two fields from that Ms-access table current place,speed into my Oracle database, that should be live transfer, means when ever a record stores into Ms-access i want this to be saved in Oracle too.
    actually they have a option SQL-server too, but i dont want to go SQL Server and already we are using Oracle 8 for all other operations. they (GPS software company)dont have an option or drivers to be integrated to Oracle.
    Please.. any ideas..
    thanks in advance

    If there is no primary key and no timestamp, I don't know how you would go about pulling only new records cheaply. The only thing I could think of would be to have a where not exists clause in the select statement, i.e.
    SELECT access.column1, access.column2
      FROM tableName@AccessDatabase access
    WHERE NOT EXISTS (
        SELECT orcl.column1
          FROM oracleTableName orcl
         WHERE orcl.column1 = access.column1
           AND orcl.column2 = access.column2 )which would obviously be an expensive query to issue repeatedly. Can you add a timestamp or some such to the Access table?
    Justin

  • Migrating MS access database to oracle

    hi
    Please let me know what are the steps to follow to migrate data from MS acess to oracle or any other databases tell me the steps one by one right from loadiing migration assistant etc

    Hello,
    To download and install the Oracle Migration Workbench and MSAccess plugin, you should select the downloads page from the following URL:
    http://otn.oracle.com/tech/migration/index.html.
    The download page will give you full details on how to install the product correctly (it is very easy to do this!).
    Once you have installed the product, you can access the user guide and reference guide from the Help menu option wothin the product. These documents (especially the user guide) will bring you through a successful migration step by step.
    The URL above also contains links to many other sources of information on migrations and you may find some of these useful.
    I hope this helps,
    Tom.

  • User Acess

    All,
    Is there a way that we can grant the select acess on oracle 9i table to the user with column(s) restriction?
    I have to restict the sensitive data access from some users. Please advice.

    Prior to 10g, you cannot hide individual columns using VPD. Assuming you are stuck on 9i (note that specifying the actual version rather than the marketing label may help because there may be differences between 9.0.1.x and 9.2.0.x), your only realistic option would be views.
    I'm not sure what you mean when you say
    "If i create a view with out thse columns that doesn't get updated by my daily imports.in order to do that , i need to do lot of scripting changes which is a big pain"
    Your batch loads should be able to continue to write directly to the base table and should, presumably, be able to see all the columns. It is only users that need to query the data and see a subset of columns that would need to run their queries through a view. And setting up appropriate synonyms may limit or eliminate the need to make code changes, assuming your code doesn't hard-code schema names.
    Justin

  • Reading foxpro dbf files from forms6i

    hi all,
    can anyone tell me how can i read a dbf file and access data from that.
    Thanks
    Uday

    Exec_Sql Package allows you to acess non Oracle Database
    You will have to follow following steps as follows:-
    1-First Find OCA.PLL and EXEC_SQL.PLL libraray.
    2-Attach Both libraries to ur concerned Forms.
    3-Create VFP odbc driver.
    3-Create a Button to write follwing codes on WHEN-BUTTON-PRESSED trigger or u can write
    these code on any Trigger as you required.
    Decalre
    conidodbc exec_sql.conntype;
    B varchar2(100);
    C varchar2(100);
    curid exec_sql.cyrstype;
    sqlstr varchar2(1000);
    nres pls_integer;
    Begin
    --This exec_sql.open_connection Procedure connect your 
    --non Oracle Database through ODBC Driver
    coniidodbc:=exec_sql.open_connection
    ('scott/tiger@odbc:yourodbcdivername');
    --exec_sql.opne_cursor return the curid of your non
    --Oracle Database
    curid:=exec_sql.opne_cursor(conidodbc);
    --It is Your non Oracle Database Statement follow there
    --Syntax rule of your non Oracle Database Syntax
    sqlstr:='Select A from yourdbffilename ';
    --exec_sql.Parse procedure parse your Stement to non
    --Oracle Database
    exec_sql.Parse(connidodbc,curid,sqlstr,exec_sql.V7);
    --After succesful Parsing it Executes your Ststment
    nres:=exec_sql.execute(conidodbc,curid);
    --exec_sql.Define column mapping for your local
    --variable to Non Oracle Database Column
    exec_sql.Define column (conidodbc,curid,B,30);
    while (Exec_Sql.fetch_rows(conidodbc,curid)>0)
    loop
    --Exec_Sql.column_value intiliaze your Non Oracle
    --Database to your Local Variable
    Exec_Sql.column_value (conidodbc,curid,1,B);
    C:=B;
    message('C value '||C);
    end loop;
    End;
    --Rest Explanation About Exec_Sql Package Find Help in
    --You Forms Still If any Problem then add me on MSN my id
    --is [email protected] may be I can help you more
    Thanks
    Khurram Siddiqui

  • Urgent: java.sql.SQLException: Protocol Violation

    Hi,
    I have Apache Web server installed and i've been acessing an Oracle 8i Database. Everything was working ok, but at some point when trying accessing the database it gave me this error, java.sql.SQLException Protocol Violation. I've revewied all the classes, classes111.zip to classes12.zip (i supposed this could be one of the causes) in the Apache Jserv configuration files, but i might be doing something wrong, or maybe this is not the problem. I would like to know, what this error is about, and how can i solve it? Maybe i have the solution, but not solving it right.
    I thank you all in advance
    Nuno Rodrigues

    Of course I did...I am sorry, I forgot to say I am using classes12.zip package (in my classpath) in JRE version 1.2.2
    Do you have any other idea or suggestion?
    Do I need any kind of particular setting or check on DB machine to get the connection?
    Calling Application is running under NT os, while Oracle8i 8.1.7 is on HP machine
    Regards,
    GG

  • System error in program SAPLRRK0 and form RSRDR;SRRK0F30-01-

    Hi
    when i execute the query on remote cube we are getting the error like below
    System error in program SAPLRRK0 and form RSRDR;SRRK0F30-01-
    We have Remote cube acessing the oracle views through ud connect .Can any one please let me know whats the issue is ?.we are using BW3.5 PATCH LEVEL 15…

    Hi,
    see that there is master data deletions..  if so how did you delete the master data.. then  check   RSRV to analyse and repair your infocube
    or    tablespace problem (PSAPTEMP),  check with basis.
    check transaction sm21, there may contains tablespace name. ask your basis to fix the tablespace PSAPTEMP problem. after that you should be able to execute the report
    or Go to ST22 and check the shortdumps ( few) and follow the debugger to know the actual cause... it   could be errors in the info object mapping ....

  • 32bit and 64bit apps side by side on win64?

    Hi!
    I've got two applications, one, which accesses the registry needs to be 64 bit and the other, that is a COM dll, needs to be 32 bit. Both are acessing an oracle database.
    Is this possible?
    I've just today stumbled over this problem and am a bit at a loss. :-(
    The database is 11gR2 and runs on Linux on a different server.
    I'm relatively free to use any ODP.NET version that can make this possible.
    Lots of Greetings!
    Volker

    Hi,
    Yes you can run your 32 and 64-bit applications side by side. You will need to install both the 32 and 64-bit oracle client as well as the required data access driver for each application in separate oracle homes. The only gotcha is if these applications are running as a hosted applications within IIS, you will need to be sure you are on a version of IIS that allows you to configure separate application pools for 32 and 64-bit worker processes. i.e IIS 7.0. IIS 6.0 allows you to configure worker processes for 32-bit on x64, but it has to be one or the other. You cannot use both at the same time. See the following: http://support.microsoft.com/kb/894435. If you are running IIS 7 then you can configure separate application pools for the 32 and 64-bit apps. If you are running IIS 7 then its easy to configure the application pool for your 32-bit hosted app to enable 32-bit support by setting a property of the app pool.
    HTH
    Jenny

  • ORACLE_HOME from inside java

    Does any one know hoe to acess the oracle home env variable from inside java.
    Sunil.

    You cannot, your best bet is to set a system property i.e.
    java -Doracle.home=$ORACLE_HOME myclass

  • Easiest to migrate MS Acess application to Oracle forms/reports

    Hi,
    I have one application in MS Acess I want to migrate it to Oracle forms 10g, is there any easy way to do this job starting from schema creation upto front end.
    Thanks and Regards, Khawar.

    I had a access database solution, but no forms in it, so maybe that was different from yours.The solution I used was:
    Made a button in an access form, and from that buttons event:
    1: Queried all TableDefs of the database
    2: Queried all Columns of each table
    3: Made Create-scripts for those objects (of course substituted the datatypes to an oracle equalient)
    4: Run those create scripts against the OraDB
    That took approx ½-1 hour of coding, but it was faster than creating all the objects from scratch.
    I saw some Non-free software that promised to do this for me, but I don't think any software can convert an Access form to an Oracle Form (if that's what you seek).
    One I found at: http://www.hxtt.com/access2oracle.html (still I think it's only the tables you can migrate)
    Regards,
    Botzy

  • Plz help to to transfer excel or acess data to Oracle 10g database

    Plz help me to transfer excel or acess data to Oracle 10g database.
    I have excel and acess sheet data here i wanna transfer it to oracle database. Plz guide me how to this
    Message was edited by:
    user582212

    There are several ways, such as ODBC or migration workbench, which is also mentioned in the current article on sqldeveloper on OTN, here's the link. If you use this forum's search function, you should find several threads regarding this topic.
    C.
    Message was edited by:
    cd

  • Oracle Retail Allocations - User Acess

    Hi,
    I'm having trouble finding information about the diference between a Administrator User or a User User (you can define a user as being Administrator (A) or User (U)).
    I've search in all the documentation about Orallocs and the only thing that I found was that DAS controls the definition of this users, and the privileges that each have, but only for the DAS application.
    Can you help me with this issue? What's the difference for the Orallocs aplication when you are a defined as a 'A' or 'U' user. (This definition appears in the ALC_USERS table).
    Regards,

    This is a Documaker community forum. Perhaps you should be posting your question in one of the retail application forums. You can search for Oracle community forums as shown below.

  • Acessing applicaion developed in Oracle XE via web browser.

    I created a application with APEX 4.0.2 in Oracle XE.
    How do my users access this application via the web browser?

    On local machine you can use
    http://localhost:8080/apex/f?p=YOURAPPLICATIONID
    To use from the network you first need to run on SQL Plus with Sys user
    exec dbms_xdb.setListenerLocalAccess   (l_access => FALSE);Then you will be able to use it using
    http://youIP:8080/apex/f?p=YOURAPPLICATIONID
    Thanks
    Habib

  • Doubt about Oracle Acess Manager Identity System

    Hi , I have a doubt about the identity system , when I configure the Identity System to use the Data Anywhere where the user is create when I create one in administrative console ? as I know the Data Anywhere is managed by OVD.
    Thanks.

    And I could connect to the database.With which tool?
    >
    I wanted to mimic the connection to another system by just copying the c:\oracle folder. The connection was established and works fine.What type of client installation is this? Can you cross check in inventory/logs?

Maybe you are looking for

  • Excel file with numbers on ipad.

    I sent an excel file with numbers to my ipad.  When I open it with Numbers there is no data in the cells.  HELP!!

  • Audio no longer working after upgrade

    Hi, After doing an upgrade this morning, my audio no longer works. Booting into KDEmod gave the first clue when I got an error message saying audio not found. The output of alsamixer say "alsamixer: function snd_ctl_open failed for default: No such d

  • HELP ME lock problem

    OK... i got my phone locked up and i dont know how to unlock it... the i phone says "iphone disabled,,,connect to itunes".. so i tried that but itunes says it wont load up unless i can get the password . PS.the lock screen goes directly to emergency

  • SSL implementation not available ... Help!

    Using WLS 7.0 SP2 on HP-UX and when attempting to establish an outoing SSL connection I receive an "SSL implementation not available" exception. In the International version of WLS 7.0 I am able to establish the SSL connection, but when the same appl

  • Disc stuck in cd drive

    I didn't know the small dvds I use for my camcorder wouldn't work in the cd drive and foolishly tried to insert one in. What was I thinking....? Now of course I can't get it out. The closest Apple store is two hours away, but is that my only option f