Create link DB in a procedure

Hello

I am trying to create the DB link in a procedure

CREATE or replace PROCEDURE cre_db_lnk AS

BEGIN

dbms_output.put_line ('before exce');

EXECUTE IMMEDIATE "CREATE DATABASE LINK remote_link_3"

||' CONNECT to c1upgrade03cm IDENTIFIED BY c1upgrade03 '

||' USING "sidev11g" ';

dbms_output.put_line ('afetr exce');

END cre_db_lnk;

This procedure compiled successfully, but when I check in the browser schema that i cannot find the DB link with that name.

And it is not even showing the DBMS_OUTPUT.

But when I tried to create using simple SQL, then it was created

CREATE DATABASE LINK remote_link_2

CONNECT to c1upgrade03cm IDENTIFIED BY c1upgrade03

With the HELP of "punvm-oracle11g/sidev11g";

I can't understand why it does not create in the process what Miss me here!

My version of DB is: -.

Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

Hello

you mention that your procedure COMPILES successfully, but you can also RUN it? When you run it, you see the 'before' as well as 'after' messages (you do SQL > SET SERVEROUTPUT ON before calling the procedure)?

If so, the database link must be created.

Otherwise, you should see an error message (and not the message 'after'); for example: ORA-01031: insufficient privileges

It may be that the owner of the procedure user can create links from database only through a ROLE that you have given, but the roles are NOT active when you define a ((Eh bien, j'ai juste parler de cas standard) procedure). In this case: you can create a DB link with the immediate command in SQL * more, but not through the procedure.

Then you will have to directly grant the privilege: LINK of DATABASE CREATE and GRANT to scott;

Best regards

Bruno Vroman.

Tags: Database

Similar Questions

  • Cannot display the trust policy custom created for attestation the attestation procedure level

    Cannot display the trust policy custom created for attestation the attestation procedure level

    Find the file updated for more information.

    Hi Pradeep and Fatih,

    This is no bug. I can only imagine without detailed information about the procedure of custom clearance and approval workflow custom.

    But each attestation procedure has an assigned table that defines what data will be documented, for example UNSAccountInUNSGroup. An Identity Manager can only assign strategies of the attestation procedure where each step of the approval workflow contains an approval procedure where the picture of the Attestation procedure is in the list of assigned to this approval process approval. (See screenshot) Verify that approval in your approval workflow steps are aligned to this requirement.

  • Cannot create links with editing in the browser

    Sorry to post this here, but I'm out of options. Three of my clients are unable to create links on their sites using IBE. I tried to reach out to the IBE team on it for more than a month. I called Adobe Support the other day, that escalating the issue to the BIE team, who sent an automatic e-mail response that I was here in 24 hours, which was a week ago.

    These issues in IBE makes null and void, and I'll have to do all updates for customers of myself while apologizing constantly telling them that they would be able to make changes to their sites as themselves.

    Is there anyone on this forum who can attract the attention of the IBE team? Please note - I have tried all the normal channels.

    Thank you.

    This is a known bug and there is a current fix. Basically what is happening, it's there are two changes taking place simultaneously: 1) addition of text in a text frame and 2.) adding a link. The solution for all those who faced this problem is to add your text, click outside the text frame, click inside and add your link to the text (to break in two separate actions).

    Update (October 11, 2016): this issue has been resolved by the release of today. Adding hyperlinks to the new text should now work the first time.

  • get list from a SQL database and create links to each lines in AS3

    I'm doing an AIR application with these conditions:

    I have a SQL database. In my table, there is a column 'categories' (with different categories (computer, books... etc.)).

    enter image description here

    In my AS3, I managed to recover "theDescription" when the user select a category. With the URLMethod and a php file.

       // create SQL $sql = "SELECT * FROM annonces where categorie = '$categorie'";

    $sql_result = mysql_query($sql, $connection) or die ("Couldn't execute query.");

    $num = mysql_numrows($sql_result); $phptheDescription = "";

    $counter = 0;

    while ($row = mysql_fetch_array($sql_result)) {

    $theDescription = $row["theDescription"];

    $phptheDescription = $theDescription;

    }

    echo  "phptheDescription=" . $theDescription;

    So my AS3 code retrieves the $phptheDescription since php and displays in a output_txt .

    Problem: in my output_txt , a 'theDescription"appears. But I have TWO Articles in the category 'Computers' (and I have 100 points in the same categories).

    How do I show all the "theDescription' that are in the same categories?

    Ex: If I choose "Computer", it should display "a Surface Pro 3" and "An IMAC". But it only shows the last element "IMAC".

    And, after that, it is possible to create "links" for each item posted?

    Here are 2 videos of short films (20 sec) explaining my problems:

    https://vid.me/DS2r

    http://sendvid.com/6iesrygk

    THX

    Hi-I've never used PHP so I could be wrong here - but it seems to me you're a loop in the records, each time as reset $theDescription to all that is in the current (rather than accumulate output) record. If you are effctively echo only the last record in the query.

    I think you should be either running the command echo inside your loop, or alternatively the concatenation of a string inside the loop and then echoing the end of the loop?

    I would be likely to generate XML data in PHP (just by concatenating strings) and then use it in my AS3 code.

  • private files cannot create link

    All my files are suddenly labeled private, I can not click on 'create link', nothing happens there...

    It's working now... I think it was a matter of cloud that has been corrected.

  • How to create the report using the procedure.

    Hi all

    I want to create the report in the apex. But I don't have a sql code. I have a single procedure. Is it possible to create the report using this procedure in the apex.

    CREATE OR REPLACE PROCEDURE headcsv_prc2

    AS

    CURSOR cr_header

    IS

    SELECT ood.organization_code, fm.formula_no AS "FORMULA_NAME."

    FM.formula_vers AS "FORMULA_VERSION."

    FM.formula_desc1 AS "FORMULA_DESC."

    DECODE (fm.formula_status,

    100, 'new ',.

    400, "approved for use in the laboratory."

    700, "allow the general."

    800, "We Hold."

    900, "frozen."

    1000, "obsolete/archived.

    ) AS "FORMULA_STATUS."

    DECODE (fd.line_type, '1', msib.segment1).

    DECODE (fd.line_type, '-1', msib.segment1 ') ingrediant.

    DECODE (fd.line_type, '2', msib.segment1) AS "BY_PRODUCT."

    DECODE (by_product_type,

    "W', 'waste."

    "R',"rework. "

    "Y', 'Yield."

    The of ', 'Sample. "

    NULL VALUE

    ) AS "BY_PRODUCT_TYPE".

    Of org_organization_definitions ood,.

    fm_form_mst fm,

    fm_matl_dtl fd,

    mtl_system_items_b msib

    WHERE ood.organization_id = fm.owner_organization_id

    AND fm.owner_organization_id = msib.organization_id

    AND msib.organization_id = fd.organization_id

    AND fd.organization_id = ood.organization_id

    AND fm.formula_id = fd.formula_id

    AND msib.inventory_item_id = fd.inventory_item_id

    - and fm. FORMULA_NO like '% THE % '.

    AND fd.line_type IN ('1 ', ' 2', '-1' ")

    Ood.organization_code GROUP,

    FM.formula_no,

    FM.formula_vers,

    FM.formula_desc1,

    FM.formula_status,

    FD.line_type,

    MSIB. Segment1,

    by_product_type

    ORDER BY fm.formula_no, fm.formula_vers;

    BEGIN

    Dbms_output.put_line (INITCAP ('the ORGANIZATION CODE')

    || ','

    || INITCAP ('NAME FORMULA')

    || ','

    || INITCAP ('FORMULA VERSION')

    || ','

    || INITCAP ('FORMULA DESC')

    || ','

    || INITCAP ('FORMULA STATUS')

    || ','

    || INITCAP ('PRODUCT')

    || ','

    || INITCAP ('INGREDIANT")

    || ','

    || INITCAP ("PER PRODUCT")

    || ','

    || INITCAP ('PER TYPE OF PRODUCT")

    );

    FOR ch IN cr_header

    LOOP

    Dbms_output.put_line (ch.organization_code

    || ','

    || ch.formula_name

    || ','

    || ch.formula_version

    || ','

    || '"'

    || ch.formula_desc

    || '"'

    || ','

    || ch.formula_status

    || ','

    || ch. Product

    || ','

    || ch.ingrediant

    || ','

    || ch.by_product

    || ','

    || ch.by_product_type

    );

    END LOOP;

    EXCEPTION

    WHILE OTHERS

    THEN

    Dbms_output.put_line (' No error: ' |) SQLCODE. "Error Msg: ' '.

    || SQLERRM

    );

    END;

    EXEC HeadCSV_Prc2



    Thank you

    Rambeau

    Hi Christian,

    In addition to the fact that the Oracle database has an internal Java engine and it would be possible for Apex call a Java stored procedure, the Apex really has nothing to do with Java. To create a report, you discovered, you specify a SQL query. In certain circumstances, you can embed a query in a PL/SQL function, but the incorporation of an arbitrary Java application and waiting for it to be called from Apex for a kind of security is there with the fairies.

    I recommend you research the Apex and then enter your so-called "higher authorities" how things work.

    Concerning

    André

  • ORA-20002: you can't create links from database

    HI Experts,

    Creating database link, I get the error below. Anyone of you could please have some light on this error. I googled for this error and did not get any update.

    Oracle version: 11.2.0.3

    The user with whom I created this link of database DBA privilege.

    SQL > create database link temp_LINK connect to account identified by * using "(DESCRIPTION = (ADRESSE = (COMMUNUITY=tcp.world) (PROTOCOL = TCP)(Host=myself.us.lev.com) (Port = 1525)) (CONNECT_DATA = (SID = LNDB1DB)))'; "
    create database link temp_LINK connect to account identified by * using "(DESCRIPTION = (ADRESSE = (COMMUNUITY=tcp.world) (PROTOCOL = TCP)(Host=myself.us.lev.com) (Port = 1525)) (CONNECT_DATA = (SID = LNDB1DB)))'; "
    *
    ERROR at line 1:
    ORA-00604: error occurred at the SQL level 1 recursive
    ORA-20002: you can't create links from database
    ORA-06512: at line 4


    Thank you..

    Well Yes, this request confirmed suspicion of SB.

    The datadictionary is your friend

  • How to create the script to compile procedure files in oracle - urgent deadline...

    How to create the script to compile procedure files in oracle.    about to go live and have much .prc pkg in a directory usr/tmp/ar... Po... human resources etc. need to create a script to compile all the files in the folder, then do not open all necessary .prc suggestions on how to do it.   Thank you Tom.

    (1) an urgent need, ASAP,... are words that do not in a forum of volunteer. We are here to help if you need it now, for free, open a SR.

    (2) oracle procedures are not files.

    (3) I think you are trying to run operating system packages, no Oracle procedure. right?

  • Why we need to create the package instead of procedure or function in Oracle

    Hello

    Recently, I attended an interview, they asked,
    why we must create the package instead of procedure or function in oracle. Is a specific advantage, if we create together.
    I'm not sure. can u tell me please someone.

    Thank you and best regards,
    Sanjeev.

    Hello

    A part of the oracle documentation.

    What is a PL/SQL Package?
    A package is a schema object which includes subroutines, variables, and logically related PL/SQL types. Packages have two parts: a specification (spec) and a body. Sometimes, the body is unnecessary. The specification is the interface to the package. It declares the types, variables, constants, exceptions, cursors, and subprograms that can be referenced from outside the package. The body defines queries for the sliders and the code for the subprogrammes.

    Benefits of the PL/SQL Packages
    Packages have a long history in software engineering, offering important characteristics for a reliable, maintainable, and reusable code, often in team for large systems development efforts.

    Modularity

    Packages allow you to logically encapsulate Associates types, elements, and subroutines in a module named PL/SQL. Each package is easy to understand, and the interfaces between packages are simple, clear and well defined. This facilitates the development of applications.

    Easier application design

    When you design an application, all you need initially is the interface information in the package specification. You can code and compile a spec without his body. Stored subprograms that reference the package can then be compiled as well. You should not set the package body entirely until you are ready to complete the application.

    Information masking

    With packages, you can specify which types, elements, and subprogrammes are (and accessible) public or private (hidden and inaccessible). For example, if a package contains four subprogrammes, three can be public and one private. The package hides the implementation of the subprogramme private so that only the package (not your application) is affected if the application changes. This simplifies maintenance and improvement. Also, by hiding the implementation details of the users, you protect the integrity of the packaging.

    Feature added

    Sliders and packed public variables persist for the lifetime of a session. They can be shared by all the subprogrammes that are running in the environment. They allow you to manage data in any of the transactions without storing in the database.

    Best performance

    When you call a subprogram packaged for the first time, the whole package is loaded into memory. Subsequent calls to related subprograms in package require no disk i/o.

    Packets stop cascading dependencies and avoid an unnecessary recompilation. For example, if you change the body of a packaged function, Oracle does not recompile other routines that call the function; These routines only depend on parameters and return value that are declared in the specification, so they are recompiled only if the specification changes.

  • Create links for bookmarks


    I created a file in robohelp with all the information I need. Now, I starts the process of exporting the file in HTML format so that it can sit in a report Center and be referenced from there. I would like to be able to create links between each page bookmark placed at various locations on the report Center. When I click on the bookmark I want and create a shortcut, the link that gives me takes me to the appropriate bookmark but it does not display the table of contents on the side. Is there a way to make this link produce the bookmark, I want to be pulled upward and the table of contents with it? I don't want to use the feature where you have to click "Show" to display the table of contents. Thank you.

    Hello

    I don't know understand what you do. Especially when you say you "created a file in robohelp with information" and "begin the process of exporting the file in HTML format. This means you use RoboHelp for Word? If you use RoboHelp HTML, you are already 'in' HTML. That's what you work in.

    When you say you want to create a page to bookmark links (don't know what a bookmarked the page here). Are you want to bind RoboHelp topics to your application in a way so that if a user displays help, they click on a link and your application open? Or are you meaning to the contrary? You are eager to links in the application to open the help?

    In regards to opening a page with the complete set of frames showing, you simply link that you see in the address bar after clicking the "show" link. Then click on a link "view, then look at the address bar of your browser and note the path.

    See you soon... Rick

  • Creating links in Word documents converted

    I converted a Word docx document to HTML which consists of a set of documents that are linked together.

    Accordingly, each section in the doc full (except the title and Table of contents), actually becomes a JPG editable text box.

    I tried to create links between the Table of contents for the different sections.

    I tried everything but I'm missing some concept.  It's one of those things, I just see it once I will hit me more head FRO not fiquring out.

    Someone has an answer for me

    I hate to burst your bubble, but Word documents are not suitable for web pages.  My advice is your docx to PDF.

    Nancy O.

  • Allow to comment and create links from URLS (JS, Acrobat Pro)

    I need to change the parameters of the PDF format to enable comments and Annotation, and then create links to the URL of the document.  I can do it manually, but I don't see where these properties can be adjusted with Javascript.

    Help, please!

    None of these measures can be done with JS.

    Well, you can convert URLS into links, but it requires a complex script.

  • Create a journal of stored procedure when it is run through dbms_jobs...

    Hello everyone,

    I have a stored procedure that we run it through dbms_jobs...

    I wanted to print the dbms_output of my stored procedure in a log file or in short I just wanted to create logs for this stored procedure...

    I know that if I run this procedure using cron, I'll be able to create a log file...

    But how can I do this using dbms_jobs

    Database version: 10.2.0.1

    Any help would be great...

    Thank you

    If the answer has helped you please mark it as Correct or relatively useful so another can benefit.

    With greetings
    Krystian Zieja
    [Project Envision | http://www.projectenvision.com]

  • create link db with timeout parameter

    Hi all

    I there a way to create the db link with timeout parameter, then only in the case where the session established for db link for more than an hour to disconnect if idle

    Thank you

    He can do with the idle session profile option, instead of RM (I think)

  • Create links

    I want to select text and create a link to another section or page in the document, or create a link to a page/section in another document on my phone or the cloud.

    Duplicate thread:

    Please see this thread for the same question: I want to select text and create a link to another section or page in the document, or create a link to a page/section in another document on my phone or cloud.

Maybe you are looking for