How can you SELECT via Database Link CLOB data using Application Express?

Customer Issue:
Developer using Oracle's Application Express 3.1. The Developer is trying to SELECT a CLOB datatype column from a remote (10.2.0.3) database, via a database link on her 10.2.0.4 based client Application. The Developer wants to be able to select CLOB data from the remote database which has limitation that she can't make any changes to the remote database.
Developer's Comments:
I do a select and get the error. Getting error ORA-22992: cannot use LOB locators selected from remote tables. So she feels she can't use dbms_lob.substr in this configuration I can do a "select into" but that is for one value. I am trying to run a select statement for a report that brings back more than one row. I do not have permission to change anything on the remote database. I want to access the remote database and multiple tables.
This is not something I work with, would greatly appreciate help or ideas. Is this a limitation of the 3.1; or does she just not have this set up correctly; or should she be using a Collection (if yes, please share example)
Thanks very much,
Pam
Edited by: pmoutrie on Jun 4, 2009 12:01 PM
Hello???
Would really appreciate an answer.
Thanks,
Pam

This may not be a perfect solution for you but it worked for my situation.
I wanted to grab some data from Grid Control's MGMT$JOB_STEP_HISTORY table but I couldnt' create an Interactive Report due to the existance of a CLOB column. I cheated this by creating a view on the GC DB, grabbing the first 4000 characters and turning it into a varchar2 column:
create view test_job_step_history as
select job_Name, target_name, status, start_time, end_time, to_char(substr(output,1,4000)) output
from MGMT$JOB_STEP_HISTORY where trunc(end_time) > trunc(sysdate)-90
In an APEX Interactive Report:
select * from test_job_step_history@GCDB
Granted, the output looks aweful right now but I am only looking for a very particular output (failed, denied, ORA-, RMAN-, etc) so the formatting isn't the most important thing to me right now.
If anyone can improve -- and I'm sure you can -- on this I'd love to hear about it.
Thanks,
Rich

