Refeferencing DB local synonyms

I have some done a good deal of poking around on this forum in search of an explicit or implicit answer to my question, but have not been able to find a clear one. So I'll try this.
I have two schema in our production database; one which I will call PROD_STAR, and another I will call REPORT.
The PROD_STAR schema is open for updates to some users; we do ETLs from other data sources to populate our star schema.
The REPORT schema consists of synonyms referencing the PROD_STAR schema. Almost all of the synonyms have only 'select' grants, but there are a few tables which have CRUD grants as well.
This is the behavior I am seeing;
Ex:
Table X in PROD_STAR is very simple; some NUMBER and VARCHAR2 fields. There is a synonym X in REPORT which has been granted 'all' privileges on the table X in PROD_STAR.
I built a form with interactive report against table X in the schema PROD_STAR. Then I was informed that I should really be using the REPORT schema with appropriate grants from PROD_STAR for table X.
So, I did the appropriate grants, and switched the Parsing Schema to REPORT.
Now, the interactive report loads with  the same query it had when the Parsing Schema was PROD_STAR.
select ... from #owner#.X
The report populates fine.
However, when I try to edit and pop up the form view, I get the following
   Table or view X not found Contact your application administrator.
Technical Info (only visible for developers)
is_internal_error: true
apex_error_code: WWV_FLOW_DML.TABLE_NOT_FOUND
component.type: APEX_APPLICATION_PAGE_PROCESS
component.id: 2248405326917199
component.name: Fetch Row from X
error_backtrace: ----- PL/SQL Call Stack ----- object line object handle number name 3fb543b18 548 package body APEX_040200.WWV_FLOW_ERROR 3fb543b18 599 package body APEX_040200.WWV_FLOW_ERROR 3fb543b18 903 package body APEX_040200.WWV_FLOW_ERROR 418f0b940 160 package body APEX_040200.WWV_FLOW_DML 418f77270 332 package body APEX_040200.WWV_FLOW_PROCESS 418f77270 783 package body APEX_040200.WWV_FLOW_PROCESS 3fc9bb868 1909 package body APEX_040200.WWV_FLOW_PAGE 42e559818 6725 package body APEX_040200.WWV_FLOW 3fbd061a8 249 procedure APEX_040200.F 41814d6e0 2 anonymous block
I can create a new row for X, which uses the same form, and items are created in the PROD_STAR database.  But I can not edit,  so there is something about the row fetch that isn't happy when I'm bringing back an existing item.
When I try to create a new form with interactive report while REPORT is the Parsing Schema, it doesn't even see the synonyms, so am dead in the water there.
Any thoughts?
Thanks
-jg-

Marco,
From the server installation notes:
Connect Method - Select Local to connect to a local database using the Oracle SID, or select Remote to connect to a remote database through Oracle Net using LOCAL on Windows or TWO_TASK on UNIX.
Connect String - If you choose the Remote connect method, enter the connect string for the remote database.
Hope this helps..
Raja

