Read/Write Oracle database

Hello all,
I was thinking about having a look at reading from and writing to tables in an Oracle DB.
Immediately I thought about using JCA, but then started thinking... Is JCA only a method of running RFC enabled functions? I used JCo before to connect to R3 and run an RFC enabled function to read from tables. Since Oracle is a DB I'm assuming that it doesn't have functions to be run, just tables to be read/written.
So then I'm thinking JDBC. Is this the way for me? I know that using JDBC will require that I have access to Oracle JDBC drivers, are these freely available or proprietary?
Do any of you have experience with this? It sounded as though it would be so straight forward at first....
As always, any help is greatly appreciated.
P.

Hi Patrick,
you can use JCA as well as JDBC. In my eyes the JCA way is a bit anti-standard, because most frameworks doing persistance stuff for you use JDBC, so it's the more natural way; at least, if you won't ever change the fact that you are accessing a DB (and won't retrieve data some day via another kind of EIS). Anyhow, even JCA uses JDBC if the EIS is a DB...
For the JCA way, there have been some examples here on SDN in December, it's a pity, I don't find them anymore. Anyhow, I didn't find them very intuitive.
For JDBC, see for example this topic: How to retrieve data from a MSSQL?
If you have Oracle, you also will have Oracle Drivers. Alternatively, you can use the SAP Oracle Drivers, see Configuring JDBC Driver for JDBC System
Hope it helps
Detlev

Similar Messages

  • Questions about 1Z0-047 Oracle Database SQL Expert

    I am planning to take this exam and I have several questions:
    1) I am using Steve O'Hearn's 'SQL Certified Expert Exam Guide' book and this states the following about SQL functions:
    "Be sure to review the Oracle Database SQL Language Reference Manual and review the lengthy description of all of the SQL functions before taking the exam"
    In trial tests it seemed that book's information was enough, but how about real exam? Is it necessary to study something in addition to this book information? You can answer regarding other exam objectives as well, if there is something that I should read from some other materials.
    2) The book states that I can add not null constraint to column that has null values, if I specify default value. I tried and cannot, I get error. So the book states it wrongly or do I misunderstand something?
    3) The book states that I cannot drop a NOT NULL constraint, but I can get the job done using: ALTER TABLE table_name MODIFY column_name NULL;
    I tried and I can execute: alter table table_name drop constraint nameofnotnullconstraint;
    4) To use external tables, is only read grant on the directory necessary or also write?
    5) I understood from the book that to flashback table (e.g to before drop) I need to have row movement enabled on the table. But I tried and I can make this flashback operation to table that does not have row movement enabled. How can this be explained!
    Big thanks in advance!

    #1) well, the manual is free; find here the SQL Language Reference - http://www.oracle.com/pls/db112/portal.all_books#index-SQL
    #2 & 3) If you proved it yourself, that settles it!
    #4) Here's a good article about external tables: http://www.oracle-developer.net/display.php?id=512
    I noted this paragraph in it, which might answer your question:
    In addition to the standard read-write Oracle directory that we need for our external table, we also need an additional executable directory object for the preprocessor. This directory defines the location of the executables used by the preprocessor (we will be using gzip below). As far as Oracle is concerned, an executable directory is one that has EXECUTE privileges granted on it (this is an 11g feature specifically to support the preprocessor).
    #5) don't know

  • Information on Oracle Database 10g Administrator

    Hi,
    I have recently written OCA PL/SQL Developer exams (1Z0-007 and 1Z0-147) and cleared both the exams successfully.
    Now i wan to focus on DBA side, so i am planning to write Oracle Database 10g Administrator Certified Associate exams.
    After going through oraclle univeristy site for exam codes, i found that i need to clear 1Z0-007(ifi opt for it) in level-1.
    Since ive already given 1Z0-007 for PL/SQL Developer, so do i need to give the exam once again for Oracle Database 10g Administrator???
    Thanks in advance.

    Since ive already given 1Z0-007 for PL/SQL Developer, so do i need to give the exam once again for Oracle Database 10g Administrator???No. The one pass if good for both OCA tracks, so you only now need to pass 1z0-042 for your DBA OCA as you already have a 1z0-007 pass.
    (You would not be able to take it twice if you wanted too, as a successfully passed exam may not be retaken).
    Rgds- bigdelboy

  • Creat too many instance when writing an oracle database

    Hi
    I want to write Oracle database with database toolkits;
    but..i found there are too many instance or called session(exceed the upper limit) created when the program running .  that makes the Orace server stop responding
    Is there anything  i need to modify?
    Attachments:
    Oracle DB.vi ‏36 KB

    Frankly I have never seen this problem, but then I make a point of never using the database connectivity toolkit. Assuming a Windows platform, Windows implements something called connection pooling so when you "close" a connection the OS inserts it into a pool so If you ask for another connection it doesn't actually open a new one it just gives you back a reference to one of the ones you "closed" before.
    What OS are you running on?
    What version of Oracle?
    Is the instance of Oracle local or on another computer?
    How are you communicating with Oracle (odbc, oledb, etc)?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Read data from Excel and write into oracle database

    Hi
    I want  to know how can i read data from excel and write into oracle database using java.Kindly help me out to find a solution.
    Thanks and Regards
    Neeta

    Hai,
    I am suggesting the solution.
    I will try out and let u know soon.
    Make a coma separated file from your excel file.
    Assuming that your requirement allows to make a csv file.
    This file may be passed as an file object to be read by java.Using JDBC you must be able to populate the data base.You can also use String Tokenizer if needed.
    You do not want to  go via sql Loader?
    For reading the excel file itself do you want java?

  • Oracle database read and write?

    I want to see on the basis of the Oracle database table to read and write rates.How can I see

    A table can exists across multiple tablespaces. A tablespace can consists of several data files. Data files can be across multiple ASM diskgroups. An ASM diskgroup can consists of multiple LUNs. A LUN can comprise of several physical disks on the storage system.
    So what EXACTLY is the problem?
    What will a magic metric of "20 writes/25 reads" on the EMP table tell you? What would this mean and how would these numbers be applied to make the system better?
    In other words - you have come up with a solution that needs write/read rate on a table. You have not told us what problem this solution of yours will address. We need to know the problem - as a solution is only ever as good as the accuracy and detail of the problem description.

  • How to read\write text file into oracle database.

    Hello,
    I am having text file called getInfo in c:\temp folder. I would like to populate data from text file to data base. How to proceed. Could anybody help me out.
    Thanks,
    Shailu

    Here is a web page with easy to follow instructions regarding external files: http://www.adp-gmbh.ch/ora/misc/ext_table.html.
    Now I understand what all the excitement is over external tables.
    "External tables can read flat files (that follow some rules) as though they were ordinary (although read-only) Oracle tables. Therefore, it is convenient to use external tables to load flat files into the DB." -from the above link.

  • How to open a "manual" Physical standby database in read/write mode

    Hi,
    I am running Oracle Database 10g Release 10.2.0.3.0 - 64bit Production Standard Edition on Linux version 2.6.9-42.0.8.ELsmp ([email protected]) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-3))
    I've created a physical standby database, but since I am running Standard Edition, I am not using the DataGuard features. I use the rsync utility to copy over the archivelogs to the standby database, and I apply them periodically to the standby database.
    The standby database is started this way :
    startup nomount pfile='/u01/oradata/orcl/initorcl.stdby';
    alter database mount standby database;
    Everything runs perfectly fine, I can do "alter database open read only" and then I can do selects into tables to confirm that everything is up to date.
    The thing is, if I shutdown immediate the database, then do just startup :
    shutdown immediate;
    startup;
    The database opens with no error messages, but is still in read-only mode...
    I read that the default behavior for a standby database is to open read-only, like I am experiencing, but I would like to know what is the right way to open it correctly in read-write mode (I understand that after that, my standby will not be standby anymore and that I will have to recreate my standby database).
    Thanks,
    Mat

    Hello,
    There're features which allows you to open a Standby database in Read/Write mode but for all I know
    it needs Entreprise Edition.
    In Enterprise Edition you can use Logical Standby database. More over, for Physical standby there's
    a way by using flashback database so as to rolling backward the database and avoiding to recreate
    the Standby.
    In Standard Edition I'm afraid that you'll have to recreate your Standby database.
    Best regards,
    Jean-Valentin

  • Read from Oracle DB and Write to MySQL

    Hi All,
    I am fairly new to database administration, so please bear with me if this is something that is simple or not achievable at all -
    SetUp:
    I have an Oracle DB on one dedicated Server, to which I only have a read_only access.
    I have a MySQL database setup on a windows server 2008, both are on the company network and accessible to internal employees only.
    Problem Statement:
    I need to read certain tables from Oracle DB and push the records to MySQL database.
    I have a stored procedure which was doing this but from one Oracle Schema to another, which is running fine, now I need to use the same stored procedure but read from one database (Oracle) and write to another database (MySQL), is there a way to do this through the stored procedure, I know I can write a java program to do this, but need to do it through a stored procedure.
    Appreciate any help in this regards.

    c5b4a91d-d35a-43ba-ac96-6d1821541d33 wrote:
    Hi All,
    I am fairly new to database administration, so please bear with me if this is something that is simple or not achievable at all -
    SetUp:
    I have an Oracle DB on one dedicated Server, to which I only have a read_only access.
    I have a MySQL database setup on a windows server 2008, both are on the company network and accessible to internal employees only.
    Problem Statement:
    I need to read certain tables from Oracle DB and push the records to MySQL database.
    I have a stored procedure which was doing this but from one Oracle Schema to another, which is running fine, now I need to use the same stored procedure but read from one database (Oracle) and write to another database (MySQL), is there a way to do this through the stored procedure, I know I can write a java program to do this, but need to do it through a stored procedure.
    Appreciate any help in this regards.
    Start here:  http://docs.oracle.com/cd/E11882_01/server.112/e25494/ds_concepts.htm#i1007709

  • SGA size is 1 GB  free but oracle starts physical read/write,why ?

    Dear Friends ,
    In my production server I observe that it takes the the data from the HDD where my SGA is still 1 GB free .
    As far I know , In oracle , when the allocated SGA size is filled up then it reads the data from the HDD which is called "physical read/write " . I am using oracle 10g database . In performance tab(From Oracle 10g OEM) , when I see that oracle starts to read the physical data , at that moment I run the following query :
    select sum(bytes)/1024/1024 " SGA size used in MB"
    from v$sgastat
    where name!='free memory';
    and I found that still 1 GB memory are still free in the SGA .
    In this moment , I want to know , is it possible to start the physical read / write while the SGA size are still free ?
    Edited by: shipon_97 on Mar 24, 2009 10:45 AM

    shipon_97,
    Your understanding is wrong. From your previous posts it appears you never read the concepts manual.
    Begging on my knees PLEASE READ IT and stop asking doc questions.
    Sybrand Bakker
    Senior Oracle DBA

  • Free Report Writer for Oracle Database except Crystal Report and Data Vison

    Dear All,
    I want Free Report Writer for Oracle Database except Crystal Report and Data Vision software.
    Wr are working on Linux and windows both platform.
    Any one have direct link or website address for it ?
    Regards,
    Vipul Patel
    Ahmedabad

    Please check the following link -
    http://www.google.co.in/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=open+source+report+writer+for+oracle&meta=&btnG=Google+Search
    Regards.
    Satyaki De.

  • Determine database read/write statistics

    From the following (in Oracle documentation)
    DB_WRITER_PROCESSES parameter is useful for systems that modify data heavily. It specifies the initial number of database writer processes for an instance.
    And from the "Deployment Guide for Oracle on Windows using Dell PowerEdge Servers.pdf" in http://www.oracle.com/technology/tech/windows/index.html
    RAID LEVELS I have heard that it is for disks where datafiles reside the following is true
    If I/O is <= 90% reads, then it is advisable to go for RAID 10. If I/O is > 90% reads, then RAID 5 could be considered.
    I would like to know
    1. How do we find out whether our database is "read heavy" or "write heavy"? Are there are scripts available please?
    2. In commercial environments, what sort of RAID Levels are normally used for "read heavy and write heavy databases?
    Edited by: sandeshd on Oct 14, 2009 3:11 PM

    We were in a similar situation some weeks ago, we decided to make a trigger (logout) for saving the butes for a specific schema, you can work with this data importing it with Excel or something similar.
    DROP TABLESPACE BYTES_USUARIOS INCLUDING CONTENTS AND DATAFILES;
    CREATE TABLESPACE BYTES_USUARIOS DATAFILE
    '/oradata/oradata/ewok/bytes_usuarios.dbf' SIZE 1024M AUTOEXTEND ON NEXT 25M MAXSIZE UNLIMITED
    LOGGING
    ONLINE
    PERMANENT
    EXTENT MANAGEMENT LOCAL AUTOALLOCATE
    BLOCKSIZE 8K
    SEGMENT SPACE MANAGEMENT MANUAL
    FLASHBACK ON;
    +++++++++++
    CREATE USER B1
    IDENTIFIED BY VALUES %password%
    DEFAULT TABLESPACE BYTES_USUARIOS
    TEMPORARY TABLESPACE TEMP
    PROFILE MONITORING_PROFILE
    ACCOUNT UNLOCK;
    -- 1 Role for B1
    GRANT CONNECT TO B1;
    ALTER USER B1 DEFAULT ROLE NONE;
    -- 2 System Privileges for B1
    GRANT CREATE TABLE TO B1;
    GRANT CREATE SESSION TO B1;
    -- 1 Tablespace Quota for B1
    ALTER USER B1 QUOTA UNLIMITED ON BYTES_USUARIOS;
    ++++++++++
    CREATE TABLE b1.BYTES_USUARIOS
    USERNAME VARCHAR2(30 BYTE),
    SID NUMBER,
    SERIAL# NUMBER,
    MACHINE VARCHAR2(64 BYTE),
    LOGON_TIME DATE,
    CLS VARCHAR2(53 BYTE),
    NAME VARCHAR2(64 BYTE),
    VALUE NUMBER
    TABLESPACE BYTES_USUARIOS
    PCTUSED 40
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    grant all on b1.bytes_usuarios to system;
    ++++++++++++++++
    grant select on v_$mystat to system;
    grant select on v_$session to system;
    grant select on v_$statname to system;
    DROP TRIGGER SYSTEM.TRG_LOGOFF;
    CREATE OR REPLACE TRIGGER SYSTEM.TRG_LOGOFF
    BEFORE LOGOFF
    ON DATABASE
    DECLARE
    --VAR_CADENA VARCHAR(20);
    begin
    --VAR_CADENA := "%bytes%";
    --execute immediate '       
    insert into b1.bytes_usuarios (
    select
    ss.username,
    ss.sid, ss.serial#, ss.machine, ss.logon_time,
    decode (bitand( 1,class), 1,'User ', '') ||
    decode (bitand( 2,class), 2,'Redo ', '') ||
    decode (bitand( 4,class), 4,'Enqueue ', '') ||
    decode (bitand( 8,class), 8,'Cache ', '') ||
    decode (bitand( 16,class), 16,'Parallel Server ', '') ||
    decode (bitand( 32,class), 32,'OS ', '') ||
    decode (bitand( 64,class), 64,'SQL ', '') ||
    decode (bitand(128,class),128,'Debug ', '') cls,
    name,(value/1024/1024) from sys.v_$statname m, sys.v_$mystat s, sys.v_$session ss
    where
    m.statistic# = s.statistic#
    and (name like '%bytes sent%' or name like '%bytes received%')
    and ss.sid = (select distinct sid from sys.v_$mystat)
    end;
    ++++++++++++
    TODO
    select username, name, sum(value)
    from b1.bytes_usuarios
    group by username, name
    order by username, name
    SOLO bytes enviados
    select username, name, sum(value)
    from b1.bytes_usuarios
    where
    and name like '%sent%'
    group by username, name
    order by username, name
    SOLO bytes recibidos
    select username, name, sum(value)
    from b1.bytes_usuarios
    where
    and name like '%received%'
    group by username, name
    order by username, name

  • Write n then read xml from database to create graph in an applet

    Hi mates
    I have one problem I want show a trend(graph) from sql database which is having the records of about 8600 in a day. And i want to show a graph for a day
    but sometimes it gives a problem like out-of-memory, so can anyone tell me how i can get read of it.
    and other this can i use xml for this means first write a data in xml format from database then read it at sametime and show graph in applet
    can anytell me how to do it
    any suggesion is appreciable
    thanx

    Here's are two example for what you are looking for
    Re: Load xml data in Oracle table
    Re: insert .xml file into xmltype table?
    First you need to create a DIRECTORY object.  That is how Oracle works and it expects a DIRECTORY object instead of a physical path when performing operations that read/write from disk.  The directory path provided to the CREATE DIRECTORY command must be a directory that the machine Oracle DB resides on can see.
    Then you can go either of two routes.  You can INSERT that XML directly into a table, as shown in the second link I provided or you can read it into PL/SQL as the first link shows.  Then in either case, you can use SQL to parse the XML for you.
    Depending upon your needs, you may get better performance if you insert the XML into a table as the second link shows, assuming the XMLType column is stored as SECUREFILE BINARY XML.

  • File read/write in Oracle JVM

    Are there any known issues around file read/write in Oracle JVM. I finally got around the issue of getting the error that says no permission is there by giving <<ALL FILES>> option, but still I don't see a file being created. Any help is appreciated.
    Code:
    try{
    fwriter = new PrintWriter(new FileOutputStream("debugLog.txt",true));
    } catch (IOException ioe) {
    System.err.println("IO Exception for Output File" + ioe.getMessage());
    Thanks.
    -Mujib

    A couple of suggestions:
    1. (Please don't be offended...) I assume you have some stuff like:
    fwriter.println("hello");
    fwriter.flush();
    fwriter.close();
    in your try block?
    2. Try catching FileNotFoundException and SecurityException also.
    3. Try providing a full path on the file just to make sure it's not buried somewhere odd.
    John H.

  • Oracle coherence first read/write operation take more time

    I'm currently testing with oracle coherence Java and C++ version and from both versions for writing to any local or distributed or near cache first read/write operation take more time compared to next consecutive read/write operation. Is this because of boost operations happening inside actual HashMap or serialization or memory mapped implementation. What are the techniques which we can use to improve the performance with this first read/write operation?
    Currently I'm doing a single read/write operation after fetching the NamedCache Instance. Please let me know whether there's any other boosting coherence cache techniques available.

    In which case, why bother using Coherence? You're not really gaining anything, are you?
    What I'm trying to explain is that you're probably not going to get that "micro-second" level performance on a fully configured Coherence cluster, running across multiple machines, going via proxies for c++ clients. Coherence is designed to be a scalable, fault-tolerant, distributed caching/processing system. It's not really designed for real-time, guaranteed, nano-second/micro-second level processing. There are much better product stacks out there for that type of processing if that is your ultimate goal, IMHO.
    As you say, just writing to a small, local Map (or array, List, Set, etc.) in a local JVM is always going to be very fast - literally as fast as the processor running in the machine. But that's not really the focus of a product like Coherence. It isn't trying to "out gun" what you can achieve on one machine doing simple processing; Coherence is designed for scalability rather than outright performance. Of course, the use of local caches (including Coherence's near caching or replicated caching), can get you back some of the performance you've "lost" in a distributed system, but it's all relative.
    If you wander over to a few of the CUG presentations and attend a few CUG meetings, one of the first things the support guys will tell you is "benchmark on a proper cluster" and not "on a localised development machine". Why? Because the difference in scalability and performance will be huge. I'm not really trying to deter you from Coherence, but I don't think it's going to meet you requirements when fully configured in a cluster of "1 Micro seconds for 100000 data collection" on a continuous basis.
    Just my two cents.
    Cheers,
    Steve
    NB. I don't work for Oracle, so maybe they have a different opinion. :)

Maybe you are looking for

  • Significance of Global_names parameter in Oracle CDC and Oracle Streams

    Hi, I am trying to implement a sample Oracle CDC example. I read in some examples that we need to set a parameter *'global_names= TRUE'*. (which means that all dblink names should be same as their respective database names) But my doubt is that what

  • Adobe forms Button

    Hello expert, II am using adobe interactive form in correspondence ! the  form is filled by the system and send it to the user by mail ! My question is : With adobe reader is possible to use a button with a code behind ( javascript for launch a URL f

  • MySQL 5.0.24 and KPlaylist

    I've been running a KPlaylist site for quite awhile without any troubles.  The MySQL 5.0.24 upgrade seems to be incompatible with KPlaylist.  (See this thread for details.) Is anybody else seeing this? Darin

  • What is best ASIO card for CC for radio station, windows 7 64 bit?

    We are broadcast radio station switching to Windows 7 64 bit computers, running trial version of Audition CC as replacement to our current Audition 3.  Our used sound card is skittish, looking to buy new in two machines.  Currently, recording is unre

  • Getting error CJS-00084 SQL Statement or script failed while creating a DB

    Hi All, I ma trying to install IDES CRM 4.0 with Oracle DB and process went fine till the point of central instance installation. I am at the final step of installing the database instance and got an error while it is performing different steps of it