Similar Messages

  • How do you close a database link in Apex?

    How do you close a database link in Apex that is referenced in an interactive report on Page 1? I want to make sure the database link is closed before a user navigates to another page in the Apex application.
    Lets assume the database link is referenced in the region source for Page 1 as follows:
    Page 1 - Employee Listing
    Region Source:
    select ename, job, hiredate
    from scott.emp@link1
    Any suggestions are appreciated.
    Ms. H

    John,
    I figured out how to eliminate the ORA-02020 and ORA-02081 errors. The solution is reference below:
    1. Create an interactive report in a page.
    2. Add the SQL statement in the region source as listed below:
    SELECT ENAME, JOB, HIREDATE
    FROM SCOTT.EMP@DBLINK
    WHERE (UPPER(ENAME) LIKE '%' || UPPER(:P1_TEXT_SEARCH)||'%')
    Conditional Display
         Condition Type:
    PL/SQL Expression
         Expression 1
         :P1_TEXT_SEARCH IS NOT NULL
    3. Add a search button and text search field as items on the page.
    4. Create a process in the page to check the cursor and catch an exception as listed below:
         Name: CHECK_CURSOR
         Sequence: 30
         Point: On Submit - After Computations and Validations
         Type: PL/SQL Anonymous Block
         PL/SQL Process:
         FOR C1 IN (SELECT ENAME, JOB, HIREDATE
         FROM SCOTT.EMP@DBLINK
    WHERE (UPPER(ENAME) LIKE '%' || UPPER(:P1_TEXT_SEARCH)||'%'))
         LOOP
         IF C1.ENAME IS NOT NULL
              THEN
              HTP.P('Employee Name: '||C1.ENAME||' ');
              END IF;
         END LOOP;
         EXCEPTION
              WHEN NO_DATA_FOUND
              THEN
              APEX_APPLICATION.G_PRINT_SUCCESS_MESSAGE := 'No Data Found Error';
              WHEN OTHERS THEN
              APEX_APPLICATION.G_PRINT_SUCCESS_MESSAGE := 'Unexpected Error';
    Conditional Processing
    When Button Pressed (Process After Submit When This Button is Pressed)
         P1_SEARCH_DATA
    5. Create a process in the page to close the database link as listed below:
         Name: CLOSE_DBLINK
         Sequence: 40
         Point: On Submit - After Computations and Validations
         Type: PL/SQL Anonymous Block
         PL/SQL Process:
         COMMIT;
         EXECUTE IMMEDIATE 'ALTER SESSION CLOSE DATABASE LINK DBLINK';
    Conditional Processing
    When Button Pressed (Process After Submit When This Button is Pressed)
         P1_SEARCH_DATA
    6. Apply changes, run the page, and conduct a test.
    I hope this solution is helpful to others.
    Ms. H

  • How do you create a database link in Forms9i

    I am writting and application that is to connect to multiple databases and do given task, but the triggers I assign to items only work in the database that you connect to for forms to run.
    How do you create a database link in Forms9i?
    Thank you in advance for your reply.
    Travis

    It seems like you will have to have database links set up in all your databases to point to all other remote databases and have a common global naming scheme for all your objects so that no matter what database you log into you will have access to all objects in the universe.

  • How can you utilise the 30 pin VGA adapter used on the iPad 3 and iPhone 4S on the iPad 4 which uses a lightning connector?

    How can you utilise the 30 pin VGA adapter used on the iPad 3 and iPhone 4S on the iPad 4 which uses a lightning connector?

    See the following. Also take note below and from the linked page above that video mode is NOT supported:
    http://store.apple.com/us/product/MD823ZM/A/lightning-to-30-pin-adapter
    *Note below and from the linked page above that video mode is NOT supported*
    "This adapter lets you connect devices with a Lightning connector to many of your 30-pin accessories.* Supports analog audio output, USB audio, as well as syncing and charging. Video output not supported."

  • HT4211 how can you find out what kb are being used by what apps

    how can you find out what kb are being used by what apps there is always alot of kb being used even when I don't use my phone

    Go into settings , general, usage and it tells you what the apps use. If your refering to the memory storage of the apps.

  • HT4528 how can you select 1 photo from a shared photo stream and save it to your HD

    Can you select a single photo from a shared photo stream that some had sent me as I want to save and print the family photo?

    FAQ photo stream http://support.apple.com/kb/HT4486

  • How can i start oracle databases? i am using Oracle 8.1.6 for linux.

    when i run dbstart,it gives me following message:
    Database "ora4cweb" warm started.
    but when i use sqlplus,it says:
    ORA-01034: ORACLE not available
    i made a mistake ,i shutdown my linux before i shutdown oracle databases,how can i start oracle databases now?thanks in advance.

    try it without the scripts...
    login to linux as oracle
    start server manager
    svrmgrl
    connect internal
    startup
    select sysdate from dual;if that works
    exitcheck listener
    lsnrctl
    statif nothing running type
    start
    exitnull

  • How can you develop photo galleries with multiple pages using the web module?

    Going through the web module I can see there are many options for developing a web page with a single collection of photos.  How can you develop a web site with multiple pages containing different categories of photos using the Lightroom web module?

    This thread will give you several ideas.
    Re: How do you embed a gallery into an existing website?

  • How can you tell if a file is being used in your project or not?

    How can you tell if a file in your bin is being used in your project or not? My director dragged hundreds of reference files into my project and only used a few of them. I'd like to do some house cleaning and delete the ones that are not in use. This project file has 100 sequences in it, so it would be a tough manual hunt to figure this out.
    In Premiere Pro (or Flash for example), where all the information is in the Project Bin such as in/out times and duration, there is where it tells you how many times that piece of media has been used or if it hasn't been used yet.
    Can FCP tell me this info?
    Thanks for yout time!
    -Monty

    Monty,
    Within FCP, there is a menu item called "Media Manager" (depending on what version you are in). This would be worth your while to look into. It basically organizes your project by moving/archiving any used assets of a project and leaving out un-used assets. It saves a ton of disk space.
    For example, say you have a 5 minute clip with an in/out point that is just 30 seconds. Media Manager will "archive" just that 30 seconds, not the entire clip. There is even a setting that you can add additional "handles" time to the front andd back of the clip if you think you may need to add or change transition.
    Do a google search. I was just watching a few Youtube videos on this myself.
    Jonathan

  • How can I select columns from a table EMP, using Select statement?.

    Hi Friends,
    How can I select columns from a table EMP?.
    I want to select columns of EMP table, using select statement.
    Please reply me urgently.
    Shahzad

    Something like this:
    scott@DBA> select empno,ename,job from emp;
         EMPNO ENAME      JOB
          7369 SMITH      CLERK
          7499 ALLEN      SALESMAN
          7521 WARD       SALESMAN
          7566 JONES      MANAGER
          7654 MARTIN     SALESMAN
          7698 BLAKE      MANAGER
          7782 CLARK      MANAGER
          7788 SCOTT      ANALYST
          7839 KING       PRESIDENT
          7844 TURNER     SALESMAN
          7876 ADAMS      CLERK
          7900 JAMES      CLERK
          7902 FORD       ANALYST
          7934 MILLER     CLERK
    14 rows selected.Check the documentation:
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#sthref9697
    Message was edited by:
    Delfino Nunez

  • How can you select which pictures to upload from camera? plus facebook ?

    Is there any way to select which pictures from your digital camera you would like to upload on to iphoto? Or is the only way to upload all of the pictures on your camera? I have 214 pictures on my camera and 210 of them are already in iphoto...i only want to upload the new 4!
    Another question..
    I am trying to upload my pictures on to Facebook, and they are significantly smaller than the pictures I uploaded via my PC. How can I get them to upload at normal size?
    THANKS!

    Re: the FaceBook problem
    This sounds like you're uploading the Thumbnails that iPhoto uses to display the pics in the iPhoto Window not the pics themselves. Have you been uploading from the Data folder in the iPhoto Library Folder?
    There are three ways (at least) to get files from the iPhoto Window.
    1. Drag and Drop: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. File -> Export: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size.
    3. Show File: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.
    Regards
    TD

  • How can I know a database link target DB is dead?

    Hi,
    I have a question about using database link.
    If I create a public database link linkB from DB A to DB B. Then the DB B's storage fail and DB B is dead.
    When I use select * from tableB@linkB in one package with exception handler, it just hang and didn't jump to exception. How can I set a timeout value (like 15 secs) to this database link ??? or is there any method to detect the database link if alive then run the sql statement????
    Anyone knows??? thanks!!
    Regards,
    Miki.

    Thanks to NKU's answer.
    But, the inbond_connect_timeout seems to set in DB server, for a client to connect with the database server and provide the necessary authentication information.
    In my case, I don't know the target DB B is dead and my AP hang because it execute a query through DB link from DB A to DB B.
    If I can set a timeout value to DB link (create in DB A) or something else, I can have exception handler to process it not just wait a long time period. ^_^
    Best Regards,
    Miki.

  • How can i navigate via navigational link between views in different windows

    hello
    i am using CRM_UI and have opened a popup
    gv_transcr_popup is a attribute referrring to if_bsp_wd_popup in my implementation class
    gv_transcr_popup = comp_controller->window_manager->create_popup(
        iv_interface_view_name = 'AIC_CM_TRANS/AssignTranspReq' "#EC NOTEXT
        iv_usage_name          = 'CUBAssignTransporReq'         "#EC NOTEXT
        iv_title               = lv_title ).
    get instance of BOL dynamic query
      lo_qs = cl_crm_bol_dquery_service=>get_instance( 'BTQAIC_CM_TRANSPORTREQ').
      gv_transcr_popup->set_on_close_event( iv_view = me iv_event_name = 'AssignTranspReq' ).
      gv_transcr_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
      gv_transcr_popup->open(   ).
    through the iv_usage_name i will open in this popup a search view from another window
    in this window is a searchview implemented and now after selecting the line in the result view in want to navigate through outbound plug / inbound plug to the starting view .
    but i get the exception
    Target view AIC_CM_TRANS/TransportReq of the navigation is not assigned to the current window AIC_CM_TRANS/AssignTranspReq ( which is true)
    now the question: how can i navigate between views of different windows?
    Best Regards
    britta

    hi
    i have found a way : you have to use a outboungplug from the windows interface ..then it is working
    best regards
    britta

  • How can you select the "from" in Mail with multiple accounts?

    Is there a simple dropdown to select the "From" field in Mail when using multiple accounts?
    All I can find is a support page saying From is defined by the email account that is highlighted and active.
    Thanks

    Hoo,
    When you hover your mouse over your name in the from field it presents a little arrow. Click it and it lets you select who you are sending an email as.
    Also if your reading an email that you got say to your @iCloud.com email when you hit compose it will automatically select your @iCloud.com email to compose your email.
    Hope that helps,
    Weston

  • How can you change individual words in a PDF using javascript?

    Hi,
    I am trying to do some simple text replacement in a PDF file using Acrobat. Specifically, I want to do some simple transliteration of words or partial transliteration. For instance, I would like to change a word like "red" to "ρed". This is to help me get used to the Greek alphabet step by step.
    Anyway, I downloaded Acrobat and there is no feature to do a single letter search and replace -- only word replacement. I have a Computer Science degree and decided to investigate the javascript capabilities to see if I can make those a simple letter replacement script. However, I have gotten to the point where I can cycle through every word in the PDF (using functions like getPageNthWord), and I can make a replacement on the string returned using something like: val.replace(/r/, "ρ"). However, I don't know how to replace the word in the PDF file....such as with a hypothetical function setPageNthWord (which does not exit). I have found the online documentation very thin on this, and I am scratching my head. Perhaps, it is something to do with the PDF format that I do not understand. So, is there a way to simply change text of a PDF file, like I am asking? All I am looking for is simple script to change a letter to another across a PDF.
    thanks if you can help
    Justin

    JS can't edit the text in a PDF file directly. There are workarounds, like
    using a redaction with overlay text or simply placing a new field or
    annotation on top of the old text with the new one, but they are all far
    from perfect and won't cause a "reflow" of the document, so if the two
    texts are not of the same length the result will look odd. Also there's the
    issue of which font to use (font family, color, size, etc.), which JS can't
    know so you'll have to tell it.

