Strange dblink - works only from sqlplus

Hi,
I've created dblink. When I tested it from SQL*Plus everything was OK. But when I PASTED my select to procedure and compile this procedure, compiler return an error that table doesn't exist... Could anybody explain my why this dblink couldn't work from PL/SQL code?
Best.

This is problematic line:
select count(1) into number_variable from TABLE_NAME@dblink_name;
But when I execute this one on SQL*Plus everything is OK:
select count(1) from TABLE_NAME@dblink_name;
Procedure belong to the same user as dblink.

Similar Messages

  • EM DB console works only from one node?

    In my 2 node RAC the enterprise manager database console works only from one node i.e the url shows login page only from one node.
    http://NODE2:5500/em------>WORKS, SHOWS LOGIN PAGE AND CAN MANAGE ALL INSTANCES FROM HERE
    http://NODE1:5500/em------>DOES NOT WORK, DOES NOT SHOW THE LOGIN PAGE.
    Please clarify.
    Kadhim

    I have to guess ... (because you tell neither OS nor database version). Assuming it's 10gR2 or higher, that's expected behaviour, dbconsole runs on one node only, the so-called master node. You can change that, see the documentation or this metalink note:
    How to manage DB Control 10.2 for RAC Database with emca
    Doc ID: NOTE:395162.1
    Werner

  • Syncing of calendar works only from icloud to iphone but not the other way round

    My iphone is suddenly not syncing with icloud anymore. I sync only the Calendar (ical). From the icloud calendar to the iPhone calendar syncing is working but not the other way round. I was at a genius bar but they could not solve the problem. Apple phone support suggested nothing I haven't tried like reboot etc. Any ideas how to solve the problem?

    Go to Settings>Mails, Contacts, Calendars, scroll down to Calendars section and check the Default Calendar. Must be the iCloud calendar. If you don't see this option it means that you have only the iCloud calendar in your iPhone. In that case try to turn off the Calendar from iCloud settings and turn it back on after few seconds.

  • Recurring Kernel Panic at startup- Ram ok- works only from DVD

    Hi everyone,
    Please help me figure this one out.
    After installing the latest ilok driver ( it might be a coincidence ) my Macpro 2.1 will go straight to Kernel Panic at start up.
    - It will start from the DVD drive, with the snow leopard installer or Drive genius. The internal drives appear on Disk utility and don;t need repair,
    - It will not start from the Backup HD as external
    - it will not start from the backup HD as internal
    - it will not start in safe mode
    I have unplugged everything, swapped or taken of the RAM, no PCI card inside and it is impossible to start from a drive.
    Any idea ???
    Thank you in advance
    S

    - took an empty drive and installed Snow leopard so I could access the naughty drives.
    - The mac works when booting on the new drive, so I guess my hardware is fine.
    - took the pace ilok stuff out of the old boot drive just to realize that it is not showing up as a bootable drive in startup disk, both when external or internal.
    - took the Pace ilok stuff out of the Backup of the old boot drive. Got Kernel panic when booting from it....  My system backup is about 3 weeks old. I use superduper.
    Looks like it is time for me to make a fresh bootable drive.  I just hope this is not going to happen again once I have spent hours to load it with all the stuff I need, so I can work.
    I very much appreciate your help mister x.

  • Handoff works only from Mac to Iphone

    Then handoff from Mac to iPhone is not working but does work from iPhone to Mac.
    It used to work previously but haven't used it in a while until I needed to yesterday.
    I've tried resets and so forth but no luck getting it to work from Mac to iPhone.
    There is one thing that bugs me and that is the wifi part. Handoff worked (& currently works from iPhone to Mac) without turning wifi on (turning it on does not solve the issue). Should it work without wifi?
    Any suggestions are greatly appreciated,
    Leonardo

    it appears that you are not alone...i have been using Handoff since it started and have just noticed that today it is not working....I have a macbook, iPhone and Mac and usually it is working fine between all three, but today it appears that it is not...
    interestingly, yesterday I got a random notice that i was signed out of iCloud..when in fact I wasn't...dont know if there is something bigger going on.  i've tried turning handoff off and on again but nothing.  don't really want to start signing out as i don't know what i have stored on my mac

  • CUP - field mapping from request to SU01 for Accnt No worked only once

    CUP - field mapping from request to SU01 worked only once. I configured the Field Mapping for Account Number with Account Id. First request worked fine in DEV systems, 2nd and 3rd requests failed. Same thing happened in QA systems. Not sure whether the difference in SP on GRC and ECC is causing this. Any help is greatly appreciated.
    We are currentky on GRC 5.3 ABAP stack SP 14.0  
    and
    ECC - SAPK-53315INVIRSANH VIRSANH 530_700: Support Package 0015
    Any help is greatly appreciated.
    Thanks,
    Vish

    Hi Diego,
    Yes, we are on VIRSANH SP15  also VIRSAHR SP13 for SAP_HR . My connector type is SAP HR System, Version ECC 6.0.
    We are on GRC 5.3  Support Pack 14.0 . Our GRC 5.3 installation is running on ABAP stack.
    It is very strange that in QA client, SU01 got updated atleast 3 times with new account number , user group. Tried 4th time, did not work. In DEV client, it worked only once.
    Thanks,
    Vish

  • Can I use Google Sync to transfer only my contacts from my IPhone 4 to my gmail acct? I don't want to sync info from Gmail to the IPhone. Can the sync work only one-way? I have 0 contacts on my gmail as I'll only use it as a back-up 4 my IPhone contacts.

    Can I use Google Sync to transfer only my contacts from my IPhone 4 to my gmail account? I do not want to sync info from Gmail to the IPhone. Can the sync work only one-way? I have 0 contacts & 0 calendar events on my gmail account. I opened the Gmail account specifically to for the Google Sync and wil only be using this account as a back-up for my IPhone contacts. Please Help!!

    You do realize that the SIM only contains account information for your wireless account.
    Moving the SIM from phone to phone does not cause any of your iTunes content, contacts, email, etc to magically appear on the device.

  • I have programmed my Iphone to automatically connect to confcalls (dialing the nbr, pausing, dialing the PIN code). Works fine from the Iphone as such. When I connect my Iphone in Bluetooth to my car, only the phone

    I have programmed my Iphone to automatically connect to confcalls (dialing the nbr, pausing, dialing the PIN code).
    Works fine from the Iphone as such.
    When I connect my Iphone in Bluetooth to the voice-driven system in my car (Mercedes C), only the phone number appears to be transmitted. Entering a conference call number via the Iphone while driving is not a good idea.
    How can I fix this ?

    That *****.  I sell electronics on ebay.  Before listing them, i have to test and clean them. I have worked with microsoft Zune, you could sync via wireless through the network to your host computer. 
    i was hoping Apple would add that feature or the ability to connect to my computer via WiFi or Bluetooth and sync it wirelessly...   It would be sweet to have the bluetooth and wireless opened up so you can do more than just  connect to headphones or a headset... 
    I upgraded to the iPhone 4 this past december, i am on replacement # 2 or my 3rd iPhone 4...  I was hoping for some upgrades in quality.  Also being left handed, it seemed to drop many calls and give me very poor reception.  i added a Griffin Elan Form Graphie case that covers all but the front, top button, bottom speakers and volume control buttons and the call and reception quality has improved.  But I sure would have loved to see some improvements in the quality and function of the phone...
    Thanks for your input, i really appreciate your replies... 

  • Strange problem with executing PL/SQL procedure from sqlplus.

    Hello,
    basicly, I'm strugling with executing a procedure written in PL/SQL from sqlplus.
    It's all because I convert a data in procedure by other function.
    SELECT partition_name
    INTO strpartition
    FROM user_tab_partitions
    WHERE table_name = tablename_in
    and substr(partition_name, -8, length(partition_name)) = (SELECT F_CONVERT_DATE(tablename_in,p_date) from dual);
    /tablename_in and p_date are input parameters/
    Function F_CONVERT_DATE looks more less like :
    select
    TO_CHAR(TRUNC(NEXT_DAY(ADD_MONTHS(substr(partition_name, -8, length(partition_name)), -3), 'MONDAY')-7), 'YYYYMMDD')
    END
    AS p_date
    INTO v_okr
    FROM user_tab_partitions
    where substr(partition_name, -8, length(partition_name)) = p_date;
    Well, the thing is that procedure is executable from TOAD without any errors !! But when I try to execute it straight from sqlplus it returns:
    ORA-01861: literal does not match format string
    ORA-06512: at "F_CONVERT_DATE", line 13
    ORA-06512: at "NAME_OF_PROCEDURE", line 17
    Tip: When I don't use functions ADD_MONTHS, NEXT_DAY and TO_CHAR in function F_CONVERT_DATE sqlplus can execute it. But only when I use them it returns an error.
    Anybody has a clue how to solve it?
    Regards !

    Hi, Nodex,
    Avoid implicit conversions.
    For example:
    TO_CHAR(TRUNC(NEXT_DAY(ADD_MONTHS(substr(partition_name, -8, length(partition_name)), -3), 'MONDAY')-7), 'YYYYMMDD')ADD_MONTHS expects a DATE as its first argument.
    SUBSTR returns a VARCHAR2, so you're calling ADD_MONTHS with a VARCHAR2 where it expects a DATE.
    For good or ill, the system tries to avoid raising an error in this case by implicitly converting the VARCHAR2 to a DATE. Exactly how it does that depends on
    (a) the tool you are using (SQL*Plus or Toad, for example),
    (b) the version (Oracle 10 behaved quite different form Oracle 9),
    (c) environmental settings (such as NLS_DATE_FORMAT), which in turn may depend on initialization parameneters, and
    (d) who knows what else.
    When you have to convert, do so explicitly.
    You can convert a VARCHAR2 to a DATE using TO_DATE, like this:
    TO_CHAR ( TRUNC ( NEXT_DAY ( ADD_MONTHS ( TO_DATE ( SUBSTR ( partition_name
                                                       , -8
                                          , LENGTH (partition_name)
                                     , 'YYYYMMDD'     -- or whatever
                             , -3
                      , 'MONDAY'
              - 7
         , 'YYYYMMDD'
         )

  • Since me and my mother moved from iChat to iMessage bêta, screen sharing works only one way. I can share my screen with her but not the reverse. When actually what I would like to do is share her screen. Video works fine both ways.

    Screensharing works only one way since we moved from iChat to iMessage bêta. Before that we have never had any problem with screen sharing. We haven't changed anything else, just installed iMessage. What I need to do is share her screen, and the only thing I can do is share my screen...
    Thanks for your help.

    HI,
    On the whole I am finding it very stable.  (it presents the same quirks in the same manner each time)
    It has some things that are more Feature requests than "Bugs" per se about the way it works that I would like to change.
    It can also be difficult to tell exactly what is going on whenyou are hearing about it third hand.
    Sounds like you have a plan.
    8:35 PM      Tuesday; March 20, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • All my email has disappeared from iCloud.  I did not delete it, and now it's working again, but only from 28 August 2013.  What happened to my old emails? How do I get them back? thanks

    All my email has disappeared from iCloud.  I did not delete it, and now it's working again, but only from 28 August 2013.  What happened to my old emails? How do I get them back? thanks

    Have you checked whether the emails are visible at http://icloud.com ? If they are, it's a problem between your Mac and the website; sign out in System Preferences>iCloud and sign back in again.
    If they aren't, then it's a server problem and you need to contact Support. If you currently happen to have AppleCare, either because you recently bought Apple hardware or have paid to extend the inititial period, you can contact them here:
    http://www.apple.com/support/icloud/contact/
    You will need the serial number of the covered hardware.
    If you are not covered by AppleCare, then - in common with other free email services - there is no free support and you may be asked to pay a fee; if so you should argue that this is a problem they've caused (it's not the first time, by the way) and you shouldn't be charged.

  • My iphone4's mic is not working. I can assure that my iphone4 is not on mute mode. The audio is working only when headset/handsfree plugged in.I tried reset my handset many times already but still nothing got success.what is the remedy to comeout from it.

    My iphone4's mic is not working. I can assure that my iphone4 is not on mute mode. The audio is working only when headset/handsfree plugged in.I tried reset my handset many times already but still nothing got success.what is the remedy to comeout from it.

    Try plugging the headphones in and gently wiggling them around for a few seconds. It may be that the sensor that tells the iPhone that headphones are plugged in has gotten stuck. If this doesn't work, they try a reset (hold down Sleep/Wake and Home all the way until the Apple logo appears on the screen).

  • Call PL/SQL Procedure (not stored) from SQLPLUS

    Hello,
    the following code creates a stored procedure and allows to call the procedure from SQLPLUS using EXEC.
    CREATE or REPLACE PROCEDURE welcome IS
    BEGIN
        dbms_output.put_line('Welcome user ' || user);
    END;
    exec welcome;I would like to do the same without storing the procedure. The procedure should be defined in an PL/SQL-Script and called in a SQLPLUS loop. On the one hand I do not have the privileges to create stored procdures. On the other hand I want to use put_line in the loop. Without passing control to SQLPLUS (e.g. the loop-master) all output is kept in the buffer and no information are shown during processing the data.
    Regards, Rainer

    netaktiv wrote:
    There should be a repair job updating many hundredthousends records. A script should be created and called only once and the calling user should be informed about the processing status. There is no need for heavy output, but after 5000 or 10000 records I would like to display a message saying nnnnn records processed.Then you need another mechanism to report the current status to the user.
    You cannot use the current session to do that. Sessions are serialised. That means they can do only service a single request at a time. So if the session executes procedure foo that updates 100's of 1000's of rows - then that is what the process will be doing. The procedure can only report back to the client after it has completed. It cannot interact directly with the client during the executing of that procedure.
    This means that if you want to actually send a notification to the client, you need to do that via a separate session. E.g. the 1st session executes procedure foo that performs the update. That procedure sends a notification (using DBMS_ALERT or DBMS_PIPE for example) to the 2nd session - where the 2nd session receives the asynchronous notification and reports that to the user.
    Another method would be for the update procedure to register a long operation using DBMS_APPLICATION_INFO. This enables another session to view the status and progress of the update procedure via virtual (v$) performance views.
    Another method would be for the client session not to start the update procedure itself. Instead it can schedule a background job (using DBMS_JPB or DBMS_SCHEDULER interfaces) - and then monitor the status of the job.
    Also suggest that you spend some time familiarising yourself with application developer fundamentals and concepts for Oracle. There are guides for both at http://tahiti.orcacle.com for the Oracle version you use. You cannot correctly use Oracle if you do not understand how Oracle works and what the application development features are. And your current approach using DBMS_OUTPUT is pretty much flawed and not how Oracle sessions should report their processing status to a client.

  • How to get ddls from sqlplus like that of TOAD

    Hi,
    I have to work on a terminal machine for a client where the TOAD is not installed. For my regular DBA activities I need to take the DDL many times.
    I am very much used to the style of DDL scripts which TOAD 9.6.x.x gives for any object in a schema.
    Can someone suggest how I can I get exactly TOAD-like scripts (which provide not just the create statements)
    For e.g.
    *1.From sqlplus when I do*
    select dbms_metadata.get_ddl('TABLE','APE1_ACCUMULATORS') from dual;
    I get only the below
    CREATE TABLE XLTDBO92.APE1_ACCUMULATORS
    CYCLE_CODE NUMBER(4) CONSTRAINT APE1ACCU_CYCLE_CODE_NN NOT NULL,
    CYCLE_INSTANCE NUMBER(2) CONSTRAINT APE1ACCU_CYCLE_INSTANCE_NN NOT NULL,
    CUSTOMER_SEGMENT NUMBER(4) CONSTRAINT APE1ACCU_CUSTOMER_SEGMENT_NN NOT NULL,
    CUSTOMER_ID NUMBER(9) CONSTRAINT APE1ACCU_CUSTOMER_ID_NN NOT NULL,
    ACCUM_TYPE_ID NUMBER(9) CONSTRAINT APE1ACCU_ACCUM_TYPE_ID_NN NOT NULL,
    OWNER_ID
    *2.But from TOAD 9.6.x.x when i click on "create scripts" I will get*
    DROP TABLE XLTDBO92.APE1_ACCUMULATORS CASCADE CONSTRAINTS;
    CREATE TABLE XLTDBO92.APE1_ACCUMULATORS
    CYCLE_CODE NUMBER(4) CONSTRAINT APE1ACCU_CYCLE_CODE_NN NOT NULL,
    CYCLE_INSTANCE NUMBER(2) CONSTRAINT APE1ACCU_CYCLE_INSTANCE_NN NOT NULL,
    CUSTOMER_SEGMENT NUMBER(4) CONSTRAINT APE1ACCU_CUSTOMER_SEGMENT_NN NOT NULL,
    CUSTOMER_ID NUMBER(9) CONSTRAINT APE1ACCU_CUSTOMER_ID_NN NOT NULL,
    ACCUM_TYPE_ID NUMBER(9) CONSTRAINT APE1ACCU_ACCUM_TYPE_ID_NN NOT NULL,
    OWNER_ID
    DROP SYNONYM XLTDB92.APE1_ACCUMULATORS;
    CREATE SYNONYM XLTDB92.APE1_ACCUMULATORS FOR XLTDBO92.APE1_ACCUMULATORS;
    GRANT DELETE, INSERT, SELECT, UPDATE ON XLTDBO92.APE1_ACCUMULATORS TO XLTDBO92_ALL;
    So my question is:
    How to such scripts from sqlplus as well ,irrespective of the type of the object?_
    Note:I am posting a new thread because my previous question was answered even though i was not able to type in completely. My mistake as it was posted in before i could finish the question.
    Regds,
    Kunwar

    If the DDL returned by dbms_metadata is not to your liking then write your own scrips to generate DDL or cover scripts to generate all related items that you want.
    In the case of synonyms and grants this is very easy using rdbms dictionary views, but if you generate a table's DDL you may also want and need the PK, UK, FK, secondary indexes, comments, and policies on the table as well as synonyms and grants. Everything that if you drop the tables goes away.
    There is a dbms_metaddata procedure get_dependent_ddl to generate dependend objects on a table that may be of interest.
    HTH -- Mark D Powell --

  • Oracle Spatial Query from SQLPLUS deteriorates in performance

    Hi,
    I am running an sql-procedure, which does spatial queries. When I run this procedure (from SQLPLUS) for the first time it takes around 45 sec to complete, but when I run the same procedure for the second time it takes 65 seconds and the performance keeps on decreasing. But if I open a new SQLPLUS session it takes 45 secs and it also starts deteriorating subsequently. This strange behaviour is only for spatial queries, if I don't have spatial queries in my procedure then its fine.
    I found this behaviour for any type of spatial query.
    Is there something which can be done for improving it ? I found a lot of information on improving performance of a query, but my problem is to maintain the same performance of the same query in the same session.
    Thanks,
    Rishi

    Hi,
    Could you provide version information?
    Also, could you try monitoring memory as the procedure is running an see
    if memory climbs more each time the procedure is run?
    Thanks

Maybe you are looking for

  • My iphone 3GS is not being recognised by my PC?

    My iphone 3GS is not being recognised by my PC, either in itunes or My Computer as a drive. iPad and iPod work fine. Phone also not found on other computers I have tried. Tried resetting the phone. Reloaded iTunes. Stumped now.

  • Pass tdline and tdformat to Sapscript

    Hi all, Can we pass tdline and tdformat at the same time to Sapscript? My requirement needs the tdformat to be dynamically, is this possible ? How should I pass a dynamic format to sapscript? If yes, could someone provide some sample code? Thanks in

  • HELP PLEASE, NOKIA TUNE FOR 3310

    Hi. I have a Nokia 3310, and i want to compose the ringtone from movie Crank, that special Nokia Tune. can someone help me please ?

  • Type-Pools in SE11 used on Class Parameter

    I have a strange one.  In 46C have parameter on a method of a class that uses a data type from a type pool.  Specific the parameter is a range type that is defined in the Type Pool.  In 46C this syntax checks fine.  But now we have upgraded our test

  • Qosmio X300-14F - Question about illumination buttons and XP downgrade

    Hello, I've got 2 questions concerning the laptop I bought 3 weeks ago. _*Question1*_ There are 9 buttons above the F-keys. They're being lit. In the beginning they all worked fine, but recently I've found that only the buttons designed to work in a