Remote procedures created on Private Database Links

How to grant access to role on the private synonym created in a schema for the remote procedure with private Database links.
We have converted the public database links to private. Plz suggest me how to access the remote procedures and
grant access to role.
Thanks a Lot in advance.
Its Urgent

I asked in general since my task was stopped because of this.
Secondly i have asked the users not specifically you. If you dont want to answer just dont answer.
Coming to the problem, There was no problem when the public database links were used. The public synonyms were created and we were able to grant access with the role.
But why not with private dblinks.

Similar Messages

  • 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..

  • Create private database link

    Hi,
    I am currently working on a 92080 database on HPUX RISC platform.
    I have a question regarding DB link.
    There is already a public database link. I want to make it private since our organaization doesnt allow public database link.
    OWNER                DB_LINK                        USERNAME             HOST                           CREATED
    PUBLIC               DW.EADV.NA.JNJ.COM             GTWYCOMMAPP          HCSOP17.HCSPROD2.RAR.NCSUS.JNJ 05-APR-06
                                                                             .COM
    PUBLIC               EDIDB.EADV.NA.JNJ.COM          USER4DBLNK           HCSOP12                        12-APR-06
    PUBLIC               RAM_MART.EADV.NA.JNJ.COM       GTWYCOMMAPP          HCSOP30.hcsprod2.rar.ncsus.jnj 04-NOV-05
                                                                             .comMy question is -> If I want to create a private database link, should we login to each application schema and create the same?
    Or can we create a private database link logging in as SYS/SYSTEM. Please let me know
    Thanks!

    You can create database link in one schema and after that you can create public synonym ,therefore all users can use this db link.
    CREATE  DATABASE LINK DBN
       CONNECT TO SMART IDENTIFIED BY sm
       USING 'SB222'
    /You can create objects like view according this dblink and create publik synonym for this
    Edited by: Chinar on Dec 3, 2010 8:39 AM

  • 20 Index Restriction on Remote Tables (i.e. using Database Links)

    The Oracle Database Administrator's Guides for 10g and 11g document a performance restriction that "No more than 20 indexes are considered for a remote table." If I go back to the 8i documentation it says "In cost-based optimization, no more than 20 indexes per remote table are considered when generating query plans. The order of the indexes varies; if the 20-index limitation is exceeded, random variation in query plans may result."
    Does anyone have more details on this performance restriction? In particular I am trying to answer these questions:
    1) Are the 20 indexes which are considered by the CBO still random in 10g?
    2) Can I influence which indexes are considered with index hints or will my hints only be considered if they are for one of the "random" 20 indexes which are being considered by the CBO?
    3) Are there any other approaches or work-arounds to this restriction assuming you need to select from a large remote table with more than 20 indexes (and need to perform the selection using 1 of those indexes to get adequate performance) or do we need to abandon database links for this table?
    Thanks in advance for your input.

    So, here's my simple test.
    SQL>
    SQL> create table gurnish.indexes20plus ( n1 number, n2 number, n3 number, n4 number, n5 number, n6 number, n7 number,
    2 n8 number, n9 number, n10 number, n11 number, n12 number, n13 number, n14 number, n15 number, n16 number,
    3 n17 number, n18 number, n19 number, n20 number, n21 number, n22 number, n23 number, n24 number,
    4 n25 number, n26 number, n28 number);
    create index xin1 on indexes20plus (n1);
    Table created.
    SQL> SQL> create index xin2 on indexes20plus (n2);
    create index xin3 on indexes20plus (n3);
    Index created.
    SQL> SQL>
    Index created.
    SQL> SQL> create index xin4 on indexes20plus (n4);
    Index created.
    SQL> SQL>
    Index created.
    SQL> SQL> create index xin5 on indexes20plus (n5);
    create index xin6 on indexes20plus (n6);
    Index created.
    SQL> SQL>
    Index created.
    SQL> SQL> create index xin7 on indexes20plus (n7);
    Index created.
    SQL> SQL> create index xin8 on indexes20plus (n8);
    Index created.
    SQL> SQL> create index xin9 on indexes20plus (n9);
    Index created.
    SQL>
    SQL> create index xin10 on indexes20plus (n10);
    Index created.
    SQL> SQL> create index xin11 on indexes20plus (n11);
    create index xin12 on indexes20plus (n12);
    create index xin13 on indexes20plus (n13);
    Index created.
    SQL> SQL>
    Index created.
    SQL> SQL>
    Index created.
    SQL> SQL> create index xin14 on indexes20plus (n14);
    Index created.
    SQL> SQL> create index xin15 on indexes20plus (n15);
    Index created.
    SQL>
    SQL> create index xin16 on indexes20plus (n16);
    Index created.
    SQL>
    SQL> create index xin17 on indexes20plus (n17);
    Index created.
    SQL> SQL> create index xin18 on indexes20plus (n18);
    Index created.
    SQL> SQL> create index xin19 on indexes20plus (n19);
    Index created.
    SQL> SQL> create index xin20 on indexes20plus (n20);
    Index created.
    SQL> SQL> create index xin21 on indexes20plus (n21);
    Index created.
    declare
    i number;
    begin
    for i in 1..100
    loop
    dbms_random.seed(i+100);
    insert into indexes20plus values (dbms_random.value(1,5),dbms_random.value(1,21),dbms_random.RANDOM, dbms_random.RANDOM,dbms_random.value(1,20),
    dbms_random.value(1,4),dbms_random.value(1,6), dbms_random.value(1,7),dbms_random.value(1,9),dbms_random.value(1,10),
    dbms_random.value(1,11),dbms_random.value(1,12),dbms_random.value(1,13),dbms_random.value(1,14),dbms_random.value(1,1),
    dbms_random.value(1,1),dbms_random.value(1,19),dbms_random.value(1,122),dbms_random.value(1,20),dbms_random.value(1,20)
    ,dbms_random.value(4,20),dbms_random.value(1,20),dbms_random.value(1,20),dbms_random.value(1,20),dbms_random.value(1,20)
    ,dbms_random.value(4,20),dbms_random.value(4,20));
    end loop;
    commit;
    end;
    SQL> set autotrace traceonly
    SQL> l
    1* select * from gurnish.indexes20plus@lvoprds where n1 = 4
    SQL> /
    no rows selected
    Execution Plan
    Plan hash value: 441368878
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU
    )| Time | Inst |
    | 0 | SELECT STATEMENT REMOTE | | 1 | 351 | 1 (0
    )| 00:00:01 | |
    | 1 | TABLE ACCESS BY INDEX ROWID| INDEXES20PLUS | 1 | 351 | 1 (0
    )| 00:00:01 | LVPRD |
    |* 2 | INDEX RANGE SCAN | XIN1 | 1 | | 1 (0
    )| 00:00:01 | LVPRD |
    Predicate Information (identified by operation id):
    2 - access("A1"."N1"=4)
    Note
    - fully remote statement
    - dynamic sampling used for this statement
    Statistics
    0 recursive calls
    0 db block gets
    0 consistent gets
    0 physical reads
    0 redo size
    1897 bytes sent via SQL*Net to client
    481 bytes received via SQL*Net from client
    1 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    0 rows processed
    SQL> select * from gurnish.indexes20plus@lvoprds where n21 = 4;
    no rows selected
    Execution Plan
    Plan hash value: 2929530649
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU
    )| Time | Inst |
    | 0 | SELECT STATEMENT REMOTE | | 1 | 351 | 1 (0
    )| 00:00:01 | |
    | 1 | TABLE ACCESS BY INDEX ROWID| INDEXES20PLUS | 1 | 351 | 1 (0
    )| 00:00:01 | LVPRD |
    |* 2 | INDEX RANGE SCAN | XIN21 | 1 | | 1 (0
    )| 00:00:01 | LVPRD |
    Predicate Information (identified by operation id):
    2 - access("A1"."N21"=4)
    Note
    - fully remote statement
    - dynamic sampling used for this statement
    Statistics
    1 recursive calls
    0 db block gets
    0 consistent gets
    0 physical reads
    0 redo size
    1897 bytes sent via SQL*Net to client
    481 bytes received via SQL*Net from client
    1 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    0 rows processed
    SQL>

  • Is Identifier required for Private database link

    Hi All,
    A public database link is created between two databases: db1 and db2.
    x.world is the name of the link.
    when we access the data as
    select * from tab@x i am getting the data.
    But if the database link is private
    can we access the data using the same query or .world is required.
    Reg
    Ravi

    Hi,
    You must understand first what type of database link you are creating. If you are working Anonymous database link then make sure that user account persists on destination database.
    Other wise you might end up with Insufficient Privileges.
    Refer to : http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/ds_concepts002.htm
    - Pavan Kumar N

  • Create View from Database Links - Question

    Question
    I'm missing something simple.
    I'm trying to create a view, from a Database Link.
    CREATE VIEW view_name
    AS SELECT a.*
    FROM schema.tablename@dblink a;
    When I run this in the SQL Commands window.
    I get this error message.
    ORA-00933: SQL command not properly ended
    What am I missing? Any help is appreciated...

    <i>CREATE VIEW vw_name
    AS SELECT a.*
    FROM [email protected] a;
    </i>
    <br>
    1) User (schema) which is creating view must have proper db_link to source database. For that try this for testing purpose:
    select 1 from [email protected]<br>
    If this fail then db_link is not ok! This step is absolute must to go any further step to!!!
    <br>
    2) when db_link is set, then your view should be named as:
    CREATE VIEW vw_name
    AS SELECT *
    FROM <b>schema_name</b>.[email protected];<br>
    please pay attention to "schema_name", because from remote side every table is in some schema so it really need declaration of owner schema.
    <br>
    Hope this helps...

  • Creating user using database link

    Hi
    I have 11g installed on one of the server
    I have created the database link BUGAU to bugau.us.oracle.com
    link works fine
    select * from table@"Bugau" gives the expected result
    I need run the below statement from my server using the dblink.but not sure how to use the dblink for this purpose.Please assit
    CREATE USER ABC IDENTIFIED BY welcome DEFAULT TABLESPACE USERS_001 TEMPORARY TABLESPACE temp123;
    GRANT DEFAULT TO abc;
    ALTER USER abc PROFILE LEVEL_1;
    Thanks
    Archana

    as mentioned in oracle documentation for db link purpose: you can use it for accessing schema objects in remote database..
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_5005.htm
    >
    Use the CREATE DATABASE LINK statement to create a database link. A database link is a schema object in one database that enables you to access objects on another database. The other database need not be an Oracle Database system. However, to access non-Oracle systems you must use Oracle Heterogeneous Services.
    After you have created a database link, you can use it in SQL statements to refer to tables and views on the other database by appending @dblink to the table or view name. You can query a table or view on the other database with the SELECT statement. You can also access remote tables and views using any INSERT, UPDATE, DELETE, or LOCK TABLE statement.
    >
    For creating users, you have to login to the remote database itself, You also need to login using the user who has the necessary credentials to create the user.
    Regards,
    Dipali.

  • Issue while creating location with database link

    Hi all,
    I am using OWB 10.2.0.4.0 (same Oracle DB version). I am trying to create a location using a database link.
    When I select the location which the database link is located (From location drop-down list), I face the following error.
    >
    ENV0036: The selected location is not valid.
    ENV0036: The selected location is not valid.
         at oracle.wh.service.sdk.integrator.RepositoryUtils.createDBLinkWithLocation(RepositoryUtils.java:156)
         at oracle.wh.ui.environment.wizards.DatabaseLinkComponent.init(DatabaseLinkComponent.java:61)
         at oracle.wh.ui.environment.wizards.DatabaseLinkComponent.reload(DatabaseLinkComponent.java:204)
         at oracle.wh.ui.environment.wizards.FromLocationComponent.itemStateChanged(FromLocationComponent.java:111)
         at javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1162)
         at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1219)
         at javax.swing.JComboBox.contentsChanged(JComboBox.java:1266)
         at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:100)
         at javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel.java:88)
         at javax.swing.JComboBox.setSelectedItem(JComboBox.java:551)
         at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:597)
         at javax.swing.plaf.basic.BasicComboPopup$ListMouseHandler.mouseReleased(BasicComboPopup.java:749)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232)
         at java.awt.Component.processMouseEvent(Component.java:5100)
         at javax.swing.plaf.basic.BasicComboPopup$2.processMouseEvent(BasicComboPopup.java:452)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)
         at java.awt.Dialog$1.run(Dialog.java:542)
         at java.awt.Dialog$3.run(Dialog.java:569)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:567)
         at java.awt.Component.show(Component.java:1133)
         at java.awt.Component.setVisible(Component.java:1088)
         at oracle.bali.ewt.wizard.WizardDialog.runDialog(Unknown Source)
         at oracle.bali.ewt.wizard.WizardDialog.runDialog(Unknown Source)
         at oracle.wh.ui.owbcommon.OWBWizard.initialize(OWBWizard.java:815)
         at oracle.wh.ui.owbcommon.OWBWizard.<init>(OWBWizard.java:168)
         at oracle.wh.ui.owbcommon.OWBWizard.<init>(OWBWizard.java:147)
         at oracle.wh.ui.owbcommon.IdeUtils._doLaunchDefinition(IdeUtils.java:1188)
         at oracle.wh.ui.owbcommon.IdeUtils.showWizard(IdeUtils.java:471)
         at oracle.wh.ui.owbcommon.IdeUtils.showWizard(IdeUtils.java:427)
         at oracle.wh.ui.jcommon.tree.WBRepositoryObjectTree.launchWizard(WBRepositoryObjectTree.java:502)
         at oracle.wh.ui.console.commands.CreateByWizardCmd.showUI(CreateByWizardCmd.java:33)
         at oracle.wh.ui.console.commands.CreateCmd.performAction(CreateCmd.java:76)
         at oracle.wh.ui.console.commands.TreeMenuHandler$1.run(TreeMenuHandler.java:188)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:189)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:478)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    >
    Could you please let me know how to solve this and how to create such location with OMB*Plus?
    Thanks,
    Sebastian

    Hi David,
    Thanks a lot for the tip. Now I was able to use this and using a registered location.
    OMBCREATE LOCATION 'X' SET PROPERTIES (TYPE,VERSION,CONNECTION_TYPE, SCHEMA) VALUES ('ORACLE_DATABASE','11.1','DATABASE_LINK','MY_SCHEMA')
    OMBCREATE CONNECTOR 'REGISTERED_LOC/X SET PROPERTIES (DATABASE_LINK_NAME) VALUES ('MY_DBLINK') SET REF LOCATION 'X'
    OMBCOMMIT
    OMBCC '/MY_PROJECT'
    OMBCAC 'DEFAULT_CONFIGURATION'
    OMBCONNECT CONTROL_CENTER USE 'owb_user/owb_user'
    OMBREGISTER LOCATION 'X' REUSE
    OMBCOMMITBut now my question is the following.
    I am having problems to import the metadata from X.
    When create a module (source), I am able to make "data location" from location 'X' but when I want to import a table from location 'X' is not possible, because it shows as a plausible metadata location as "REGISTERED_LOC"
    Could you please let me know how to use 'X' as metadata location?
    Thanks!
    Sebastián

  • I should create a new database link to an AS/400 server but i m rookie!!

    İ have an oracle 10g DB server.İ need get some of data from AS/400 DB on other location and put them all to my oracle server.İ should create a database link between oracle server and AS400 DB but how will i realize that event.in oracle 10g enterprise manager console i choose administration-database link-create database link.At this step how could i fill the requirement.Which format should i use.
    General
    * Name:????????     (should i type the AS400 IP?????)
    * Net Service Name:????????     (what should i fill)
    Public - This database link is available to all users.
    Connected User:
    Current User
    Fixed User
    Username     
    Password     
    Confirm Password     
    thanks for all as now

    İ have an oracle 10g DB server.İ need get some of data from AS/400 DB on other location and put them all to my oracle server.İ should create a database link between oracle server and AS400 DB but how will i realize that event.in oracle 10g enterprise manager console i choose administration-database link-create database link.At this step how could i fill the requirement.Which format should i use.
    General
    * Name:????????     (should i type the AS400 IP?????)
    * Net Service Name:????????     (what should i fill)
    Public - This database link is available to all users.
    Connected User:
    Current User
    Fixed User
    Username     
    Password     
    Confirm Password     
    thanks for all as now

  • Procedure containg select from Database link

    Hi,
    I have one database link xxx which is getting some data from one table from Sqlserver database.
    Now I am writing one procedure which contain
    if(c=1) --get from databaselink
    select name,num from table1@xxx;
    else --get from the Oracle table;
    Now iam calling that procedure from .net application which is giving the following error :ORA-01002: fetch out of sequence
    ORA-02063: preceding line from FSPDEV_TO_AVERY_ORGRPT
    it is giving the above error if c=1 otherwise the else part is working fine.
    What i need to do?
    Thanks

    Hi,
    Thanks for your response.
    my procedure is like this:
    Cur_Out sysrefcursor
    if(c=1) --get from databaselink
    Open Cur_out for
    select name,num from table1@xxx;
    else --get from the Oracle table;
    Open Cur_out for Select from Oracle table;
    I will try to execute the procedure from SQLPLUS.
    thanks

  • Movie link doesn't respond to remote. Create a static movie link?

    When I attempt to view a DVD created in IDVD on my TV, I am unable to click on the movie link and have it open. Instead, I have to press STOP and then PLAY on my remote. How can this be corrected? Also, how do you insert a movie into the menu as a link, not a background image, and have it not play in its window? Thank you!

    Hi
    Can only guess that You may be did put in the movie into iDVD in the wrong way.
    Try
    • Find where the movie is stored and import FROM WITHIN iDVD application (File and down)
    or
    • in iMovie do not Share to iDVD - but "Share to Media Browser" and as large (not HD or other res.) and in iDVD import it from the Media button and Movie.
    Yours Bengt W

  • Creating trigger using database link

    I need to create the trigger from local server B using Dblink(whereas the dblink points to the remote server A)
    Action of the trigger:
    After every insertion of the record in the 'Table1' from the Remote DB Server A , the newly inserted record should parallely inserted into the 'Table 2' of the local server B
    Kindly help me out to do
    _ BY
    Rajan

    I tried to create the trigger but it throws like DDL operations are not allowed in the remote database.
    Following is the script, I have tried
    CREATE OR REPLACE TRIGGER ROUTE_TRIGGER AFTER INSERT ON ROUTEDECISION@DBLINK1
    FOR EACH ROW
    DECLARE
    BEGIN
    INSERT INTO routedecision_rptdb(a1,a2) values(:new.a1,:new2.a2);
    END;

  • Steps to create database link

    i got these info from my teacher to create database link
    1.     Establish the network connection.
    2.     Shutdown the database. (SQL>shutdown immediate ;)
    3.     Open and modify the pfile and set GLOBAL_NAME = FALSE.
    4.     Create spfile from pfile. (SQL>create spfile from pfile;)
    5.     Startup database. (SQL> startup;)
    6.     Modify tnsnames.ora file, set the destination computer service name and other in formations.
    ASIF.com =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ONE)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ORCL)
    7.     Crate database link .
    SQL>create public/private database link abc
         Connect to “scott”
         Identified by “tiger”
         Using ‘asif.com’;
    in step 3, which pfile should i modify
    i got a file in F:\oracle\admin\fahmi\pfile named init.ora.31620060327
    but there is no line like GLOBAL_NAME = FALSE
    so watching the sample i add this line in init.ora.31620060327
    global_names = FALSE
    am i right...........??
    can anyone help me...??
    i have some few other questions.....................

    The following is an excerpt from http://www.oracleutilities.com/OSUtil/ping.html
    The tnsping utility is used to determine whether or not an Oracle service can be successfully reached. If a connection can be established from a client to a server (or server to server), tnsping will report the number of milliseconds it took to reach the remote service. If unsuccessful, a network error will be displayed. However, tnsping will only report if the listener process is up and provides no indication of the state of the database.
    $ tnsping <net service name> <count>
    The “net service name” must exist in the tnsnames.ora file. This file is used by clients and database servers to identify server destinations. It stores the service names and database addresses. The “count” parameter is optional and will show the number of times the command should try to connect to the specified service name.
    After this I suggest you to check your $ORACLE_HOME/network/admin/sqlnet.ora.
    Look for what is configure for:
    NAMES.DEFAULT_DOMAIN
    NAME.DEFAULT_ZONE
    This must be compatible to what you are using in your tnsnames.ora.
    By the way, don't forget to check if there is a log file (sqlnet.log) in your $ORACLE_HOME/network/admin directory.
    Regards.
    RK

  • Building a form based on a synonym that points to a database link

    Hello
    Finally I got APEX 3 installed on our test server. I am starting to work with it and I faced my first problem...
    I need to build an application that will query and maintain data stored in another database server. This is because we were not allowed to install APEX in the production server. So I created a schema DEV_USER (which I associated with the workspace). In this schema I created a private database link my_link and a synonym:
    create synonym the_table for the_table@my_link
    I am trying to create a form to query and maintain that table via the synonym but I am not succeeding. The wizard does not work as the synonym is not listed in the table list. Then I created the form manually, creating the items, the Automatic Row Processing process etc. When I run the page I get the error Error ORA-01403: no data found.
    Is it possible to use APEX in this scenario (accessing synonyms that point to database links)? What is the recommended approach in this case?
    Thanks
    Luis

    Hi Kathryn
    Thanks very much for your reply. I did as you suggested; I dropped the synonym and created a view:
    create view my_table as select * from my_table@my_dblink
    ...and was able to create a multirow form based on that view.
    However, when I try to update any value on the form, I get the following error when submitting it:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01461: can bind a LONG value only for insert into a LONG column ORA-02063: preceding line from DB_LINK, update "APEX_DEV"."MY_TABLE" set "CAMPAIGN_ID" = :b1, "SITE" = :b2, "PERCENTUAL" = :b3, "DURATION_MONTHS" = :b4, "PRG_ID" = :b5, "AFF_ID" = :b6 where "CAMPAIGN_ID" = :p_pk_col and "SITE" = :p_pk_col2
    I thought it was because the form was based on a view; so I dropped the view and re-created the synonym (using the same name). When I tried to submit the updates again I got this error:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 0, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "35636E5FDD251146DB4B7B56119E7914", item checksum = "A884FA378C851786DDFE3A33709CB23C"., update "APEX_DEV"."MY_TABLE" set
    If you or anyone else could point out what I am missing, and maybe explain what those messages mean, it would be great!
    Thanks
    Luis

  • Execute procedure over database link

    Hi,
    I''m working on a package where you can select the required database, paste some query and with clicking on a button it will execute and create an explain plan for this query.
    Therefore i've create a procedure on each database that put's the explain plan in the PLAN_TABLE.
    To do this i need to execute this prodecure from the package. I use the following code:
    DBA_OWNER.DB_PCD_EXPLAIN_PLAN@DBA_LINK_533.WORLD(p_query);
    This is working fine as this database link allready exists to the required database. But i want to make the database link name variable. I've allready created the dynamic database link:
    l_link varchar2(20) := 'DBA_LINK';
    l_link_nr number(4) := dbms_random.value(0,1000);
    l_db varchar2(20) := l_link||'_'||l_link_nr;
    l_statement varchar2(4000);
    begin
    l_statement := 'create database link '||l_db||' connect to **** identified by ***** using '''||p_database||'.WORLD''';
    execute immediate l_statement ;
    So now i have the dynamic databaselink that is created each time i call the package.
    now i want to use this databaselink to call the procedure. this is where it goes wrong.
    The code i'm using:
    DBA_OWNER.DB_PCD_EXPLAIN_PLAN@l_db(p_query);
    is not acceoted when i build the package.
    The follwoing error message is showed.
    PACKAGE BODY DBA_OWNER.PCK_EXPLAIN_PLAN
    On line: 66
    PLS-00352: Unable to access another database 'L_DB'
    Does someone know how to use this variable to execute the procedure on the remote db?

    Any procedures you call have to be accessible at compile time, so the database link must also exist at compile time.
    You can get around this by putting your procedure call to DB_PCD_EXPLAIN_PLAN inside dynamic SQL, the same as you are doing to create the database link. Dynamic SQL is not checked until runtime.
    Think about the risk if this procedure is exploited. You are creating a way for someone to run arbitrary code in an any database in your environment, with presumably a highly-privileged ID, if it can run an explain plan against any schema in any target database.
    This is exposing some significant security issues. Read up on SQL injection, and have someone else review the code for security issues before deploying this.

Maybe you are looking for

  • ITune (10.2.1.1) Genre "&"

    Hello, I'm editing iTune genre's picture (http://discussions.apple.com/thread.jspa?messageID=12603989&#12603989) My probleme is with *Rock & Roll* iTune dsnt accept the & : *Working :* <dict> <key>matchString</key><string>Rock N Roll</string> <key>re

  • Need a big help please

    hi all, i receaved Oracle 11g and would like to install it but when it is started, it is asked to me to put the SID , what can it be? and would like to have a full detail to fill in once installing. thanks,

  • Errors in IDOC

    How can we see the errors displayed in IDOC?

  • After Upadate to Firefox 18.0.1 Sync and Pair Device options stop to work

    <blockquote>Locking duplicate thread.<br> Please continue here: [[/questions/949285]]</blockquote> I"m trying to pair device but then i click next button I always return to "Firefox Sync Setup " dialog

  • Tutorial: Azure AD Integration with Canvas LMS

    Click reply and tell us what you think: Tutorial: Azure AD Integration with Canvas LMS Markus Vilcinskas, Knowledge Engineer, Microsoft Corporation