Can we create pl/sql code over database link?

Hi All,
We are using Oracle 9i database.
I want to know if we can create or modify pl/sql code (procedue, package, etc) over the database link? That means - can we create a procedure in remote database using the db link?
Thanks,
Dnyanesh

yes, I can connect to the remote database directly and create/modify the packages.
But I want the users not to create them using the db link.
Is there any way to create the pl/sql package over database link?
Thanks,
Dnyanesh

Similar Messages

  • How can i create a new and tableless database using database configuration

    How can i create a new and tableless database using database configuration

    How can i create a new and tableless database using database configuration
    Just don't install the sample schemas. See the installation guide
    http://docs.oracle.com/cd/E11882_01/server.112/e10831/installation.htm
    Using the Database Configuration Assistant
    When you install Oracle Database with the Oracle Universal Installer, the sample schemas are installed by default if you select the Basic Installation option. Selecting the sample schemas option installs all five schemas (HR, OE, PM, IX, and SH) in the database. If you choose not to install the sample schemas at that time, you can add them later by following the instructions in section "Manually Installing Sample Schemas".
    Choose a custom install and don't install the sample schemas.
    All other schems/tables installed are REQUIRED by Oracle

  • How can I create xml file automatically from database

    Hi,
    Can I create a site map drom database.There is table for storing menu details.Is it possible to create an xml file corresponding to a query.
    How can i configure root menu.xml to incllude this xml file.Please help me..
    Thanks

    Is your question pertaining to an answer regarding JDeveloper, or you just want an XML file? If XML, have you considered looking at the Oracle db XML DB feature set?
    CM.

  • Can we create new tablespace in Oracle Database 10g Express Edition?

    Hi,
    Can we create new tablespace in Oracle Database 10g Express Edition instead of using the default "users" tablespace provided?
    Please advise.
    Thank you.

    Correct. The sum of all user tablespaces is not allowed to exceed 4 GIG.
    You could try shrinking your tablespaces. Theres a script called maxshrink on http://asktom.oracle.com which is useful for this.
    You could compress your tables.
    If you are storing lobs, you could consider storing them as bfiles.
    Or upgrade to Oracle Standard Edition 1. Its not that expensive.

  • Interactive report performance problem over database link - Oracle Gateway

    Hello all;
    This is regarding a thread Interactive report performance problem over database link that was posted by Samo.
    The issue that I am facing is when I use Oracle function like (apex_item.check_box) the query slow down by 45 seconds.
    query like this: (due to sensitivity issue, I can not disclose real table name)
    SELECT apex_item.checkbox(1,b.col3)
    , a.col1
    , a.col2
    FROM table_one a
    , table_two b
    WHERE a.col3 = 12345
    AND a.col4 = 100
    AND b.col5 = a.col5
    table_one and table_two are remote tables (non-oracle) which are connected using Oracle Gateway.
    Now if I run above queries without apex_item.checkbox function the query return or response is less than a second but if I have apex_item.checkbox then the query run more than 30 seconds. I have resolved the issues by creating a collection but it’s not a good practice.
    I would like to get ideas from people how to resolve or speed-up the query?
    Any idea how to use sub-factoring for the above scenario? Or others method (creating view or materialized view are not an option).
    Thank you.
    Shaun S.

    Hi Shaun
    Okay, I have a million questions (could you tell me if both tables are from the same remote source, it looks like they're possibly not?), but let's just try some things first.
    By now you should understand the idea of what I termed 'sub-factoring' in a previous post. This is to do with using the WITH blah AS (SELECT... syntax. Now in most circumstances this 'materialises' the results of the inner select statement. This means that we 'get' the results then do something with them afterwards. It's a handy trick when dealing with remote sites as sometimes you want the remote database to do the work. The reason that I ask you to use the MATERIALIZE hint for testing is just to force this, in 99.99% of cases this can be removed later. Using the WITH statement is also handled differently to inline view like SELECT * FROM (SELECT... but the same result can be mimicked with a NO_MERGE hint.
    Looking at your case I would be interested to see what the explain plan and results would be for something like the following two statements (sorry - you're going have to check them, it's late!)
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two),
    sourceqry AS
    (SELECT  b.col3 x
           , a.col1 y
           , a.col2 z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5)
    SELECT apex_item.checkbox(1,x), y , z
    FROM sourceqry
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two)
    SELECT  apex_item.checkbox(1,x), y , z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5If the remote tables are at the same site, then you should have the same results. If they aren't you should get the same results but different to the original query.
    We aren't being told the real cardinality of the inners select here so the explain plan is distorted (this is normal for queries on remote and especially non-oracle sites). This hinders tuning normally but I don't think this is your problem at all. How many distinct values do you normally get of the column aliased 'x' and how many rows are normally returned in total? Also how are you testing response times, in APEX, SQL Developer, Toad SQLplus etc?
    Sorry for all the questions but it helps to answer the question, if I can.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Report over database link error

    Good morning all.
    I have a database link LINKA from USERA on LOCALSERVER to USERB on REMOTESERVER.
    (create database link LINKA connect to USERB identified by mypassword using validtns)
    In USERC on REMOTESERVER I have a TABLEX, with grant all on TABLEX to USERB on REMOTESERVER.
    In USERB on REMOTESERVER I have a view TABLEXV, select * from USERC.TABLEX
    From USERA on LOCALSERVER I can select * from TABLEXV@LINKA. In fact I can insert/update/delete tablexv from USERA.
    I also have a view TABLEXV on USERA, select * from TABLEXV@LINKA. I can also select/insert/update/delete from USERA.TABLEXV.
    So far so good - all working as expected.
    Then, my APEX app on LOCALSERVER, interactive report, parsing schema USERA, querying TABLEXV, I get the following:
    when "Exclude Link Column", I get the error "The requested URL /pls/apex/f was not found on server.
    when "Link to Single Row View", report displays correctly.
    when "Link to Custom Target", I get the error "The requested URL /pls/apex/f was not found on server.
    When I run the select * from TABLEXV as a regular report (i.e. not interactive), I also get the error.
    So the only time I get the report displayed correctly is using IR and "Link to Single Row View".
    However, clicking on the link (for Single Row View) I get "The requested URL /pls/apex/wwv_flow.show was not found on this server.".
    To summarize:
    - accessing table via view over database link
    - works outside of apex without issue
    - inside only works when Link to Single Row View set
    - But clicking on link fails
    I could live with just having the Link to Singe Row View option if I could disable displaying of the icon so that the user cant click on it.
    APEX 3.2.00.27
    EE Database - 10.2.0.3 (yes I know out of support)
    Remote EE Database - 10.2.0.5
    Real object names replaced to protect the innocent!
    Anyone got any clues?
    I have used remote tables many times in my APEX applications and never had this issue.
    Thanks,
    Rob @ very confused .com

    Good morning all.
    I have a database link LINKA from USERA on LOCALSERVER to USERB on REMOTESERVER.
    (create database link LINKA connect to USERB identified by mypassword using validtns)
    In USERC on REMOTESERVER I have a TABLEX, with grant all on TABLEX to USERB on REMOTESERVER.
    In USERB on REMOTESERVER I have a view TABLEXV, select * from USERC.TABLEX
    From USERA on LOCALSERVER I can select * from TABLEXV@LINKA. In fact I can insert/update/delete tablexv from USERA.
    I also have a view TABLEXV on USERA, select * from TABLEXV@LINKA. I can also select/insert/update/delete from USERA.TABLEXV.
    So far so good - all working as expected.
    Then, my APEX app on LOCALSERVER, interactive report, parsing schema USERA, querying TABLEXV, I get the following:
    when "Exclude Link Column", I get the error "The requested URL /pls/apex/f was not found on server.
    when "Link to Single Row View", report displays correctly.
    when "Link to Custom Target", I get the error "The requested URL /pls/apex/f was not found on server.
    When I run the select * from TABLEXV as a regular report (i.e. not interactive), I also get the error.
    So the only time I get the report displayed correctly is using IR and "Link to Single Row View".
    However, clicking on the link (for Single Row View) I get "The requested URL /pls/apex/wwv_flow.show was not found on this server.".
    To summarize:
    - accessing table via view over database link
    - works outside of apex without issue
    - inside only works when Link to Single Row View set
    - But clicking on link fails
    I could live with just having the Link to Singe Row View option if I could disable displaying of the icon so that the user cant click on it.
    APEX 3.2.00.27
    EE Database - 10.2.0.3 (yes I know out of support)
    Remote EE Database - 10.2.0.5
    Real object names replaced to protect the innocent!
    Anyone got any clues?
    I have used remote tables many times in my APEX applications and never had this issue.
    Thanks,
    Rob @ very confused .com

  • How can I create an sql query updateable report

    Seems as though after upgrading our APEX version I no longer have the option to create an updateable report. Some of my old updateable reports seem to be working fine but some will not update after I click my submit button. AT first they just refreshed the page and ignored my changes to the data in the text field. After tinkering with the non working region, now I get a ORA-20001 current version of data in database has changed etc.
    HELP!

    Hi,
    OK - first, you can still create an Updatable Report. When you create a new report, select the Wizard Report option and follow the prompts. When the report has been created you can then switch it to be updatable. I don't know why it has been done this way, but that works.
    Second, on the reports that return that error, do you have any columns set a Standard Report Column? I have found that you need to include ALL columns in the data being submitted, even if that means you have to create a second instance of a column in your SQL statement and then make one of the columns Hidden. For example, if you created a Tabular Form using the wizard on the EMP table, you get EMPNO and EMPNO_DISPLAY, with EMPNO hidden. You would need to do the same for any column not being edited by the user. Something similar may also happen if you have made any of the INPUT items readonly or disabled as these are not submitted by the browser.
    Andy

  • How can I create an EntityStore for a Database?  Advice on DB strategy?

    Hello All,
    How can I create an com.sleepycat.persist.EntityStore for a com.sleepycat.db.Database? Advice on DB strategy?
    I'm looking to create an application prototype that creates a database dynamically and can delete it programatically. Is openDatabase/removeDatabase what I'd want to use for that?
    So far, the Direct Persistence Layer is an amazing piece of technology and has the potential to make my team's application faster than we every though possible, so kudos to the author.
    I've built a high-security application using the DPL and a single database for hundreds millions of users. I'd like to attempt to create a database for each user for security and manageability purposes. Our mission statement doesn't allow us to execute queries for sensitive data across more than one user account at a time, so I don't get any benefit from having every user's objects in a single database. I'm investigating if giving each user their own database will speed up insert times and SecondaryIndex queries. It'll certainly be more secure as each database will be encrypted with a unique password.
    My design is that I have an app with dozens of com.sleepycat.persist.model.Entity beans which I persist and query on their Primary and secondary indexes. I've been accessing things through an EntityStore as illustrated in the Getting Started Guide. Can I access a database created with openDatabase through an EntityStore and com.sleepycat.persist.PrimaryIndex?
    Thanks in Advance,
    Steven
    Harvard Childrens Hospital Informatics Program

    I closed this as I found another way to solve my issue.
    Thanks,
    Steven

  • How can i get data from another database SQL Server use database link from

    I have a database link from Oracle connect to SQL Server database with user cdit connect default database NorthWind.How can I get data from another database(this database in this SQL Server use this database link)?

    hi,
    u should see following documentation:
    Oracle9i Heterogeneous Connectivity Administrator's Guide
    Release 1 (9.0.1)
    Part Number A88789_01
    in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
    regards
    umar

  • Can't create Java VM [Code :- 3 ] with JNI_CreateJavaVM()

    hello all,
    I am trying to create an inctance of JVM from C/CPP ( iam using VC++ editor) on windows. My code to create JVM is :
    res = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args);
    as a reasult of this call, -3 is returned to res.
    please help me to create a JVM and/or call a java class from C/CPP
    Thanks in advance,
    Soujanya.R

    I tried to run it this way :-
    #include <jni.h>
    #include <windows.h>
    #define JNI_EVERSION (-3) /* JNI version error */
    #define PATH_SEPARATOR ';'
    #define USER_CLASSPATH "." /* where Prog.class is */
    void main() {
              JNIEnv *env;
              JavaVM jvm = (JavaVM )0;
              jint res;
              jclass cls;
              jmethodID mid;
              jstring jstr;
              jobjectArray args;
              HINSTANCE hVM = NULL;
              JavaVMInitArgs vm_args;
              JavaVMOption options[4];
              printf("\noptions");
              options[1].optionString = "-Djava.class.path=C:/j2sdk1.4.1_07/jre/lib/rt.jar;E:/test/c/Debug/"; /* user classes */
              options[2].optionString = "-Djava.library.path=lib"; /* set native library path */
              options[0].optionString = "-Djava.compiler=NONE";
              //options[1].optionString = "-Djava.class.path=c:\\My Folder"; /* user classes */
              //options[2].optionString = "-Djava.library.path=C:\\j2sdk1.4.2_04\\include";
              options[3].optionString = "-verbose:jni";
              printf("\nversion info");
              vm_args.version = JNI_VERSION_1_2;
              vm_args.options = options;
              vm_args.nOptions = 4;
              vm_args.ignoreUnrecognized = TRUE;
              printf("\ncreate");
              hVM = LoadLibrary("C:/j2sdk1.4.1_07/jre/bin/client/jvm.dll");
              if (hVM == NULL)
                   printf("hVM is null ");
              res = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args);
              if (res < 0) {
                   fprintf(stderr, "Can't create Java VM \n",res);
                   exit(1);
              cls = env->FindClass("HelloWorld");
              //cls = env.FindClass(env,"helloWorldClass");
              if (cls == 0) {
                   fprintf(stderr, "Can't find Prog class\n");
                   exit(1);
              mid = env->GetStaticMethodID(cls, "main", "([Ljava/lang/String;)V");
              if (mid == 0) {
                   fprintf(stderr, "Can't find Prog.main\n");
                   exit(1);
              jstr = env->NewStringUTF(" from C!");
              if (jstr == 0) {
                   fprintf(stderr, "Out of memory\n");
                   exit(1);
              args = env->NewObjectArray(1, (*env).FindClass("java/lang/String"), jstr);
              if (args == 0) {
                   fprintf(stderr, "Out of memory\n");
                   exit(1);
              env->CallStaticVoidMethod(cls, mid, args);
              jvm->DestroyJavaVM();
    I could run the program.
    You need to have the C:\j2sdk1.4.1_07\lib\jvm.lib entries in Project->Settings->Link Tab
    When you open the Settings dialog box you will see Win32Debug in the
    drop down . You need to provide the entries for that page .
    Then change the drop down to Win32 Release and make an entry similarly there too.
    You should be able to run your code.
    Vishal                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Can we create the T-Code for a maintenace view

    Hi All,
    I have a table for which i create a maintence view . Now we want to create the Transaction code for that.Can it possible..?  if yes Plz help me .its very urgent .
    Thanks!
    Vipin Kumar

    Use TC SE93.
    Select option Create TC with Parameter.
    Enter TCode.
    In it maintain TC as SM30
    Click on Skip first screen
    Maintain Default Values as
    VIEWNAME = <View name>
    UPDATE = 'X'

  • Can I migrate from sql azure business database edition (old) to sql azure standard database edition (new in preview)?

    I have an export .bacpac file from a sql azure business database edition and I want import that file to sql azure standard database edition.
    I have tried through Azure but I think that is not supported yet.
    I have also tried through Microsoft SQL Server Management Studio 2012 but Wizard only shows me old editions "web" and "business" for destination database and it is incompatible...
    Thanks.

    I've done this today.
    You'll need to restore your database onto Azure as a Business/Web addition. Either use your existing or New > SQL Database > Import.
    Then you need to sign up to the SQL Preview https://azure.microsoft.com/en-us/services/preview/.
    Once you've done that, in the Azure portal under DB > Scale, you'll have Web, Business, Basic, Standard and Premium to choose from.
    Obviously this is still in preview mode.

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

  • Column reference over database link.

    Hi,
    Is it possible to reference a table column across a database link?
    Ex: var1 table.column%TYPE@dblink
    Thanks
    Chad

    Chad,
    Glad it worked ..
    Taking this thread a step further ..
    If you have the privileges to create synonyms then you could do the following:
    create synonym mySynonym
    for table@dblink
    Then use the synonym in the PL/SQL code as follows:
    var1 mySynonym.column%TYPE;
    This will avoid repetitive typing of table.column@dblink and if the dblink name changes then you have to make the change in only one place - the synonym
    Shakti
    http://www.impact-sol.com
    Developers of Guggi Oracle - Tool for DBAs and Developers

  • Can statements inside a package refer to database links

    Hi all
    I was just curious to know, what will happen in this case
    CREATE OR REPLACE PACKAGE BODY "TESTUSER"."TESTPKG" as
    procedure testproc is
    n number := 0;
    begin
    select count(*) into n from ps_tab@dblink;
    end;
    end testpkg;';
    Is it valid to have dblink inside a package body?
    Regards
    Edited by: user13332773 on Mar 6, 2011 10:26 PM

    user13332773 wrote:
    Hi all
    I was just curious to know, what will happen in this case
    CREATE OR REPLACE PACKAGE BODY "TESTUSER"."TESTPKG" as
    procedure testproc is
    n number := 0;
    begin
    select count(*) into n from ps_tab@dblnk;
    end;
    end testpkg;';
    Is it valid to have dblink inside a package body?
    RegardsSure it is. You can have a database link inside a package code. Moreover, you'll get the name of that database link in the REFERENCED_LINK_NAME column of the DBA_DEPENDENCIES view
    Kamran Agayev A.
    Oracle ACE
    My Oracle Video Tutorials - http://kamranagayev.wordpress.com/oracle-video-tutorials/

Maybe you are looking for

  • How can I transfer all my data from my mac to my laptop

    Do anyone of you know how to transfer all my itunes data from my MAC to my laptop? Thanks,

  • W540 fingerprint reader wont start during windows logon

    Greetings to all fellow thinkpad owners, As the title indicates, i have an issue with my w540's fingerprint function. My laptop is relatively new ~2 weeks old and as i am on vacation i boot it every 2-3 days just to mess with it. few days ago i notic

  • Product Category Error in SRM

    Hello Gurus, I tried to replicate Material Group from ECC to SRM using R3AS tcode. When I checked the status in R3AM1 it was showing running status but by mistake I clicked on cancel button and the status is "abort" Even after setting filter in Produ

  • Sending files using ipad

    is it possible to send a file to somebody from my ipad, if so how do i do it?

  • Data Guard-Log shipping

    Hi, I have Data Guard implemented on Oracle 10gR2 10.2.0.1 database. OS-Windows 2003 Server. I am facing the following error ORA-16146: standby destination control file enqueue unavailable I get this alert in my alert log. After sometime it gets reso