Question about using database links in Forms 10g

I have a form that uses a database link for the "Query Data Source Name," i.e. it is set to some_view@some_db_link
For some reason when I run a query using the DB link the query takes approximately 30 seconds. When I remove the link and go local the query takes about one second. Has anybody observed and addressed this issue before (without going local of course)?
Thanks,
Thomas

Let me first say that it is never a good idea to use a db link in the data source. It is better to create a synonym in the database and use this as the data source. If the db link changes, you only have to do this in the database, without recompiling forms.
create synonym some_view for some_view@some_db_link
This may already solve your problem. If not, than see if the query is also slow in sqlplus. You may have a problem in your connection between the two databases.

Similar Messages

  • Question about using constant variables in Forms

    As I am still very new to Forms, please forgive my ignorance if the answer to my question is very simple. I am trying to figure out how to use constant variables within my Forms application. For example, if I want to setup return code constants for the application (mind me, these are examples):
    RC_SUCCESS CONSTANT PLS_INTEGER := 1;
    RC_FAILURE CONSTANT PLS_INTEGER := 0;
    RC_YEAR_DATA_NOT_FOUND := 50;
    Then in a module I created, if I wanted to check the return code against one of the constants I would do:
    DECLARE
    rc PLS_INTEGER;
    BEGIN
    GET_YEAR_DATA('2000', rc);
    IF rc = RC_YEAR_DATA_NOT_FOUND THEN
    -- Do some error handling
    END IF;
    END;
    I know that you can declare constants within individual procedures or packages but I can't see to find information on how to do this globally for the application. I've read about using global variables within Forms but the CHAR data type only and the fact the value can be changed doesn't really fit for this purpose. Am I missing something? Is there a config file or something for the webserver that can be used to set these up??
    Any help would be appreciated.
    Thanks

    To declare constants create a Package-Specification in a pll and deifne all your constants there, something like:
    PACKAGE PK_CONSTANTS IS
      RC_SUCCESS CONSTANT PLS_INTEGER := 1;
      RC_FAILURE CONSTANT PLS_INTEGER := 0;
      RC_YEAR_DATA_NOT_FOUND := 50;
    END;Then attach that pll to all your forms-modules, and use it like
    IF rc = PK_CONSTANTS.RC_YEAR_DATA_NOT_FOUND THEN
    END IF;A word about exceptions or errors: In my eyes its clearer (and in case of exceptions even better) to raise an exception than to hide it behind return-codes.

  • Question about using library items in forms

    After a long time I am again returning to this perpetual fountain of Dreamweaver knowledge.
    I am converting a site from AGL to DW. In AGL I used a separate template for the forms (there are over 10) and used "components" to create the different forms. Each form shared features with other forms but were not identical, all together 5 components. When I converted over to DW the 5 compnents were made into 5 "library items" but neither the form template or the library items work, by that I mean they do not update if I make a change.
    Hence I want to make 5 new library items to use in the forms my question is this: when I choose an item to put in the form like a text field or radio button I always get this window.
    Though I read the documentation I am still not really clear about the "style" option so I just choose "no label tag." What is this used for? Any examples of how it is used?
    Regarding "position" before or after the item, what is this all about? I have been choosing "after form item" but I don't really know what the difference is and what advantages or disadvantages acrue from these choices.
    Regarding "Access key" and "Tab index" I sort of have the idea of what it is about but an example of how they work in action would clear up any nebulosity.
    But my real puzzle is with the following which pops up at the end when I am inserting a form items.
    Since the library items are not separate forms in themselves I have NOT added the form tag because my reasoning is that when I make the new form templates it will have the requisite form tags. Am I correct in this line of thinking? Or do I have to add form tags every time I add form elements to a form? I really don't want to have to do the whole thing over again if I get it wrong. So if one of you kind souls could guide me in doing it right the first time I would really appreciate it.
    I am using a MBP, OS X 10.6.8, DW CS6
    BvL

    To declare constants create a Package-Specification in a pll and deifne all your constants there, something like:
    PACKAGE PK_CONSTANTS IS
      RC_SUCCESS CONSTANT PLS_INTEGER := 1;
      RC_FAILURE CONSTANT PLS_INTEGER := 0;
      RC_YEAR_DATA_NOT_FOUND := 50;
    END;Then attach that pll to all your forms-modules, and use it like
    IF rc = PK_CONSTANTS.RC_YEAR_DATA_NOT_FOUND THEN
    END IF;A word about exceptions or errors: In my eyes its clearer (and in case of exceptions even better) to raise an exception than to hide it behind return-codes.

  • Question about using calculations in PDF form

    I am creating an order form with fields using simple calcuation math (price field x qty field = subtotal field). My question is, if the quantity fields in the order form are blank I would like the subtotal and total fields to remain blank as well. However it shows and prints as 0.00. Is there a way to change that?

    Use this code as the custom validation script for that field:
    if (event.value == 0) event.value = "";

  • Question about Access database linking in SharePoint

    I have a database table I created in Access 2010, I can get it into SharePoint as a list and then create a calendar view.  I used the SharePoint icon under Database Tools in Access.  My problem is that when I enter new information in the Access
    Database I am not able to get SharePoint to reflect this update.
    I should state that I am extremely rusty with Access and SharePoint.
    I appreciate any help that can be offered and I thank you in advance.

    Check out few synchronization options from the following link, hope it helps
    https://support.office.com/en-us/article/Synchronize-a-SharePoint-2010-list-with-Access-2010-975bfb97-c799-4fce-b7cc-3db3b397f116
    Cheers,

  • Question about using 10g/11g and APEX ...

    Hi,
    I just recently learned of Oracle's APEX and have a few questions about using it.
    Can I use APEX with express, standard, and enterprise editions of 10g and 11g?
    Are all of these free to use?

    You might want to read about APEX rather than jumping into questions that are reasonably well documented. Info at http://www.oracle.com/technology/products/database/application_express/index.html
    Your specific questions:
    1) Apex is a package that can be installed into any properly licensed database.
    2) The price for the production license of the database varies by edition.
    The price for Express Edition is $0 for use in production. Part of the cost for that edition is 'no Oracle Support based support, no patches, data volume limitation, etc.'

  • Using Database link in applications

    Hi,
    i just configured and created a PUBLIC database link on my 10g oracle. I can use it successfully from sqlplus doing some simple select like:
    SQL> select * from "table"@dblink
    The query returns all the result as expected.
    Now I would like to use this public link in my applications but the problem is that the link seems to be only available in the SYS schema.
    Ho can I access from other schema?
    In other words, in need to do some select (and insert) from my APEX applications using the db link. If I try the said select, all I obtain is
    ORA-02019: connection description for remote database not found

    Is that the actual command or what you believe you issued? Can you pull the entry from dba_db_links to verify the problem is not something as simple as you left off the word 'public' in the command?
    In the old days when you used HS you also had to create an hs_tnsnames.ora, hs_listener, and an hs_initsql.ora file. Do you still create these with DG4ODBC? What about the file permissions, are there any requirements to set these in order to allow use?
    I found an internet article you can check you actions against and two threads here on OTN that may be of help.
    http://www.pythian.com/news/1554/how-to-access-mysql-from-oracle-with-odbc-and-sql/
    How to connect to Oracle from MySQL
    Oracle to connect MySQL
    HTH -- Mark D Powell --

  • A Question about LV Database Connectivi​ty Toolkit

    Hello everyone!
    I have a question about using LabVIEW DataBase Connectivity Toolkit 1.0.2 that eagerly needs your help. I don't know how to programmaticlly create a new Microsoft Access(.mdb)file (Not a new table in a existing Database)using LabVIEW Database Connectivity Toolkit1.0.2. As you know, usually we can set up the connection by creating a Universal Data Link (.udl) file and inputting the path to the DB Tools Open Connec VI in the LabVIEW DataBase Connectivity Toolkit. However, searching a table within an existing database containing a great many tables is a toilfulif job. If I want to use a new DataBase file with the date and time string as its name to log my acquisition data in each measurement process, how to do? I am sure someone of you must can resolve my question, and thanks very much for your help.

    I don't know what your real design considerations are here but, from I understand from your post, this is a really bad way to go about the process of logging data -- IF you want to be able to do significant ad hoc or stored procedures analyses after it has been collected.  Using separate MDB files for data that ONLY differs by one field (namely that date) is not the most efficient way to organize it.  What would be much more efficient would a joined table including the date and a reference ID of some sort for the various measurements that were done.  That way your stored procedures for looking at ALL measurements of type X would be very simple going across ALL dates.  Making such a comparison across multiple MDB files is a much more challenging process AND doing the original data collection in that way doesn't really gain you anything.
    Generally, if something is difficult to do in the DCT (Database Connectivity Toolkit) it's because it's a "not good thing" to do within MDBs.  I know that others probably disagree with that but I've worked with Access since it's initial release and other RDBMs prior to that both through compiled tools, Unix scripts, etc.  You may, of course, still choose to proceed in the way you've described and that may work excellently for you. 

  • How to Execute a Remote Procedure in Portal using Database Link

    Hi,
    I followed the instructions to create a Portal form for a remote procedure. But I am encountering the following error. Can someone advise what may be the cause?
    Failed to execute - Missing string(create_package_body) language(us) domain (wwv) sub_domain (wwv_builder) (WWV-04300)
    ORA-04020: deadlock detected while trying to lock object PUBLIC.PORTLET_SCHEMA (WWV-11230)
    Failed to parse as PORTAL - (WWV-08300)
    PURPOSE
    How to execute a remote procedure in Portal using Database Link.
    DESCRIPTION
    This procedure assumes that you have two databases, one of which is remote, and Portal is configured in the other.
    Remote Database A:
    ==================
    1) Create a procedure as follows: Create or Replace PROCEDURE SCOTT.ADD_TWO_VALUES ( v_one IN NUMBER, v_two IN NUMBER, v_result OUT NUMBER) as begin v_result :=v_one+v_two; end; 2) Grant execute privileges to PUBLIC on the procedure.
    Database B (where Portal is configured): ========================================
    1) Create a public database link and choose to connect as a specific user (say SYSTEM). By default, in an Oracle 8i database, the "global_names" parameter in initSID.ora (or init.ora) file is set to "true". This Global Naming parameter enforces that a dblink has the same name as the database it connects to. Therefore, if the remote global database (A) name is "ora8.acme.com" then the database link should also be named as "ora8.acme.com".
    2) Create a synonym for the procedure in Database A. Make sure you fully qualify the procedure name in the remote database (like SCOTT.ADD_TWO_VALUES).
    3) Create a dynamic page to execute the procedure. The ORACLE tags in the dynamic page will look similar to the following: <ORACLE> DECLARE v_total NUMBER; BEGIN ADD_TWO_VALUES(:v_one,:v_two, v_total); htp.p('The total is => '); htp.p('<input type="TEXT" VALUE='||v_total||'>'); htp.para; htp.anchor('http://<machine.domain:port#>/pls/portal30/SCOTT.DYN_ADD_TWO_VALUES.show_parms', 'Re-Execute Procedure'); END; </ORACLE>
    4) Portal does not have an option to create a form based on a synonym. Therefore, if you want to create a form instead of a dynamic page, create a wrapper procedure and then create a form based on this procedure. For example: Create or Replace PROCEDURE PORTAL30.ADD_TWO_VALUES_PR ( v_one IN NUMBER, v_two IN NUMBER, v_total OUT NUMBER) as begin add_two_values(v_one, v_two, v_total); end;
    5) Grant execute privileges to PUBLIC on the procedure.

    hello...
    any input will welcomed... Thanks..

  • How to use DDE package in form 10g module

    Hi All,
    I am using DDE.package in form 10g for uploading excels data in oracle database at windows platform but it is showing non-oracle exception.
    Thanks

    hi
    mehwish............just do for attachment.......
    u can also use something like this...
    Execute send_mail;and also.
    try something like this..
    example:
    begin
    mahi.mail('email address','subject','message','attachment');
    end;Edited by: Sarah on Apr 18, 2011 10:25 AM

  • Basic question about Flashback Database

    Hi,
    I have a very generic question about using Flashback Database.
    On my testing systems, for performance testing and simulation purposes, I want to create a guaranteed restore point so I can test impact on batch when code change releases are done, before deployment in production.  My confusion is with respect to redo logs, as summarized in the questions below:
    1. Is it possible to change redo log files, when a guaranteed restore point has been configured?
    2. If yes, will the Flashback to restore point, also change the size of the redo logs?
    I could not find anything in the docs about this....hence my question....
    Appreciate your time taken in responding to these questions....
    Regards.

    HI,
    donneskold wrote:
    Hi,
    I have a very generic question about using Flashback Database.
    On my testing systems, for performance testing and simulation purposes, I want to create a guaranteed restore point so I can test impact on batch when code change releases are done, before deployment in production.  My confusion is with respect to redo logs, as summarized in the questions below:
    1. Is it possible to change redo log files, when a guaranteed restore point has been configured?
    1) Yes it is possible.
    2. If yes, will the Flashback to restore point, also change the size of the redo logs?
    2) It will not change the size of redo log file.  Cannot resize a redo log file..
    I could not find anything in the docs about this....hence my question....
    Appreciate your time taken in responding to these questions....
    Regards.
    Thank you

  • Techie Question about iWeb, outbound links, and Google Analytics

    Hi,
    I have a kind of pretty technical question about using Google Analytics (GA) with iWeb sites to measure clicks on outbound links. Here's the setup:
    1) My website's online, and GA is working properly.
    2) I don't sell stuff directly, but I do have a "Purchase" page which contains a link to a specific Amazon page.
    3) I'm pretty sure I can measure how many people go to the Purchase page using GA, but how do I measure whether visitors click on the Amazon link? It would be interesting to me to be able to gauge what the conversion rate is; that is, how many people actually proceed to purchase the product at Amazon.
    I've checked the GA instructions and there's a page about manually tracking clicks on outbound links but it requires some code inputting. I know zero about coding, but I'm pretty sure that in iWeb you can't get access to the source code to input the required code.
    Am I wrong about this? And if I am, then does anyone here know how to measure the clickthrough rate?
    Anyway, hope you can help. Thanks in advance.

    I don't know about the link tracking but you could have the link take you to a redirect page which automatically sends them to Amazon.com after a preset time, 0 seconds to whatever you'd like. You can put a counter on that redirect page, like StatCounter. StatCounter can tell you how many, from where they came, i.e country and area, repeat visits, etc.
    Tutorials #12 & #13 describe how to put a visible counter on a page but with a redirect page you wouldn't have to bother since it wouldn't be seen. You can get all of your information from your account on the StatCounter site.
    The redirect page would be a simple plain text page titled redirect.html and would look like this:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="refresh"
    content="0; Destination URL">
    <title>Redirecting or whatever you'd like to appear at the top of the browser</title>
    </head>
    <body>
    </body>
    </html>
    0 Is the number of seconds to wait before redirecting the visitor. If set to zero the visitor would not know they were being redirected. Replace Destination URL with the Amazon URL you want them to go to.
    OT

  • TNS-12666 error occures when using database link

    When I am trying to use database link
    defined in my database the following error occures:
    TNS-12666 Dedicated server: outbound transport protocol different from inbound.
    In documentation is stated to resolve such an error to
    specify the same protocol in the SQL*Net connect string or alias for the outbound connection as that used for the inbound connection.
    I have in tnsnames.ora defined network service name
    by which I can connect to such a database by SQL*Plus
    without any problems, why can I not do such a thing
    via database link?
    Thanks a lot for advise, ...

    Could you change the following entry in your 'sqlnet.ora' file and try?
    SQLNET.AUTHENTICATION_SERVICES = (NONE)

  • Adding user to the oracle database using database link - is it possible?

    Hi, i wolud like to manage my databases using one client. I easilly operate on my distriubuted tables but i have problem with creating users in distribiuted database. Is it possible to create users in distributed database using database links? or it have to be done locally using some stored procedures or sth similar?

    The SQL syntax of the CREATE USER statement doesn't support DB links, the only way to do it would be with stored procedures. There might be an Oracle SP for that or for generic remote execution of SQL, but I'm not familiar with such.

  • I have a question about using multiple ipads in our school.  Each of our teachers have a iPad and AppleTV in their classroom.  The issue is, with our classrooms so close in proximity to one another, is there a way to pair teacher

    I have a question about using multiple ipads in our school.  Each of our teachers have a iPad and AppleTV in their classroom.  The issue is, with our classrooms so close in proximity to one another, is there a way to pair teacher #1 iPad to its AppleTV without effecting/projecting onto the adjacent teachers #2 classroom AppleTV?

    Not as such.
    Give the AppleTV units unique names and also enable Airplay password in settings with unique passwords for each teacher.
    AC

Maybe you are looking for