To view defination of already defined procedure/trigger

Hi,
suppose i have already defined a procedure or a trigger.Later on if i forget its actual definition then how can i view its definition as defined by me.
Thanks

user12222356 wrote:
I am not getting full definition for triggers and procedures through this command:You are running it in SQL*Plus, right? dbms_metadata.get_ddl returns CLOB and by default SQL*plus displays only first N characters of a CLOB wheree N is set by SET LONG command (default 80):
SQL> select dbms_metadata.get_ddl('TABLE','EMP','SCOTT') from dual
  2  /
DBMS_METADATA.GET_DDL('TABLE','EMP','SCOTT')
  CREATE TABLE "SCOTT"."EMP"
   (    "EMPNO" NUMBER(4,0),
        "ENAME" VARCHAR2(10),
SQL> set long 10000
SQL> /
DBMS_METADATA.GET_DDL('TABLE','EMP','SCOTT')
  CREATE TABLE "SCOTT"."EMP"
   (    "EMPNO" NUMBER(4,0),
        "ENAME" VARCHAR2(10),
        "JOB" VARCHAR2(9),
        "MGR" NUMBER(4,0),
        "HIREDATE" DATE,
        "SAL" NUMBER(7,2),
        "COMM" NUMBER(7,2),
        "DEPTNO" NUMBER(2,0),
         CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")
DBMS_METADATA.GET_DDL('TABLE','EMP','SCOTT')
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE,
         CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")
          REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"
DBMS_METADATA.GET_DDL('TABLE','EMP','SCOTT')
SQL> SY.

Similar Messages

  • How to view defination of already defined packages ?

    Hi,
    how can i view defination of a already defined package? Its spec and its body?

    Hi,
    user12222356 wrote:
    My package name is 'PackageTest1' , since at the time of creation i had given that name.
    But while writing this query
    select text from user_source where name='PacklageTest1'no row is selected, and when i give this command
    select text from user_source where name='PACKAGETEST1'defination is shown .But why only capital letter package name is identified ?One reason is that the names are different; there's an 'l' (5th character) in 'PacklageTest1', but not in 'PACKAGETEST1'.
    A more subtle reason is that identifiers in Oracle are case-sensitive. You can have one package called
    "PackageTest1", another called
    "Packagetest1" (with a small 't'), another called
    "PACKAGETEST1" (all capitals), another called
    "pAckAgEtEst1" (vowels capitalized),
    all in the same schema.
    Normally, the parser capitalizes all unquoted text, so if you say
    EXEC  packagetest1.foo ('Hello, world!');what actually gets compiled is
    EXEC  PACKAGETEST1.FOO ('Hello, world!');If you actually have an identifier with lower-case letters, then you have to use quotes around it; double-quotes, in places where you don't want it mistaken for a string literal:
    EXEC  "PackageTest1"."Foo" ('Hello, world!');or single-quotes when it really is a string literal:
    select       text                     -- Column name is actually TEXT, but lower-case will work here
    from      user_source                -- View name is actually USER_SOURCE, but lower-case will work here
    where     name     = 'PackageTest1'     -- String literal is already quoted
    and       type     = 'PACKAGE BODY'     -- If you don't want source code from package spec mixed in
    order by  line                    -- Only way to make sure output is in order
    ;

  • Find views defined on tables

    I am trying to create a prebuilt MV on a table.
    but it some up with the error:
    ORA-32334: cannot create prebuilt materialized view on a table already
    referenced by a MV
    Just wondering how to find the list of views defined on teh table.
    I am using oracle 10g.
    can someone hlep.
    Cheers,

    user1000979 wrote:
    I am trying to create a prebuilt MV on a table.
    but it some up with the error:
    ORA-32334: cannot create prebuilt materialized view on a table already
    referenced by a MV
    Just wondering how to find the list of views defined on teh table.
    I am using oracle 10g.
    can someone hlep.
    Cheers,Hi,
    If they are on the same database,
    For materialized view
    select name, owner from dba_snapshots where
                              table_name ='<table_name>' and master_owner =<'owner of table>'For views
    select name, owner, type from all_dependencies where
    REFERENCED_TYPE ='TABLE' and REFERENCED_NAME ='<table_name>'
    and REFERENCED_OWNER ='<owner of the table>' and type Like '%VIEW'Regards
    Anurag

  • Used of 362 & 363 Alternative formula for condition base value in Define Procedures (Tcode obyz)

    Dear
             what is the  used of 362 & 363 Alternative formula for condition base value in Define Procedures (Tcode obyz)

    362 is used for to pick base value to BASB condition type from MM pricing procedure
    363 is used for all sales tax {VAT (Inventory or set -off) & CST}.
    Tax Calculation on Freight - Different Scenarios
    Please  go through this  link  and  you will know  very well a bout  362 and  363  usage

  • How to define a trigger to start a switch scanning task

    I am writing a program in LabWindows/CVI using DAQmx library which handles PXI-2567 card. I have created a new switch scanning task, by the function DAQmxSwitchCreateScanList, that uses the specified scan list. I would like to start this task synchronously with the signal generated on one of trigger line. I thing, that this is possible using DAQmxSetTrigAttribute function where I can define the trigger type to start the task. Unfortunately, it only allows setting the type of trigger but is not clear for me, how can I set the source and edge type for the signal which will start the task.
    Best regards,
    Miroslaw Koziol

    Hi Ion,
    Below I will try, most clearly as I can, present a problem which I was struggling.
    I have a system that consists of 3 PXI modules: PXI-4461, PXI-6653 and PXI-2567. One digital-to-analog channel on PXI-4461 generates sinusoidal signal which supply my DUT. I need to measure 2 voltages on DUT by one analog-to-digital channel on PXI-4461 (I know that PXI-4461 has 2 analog-to-digital channels but for various reasons such an approach cannot be applied). Each of the voltages must be measured by the integer number of periods and it has to be done continuously (for example 8 periods of one voltage and 8 periods of second voltage and so on). Therefore, a DDS on PXI-6653 is used to generate the signal which frequency is integer times smaller than the frequency of the supply signal. This signal is routed through the trigger line to PXI-2567 and controls the switch which alternately joins the measured signals to the analog-to-digital channel of PXI-4461.
    The signal on DA channel must be generated continuously so this task is started and does not stop until the application is closed. Moreover, the generation is started synchronously with the rising edge of the signal generated by the DDS on PXI-6653. It is easy to start this task synchronously to the signal generated by the DDS because on PXI-4461 module a specialized trigger line for analog outputs exists.
    The measurements done by the AD channel on PXI-4461 are started and stopped by the user of application. The start has to be done synchronously with the DDS signal. This is also not a problem because on PXI-4461 module a specialized trigger line for analog inputs exists. Unfortunately, I do not know how to start a switch scanning task in the same moment of time when the measurement task is started. If I do not do start these two task together I do not know which voltage samples I receive in my application.
    Therefore, I need to know if is it possible to assign a trigger line to start the switch scanning task and set the source and edge type for this signal.
    Best regards,
    Miroslaw Koziol

  • Basic Order View - Define View Profiles

    In ECC 6.0, we have an option to customize the work order screen as per the busiess needs in the configuration path:
    Plant Maintenance and CS -> Maintenance and Service Processing -> Functions and Settings for Order Types -> Basic Order View -> Define View Profiles
    Question -> Is there a view profile defined by SAP for standard SAP work order screen?
    We have a requirement to modify the standard SAP work order screen where we have to add additional tabs. Since there is no profile defined for standard SAP work order screen, we have to build from the scratch which takes a lot of time.
    Any suggestions?
    Thanks

    Thanks SN. Yes, I am aware of the user exit and also that we can configure the screens of work order in ECC 6.0 using SPRO but the only problem is that we have to build it from scratch. My question was to know if SAP had standard screen templates or profiles like they have for Notiification. Anyways thanks for your response, I got the below response from SAP for my question.
    I've checked if its possible to customize the screen selections
    like it can be done for notifications and unfortunately it isnt
    possible in the standard system
    The only customizing that can be done for order can be found using the
    following path:
    SPRO>>>IMG>>>PLANT MAINTENANCE & CUSTOMER SERVICE>>>MAINTENANCE &
    SERVICE PROCESSING>>>MAINTENANCE & SERVICE ORDERS
    You will find the following options:
    DEFINE FIELD SELECTION FOR ORDER HEADER(PM)
    DEFINE FIELD SELECTION FOR ORDER HEADER(CS)
    DEFINE FIELD SELECTION FOR ORDER OPERATION(PM & CS)
    DEFINE FIELD SELECTION FOR ORDER COMPONENT(PM & CS)

  • Getting error View cluster is already open. Go Back with F3

    Dear All,
    when i try to open (Templates > Assign Mini-Templates to Templates) i am getting following error,
    View cluster is already open. Go Back with F3
    Message no. SV851
    CRMVC_TFW_TEMPLATES
    please help me

    I got the same error when configuring valuation method under controlling module.

  • View defination privilege on Procedures by all the users

    Hello,
    I was looking for some query where i can view the defination or select the procedures of any schema
    for example we have procedures owned by ML schema, other users such as fft, fft_read etc wants to view the defination of the procedures or select privileges on the procedures owned by ML Schema.
    is there anything like grant select any procedure owned by any schema can view the procedures by all other schema's in the database.
    Thanks

    You can not grant select on a procedure;
    SQL> grant select on tsb.example_defaults to test01;
    grant select on tsb.example_defaults to test01
    ERROR at line 1:
    ORA-02225: only EXECUTE and DEBUG privileges are valid for procedures
    However, you can grant debug on the objects and then you will be able to see the definitions from ALL_SOURCE. Additionally they will still not be able to excute the code.
    SQL> select object_name from all_objects where object_type='PROCEDURE' and owner='TSB';
    OBJECT_NAME
    NEW_EXAMPLE
    EXAMPLE_DEFAULTS
    SQL> connect test01/password
    Connected.
    SQL>  select object_name from all_objects where object_type='PROCEDURE' and owner='TSB';
    no rows selected
    SQL> connect tsb
    Enter password:
    Connected.
    SQL> select 'GRANT DEBUG ON TSB.'||OBJECT_NAME||' TO TEST01;'  from all_objects where object_type='PROCEDURE' and owner='TSB';
    *'GRANTDEBUGONTSB.'||OBJECT_NAME||'TOTEST01;'*
    GRANT DEBUG ON TSB.NEW_EXAMPLE TO TEST01;
    GRANT DEBUG ON TSB.EXAMPLE_DEFAULTS TO TEST01;
    SQL> GRANT DEBUG ON TSB.NEW_EXAMPLE TO TEST01;
    Grant succeeded.
    SQL> GRANT DEBUG ON TSB.EXAMPLE_DEFAULTS TO TEST01;
    Grant succeeded.
    SQL> CONNECT test01/test01
    Connected.
    SQL>  select text from all_source where owner='TSB' order by name, line;
    TEXT
    procedure example_defaults
    *(n_1 in number :=5,*
    n_2 in number :=6,
    n_3 in number :=7)
    as
    begin
    dbms_output.put_line(n_1||n_2||n_3);
    end;
    procedure new_example
    *(n_1 in number :=8,*
    n_2 in number :=10)
    as begin
    dbms_output.put_line(n_1+n_2);
    end;
    *14 rows selected.*
    SQL> set serveroutput on
    SQL> exec tsb.example_defaults(1,2,3);
    BEGIN tsb.example_defaults(1,2,3); END;
    ERROR at line 1:
    ORA-06550: line 1, column 11:
    PLS-00904: insufficient privilege to access object TSB.EXAMPLE_DEFAULTS
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Hope this helps.
    Regards
    Tim

  • View defination privileges on Procedures for any user

    Hello,
    I was looking for some query where i can view the defination or select the procedures of any schema
    for example we have procedures owned by ML schema, other users such as fft, fft_read etc wants to view the defination of the procedures or select privileges on the procedures owned by ML Schema.
    is there anything like grant select any procedure owned by any schema can view the procedures by all other schema's in the database.
    Thanks

    Thanks for your response.
    These are the procedures owned by other schema not by FFT and FFT read.
    and i need only procedures not other objects.Connect to the schema who owns the Procedures and Issue,
    Grant debug on owner.object_name(Procedure) to FFT,FFT_READ;
    Or
    Just issue
    Grant debug connect session to FFT,FFT_READ
    Hope this helps.
    -Anantha

  • Define a trigger in procedure with error

    I have oracle database 11gR2 and i want to create some triggers automatically with a block . when i want to run query in below , i have an error .
    My block is :
        declare
          tablesid number ;
          tablenames varchar2(4000);
          cursor c1 is
          select id , title from hr.tables;
        begin
            open c1;
            loop
              fetch c1 into tablesid , tablenames;
             CREATE OR REPLACE TRIGGER tablenames||'_before_insert'
              before insert
              on hr.tablenames
              DECLARE
             columnid number ;
              columnval number ;
              columntitle varchar(4000);
              cursor c2 is
              select id from hr.columns where tableid = tablesid ;  
              BEGIN
              -- open c2 ;
               for rec in c2 loop
               select title into columntitle from hr.columns where id = rec.id
               insert into hr.rowaction(columnid,newvalue,oldvalue,actiondate)
                 select  id ,:new.columntitle,:old.columntitle,sysdate 
                 from hr.tabletiltes
                 where id = rec.id
              select title into columntitle from hr.columns where id = rec.id;
              dbms_output.put_line(columntitle);
             end loop;
            end;
            end loop ;close c1; end;
    >ORA-06550: line 11, column 6:
    PLS-00103: Encountered the symbol "CREATE" when expecting one of the following:
       ( begin case declare end exit for goto if loop mod null
       pragma raise return select update while with <an identifier>
       <a double-quoted delimited-identifier> <a bind variable> <<
       continue close current delete fetch lock insert open rollback
       savepoint set sql execute commit forall merge pipe purge
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action :
    Bind Variable "new" is NOT DECLARED
    anonymous block completed
    Bind Variable "new" is NOT DECLARED
    anonymous block completed
    Thanks

    This is a duplicate post of your other question:  create trigger automatic
    DO NOT start duplicate threads for the same question.
    Locking this thread

  • Custome Views Defined Showing Incorrect Data

    Dear All,
    When users apply filters -> define and save custom views, they see instances in their defined view which have actually already gone out from the current activity.
    This gives them an incorrect picture of the view at any point causing great amount of disgruntlement especially among the managers who need to know how many tasks are there in the queue and accordingly plan for it.
    If we go to Internet explorer settings and delete temporary internet files and cookies then it does work and shows the users the correct figure. But every now and then an incorrect view is shown to user and users have to keep performing this irritating activity of deleting cookies.
    Can anybody throw light on how best this can be handled and why the problem is occuring in the first place
    Regards,
    Viraj Churi

    I've seen this happen with people abruptly close out of a prior view by using the back button having multiple windows open in BPM, or by closing a browser window on a view. You can educate the managers by telling them to not do this, but that never goes over very well, does it...
    If this is the problem, you'll need to experiment with various causes, there may be some code remedies for this. I don't have the code handy to show you, but I believe we solved this using <BODY onUnload> or <BODY onBeforeUnload>. You can also try using windows.onclose and Javascript. These solutions are problematic as well and are not always supported on all browsers and versions. I'll see if I can find better code examples later, but you might try to pinpoint what is causing it and focus your solution based on that. (Back-button, or windows closing, etc.) There are also many post on this subject you can find through Google.
    HTH,
    Mark

  • Creating a custom view - define NavBar ID

    Hi Guys,
    Well im new to all this but like ive got some preliminary knowledge. The problem is i started off with the cookbook but somehow got blocked. I wanted to create my own views.
    As far as ViewSet and ViewAreas and Views are concerned i got through. But here is the problem How am i suppose to link them.
    I mean where? and what sort of changes are required.
    Coz what ive been through till now was not much of a help. The problem is that when i followed the examples i was supposed to get automatically generated in and outbound plugs. So i dint get any.
    In navigation bar which way should i follow. I mean in the Navigation Bar entry i tried to hang up one. But it was obviously wrong one so i had runtime errors. Where and how should i define my NavBar ID so it can be called.
    My question is getting uglier. So id stop. I hope ud understand.
    Regards,
    Ragwan

    Thanks alot Anand,
    But where am i supposed to define this TargetID in SPRO. Coz right now im through with the link but its not shown in the browser. As soon as click on this defined link of mine i come up with a browser window with std. SAP Header and footer but the rest is gone. I think the way you have pointed out its because of this missing hook.
    Thats why i wanted to know the exact location where in SPRO am i supposed to hook it up. I know it sounds a bit preliterate, but i'd appreciate your help.
    Regards,

  • How to Call User Defined Procedure in Report

    I have a procedure which return some values.and i want to call this procedure in PLD.In PLD's  properties field there is a tab named Content , when i select source type as procedure and give the procedure name the PLD is unable to call this procedure.
    Regards
    Edited by: Philip Eller on Jun 26, 2008 11:09 AM

    Hi Sandeep,
    Please kindly refer to the definition of this type:
    You can use this type of field to print secured images, such as official
    stamps, which you are not legally permitted to save on your computer as
    regular pictures, but as *.dll files. The source types available for
    External Data fields include the values Procedure Name, Database,
    Formula and System Variable.
    To select an external data source type to print a fixed image:
    1. Choose Properties - Field > Content tab.
    2. Select Procedure Name in the Source Type field:
    3. Enter the name of the required *.dll file in the Procedure
       Name field.
    The *.dll file must be located in the extensions folder defined in
    Administration > System Initialization > General Settings > Path tab >
    Extensions Folder.
    Hope this clarifies the issue.
    Regards,
    Canna Mu
    SAP Business One Forums Team

  • How can I generate a Complete View defination of multiple inline views

    Hi,
      I am trying to write a sql that will return the select statement of a view, but if the view contains reference to others views then
      the select statement of those views should also be included in the final select as inline query. The same thing can be done using a
      recursive procedure, which I already did, so I am posting this out of curiosity just to know if this is possible to achieve just via plain sql.
      Let me explain in details what my requirement really is::
      Say I have a View Called A.
      The select for A is :: SELECT * FROM B,C;
       Now B and C are both views and the select for those are respectively ;
         View B :   SELECT * FROM B1;
          View C :   SELECT * FROM C1;
      So, I want a SQL QUERY which will take View A as input and will produre the following result :
           View Name                           View Def
            A                              SELECT * FROM (SELECT * FROM B1),(SELECT * FROM C1)
    PS: If B1 and C1 are views then the select for those should also be included in the SELECT statement for A.
    Thanks,
    Ruhu

    You must be on a 12c Database for that
    They have introduced DBMS_UTILITY.EXPAND_SQL_TEXT Procedure. Check out Oracle Database 12c Release 1 (12.1) New Features

  • VC: Syntax error while defining procedures

    Requirement is to calculate value of characteristic Volume from the values of characteristics
    width, height & depth. To achieve this, defined following source code
    $self.volume = $self.width$self.height$self.depth
    But could not able to execute condition, All the characteristics are char format & single value.
    checked into following threads, which talks about the similar issue, followed their suggestion, but not
    able to fix the error.
    Re: variant configuration
    Author Sathyanarayana naini mentions about
    "character format values you have to use strings........ex: "value"", which I am not clear about. Does it
    mean, need to maintain string "  " in characteristic value.

    All my characteristics are type "char"
    error message:
    E28021 Error: remaining part of expression cannot be interpreted
    After selecting back, cursor blinks on first asterisk.

Maybe you are looking for

  • Need to know how to allow mail to be sent to my Hosted Sharepoint 2013 site's documents folder/ Using CRD 7 reporting

    I have gotten as far as adding a new app, naming the folder and going into CRD, for the report we need online and attempted to enter the settings information for our sharepoint site. The issue is no matter how I enter the credentials it will not auth

  • Fed up with BT already, speed and usage.

    I've been with BT from the 1st of April, what a disaster. Many issues with slow speed, emailed support a few time and had a couple of phone calls back "We're looking into it, will call back withing 48 hours" they never do. My speed has varied from 35

  • ITunes now wont auto connect when iPhone connected

    Since installing 10.6.8 on my macbook pro now when I plug my iphone in itunes wont auto sync??? Yes the "open itunes when this iphone is connected" and in itunes preferences the prevent field is unchecked. Ideas please ????

  • Custom Finder Icons

    Hi, Does anyone know how to create custom icons for various finder items, such as folders or documents? A friend of mine transferred a folder to me a few weeks ago that was different from the standard. I'd also like to assign different icons to vario

  • How to deal with an empty part content

    a simple Mail Content as that: Date: Tue, 17 Nov 2009 12:37:36 +0800 From: "ccoacoa" <[email protected]> Subject: there have something wrong Message-ID: <sfo1398f89wa2e323> Mime-Version: 1.0 Content-Type: multipart/alternative;      boundary="=====00