Best way to retrieve data from oracle?

Hi,
I have a few questions.
1.)Can a rowtype or a table type returned from oracle database can be retrieved as a dataset or datareader?
2.)Cursors generally slow down your db(Iam from microsoft sql server back ground). But we seem to be using ref cursors quite a lot here.The only way to return a result as far as i have seen in oracle is to use a ref cursor.Is there any other way?

Hello,
1.)Can a rowtype or a table type returned from oracle database can be retrieved as a dataset or datareader?
I'm not sure how complex your "table types" are -- do you mean PL/SQL Associative Arrays (formerly knowns as "index-by" tables)?
I believe that %rowtype is a PL/SQL'ism that does not work outside of PL/SQL.
However, the 11g version of the provider introduced User Defined Types (UDTs) which may be helpful depending on your requirements, etc.
2.)Cursors generally slow down your db(Iam from microsoft sql server back ground). But we seem to be using ref cursors quite a lot here.The only way to return a result as far as i have seen in oracle is to use a ref cursor.Is there any other way?
Using a ref cursor is the way to return a result set from PL/SQL to a client. If you are not using PL/SQL then you would not use a ref cursor.
The .NET Developer Center has good information:
http://www.oracle.com/technology/tech/dotnet/index.html
Regards,
Mark

Similar Messages

  • What could be the best way to Export data from 11.5.8 instance to 12.1.2?

    Hi All
    What could be the best way to Export data from 11.5.8 instance to 12.1.2?
    Release: 11.5.8
    OS: Oracle Solaris on SPARC (32-bit) verison 9
    DB: 9.2.0.1
    Thanks in advance

    What kind of data you are looking to move?
    Database export/import is only supported for full database export/import and the application release should be the same on the source/target nodes.
    You can move the setup using iSetup or FNDLOAD.
    Thanks,
    Hussein

  • What are the different ways of retrieving data from Oracle8i

    What are the different ways of retrieving data from Oracle8i
    into my HTML page ?
    Is it JDBC and ODBC ?
    Is there any other way ?
    null

    Methods I tried,
    Applet using SQLJ/JDBC with JDBC drivers thin or Oci8,
    Oracle Web Publishing Assistant,
    HTP/HTF PL/SQL packages (if you have OAS 4.0)
    Webserver Generator of Designer 2000 (if you have OAS 4.0)
    Arun (guest) wrote:
    : What are the different ways of retrieving data from Oracle8i
    : into my HTML page ?
    : Is it JDBC and ODBC ?
    : Is there any other way ?
    null

  • How is the best way to read data from an iphone if you lost your itunes data after a crash?

    How is the best way to read data from an iphone if you lost your itunes data after a crash?

    How is the best way to read data from an iphone if you lost your itunes data after a crash?

  • What is the best way to transfer data from a PC to an iMac?

    What is the best way to transfer data from a PC to an iMac?

    If you know how to set up a computer-to-computer Ethernet network, then you can give that a try, but a hard drive will be faster than Ethernet unless you don't have a lot to transfer.
    Mac OS X 10.6 Help- Creating a computer-to-computer network

  • Best way to extract data from archived cube

    Hello Experts,
    Can anyone tell me best way to extract data from archived cube.
    Basically I am trying to pull all the data from archived cube and then load it into another brand new infoprovider which is in different box.
    Also I need to extract all the master data for all infoobjects.
    I have two options in my mind:
    1) Use open hub destination
    or
    2) Infoprovider>display data>select the fields and download the data.
    Is it really possible to extract data using option (2) if records are too high and then load it into another infoprovider in new system.
    Please suggest me the pros and cons for the two options.
    Thanks for your time in advance.

    Hello Reddy,
    Thanks a lot for your quick reply.
    Actually in my case I am trying to extract archived infocube data and then load it into new infoprovider which is in different system. If I have connectivity I can simply export data source from archived infocube and then reload into new infoprovider.
    But there is no connectivity between those two systems (where archived cube is and new infoprovider) and so I am left with the two options I mentioned.
    1) Use Open Hub
    or
    2) Extract data manually from infoprovider into excel.
    Can anyone let me know which of the two options is the best and also I doubt on how to use excel in extracting data as excel have limit of no.of records 65536
    Thanks
    Edited by: saptrain on Mar 12, 2010 6:13 AM

  • Is there a way to retrieve data from a water damaged ipod?

    my ipod got water on the inside, and it wont charge. when i plug it in, the image shows it as charging but its not. im guessing that there is a short circuit, do to he water. is there a way to retrieve data from my ipod?

    http://www.google.com/search?client=safari&rls=en&q=svae+data+from+water+damaged +iphone&ie=UTF-8&oe=UTF-8#hl=en&client=safari&rls=en&sa=X&ei=Wwy6TtCXG-n22gX-6t2 8Bw&ved=0CCEQvwUoAQ&q=save+data+from+water+damaged+iphone&spell=1&bav=on.2,or.r_ gc.r_pw.,cf.osb&fp=bd3772843da9910d&biw=1074&bih=704
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
     In Memory of Steve Jobs 

  • Retrieve data from oracle table, table name passed in runtime into JSP

    Hello All,
    I am new to JSP, i have a requirement,
    I need to retrieve data from oracle table, here table is passed at random. how to get the data displayed in JSP page.
    can any one help me in that
    thanks

    1) Learn SQL.
    2) Learn Java.
    3) Learn JDBC.
    4) Learn DAO.
    5) Learn HTTP.
    6) Learn HTML.
    7) Learn JSP/Servlet.
    8) Learn JSTL.
    9) Apply learned things and develop.
    Whenever you stucks, please come back and post the specific coding/technical problem here.

  • What is best method to retrieve data from two databases

    I'm writing a report that needs data from two sql databases. Not the same brand. Grouping and sorting fields come from both databases, so I can't just read one and retrieve data from the other. It seems to me I have to extract data from each data base using crystal reports, merge the two files using crystal reports and feed the merged file into crystal reports. I've not found a simpler or better method in the Crystal Reports documentation. Is there documentation about doing this process on the web site or with crystal reports documentation? My method seems cumbersome so I'm wondering if there is a better method.

    Jeffrey,
    A cheap and effective solution, for a periodic transfer would be using XML.
    If you have the DDL for all of the objects in the database, you can just duplicate it on whatever RDBMS engine you want, and then, extract the data, table per table into XML files from the target server, and then load the files into the target server.
    Otherwise, if you are going to do this in an ongoing basis, then, use SAP Replication Server. The best asynchronous, real time, heterogeous replication solution in the industry, exploited with a great deal of success by many critical mission financial applications with global topologies and sub second latency.
    My two cents.
    I hope they help.
    Regards,
    Jean-Pierre

  • Best way to transfer data from other computer

    I'm wondering what is the fastest, or most reliable way to transfer data from another computer to my G5. I've skimmed through manual for G5 and it seems to list several options, if I'm understanding it correctly.
    1. Using Airport Extreme
    2. Using Bluetooth
    3. Hooking up a local Ethernet connection
    4. Setting up a Firewall connection?
    I want to be able to transfer a completed iDVD project created on an iMac G3 to my G5 for burning the DVD. And which method (if any) will work with a non-Mac computer?
    Anyone know the advantages, disadvantages of the transfer methods?
    ccCarol

    If you have a high-speed connection, another easy & fast way to transfer files between computers is through AIM (AOL Instant Messenger).
    iChat has the same ability of transferring large files as AIM.
    http://docs.info.apple.com/article.html?artnum=150934

  • How is the best way to send data from local database into remote database ?

    Hi all,
    I need to send data from local Oracle database into remote oracle database. Both sites connected via 128 kbps frame relay connection.
    The sending need to be done once a week, can be done nightly.
    How is the best way to do this ?
    Thank you very much,
    xtanto

    How is the best way to do this ?How much are you planning to send?
    You can use COPY command. Ensure that you have valid database link between two databases.
    Available options are:
    create - creates a new table. errors out if the destination table exists.
    replace - drop the destination table and re-creates with data.
    insert - inserts data if the destination table exists.
    append– appends data into an existing table.
    use set arraysize 5000 -The arraysize specifies the number of rows that SQL*Plus will retrieve from the database at one time.
    copy from scott/tiger@ORCL to scott/tiger@ORCL92 create new_emp using select * from emp;

  • What is the best way to save data from GPIB Device in a file?

    HI!
    I have a Keithley SourceMeter and want to save readings in a File along with settings on the front panel and timestamps plus several other infos. What is the best way to do this? Which file type? Any recommendations or hints could help me?
    Thanks

    Hi Andy,
    There are 3 main file formats that you can consider writing your data out to in LabVIEW:
    ASCII
    Binary
    Datalog
    ASCII
    ASCII files are useful because every operating system and almost every application can read/write ASCII format files. Use ASCII files when:
    Other users or applications will need to access the data file.
    You will not need to perform random access file I/O
    File I/O speed is not crucial
    Disk space is not crucial
    Examples within LabVIEW Example Finder: Fundamentals >> File Input and Output >> Write to Text File.vi and Read from Text File.vi
    Binary
    Binary byte stream files are more specific to data storage and retrieval. Use b
    inary files when:
    File I/O will remain in LabVIEW only -- no other applications will be needing to write/read that file. There is no standard formatting for binary files and thus other applications or operating systems may be unable to read the file.
    Files are smaller than ASCII files
    Easier and faster random access to data
    Examples within LabVIEW Example Finder: Fundamentals >> File Input and Output >> Write Binary File.vi and Read Binary File.vi
    Datalog
    When to use datalog:
    If you need to record data with a mixture of types, it can be cumbersome to convert everything to ASCII or to keep track of the binary formatting.
    Datalog format is binary and internal to LabVIEW, so again only use this format if no other applications or operating systems will be needing to perform file I/O on the file.
    Examples within LabVIEW Example Finder: Fundamentals >> File Input and Output >> Write Datalog File
    Example.vi and Read Datalog File Example.vi
    Good luck!
    Kileen C.
    Applications Engineer
    National Instruments

  • Best way to sync data from temp database back to primary one?

    Hello all!!
    I'm trying to figure the best way to remedy this situation.
    I have a RAC cluster...and one instance went down...some problems with all nodes running, etc. Anyway, while working with Oracle support, I was able to get one node up with sqlplus, and I ran a datapump export, and move that file to a test server I have...as that this was the quickest solution, and I was able to get my developers up and running again on the new server.
    I've been working with Oracle support for weeks now...and now all instances on the main RAC cluster all seem to be up and running now.
    The trouble is...the instance that was 'moved' to the test server...has had a LOT of work on it in many of the schemas it contains. I need to move the developers back to the main unit where backups are taken and more horsepower for load testing, etc.
    What is the best way for me to sync the main server up with the changes made in these weeks on the test server.
    Would it be best to take a datapump export from the test box.....move it over to the main server, and basically then....truncate all non-system schemas and just import from the test server (with changes) back onto the main server?
    Any other suggestions?
    Thank you in advance,
    cayenne
    ps. Both main and test servers are same version of Oracle 11Gr2 RAC. No rman backups currently being taken on test server, not in archive log mode on test server.

    The trouble is...the instance that was 'moved' to the test server...has had a LOT of work on it in many of the schemas it contains. I need to move the developers back to the main unit where backups are taken and more horsepower for load testing, etc.What is the nature of the work? Cleaned and filtered data? New code/stored procedures/triggers/metadata?

  • Retrieve data from oracle table

    hi,
    i have uploaded a piece of xml format data in oracle and successfully uploaded but when trying to retrieve data it reterieve 0 records. Oracle version is given below:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    create table temp_loading_lob(
                                            xml_id varchar2(3),
                                            q_clob CLOB
    nologging
    create table temp_loading_xml
    nologging as
    select xml_id,xmltype( q_clob) q_xml
    from temp_loading_lob;
    XMl Data
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <Root xmlns="http://www.w3.org/2000/10/XMLSchema">
         <Accounts ApplicationVersion="7.2.1.6 (10-02-2012)" Database="Q" DateExported="20120813">
              <Account AccountID="QF8AA000">
                   <AccountName>124 On Brunswick Bed &amp; Breakfast</AccountName>
                   <Addresses>
                        <Address AddressID="aQF8AA000YMY">
                             <Description>Physical</Description>
                             <Address1>124 Brunswick Drive</Address1>
                             <Address2>Brunswick Park - RD 4</Address2>
                             <Address3></Address3>
                             <Suburb></Suburb>
                             <City>Rotorua</City>
                             <Postcode></Postcode>
                        </Address>
                        <Address AddressID="aQF8AA000WXX">
                             <Description>Postal</Description>
                             <Address1>PO Box 7365</Address1>
                             <Address2></Address2>
                             <Address3></Address3>
                             <Suburb>Te Ngae</Suburb>
                             <City>Rotorua</City>
                             <Postcode>3042</Postcode>
                        </Address>
                   </Addresses>
    </Accounts>
    </Account>
    </Root>
    Query used to reterive data
    select po.*
    from temp_loading_xml p,
         XMLTable('/Accounts/Account'
                   PASSING p.q_xml
                   COLUMNS
                      AccountID varchar2(20) PATH '@AccountID'
                      ,AccountName varchar2(20) PATH 'AccountName'                 
                                  )poi am trying to catch my error but unable to fix it. Any help will ge greatly appretiated. How can i close my thread?
    Best Regards,
    Zaid

    >
    <Root xmlns="http://www.w3.org/2000/10/XMLSchema">
         <Accounts ApplicationVersion="7.2.1.6 (10-02-2012)" Database="Q" DateExported="20120813">
              <Account AccountID="QF8AA000">
    </Accounts>
    </Account>
    </Root>
    >
    must be
    <Root xmlns="http://www.w3.org/2000/10/XMLSchema">
         <Accounts ApplicationVersion="7.2.1.6 (10-02-2012)" Database="Q" DateExported="20120813">
              <Account AccountID="QF8AA000">
    </Account>
    </Accounts>
    </Root>and add namespaces to xmltable
    32  select po.*
    33  from temp_loading_xml p,
    34       XMLTable(
    35       xmlnamespaces(default 'http://www.w3.org/2000/10/XMLSchema')
    36       ,'Root/Accounts/Account'
    37                 PASSING p.q_xml
    38                 COLUMNS
    39                    AccountID varchar2(20) PATH '@AccountID'
    40                    ,AccountName varchar2(20) PATH 'AccountName'
    41                                )po
    42  /
    ACCOUNTID            ACCOUNTNAME
    QF8AA000             124 On Brunswick Bed
    SQL>

  • Best way to retrieve data for jsp

    Hi,
    I'm fairly new to java and am preparing to create some jsp's for our intranet. The pages need to include data from a db2 database. I know pretty much what I need to do, but I'm trying to decide the best(most efficient) way to retrieve the data to display. I've looked at a number of examples and the more I look, the more confused I get (it would be so easy on the AS400 which is my background so you can see how new this is to me). I see my options as: using an 'include' statement to include another java file that retrieves the data; or use a java bean; or just instantiate an instance of the class and 'call' the methods for that class directly; or lastly, place all the code directly in the jsp to connect to the database and query the table.
    What's the real difference between these options and what's usually the most efficient and preferred way?
    Thanks for any advice and clarification.

    As a general rule, it's a good idea to separate the
    presentation (JSP and HTML) from the business rules
    (database access). I know you didn't do that on the
    AS/400, you had display files and business logic in
    the same program (at least, we certainly do in ours),
    but it's a good policy to follow in the web world.
    That means, don't put your database access code in
    the JSP. Other than that, it depends on the data.
    If you have simple data (e.g. customer's name and
    d address) then a Java bean would suffice. If you
    have complex data (e.g. customer's payment history)
    then a bean still might suffice. You would use an
    "include" if you had some data (static or dynamic)
    that you wanted to appear in several different pages
    in the same form.Thanks, I figured putting the code in the JSP was not the best way, but I wasn't sure about the other options.

Maybe you are looking for

  • Is there a way to set off contra amounts for vendors and customers?

    Hi i would like to know whether there is a way in B1 to set off the contra amounts for a business partner who is both a customer and a vendor in B1? If so how?

  • Transferring / Upgrading license - Acrobat Std.

    I purchased and registered Acrobat Standard X in July 2012. In August last year I upgraded to version XI. My Adobe page only lists the serial number for Version X. I now have a new laptop and want to install Acrobat Std.. I can now only download vers

  • App.xml in Tomcat 5.0

    Hi, I am trying to auto extract the war file in Tomcat if war file is loaded other than webapps directory. I created app.xml in ${catalina.home}/conf . Here is my app.xml <?xml version="1.0" encoding="ISO-8859-1"?> <webapps> <context> <path>"/VApp"</

  • IPad free space fragmentation

    I'm wondering how to defragment the free space on the iPad's solid state (i.e. NAND flash) drive?  The reason I ask, is that I've found that the more I use my iPad 2, the slower it gets (even after a restart).  When my Ipad 2 had 1.5 GB of "disk" spa

  • Webcam sound problems!!

    while using webcam to talk to my aunt, she can only see me  but I can see and hear her....no sound on her end.  Her speakers work for other sounds like internet games and stuff like that. We both have HP laptops with built-in webcams.  I have used my