Maybe you are looking for

  • Add new field in Txn FBL5N

    Hi SAP, How to add "new" field eg: object key in customer line item (FBL5N) via config? any menu path? I will give points for those who can solve my problem. TQ Regards, Nazrul

  • How can I lock rotation and magnification in CS4?

    I use CS4 on my macbook pro, and thanks to some rather irritating touchpad shortcuts, I often find myself accidentally rotating the image or zooming in. Is there anyway I can lock the image so this doesn't happen? Thanks in advance for your help.

  • Ethernet not working properly

    I have a Power Mac g4 Dual 1.42GHz. I am able to use my internet Cable connection properly, but when I turn off my computer or put it in sleep mode and afterwards turn it back on, my computer behaves as if there were no ethernet cable connected. I ha

  • How to see that r/3 table for infoobject

    hi to all                   i am working in time management ,i have a two key fields , like planned time according to personal work schedule (0plhrs) n planned time without public holiday (0whrs) , i have two data sourse 0hr_pt_01 and 0hr_pt_02 , so

  • Adobe does not want to learn! What to do?

    I am still on my bandwagon. Got notifications that some Adobe apps have updates for CC. Cool. Got up very early to use bandwidth (CAP!) from my midnight to morning allocation and press update Bridge, Photoshop and InDesign. Way beyond my time limit f