Script to extract the code of the package (coil)

I wrote the following code to the code in the package of the coil. However, at the beginning of the file put on hold the SQL statement is coming. I want to get rid of him.
SET LINESIZE 32000
SET PAGESIZE 0
SET TRIMSPOOL ON
SET ECHO OFF
SET FEEDBACK OFF
SPOOL D:\test.txt

select text 
from dba_source 
where name='TEST'
and type='PACKAGE BODY'
and owner='PMP'
order by line;

SPOOL OFF

Run as a script.

Save your code in a file, spooltest.sql.

Then, run it like this:

SQL > @spooltest.sql

BTW, code tags must be lowercase.

Tags: Database

Similar Questions

  • extract the package and the procedure name in the code

    In my treatment of exceptions, I need to register the name of package and procedure I have the exception. How can I get these two names without manually coding the names?

    Thanks to anticipiation

    A better option is to get the package name and the line number

    An even better option is to use the pl/scope (when you are in 11g (not sure about 10g)):

    SQL> alter session set plscope_settings='identifiers:all'
    /
    Session altered.
    
    SQL> set serverout on
    
    SQL> create or replace package pkg
    as
       procedure p1;
    
       procedure p2;
    end pkg;
    /
    Package created.
    
    SQL> create or replace package body pkg
    as
       procedure get_scope (obj varchar2, line int)
       as
       begin
          for c in (select rpad (lpad (' ', 2 * (level - 1)) || name, 20, '.') || ' ' || rpad (type, 20) || rpad (usage, 20) identifier_usage_contexts
                    from user_identifiers t
                    where level != 1
                    start with line = get_scope.line and object_name = obj
                    connect by usage_id = prior usage_context_id)
          loop
             dbms_output.put_line (c.identifier_usage_contexts);
          end loop;
       end get_scope;
    
       procedure p1
       as
       begin
          null;
       end p1;
    
       procedure p2
       as
       begin
          get_scope ($$plsql_unit, $$plsql_line);
       end p2;
    end pkg;
    /
    Package body created.
    
    SQL> exec pkg.p2
    
      P2................ PROCEDURE           DEFINITION
        PKG............. PACKAGE             DEFINITION
        PKG............. PACKAGE             DECLARATION
    PL/SQL procedure successfully completed.
    
  • Script to copy the package to local disk folder

    Hello-

    I have a created script that will create a folder on the local drive and it is supposed to enter a folder that I have in the package and copy it to the newly created folder.  I have the script to the root of the package as well as the folder it needs to copy.  When I run the executable on the thinapp I get the following error...

    pic1.JPG

    If I click on ok the thinapp opens but the file was never copied to the local disk.  Can someone please look at the script attached that I created and I would like to know what path must be in the script to locate the folder I'm trying to copy.

    Thank you!

    Hello

    I modified the script slightly and tested. Please find attached the same.

  • How to extract the text of procedure of a packege

    Hi all

    can someone help me to retrieve the text of a procedure from pl/sql to a packege.procedure name is "CALC_BUNUS" of packege "EMP_BONUS."

    Thank you
    Ankur

    I don't think you can get a code of procedure of a package, but what you can do is get the whole package code and just manually extract the package code procedure.

    To get the package code, you can query ALL_SOURCE.

    Or you can use DBMS_METADATA. GET_DDL and extract the PACKAGE code.

    SELECT DBMS_METADATA.GET_DDL('PACKAGE',)
      FROM DUAL
    

    Published by: Karthick_Arp on May 31, 2010 23:15

  • How to extract the images filled in numbers?

    Hello community,

    I have prepared a file number for one of my clients with basic information and photos of products. I now need to export to Excel, but it does not keep the images which were filled in the cells of the numbers.

    Is there a way to extract the images of cells of numbers? I took these pictures on the internet directly, so I have stored them in a special place. I think, however, that they could be stored somewhere on my mac but cannot find them.

    I have over 300 images inserted in 300 cells, so I'll try to avoid to find their return and save them properly.

    Thanks for your help!

    I've tried in the past to extract numbers background images but never succeeded.

    I know that when you click on a cell and command + c to copy the content to the system Clipboard background images is included, because you can also click and command + v to paste the images follow the dough.

    But how the numbers stores the image to the system Clipboard when you copy and paste is not, as far as I know, documented.  It is so difficult to "get to work."

    If you are handy with AppleScript, you can try + command + c to copy and then run this script.

    the Clipboard as record

    This will list the contents of the Clipboard.  Give more information on how the image is stored in this folder could make it possible to shape a script to extract the images.

    But that is as far as I'm away.

    The folks at Mac OS technology discussions might know how.

    SG

  • script to pull the VMTools version for all of the VM?

    Do we have the script to extract the VMTools version for all the virtual machines?

    with powershell, you can use:

    Get - vm | Get-View | Select Name, @{Name = "VMWareToolVersion"; {Expression = {$_.config.tools.toolsversion}}

    or:

    Get - vm | Get-VMGuest | Select VMName Toolsversion

    with esxcli I would do it similar to (sorry, but I don't know the syntax of the shell):

    Vim - cmd vmsvc/getallvms | SED ' 1 of | AWK '{print $1}' (to gett all the VM ID)

    then for each ID I would do this:

    Vim - cmd vmsvc/get.config 12 | grep-i toolsversion

  • Install the package apex 3.2.1 and OWA_UTL

    Hello

    It seems Apex 3.2.1 installation files contain no more scripts to upgrade the package OWA_UTL.
    In install zip file apex/owa, there is only the Readme.txt file.

    Previous versions there are also scripts for OWA_UTL 10.1.2.0.6.

    Is this "bug" or script is there for a reason any?

    BR, Jari

    Hi Jari,

    It is a bug (supervision). We'll get this fixed in the distribution of the RTO.

    Thanks for reporting this.

    Joel

  • Need a powershell script to extract VM-> IP->->-> mapping vSwitch portgroup vNIC

    Hello

    I need a powershell script to extract the following information for all the VMS in vcenter.

    vm_name | ESX_name | Cluster_name | vm_IP_address | vNIC_name | PortGroup | vSwitch

    Please note that multiple virtual machines have several vNIC where vNIC is connected to various exchanges

    Here you go

    $report = @()
    Get-VM | %{
         $vm = $_
         $_ | Get-Vmguest | %{
              $guest = $_
              if($_.Nics){
                   $i = 0
                   $_.Nics | %{
                        $row = "" | Select Name, Powerstate, Host, Cluster, "IP address","Nic Name",Portgroup,vSwitch
                        $row.Name = $vm.Name
                        $row.Powerstate = $vm.PowerState
                        $row.Host = $vm.Host.Name
                        $row.Cluster = ($vm.Host | Get-Cluster).Name
                        $row."IP address" = $guest.IPAddress[$i]
                        $row."NIC Name" = $vm.NetworkAdapters[$i].Name
                        $row.Portgroup = $guest.Nics[$i].NetworkName
                        $row.vSwitch = (Get-VirtualPortGroup -Name $guest.Nics[$i].NetworkName -VM $vm).VirtualSwitchName
                        $report += $row
                        $i++
                   }
              }
              else{
                   $row = "" | Select Name, Host, Cluster, "IP addr","Nic Name",Portgroup,vSwitch
                   $row.Name = $vm.Name
                   $row.Powerstate = $vm.PowerState
                   $row.Host = $vm.Host
                   $row.Cluster = ($vm.Host | Get-Cluster).Name
                   $row."IP address" = "na"
                   $row."NIC Name" = "na"
                   $row.Portgroup = "na"
                   $row.vSwitch = "na"
                   $report += $row
    
              }
         }
    }
    $report
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Code/script to extract all the text in the Illustrator document?

    Any who have code/script for this, or how to create the code to extract all the text on an active document in Illustrator. Extract the text as the text for any and all text elements in the document (TextFrameItem, TextRange, TextPath, etc.). We can just empty the text with alerts().

    I'm not sure of is what order or hierarchy to retrieve the text. Where do we start from activeDocument.textFrameItems/TextRanges/etc. How are text in Illustrator? I'm new to Illustrator scripting.

    Something as simple as that can do the trick.

    It will act on all open documents.

    you could then create a file and write to this alert, rather then just

    for(var i = 0; i < app.documents.length; i++){
        for(var j = 0; j < app.documents[i].textFrames.length; j++){
            var str = app.documents[i].textFrames[j].contents;
            alert(str);
            }
        }
    
  • Need to duplicate the package through the code

    I'm about to upgrade the package body. I don't have a direct access to the database. However, there will be a dba that will run the scripts for us. I can't be sure that the script into Production is the same as the script that I sent you. To the idea of disaster recovery, I would like to replicate the script and rename it "script_name_BAK".

    I know I can do this by copying the script and renaming. Because I only have access, can I send on a script that will do I need?
    Also, when I ask the script, it cut so many characters to the right (perhaps 80). I hope that a copy of the script is not the same gap. It will be?


    Thank you.


    Daniel

    2yzzy says:
    I'm about to upgrade the package body. I don't have a direct access to the database. However, there will be a dba that will run the scripts for us. I can't be sure that the script into Production is the same as the script that I sent you. To the idea of disaster recovery, I would like to replicate the script and rename it "script_name_BAK".

    I know I can do this by copying the script and renaming. Because I only have access, can I send on a script that will do I need?
    Also, when I ask the script, it cut so many characters to the right (perhaps 80). I hope that a copy of the script is not the same gap. It will be?

    Thank you.

    Daniel

    Why not inform the ADMINISTRATOR who must be part of this process and ensure that it has a valid "backup" this package until he applies the change that you send. Sounds like something I don't want to be aware of if I was in his place.

    In general resembles your store needs serious work on it's versions of the code and procedures management strategies.

  • Security for the COD file question: is it possible to extract the BlackBerry devices .cod file?

    Is it possible to extract the BlackBerry devices .cod file?

    We want to ship the BlackBerry device with our application installed.

    I was wondering if need to add additional security.

    Installing drivers USB BlackBerry Desktop Manager, connect the BlackBerry to the PC via USB/Bluetooth and «save the JavaLoader.exe u your_module_here»

    PS JavaLoader.exe comes with the BlackBerry development Java (JDE) environment.

  • Extract the Variables from Script Powershell

    Hey guys

    I am building a workflow active directory of this synchronization for the IAC database and I'm looking to make the most effective possible by reducing the amount of powershell scripts I use one only and then use the variables powershell to get what I need.

    Is it possible to extract the variables stored in a variable of workflow instead of use the output of the powershell statement?

    Has anyone built a workflow to users of this synchronization of DB works maximum efficiency on the when modified date now that mine is 28 minutes to synchronize 200 users.

    Matt

    From a design point of view, I would say to use the generic OLEDB data adapter.  There is an OleDB for Active Directory Provider called ADsDSOObject. You can find it by searching on the Microsoft site.  It can be installed as part of the standard Windows or .net.  I'm not sure. If you could get it saved on the server of PO, you would be able to do a select and use the output as native table instead of the Powershell output analysis.

    PowerShell has a tendency to be underperforming.  Certainly, I'd caution against the appellant PowerShell repeatedly in a loop.

  • How to find the part creator problem of the code in the package?

    Hi gurus

    This question is just for my goal of learning, my question is that if I create a package that have 10 000 lines, includes several functions and procedures, but when I then run my stuck bundle / freeze on some specific code so how is it, I identify the specific part of the code. Thanks in advance

    Concerning

    Shu

    Hi Shu,

    What do you mean by the method of logging? is there a utility to do this?

    even if it's not 'connect' mechanism but the simplest solution is to instrument your code to package with the DBMS_APPLICATION_INFO package programs. For example SET_ACTION at the beginning of each subprogramme in the package. See http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_appinf.htm

    "Application developers can use the DBMS_APPLICATION_INFO package with Trace of Oracle and the SQL trace facility to the record names of execution modules or transactions in the database for use later when monitoring the performance of the different modules and debugging."

    Then, you can monitor for sid, serial # when running from v$ session http://docs.oracle.com/cd/E11882_01/server.112/e40402/dynviews_3016.htm#REFRN30223

    MODULE VARCHAR2(48) Name of the module running in the game by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure
    ACTION VARCHAR2(32) Name of the action being performed as defined by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure
    CLIENT_INFO VARCHAR2(64) Information defined by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure

    and for sid and serial No.

    v$ session_wait https://docs.oracle.com/cd/B28359_01/server.111/b28320/dynviews_3023.htm

    and

    v$ session_longops http://docs.oracle.com/cd/E11882_01/server.112/e40402/dynviews_3022.htm#REFRN30227

    and other license pack tuning requiring views

    Finally the answer to your question. If you do not have your own recorder there is for example LOG4PLSQL: logging of Oracle database tools (I've never used).

  • 4.0 ai2 - cannot select and copy the code from a package body when opened in read-only mode

    4.0 ai2 - cannot select and copy the code from a package body when opened in read-only mode

    He was connected/buggy. It is not fixed yet. But it will be.

  • I can't get the record to accept the redemption on the package code.

    I can not get the product registration to accept the redemption on the package Code.  What should I do?

    Redemption code is not the serial number, you must use the Exchange code to get the serial number.

    (1) go to www.adobe.com/go/getserial

    (2) enter the redemption code you

    (3) use the serial number for installation and product registration.

    Visit this link as well

    http://forums.Adobe.com/message/4264286

Maybe you are looking for