Merge statement not working over db link

I have a merge statement that works fine when it's run against a local table, but when I try to run it against a table over a database link, I get the following error.
ERROR at line 1:
ORA-01008: not all variables bound
ORA-02063: preceding line from REPOS
ORA-06512: at "DBADMIN.PING_DB", line 6
ORA-06512: at line 1
Here is the code:
create or replace procedure ping_db
as
begin
merge into availability@repos A
using (select trunc(sysdate) from dual)
on (trunc(A.day) = trunc(sysdate))
when matched then update set A.uptime = A.uptime + 1
when not matched then insert (hostname,dbname,day,uptime) values
(utl_inaddr.get_host_name,sys.database_name,trunc(sysdate),1);
commit;
end;
/Code compiles fine, but gets the error when it's executed. Any help would be appreciated.

9.2.0.x is the version (9.2.0.4,.5 and .6)

Similar Messages

  • Logon trigger not working over DB-Link?

    Hi all,
    I have a serious question about accessing tables over a database link.
    I have three schema:
    DATA@SOURCE
    INTERFACE@SOURCE
    WORK@TARGET
    Schema DATA has one table called T1
    The INTERFACE schema has select privileges on all tables from DATA. Furthermore schema INTERFACE has a logon trigger to change the "current schema" to DATA:
    CREATE OR REPLACE TRIGGER TRG_A_LOGIN_SET_SCHEMA AFTER LOGON
    ON INTERFACE.SCHEMA
    BEGIN
    execute immediate 'ALTER SESSION SET CURRENT_SCHEMA = DATA';
    END;
    The WORK schema has a database link to the INTERFACE schema called INT_DB_LINK.
    I am now logged into schema WORK on the TARGET database and I am executing following statement:
    select a from T1@INT_DB_LINK
    -> it's working
    Next I execute
    declare
      cursor c is 
      select a
        from T1@INT_DB_LINK
       where rownum<2;
    begin
      for r in c loop
        null;
      end loop;
    end;
    This is not working. Error message is ORA-000942: table or view does not exist.
    But why?
    Can anyone help me?
    Thanks in advance
    Py

    Hi all,
    after a long, very long search I found what caused this strange behaviour.
    The ORA- Error was not raised by the SQL-Execution-Engine but by the SQL-Parser/SQL-Validation.
    As the second statement is an anonymous SQL block the Oracle Parser checks all objects dependencies before execution.
    This means a connection is established from TARGET to SOURCE checking if table T1 is available. The strange thing is
    that on this connection the "ALTER SESSION" trigger is not fired. So the parser does not find object T1 in schema INTERFACE.
    If I create an empty table T1 in INTERFACE the anonymous block gets parsed/validated and the statement is executed. But this
    time the block does a normal "connect session" and the trigger is fired. This means the statements accesses the T1 table in
    schema DATA. (But T1 in INTERFACE has to be existent that parse/validation works)
    I don't know if this is a bug or a feature.
    To workaround this I have created private synonyms in schema INTERFACE pointing to the objects in DATA.
    Thanks for your help!
    Py
    regarding the other qestion:
    Yes, permissions are granted over a role.

  • Oracle 11g merge statement not working properly

    HI I have recently my oracle version to 11.2.0.3 -64 bit . My merge statement is geeting failied saying that invlid identfier at line number 18    
    MERGE INTO peer_index indx        USING staging.stg_peer_filing stg          ON (indx.peer_element_code = stg.fund_code                and indx.index_effective_date = trunc(stg.pricing_date))        WHEN MATCHED THEN UPDATE          SET indx.filing_date = trunc(stg.filing_date),            indx.reported_net_assets = stg.net_assets,            indx.active_flag = 'N',            indx.parent_index_code = NULL,            indx.update_datetime = systimestamp,            indx.last_update_user_id = user        WHEN NOT MATCHED THEN INSERT         (index_code, peer_element_code, filing_date, index_effective_date,          reported_net_assets, active_flag          )        VALUES         ((SELECT pe.index_code_prefix || to_char(stg.pricing_date,'MMRR')           FROM fi_benchmark.peer_element pe           WHERE pe.peer_element_code = stg.fund_code),          stg.fund_code, trunc(stg.filing_date), trunc(stg.pricing_date),          stg.net_assets, 'N'         );
    please help why this is happening .Same query works fine in 10g .

    which line is the line that has the error?
    merge INTO peer_index indx
    USING staging.stg_peer_filing stg
    ON (indx.peer_element_code = stg.fund_code AND indx.index_effective_date = Trunc
    (stg.pricing_date))
    WHEN matched THEN
      UPDATE SET indx.filing_date = Trunc(stg.filing_date),
                 indx.reported_net_assets = stg.net_assets,
                 indx.active_flag = 'N',
                 indx.parent_index_code = NULL,
                 indx.update_datetime = systimestamp,
                 indx.last_update_user_id = USER
    WHEN NOT matched THEN
      INSERT (index_code,
              peer_element_code,
              filing_date,
              index_effective_date,
              reported_net_assets,
              active_flag )
      VALUES ((SELECT pe.index_code_prefix
                      || To_char(stg.pricing_date, 'MMRR')
               FROM   fi_benchmark.peer_element pe
               WHERE  pe.peer_element_code = stg.fund_code),
              stg.fund_code,
              Trunc(stg.filing_date),
              Trunc(stg.pricing_date),
              stg.net_assets,
              'N' );

  • Active States Not Working on Anchor Links?

    Since updating to the newest version of Muse today, it seems that my parallax site's navigation button aren't displaying the "active" state once you scroll to an anchored position. This was working earlier today, it seems to be an issue with the newest version of Muse (v7.2, Build 230). Anyone else having this issue?
    Here's a link to the site. http://www.hillcreative.net

    I think this bug is back. I am using the latest Muse build.
    When I go to add a menu (manual) from the widget menu, I can add in the names of the buttons without issue.
    If I want to link out to other sites, no issue.
    However, if I add anchor links, things fall apart.
    It seems the first few links work without issue and with a fixed menu at the top, the page scrolls nicely to the area. However, I am noticing that the 4th and 5th button in a manual menu do not respond to active states and even the scrolling page navigation is wonky. The "team" and "contact" buttons never highlight, even when selected, nor do they navigate properly to the corresponidng anchor link.
    I have moved the anchor links deeper down the page to see if this makes a difference and it doesn't. It is as if the menu can't pick up the anchor points.
    I addition, when viewed on iOS devices (although not optimized) I get 2 active states selected in the menu.
    I think the script for this widget needs revisiting. Please advise.
    Here is a link to my temporary example:
    http://jbrubaker.fatcow.com/warwick/index.html
    The active state only shows up for the first 3 buttons...weird.
    (Windows 7 / All latest browers)
    Thanks!
    J.

  • Home sharing not work over d-link router (lan - wi-fi)

    I have d-link dsl-2640u. It has 4 Ethernet ports and wi-fi AP. My iTunes is installed on pc that connected to d-link through Ethernet. And I have iPad connected to the d-link via wi-fi. So, the library that is shared on my pc, don't showing up in the iPad. But when I unplug LAN cable from pc and then plug the wi-fi adapter in, and connect to d-link wi-fi - all work fine. All devices use 192.168.1.1-10 ip. Can anybody help me? How provide sharing from the ethernet to wi-fi.

    I solved the problem! First of all, i installed the latest firmware for the DSL-2640u.
    The Next steps include the following:
    1. Turned of the firewall in WAN interface
    2. Enable "Bridge PPPoE Frames Between WAN and Local Ports" in WAN interface.
    3. Enable "Enable WAN Service" & "Enable IGMP Multicast"
    4. Advanced Setup->LAN-> Enabled "Enabled IGMP Snooping"
    5. Advanced Setup->Interface Group. Group "default" include Wireless(SSID1), LAN1, LAN2, LAN3, LAN4
    6. Wireless -> wireless bridge -> Bridge Restrict turned to "disabled"
    Last steps (maybe, its not necessary)
    1. Advanced Setup->NAT -> Virtual Servers -> ADD TCP/UDP port 3689 & ADD UDP port 5353 for 192.168.1.2
    2. Advanced Setup->NAT -> Port Triggering -> ADD TCP port 3689 & ADD UDP port 5353
    3. Advanced Setup->NAT -> DMZhost -> ADD 192.168.1.2 (my pc IP-adress)

  • Hover is not working over certain links. I already unistalled and reinstalled firefox but I'm still having the problem. How do I fix it?

    I can't play certain games or videos on youtube. Also I can't close my browser window or select items from a drop down menu. Not only did i uninstall firefox and then reinstall but i ran firefox in safe mode and still had the same problem

    Try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/
    *https://support.mozilla.org/kb/how-do-i-upgrade-my-graphics-drivers
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Merge call not working in ios7 on Iphone5

    Merge call not working in ios7 on Iphone5 ?

    Same here. We have this call center in our company where after i have added a call to merge i have to push no. 4 and dial from the keypad. This has never been possible in ios but it have been possible to create a contact called "Merge" and add number 4 as it's phone number. Now by merging first my clients call to my collegegue and then to this "Merge" contact it has been dropping me out of line and my client and collegue are merged.
    Now ios 7 wont let me call to this "Merge" contact's number "4"

  • Select statement not working

    hi to all,
    I am trying to write use inner joining . here is code
    DATA:tabname LIKE dd02L-tabname,
         table_disc LIKE dd02t-ddtext.
      SELECT  dd02ltabname dd02tddtext INTO (tabname,table_disc)
        FROM dd02l INNER JOIN dd02t on dd02ltabname = dd02ttabname
              WHERE dd02tddlanguage = 'E' AND dd02ltabclass = 'TRANSP'
                                AND dd02L~tabname = 'ZANKI*'.
        endselect.
          write : tabname.
    I also checked in tables dd02t and dd02l for the table zanki* and data available in both table . but here select statement not working .do u have any idea about this. thank you

    Hi,
    I executed the ur inner join conditin by commenting 'z*' it's working fine.
    I think  where condition is not getting satisfied so u r not getting any data.
    Please conform in where condition you need * 'AND'* or OR
    I change decalration as below.
    DATA:tabname    type TABNAME,
          table_disc type AS4TEXT.
    SELECT dd02l~tabname
           dd02t~ddtext  INTO (tabname, table_disc)
    FROM dd02l  INNER JOIN dd02t on dd02l~tabname = dd02t~tabname
    WHERE dd02t~ddlanguage = 'E' AND
          dd02l~tabclass = 'TRANSP'AND
        dd02L~tabname = 'ZANKI*'.
    endselect.
    write : tabname.
    Regards,
    Pravin

  • Multi-Row insert/update/delete not working via db-link

    App. Version: 2.0.0.00.49
    DB: Oracle 9i, not sure about the build
    Problem: Multirow Update/Insert/Delete doesn't work via db-link.
    Error received: ....ORA-1460: unimplemented or unreasonable conversion requested....
    Where: Tabular Form generated via Wizard
    Side note: It's working properly when local table(s) is/are used, it's not working via db-link or view.
    I've encountered this error with single update/insert/delete operations before, but was able to fix it via using temp-variables (v_xyz := :Px_xyz; as the proposed v('Px_xyz') was really slow with my scripts)...but with the automated DML-action I don't see a way to edit it accordingly.
    Workaround found:
    1a) Use local* collection on HTML-DB-Server, then write single row updates/deletes/inserts to the remote DB via DB-Link
    1b) Use local* table on HTML-DB-Server, then write single row updates/deletes/inserts to the remote DB via DB-Link
    * Local = on the same server that HTML-DB is running on...
    So,...to my questions:
    1. Can someone confirm that this is a "known feature" (aka bug)?
    2. Can someone tell me if this "known feature" has been eliminated in the newer version of HTML-DB/APEX (> 2.0.0.00.49)?
    Thanks.
    Ingo

    Hi,
    Do you have a small test case program that demonstrates this? A JDeveloper project showing what exactly is the problem when trying to use the BDB SQL JDBC driver to insert data into the BDB SQL database? What do you mean by "not working", do you get any errors, you do not get errors but you do not see the data in the database etc?
    What are the versions of Java, JDeveloper, ADF and BDB SQL you are using, and on what OS?
    Regards,
    Andrei

  • Facebook App not working over 3G, but works over Wi-Fi.

    I have a BlackBerry® Curve™ 3G 9330 Social Messaging Ready smartphone. My current software version is 6.0 Bundle 2333. My Facebook application worked perfectly fine when I got the phone a few months ago over the Verizon 3G network and Wi-Fi, but when I recently updated Facebook to version 2.0.0.58, it does not work over 3G anymore. But everytime I try to connect via 3G it says "We cannot reach the Facebook server at this time. Please try again later. (100)" It does however still work over Wi-Fi.
    I have tried various attempts to fix it: uninstalling the App and re-installing it and also removing the battery and putting it back in (hard reset), but nothing has worked.
    Is anyone else have this same issue? Is there a way to restore my Blackberry to its factory settings so that I can just use the older version of the Facebook App [that was previously installed]?
    Thank you.

    Hey metalhourse90,
    I can see from your PIN that you currently don't have browsing services included in your data plan. I would advise contacting your wireless provider to have this enabled.
    Thanks,
    -FS
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.
    Click Solution? for posts that have solved your issue(s)!

  • IMessage is not working over wifi. I need HELP D:

    My iMessage is not working over wifi. But it's only at my house. Actually it worked a while ago but then it stopped working.
    The browser, email, app store, youtube and any other apps are working just fine over the wifi. It's only my iMessage. It won't send any message. It say message not delivered. Does anybody what is going on and what can I do to fix it? Thanks, before. (:

    I recently moved my library on my time capsule
    You mean you moved your music files to the external. The library is more than the music files.
    Just copy the \Music\iTunes\ folder from internal to the Time Capsule.
    Add the Time Capsule to your Login items in System prefs -> Accounts.
    Hold Option and launch iTunes and select *Choose library*.
    Select the iTunes library file int ehiTunes folder on the Time Capsule.
    It is hte samae library you have previously. All artwork playlists, ratings, songs, movies, etc. will be there.
    Genius is already there so nothing needs to be done.

  • BBM not working over mobile network

    BBM on Q10 not working over mobile network.
    Working only via wifi.
    Carrier: KSA STC
    OS: Official 10.2.1.2102
    Please help.
    Its very disappointing that bbm is not working on bb.

    Can you try sending a BBM friend a PIN message, not in BBM, but in your Compose Message > PIN.
    You will need that contact's BBM PIN number...
    Do you see the message sent, and does it hae a D beside or R afterwards?
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Active state not working in scrolling site (with anchor links)

    I'm design a scrolling site with anchor links and an horizontal menu on the top.
    when i publish the site and click on the menu buttons the site scrolling to the place of the anchor but the active state in the menu is not working.
    now... when i leave the main page (were the scrolling site is) and then return back to it all active states are working perfectly
    anyone have this bug? or any one know how to fix it ?

    Hmmm...I've just been playing around, and I think I got the Active State to work correctly.  I think my problem was not understand what Active State means.
    To answer your question, I was changing the Font Color and Box Fill Color of the Active State.
    I did not understand that Active State means the look of the Menu Item when the PAGE is active.  I thought it meant the look of the Menu item when the cursor is scrolling down the Menu (i.e. when the MENU is Active, not the page).
    Look at this page for an example of what I'm trying to achieve...
    http://www.pgavdestinations.com
    When you hover over the "Work" menu item, and move the cursor down the menu, the state of "Work" remains changed until you move the cursor off of that menu column. It does NOT return back to it's Normal state until you are off of that menu column.
    Is there a way to achieve this with the menu states in Muse?
    Thanks for the replies!
    Dave.

  • Facebook app links not working over wifi

    This might be hard to explain let alone comprehend so bear with me.
    As of the last 24 hours or so I am having trouble using Facebook linked apps while on Wifi. To be specifc I was using the app called "Lost Friends?". I have used this app for months, no issues. All of a sudden last night it would not connect to my Facebook account. I went on to try another app called "Lost A Friend", same issue, no connection to Facebook via wifi. After I left my house (back to 3G) I tried it and it worked perfectly, but again, once home it was doing the same thing. While inside my house I turned off Wifi and it worked again. It sounds to me like there is something within wifi, Facebook or both. If anyone has any info it would be greatly appreciated.
    To skip a step or two, I went as far as factory resetting my phone, starting as a new iphone and still have the same issue.

    I'm using a Mac have a Airport express base station. Everything was fine and I could pull up Facebook on my Mac and Androids over my WiFi. Apple pushed a firmware upgrade and the IOS upgrade.  Now, voila, Facebook not working on my Mac or on other devices if logged on to my WiFi.  If I disconnect WiFi and am on 4G it works fine.  The same issues as others have described.
    After trying all the fixes listed and a few not listed like clearing my cookies, history, tmp files and cache, I tried a release/renew.  Nope. So I logged out of Facebook, uninstalled the apps, shut down computer, phone and tablet. I finally reset my routers by unplugging my comcast router and my basestation, let them all resync, thinking this might have been an issue with a router table (?). At any rate this would reset all the IPs. (I reinstalled the apps)  Worked the first time, about 2 hours later it quit working.  Tried the same trick but it didn't work again.
    I've read a number of blogs and other posts on 'fix it' type sites researching the issue.  It sounds like many of the streaming media sources that require lots of resources and will cost more to operate by using the data plans are no longer working on WiFi. 
    Interesting.

  • Safari 8 hover does not work over google map location pins

    OS X 10.10.1,   Safari 8,  Java 8-25
    I have always had little odd things not work when using safari on a large % of websites I visit,  the latest issues are
    no response when hovering over google map location pins, travel site calendars not opening or responding to mouse, drag and drop
    show the item being dragged several inches away from the actual pointer, some links don't respond, missing items
    or odd layout with print or pop ups going off the screen on some website pages, zooming in and out does not help. I have none
    of these issues when using Firefox or Chrome. Been using Safari for 4 years now.

    Have you tried a PRAM and an SMC reset? They're longshots, but don't take long to try.
    PRAM: http://support.apple.com/kb/HT1379
    SMC: http://support.apple.com/kb/HT3964
    Have you run Apple Diagnostics from the disc(s) that shipped with the computer?
    Since the problem occurs in all browsers, it still sounds like a video hardware or video RAM or maybe a software issue having to do with layers and rendering.
    The map layers aren't getting rendered, or if rendered, aren't getting displayed.
    Do you have any browser add-ins? Pop-up blockers?
    Since you have two video chipsets, it's possible that might be related to the issue.
    This non-Apple website talks about switching between chipsets on the various MacBook models so equipped, and points to a free 'donationware' program for the menubar that lets you easily switch between chipsets:
    http://www.everymac.com/systems/apple/macbook_pro/macbook-pro-unibody-faq/macboo k-pro-unibody-switching-between-graphics-processors.html
    Trying to think of other software that might help pinpoint the problem, does the iPhoto Slideshow 'Shatter' template work? Working properly, it 'shatters' images into several color layers and rotates them in and out to build and deconstruct photos.

Maybe you are looking for

  • Mac Photobook- 100 pg max but what's the picture max?

    I'm making a Mac Lg Hardcover Photobook; it says there's 100 pages max allowed. Even though I only have 27 pages it says I've reached the max based on how many pictures it supports. What is the number of pictures I can have? Any help would be appreci

  • How to use Reference type of Data Element

    Hi guys, is there anyone could give me a trace how to use reference type of data element. More details i'm going to reach is: I create 2 tables: eq. 1. table ZFIRST has field X with data element ZFX (Data element i declared). 2. table ZSECOND has fie

  • Printing a lots of reports to pdf

    Hi, have anyone practice with printing a lots of reports, web templates ... We have done 100 quries for some big report for management. This report will be done every month. We have problem with generating PDF of this 100 querie, we need some solutio

  • HT1766 Hi, i have my whatsapp backup in icloud and now i want to download it on my pc? how is it possible?

    Hi, i have my whatsapp backup in icloud and now i want to download it on my pc? how is it possible?

  • Quicktime with ? in chrome browser...

    Hi everyone... i got a macbook pro with Mac OS X 10.6.8 and Google chrome 17.0.963.78 (the last version) as browser  (more faster then safari ...DEFENITELY ) i was watching into apple's web site, the new video about ipad 3... when i click on play, im