Similar Messages

  • PL/SQL Web services working with synonyms but not parameters Collection

    Hi
    I am Using JDeveloper 10.1.3.1.0
    i could able to test successfully the PL/SQL web services with the synonyms.I created the PL/SQL web services in 'MKI' schema and then i dropped the objects from the MKI schema and launched the same in 'BAS' Schema and given grants to MKI schema and Created the Local synonyms in Schema 'MKI' and now when i test the PL/SQL web service, it is working successfully.
    There was problem with passing the collection types as parameters in web services in that case it is giving the following Error
    "Internal Server Error (Caught exception while handling request: java.rmi.RemoteException: java.sql.SQLException: Internal Error)"
    Could any one suggest me the reason for the above error?
    Regards
    Malathi

    Just a clarification about the problem.
    Even though, if an exception is raised, the Connection object will be eventually closed(), it may take a while and if there are lots of users getting exceptions at the same time the connection pool can quickly run out of connections (correct me if I am wrong please.)
    That is why we think the Connection object should be immediately closed in the case of an exception is raised and we are looking for a fix for this.
    Thanks
    Luis

  • Cannot see views in table list when building a form or report page

    We are new to APEX. accessing remote databases by defining database links in our apex instance and then views in the apex instance on the remote tables. We set up all this stuff, then when we go to build a report or form on one of the views, the views are not showing up in the popup list for us to choose from.
    Any ideas as to why this would be? it's a showstopper for our application right now. Any help would be greatly appreciated! Thanks.
    Edited by: moo on Apr 11, 2011 11:55 AM

    Did you define local synonyms for the objects? Try this and then come back..
    Thank you,
    Tony Miller
    Webster, TX
    While it is true that technology waits for no man; stupidity will always stop to take on new passengers.
    If this question is answered, please mark the thread as closed and assign points where earned..

  • How can we identify the location from which a map is run, in the map ?

    Hi,
    I have a map that moves data from source system into the target system.
    I have two locations in the project (PROD_SOURCE and PROD_TARGET).
    My map picks the source table from PROD_SOURCE location and inserts into the target table in PROD_TARGET location.
    Now, this map can be deployed by changing the source location.
    In my map, I want to find out the location and subsequently the source database from which the map was run. This has to be inserted into a table
    Any pointers?
    -Pushkala

    You can always query the data dictionary in a pre- or post- mapping procedure.
    e.g.:
    select dep.owner, dep.object_name
    FROM PUBLIC_DEPENDENCY pd,
    all_objects dep,
    all_objects src
    where pd.object_id = src.object_id
    and pd.referenced_object_id = dep.object_id
    and dep.object_Type = 'TABLE'
    and src.owner = 'ERS_CTRL3X'
    AND src.object_name = 'TEST_MAP'
    AND src.object_type = 'PACKAGE BODY'
    will give me the listed owner of all tables referenced in this mapping. Knowing the table name, I would have access to the owner name. Now, whether you also will need to query agains all_db_links to see where a given db link is pointing to resolve the owner etc, or all_synonyms to resolve local synonyms to the db_link that they operate against etc I do not know. But tracing the dependancy tree from the current runtime copy of the package will get you to what you need.

  • Uploading Documents to Another Database Through APEX

    Hi,
    I am trying to find a solution for uploading documents through APEX, but storing them in a database on a different server other than the server where apex is installed.
    I am unable to use DBLINK, because we are needing to pass a BLOB column. We have also looked into the DAD, but it only allows for one database connection for the APEX instance. I am pondering with creating a database connection to the other database when needing to upload a document, but not certain if that is the most efficient way.
    I am wanting to know if there is a way to upload documents (BLOBS) through APEX that is installed on DATABASE A, but store the documents in DATABASE B?
    Thanks,
    Keisha

    Ok...up front warning...this is a bit klugey but, it does work.
    In the APEX database:
    Create the table (with the BLOB column) to which you will upload the documentsWe're going to get them to the remote DB but, for reasons that will become apparent shortly, they need to go here first.
    In the Remote database:
    Create a DB Link to the APEX database.
    Create a Materialized View that selects from table with the the BLOB column in the APEX database
    In the APEX database:
    Create a local synonym that points to the DBMS_REFRESH package in the Remote database.For this example, we'll name the synonym REMOTE_DBMS_REFRESH
    Create a PL/SQL procedure that does the following:
    Upload the document to the APEX database
    Fire the REFRESH method for the MV that you created using REMOTE_DBMS_REFRESH
    Remote the data from the APEX database
    For whatever reason, the restriction to copy LOB data over the link is by passed when using a Materialized View.
    Cheers,
    -Joe

  • Database link works for form but not report

    I have created a database link to the scott.emp table in a remote database then created a local synonym in my Portal.
    I then created a Form and a Report referencing the local synonym. The for works and allows me to insert record but the form does not. The report compiles fine but I get a message that Portal can't find the underlying table. It seems that if the form works then the report should too. Does anyone have a recommended solution?
    Thank you.
    Sam Masias

    There is a bug filed for this issue. And it should be taken up for fixing most probably in next release.

  • Connecting and Updating External Database from SAP

    Connecting and Updating External Database from SAP
    How can i connect SAP Database to External database?
    How can i update external databas from SAP withouting using BI/BW, Workflow or Net Weaver?
    If anyone know please let me inform.
    Thanks in Advance.
    Jahnavee Trivedi

    Steps
    1. Create an entry in tnsnames.ora for the remote oracle DB
    2. Test sqlplus user/pass@remote 
    3. create a synonym which points to a table at remote DB check docs.oracle.com
    4. user ABAP code execute SQL to insert data into local synonym which inturn updates the remote DB.
    I have done this in the past, it works great.
    It requries, DBA skills + ABAP programming
    -AJ

  • Can I define tables/views of another oracle database as data sources in DBI?

    Hi!
    Assuming I created a dblink between an Oracle EBS database and another oracle database and I wish to create custom dashboards and reports in Oracle Daily Business Intelligence, will the tables/views from the another oracle database be allowed as the data sources?
    Thanks.

    Pl do not post duplicates - Can I read data from other database and tables in Oracle Daily Business Intelligence?
    Whether the custom tables are in the same database or a separate database is a trivial issue - a database link and local synonyms can easily mask where the tables are located.

  • EA1 : Bug for F4 to Describe Table

    Hi,
    SQL Developer EA1 1.5, Win XP, Java 1.5.0_01, againts 9i and 10gR2 Database.
    I use the Describe functionality using F4, the following happened :
    - Cannot describe tables owned by other user, both for DBA's liked user and standard user
    However run :
    desc otheruser.table1 from SQL Worksheet is working and showing tables structure
    and code completion seems to working correctly (I did use the code completion and then F4 to try this)
    Just example :
    -- query is working,
    -- but F4 showed a popup message : No Object Found: system.help
    select *
    from   system.help;   No Describe Window open at all.
    - Describe tables owned by myself
    Two conditions :
    1. User with granted select and connect (on Oracle 10.2.0.2)
    Describe Window doesn't appear.
    Just example :
         -- query is working,
         -- but F4 showed a popup message : No Object Found: myuser.mytable
         select *
         from   myuser.mytable;  
                             But.... now Describe Window appears
        -- query is working,
        -- F4 showed a popup message
        -- Pop up : No Valid Query
        -- No query found for version of the selected database
           select *
           from   sys.dual;             
           select *
           from   mytable; -- without specifying myuser (schema/owner)
        2. User with privilage near to DBA (on Oracle 9.2.0.6 64 bit)
    Describe Window appears.
    Pop up : No Valid Query
    No query found for version of the selected database
    And
    The following error occured :
    java.lang.NoSuchFieldException: TABLE_NODE_ICON at java.lang.Class.getDeclaredField(Class.java:1854) at oracle.dbtools.raptor.images.RaptorImage.getIcon(RaptorImage.java:31) at oracle.dbtools.raptor.controls.display.DisplayModel.getIcon(DisplayModel.java:295) at oracle.dbtools.raptor.oviewer.base.PopupDescribe.showPopup(PopupDescribe.java:142) at oracle.dbtools.raptor.oviewer.base.PopupDescribe.showPopup(PopupDescribe.java:99) at oracle.dbtools.raptor.oviewer.base.PopupDescribe.showPopup(PopupDescribe.java:76) at oracle.dbtools.sqlworksheet.sqlview.SqlEditorController.handleEvent(SqlEditorController.java:587) at oracle.ideimpl.controller.IdeActionHook$MetaClassController.handleEvent(IdeActionHook.java:407) at oracle.ide.controller.IdeAction.performAction(IdeAction.java:513) at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:843)
    at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:486)
    at oracle.ide.ceditor.keymap.IdeKeymapHelper.invokeAction(IdeKeymapHelper.java:160)
    at oracle.javatools.editor.keys.MultiKeyHandler.keyPressed(MultiKeyHandler.java:334)
    at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:191)
    at java.awt.Component.processKeyEvent(Component.java:5446)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2713)
    at java.awt.Component.processEvent(Component.java:5265)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
    at java.awt.Component.dispatchEventImpl(Component.java:3841)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Window.dispatchEventImpl(Window.java:1774)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Has anyone got this issue?
    Regards,
    Buntoro

    Sue,
    Which bug are you talking about as being 9i specific?
    I am on 10.2.0.3 and using EA2 with JDK 1.6.0_04 and still getting the following:
    My user has a private synonym THEIR_TABLE for OTHER_USER.THEIR_TABLE and select access.
    My user has select access but no synonyms for OTHER_USER.OTHER_TABLE.
    Describe works with THEIR_TABLE, OTHER_USER.THEIR_TABLE and OTHER_USER.OTHER_TABLE, but fails in OTHER_TABLE - so this all works as expected.
    F4 works as follows:
    THEIR_TABLE: shows "No Valid Query: No query found for version of the selected database" dialog, but the table (not the synonym!) is described successfully after accepting the dialog
    OTHER_USER.THEIR_TABLE: describes private local synonym!
    OTHER_USER: shows "No Object Found: other_table" dialog
    OTHER_USER.OTHER_TABLE: shows "No Object Found: other_user.other_table" dialog
    F4 does not seem to cope (in my experience) with schema references in the object name being described.
    The only difference between EA1 and EA2 is that I am no longer getting the java.lang.NoSuchFieldException: TABLE_NODE_ICON exception on the console.
    Just a note - I like the fact that F4 on THEIR_TABLE describes the table rather than the synonym.
    theFurryOne

  • Use of Prefix SYS before dbms.output()

    Hi all,
    This may be silly. But i have a doubt what is the difference between the below two:
    DBMS_OUTPUT.PUT_LINE('TEST');
    AND
    SYS.DBMS_OUTPUT.PUT_LINE('TEST');
    What is the use of SYS prefix?
    Regards
    Vijayaragavan

    788844 wrote:
    This may be silly. But i have a doubt what is the difference between the below two:
    DBMS_OUTPUT.PUT_LINE('TEST');
    AND
    SYS.DBMS_OUTPUT.PUT_LINE('TEST');
    Not silly at all. This is a scope resolution issue.
    All programming languages have scope resolution. You refer to a call (method, function, procedure, etc). The system (compiler or run-time engine) needs to figure out exactly what you are referencing , in order to execute that call.
    In the case of PL/SQL, the PL/SQL engine will first use the local scope - in other words, the objects (procedure, functions, variables, etc) defined in the current code unit and schema.
    If it fails to resolve the call reference, it looks at the public scope.
    DBMS_OUTPUT.put_line() is a package call reference. So the 1st check would the local check. Does such a package exist in the current schema? Is there a local synonym that can be used?
    If this fails, scope becomes public. Is there a public reference (synonym in this case) that resolves this?
    The answer for DBMS_OUTPUT is yes - and that public synonym refers to the package owned by the SYS schema.
    If you had a local package with the same name, or a local synonym, then that would have been used.
    When you now code SYS.DBMS_OUTPUT.put_line() instead, you explicitly state the scope to the PL/SQL engine. You are telling it that you are referring to the DBMS_OUTPUT object owned by the SYS schema.
    Both methods have certain advantages and disadvantages.
    Simplistically, implicit scope (where you leave it up the engine to find the object you are referencing) provides more flexibility. Let's say you need to modify the behaviour of DBMS_OUTPUT - have it for example also write output to a log file. You can create your own DBMS_OUTPUT package with the exact same interface as the SYS.DBMS_OUTPUT package. Inside your custom package you can write output to a log file and then call the SYS.DBMS_OUTPUT package to do its part.
    The original source code using DBMS_OUTPUT.put_line() works unchanged. All you have now introduced is a local reference that satisfy the scope - and your local DBMS_OUTPUT package is now used instead.
    Explicit scope can be argued to be more secure. As no-one can "hijack" your code's call by manipulating scope resolution - and do the above and create a custom DBMS_OUTPUT package. But this also makes the code a lot more rigid.
    In general in PL/SQL - implicit scope is desirable as it provides the flexibility that is often needed. When one writes "trusted" code (code that does superuser stuff and needs to be trusted to always do the right thing), then explicit scope should be considered instead.

  • Different schema for LOV

    I am a new, new Apex user. I am attempting to create a LOV for a page in an application schema PROMOMGR. The table I would like the LOV to reference is in schema FIMSMGR. The only way I could figure out how to get this to work was to create a view with the right information in the PROMOMGR schema that pointed to the FIMSMGR table. This seems pretty clunky... I have verified that PROMOMGR has rights to select the LOV table, I have even attempted to create a local synonym that points to the FIMSMGR table -- neither of which worked. I would love some suggestions.
    TIA,
    DJM

    That was a good thought, Mike. I had indeed created a role and granted rights that way. So I granted select on the FIMSMGR table. Unfortunately, I still get the same error that first the schema owner is invalid, then that PROMOMGR doesn't have sufficient rights. I then granted ALL rights to PROMOMGR on that table, with no change.
    OK, I think I have it figured out. If I type it in manually, it works ok, if I try the graphic interface to build a dynamic LOV, it fails...which makes sense, because the table owner ISN'T PROMOMGR (my only choice, which I don't understand).
    Thanks for the help, it did indeed work!
    DJM

  • Clobs dblinks

    Is there any way to select a clob across a dblink ? what I have to do now is select all the columns individually (can add up) and exclude the clobs ? Or can you auto-generate a select with all the columns on a remote table across a link ? I know we can drag/drop a table to the worksheet and get a select built, but how to do this for a remote table ?
    Thanks,
    Mark

    Try to create a local synonym for the remote table.
    If you still can't select the CLOB, at least you do get the table in your Tables node if you check Include Synonyms in the Apply Filter dialog on the Tables node.
    Hope that helps,
    K.

  • Same schema/workspace for multiple users

    I would like to allow some PHP developers access my XE schema for reading only. Is it possible to set up such restriction?

    Sure,
    I would suggest the following:
    (1) create a new user, e.g. PHP (needs CREATE SYNONYM privilege)
    (2) grant access to all relevant tables, views, procedures, ... to PHP
    (3) connect as user PHP and create local synonyms
    See the following example:
    C:\temp\xe>sqlplus hr/<pwd>@xe
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Mar 2 22:24:14 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta
    SQL> grant select on regions to php;
    Grant succeeded.
    SQL> connect php@www_xe
    Enter password:
    Connected.
    SQL> create synonym regions for hr.regions;
    Synonym created.
    SQL> desc regions;
    Name                                      Null?    Type
    REGION_ID                                 NOT NULL NUMBER
    REGION_NAME                                        VARCHAR2(25)
    SQL> select region_name from regions where rownum=1;
    REGION_NAME
    Europe
    SQL> delete from regions;
    delete from regions
    ERROR at line 1:
    ORA-01031: insufficient privilegesYou can use scripts to generate your synonyms, just google for them. Makes life easier :).
    ~Dietmar.

  • One ETL question.

    I outport the source data to another database using owb.
    For example:
    The source data is in machine A(installed oracle 9i);
    The metadata of runtime repository and target schema is in machine B(installed oracle 9i and owb);
    The machine C(installed oracle 9i);
    May i import the source data from A to C?
    How to realize it?
    thx.

    Folks,
    Correct. In order to implement this option, you would have to load across database links. We do not support that (today), because the implementation would run a lot slower than it would do if you use local objects. You can fake the situation by creating local synonyms in one database, that point to objects in another database. Also, in design your tables would be somewhere else than you tell Warehouse Builder they are.
    In the next release, we may support loading across a database link, primarily to target a non-Oracle database.
    Thanks,
    Mark.

  • SQL Server synonym used in two ways, local table and Oracle table via ODBC, fails on ODBC

    I am implementing a Web Site at our institution that was written for another institution that was all SQL Server.The Web Site has included as a feature the use of synonyms which have a dual use. Normally they point to a different machine, different database (PeopleSoft)
    via linked server, but if the linked server connection fails they can be switched to point to tables on the local instance by running a stored procedure that redefines the synonyms. This is a failover feature meant to keep the site up by resorting to
    possibly out of date data if need be.
    This means that any SQL Select statement that uses one of these synonyms is unaware of whether the data returned comes from the local instance or from another remote instance. There is no logic to check whether the linked server is functioning or not.
    The local instance is a custom SQL Server database at both institutions. The remote instance is one of two PeopleSoft instances at both shops; however, while the original website was written to work with the remote instance being SQL Server,
    our shop uses Oracle for PeopleSoft. This means that our linked servers are further complicated by an ODBC connection that the original site did not need.
    The problem I have is that the SQL statements in the stored procedures that came with the Web Site do not work when a synonym is used that points to the remote PeopleSoft instance. The same statements also fail in SSMS.  I get this error when I run
    this statement (select * from PS_ZZ_BUD_JOB_VW):
    Error: The OLE DB provider "OraOLEDB.Oracle" for linked server "CSUPG" does not contain the table
         ""dbo"."PS_ZZ_BUD_JOB_VW"". The table either does not exist or the current user does not have  permissions on that table.
    I can successfully query the PeopleSoft database using openquery, but unless I can get the synonyms to work as they were intended to, I'll have to rewrite all the stored procedures that use them to: 1) check if the linked servers are up, then 2) execute
    one of two versions of each SQL statement depending on the result of that check.

    Will the four-part notation work when the synonym is pointing to the local SQL Server table ?
    You should not use four-part notation when you reference your synonym. The four-part query that I suggested is only one you would to determine to define our synonym correctly when the view is on the Oracle server.
    In the case of synonym PS_ZZ_BUD_JOB_VW, it can point to either an Oracle view of the same name, or to a local SQL Server table named PS_HR_JOB.
    Then the table is local the synonuym definition should be
    CREATE SYNONYM PS_ZZ_BUD_JOB_VW FOR dbo.PS_HR_JOB
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for

  • Error while running RPTQUOTA_CHECK

    Hi Folks, I am getting error while running RPTQUOTA_CHECK as " personnel number not active or has not been created " All Configurations required for quota generation were done starting form absence type creation to generation rule. QUOMO feature main

  • Deletion of Appended searchhelp

    Hi Experts,                   I got a problem while deleting Appended searchhelp.please help me out with this. I have appended a serachhelp to the standard searchhelp.when i try to delete the Append serachhelp system is not allowing me delete saying

  • Cant access movies on my mac with my iPad!

    So I have movies that I have purchased off of iTunes stored on my mac, they are actually on an external hard-drive, but I can no longer access my stored movies from my iPad. the message "request timed out" appears after a short while of waiting. plea

  • Huwaei E169 modem and OS X 10.6

    (Apologies for posting this twice - I already posted it as a reply to another thread, but I'm marking it as a 'question' here in the hope of a response.) My parents just bought a MacBook running 10.6 in the UK. They have an E169 modem from '3' (Tre)

  • MacBook Air vs. HP Office Jet Pro 8600

    My computer and printer originally paired together and printed fine, but a week later the printer was not being responsive to my MacBook Air. I uninstalled all the drivers and software and redownloaded and installed them off of HP's website. The prin