Script -Compilation

Yesterday one of my friend this script ,when i asked for compilation after functions ... But i am still confuse with other scripts , so please tell me exactly how this script will help out ,its for compilation or any other reasons.
The main thing is I am creating functions and i need to compile . If i will not do compilation my team getting alerts that you have invalid objects .
set echo off termout off head off verify off feedback off
select 'alter '||object_type||' '||owner||'."'||object_name||'" compile;'
from user_objects
where status<>'VALID'
and object_type not in ('PACKAGE BODY','TYPE BODY','UNDEFINED','SYNONYM')
union
select 'alter package '||owner||'.'||object_name||' compile body;'
from user_objects
where status<>'VALID'
and object_type='PACKAGE BODY'
union
select 'alter type '||owner||'.'||object_name||' compile body;'
from user_objects
where status<>'VALID'
and object_type='TYPE BODY'
union
select 'alter materialized view '||owner||'.'||object_name||' compile;'
from user_objects
where status<>'VALID'
and object_type='UNDEFINED'
union
select 'alter synonym '||owner||'.'||object_name||' compile;'
from user_objects
where status<>'VALID'
and object_type='SYNONYM'
and owner<>'PUBLIC'
union
select 'alter public synonym '||object_name||' compile;'
from user_objects
where status<>'VALID'
and object_type='SYNONYM'
and owner='PUBLIC';
spool off
@compile.sql

The best solution to compile invalid objects is to use the code Oracle provided for this purpose.
It is in %ORACLE_HOME%\rdbms\admin\utlrp.sql and it needs to be ran as SYS.
You can see the very reason to run the Oracle provided code in this script.
First of all: it is not correct, as synonyms are not compiled.
Secondly: Oracle is maintaining utlrp.sql., who is maintaining this script?
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Apple Script Compile Problem

    I'm having trouble saving my applescript as an app.
    I've debugged my applescript, it works, and it is saved as a "scpt" file. I'v compiled it, no error messages.
    But when I click "save" I don't get to choose any options, and it gets saved as a script file. When I double click the scirpt file, it of course brings up the applescript Editor.
    How do I compile this script so that it gets saved as an "app", so that it runs by itself?
    (As you can tell, I'm new at this)

    Unfortunately, this is Mountain Lion. Having saved a file once, the "save as" option disappears. If you choose "rename",  then it immediately saves it with the new name and same file type (and the "save as" option never appears).
    So far the only choice that I have found is to open a new blank document, copy and paste the contents of the the old document into it, and then choose "save as" and select "app"
    Isn't there a better way?

  • "use script" compile error

    Hello.
    I am, for the first time, attempting to modularize my scripts to use script libraries. I am running into a compile issue where the compiler doesn't recognize the lines that are supposed to locate my script libraries. I am running under Yosemite, with Script Editor version 2.7.
    I have created a folder called "Script Libraries" in the computer location "/Library/Scripts", and put a script file called "SpeakLib.scpt" in this folder. SpeakLib.scpt compiles and runs correctly, and contains only handler subroutines.
    I am now attempting to use the SpeakLib library, but I get a compile error: Can't get script "SpeakLib".
    The new script contains only the code to use the script library and call a single function from that library.
    The error is for the following line, which is at the top of my new script:
    use myLib : script "SpeakLib"
    If instead, I do not put the above line in the text of my new script but put the text:
    tell script "SpeakLib"
        SpeakMessage("Hello world")
    end tell
    I get the same compile error on the tell script "SpeakLib" line.
    Just in case it was needed, I placed the following line at the top of the new script, but it made no difference:
    use AppleScript
    Can anyone tell me what I am doing wrong?
    Thanks in advance.

    Haven't used this myself but looking at the documentation for it I see
    Creating a Library
    The basic requirement for a script to be a script library is its location: it must be a script document in a “Script Libraries” folder in one of the following Library folders. When searching for a library, the locations are searched in the order listed, and the first matching script is used:
    If the script that references the library is a bundle, the script’s bundle Resources directory. This means that scripts may be packaged and distributed with the libraries they use.
    If the application running the script is a bundle, the application’s bundle Resources directory. This means that script applications (“applets” and “droplets”) may be packaged and distributed with the libraries they use. It also enables applications that run scripts to provide libraries for use by those scripts.
    The Library folder in the user’s home directory, ~/Library. This is the location to install libraries for use by a single user, and is the recommended location during library development.
    The computer Library folder, /Library. Libraries located here are available to all users of the computer.
    The network Library folder, /Network/Library. Libraries located here are available to multiple computers on a network.
    The system Library folder, /System/Library. These are libraries provided by OS X.
    so it looks to me like the Script Libraries folder should be in /Library (for your example) not in /Library/Scripts.
    That is it should be /Library/Script Libraries  and not /Library/Scripts/Script Libraries.
    regards
    from
    Introduction to AppleScript Language Guide

  • Script compile errors: error CS2001: Source file 'C:\WINDOWS\TEMP\nwf-21_q.

    Hi
    In While i am trying to create a new report or trying to open an existing report i am getting below mentioned error..
    "at System.Xml.Xsl.Compiler.CompileAssembly(ScriptingLanguage lang, Hashtable typeDecls, String nsName, Evidence evidence) at System.Xml.Xsl.Compiler.CompileScript(Evidence evidence) at System.Xml.Xsl.Compiler.Compile(NavigatorInput input, XmlResolver xmlResolver, Evidence evidence) at System.Xml.Xsl.XslTransform.Compile(XPathNavigator stylesheet, XmlResolver resolver, Evidence evidence) at System.Xml.Xsl.XslTransform.Load(String url, XmlResolver resolver) at System.Xml.Xsl.XslTransform.Load(String url) at Oracle.BAM.Web.XmlProcessor.LoadTransformFromFile(String strFileName) at Oracle.BAM.Common.Threading.SynchedHash.GetObject(String strKey, Object oLock) at Oracle.BAM.Common.Threading.SynchedHash.GetObject(String strKey) at Oracle.BAM.Web.XmlProcessor.LoadXslFromFile(String strXslFileName) at Oracle.BAM.Web.XmlProcessor.TransformStringFromFile(String strXml, String strXslFileName, XsltArgumentList oXsltArgumentList) at Oracle.BAM.ActiveStudio.ReportEditor.EditReport() ... "
    Please any one help me to solve the error.
    Thanks in Advance..

    Dear Sherman
    Thanks for the response
    As per request i am sending the details
    My Bam Version is = Bam Release 3 (10.1.3.1.0)
    OS = Windows Server2003
    Browser version = I.E 6.0.29
    I tried clearing IE cache, but it does not work
    Thanks

  • [newbie qn] script runs under Script Editor but not as application

    I have a simple script that runs successfully under the Script Editor. The script is:
    tell application "Safari"
    activate
    tell (make new document) to set URL to "http://www.google.com"
    end tell
    However, when I tried to run it as an application, I encountered the error 'Can't set document "Untitled" of application "Safari" to "http://www.google.com".'
    How should I rewrite the script so that it would run as an application? Thanks!

    Hi PointZero01
    Your script compiles and works fine saved as an application and tested under 10.5.6.
    slightly different but does exactly the same
    tell application "Safari"
    activate
    make new document
    set URL of document 1 to "http://www.google.com"
    end tell
    Budgie

  • Need Help with scripting for Automator/AppleScript.

    Hi everybody,
    I am building a small app for my mac, What I need is a script that can rename a file that I drop on it.
    and example being:
    example.jpg
    (when I drop it on the app, I want the app to change the filename of the document to "Image.jpg"
    I have tried this with Automator, but it requires that I specify the file to be changed, what I need is something that will change the name of any file I drag onto it.
    I am using it for application specific files.
    Kind regards,
    Pete.
    iBook G4; 60GB Hard Drive, 512MB RAM, Airport Extreme    

    Open the Script Editor in the
    /Applications/AppleScript/ folder and enter the
    following:
    on open(the_file)
    tell application "Finder"
    set name of the_file to "Image"
    end tell
    end open
    Save this script as an application.
    (11347)
    this script compiled correctly; however when run it returned the following error "Can't set name of (the_file) to "Image.jpg"
    I am also given the option of editing the script or just quitting.
    thanks for your help

  • Genbscript automation - Making genbscript run automatically after compile.

    Hello,
    Is there any way where we can make the genbscript run as soon as we click on compile. What am doing now is, every time I compile, i run the genbscript seperately.
    So I would like to know , is there any method where the genbscript runs automatically as soon as we compile? If so plz let me know.
    Thank and Regards,
    Abhishek.

    What version of Siebel are you using? If you are on 8.0, in Siebel Tools go to menu item View and choose Options.
    Choose the Scripting tab and enter a value in "Browser script compilation folder".
    Or just have a look here:
    Using Siebel Tools
    http://download.oracle.com/docs/cd/B40099_02/books/UsingTools/UsingToolsTOC.html
    Setting Scripting Preferences
    http://download.oracle.com/docs/cd/B40099_02/books/UsingTools/UsingTools_ScriptEditors3.html#wp1109335
    Axel

  • Calling RMAN script with DBMS_JOB

    Hi,
    Maybe someone can help me out. I'm perfecting my skills on 9i in the backup area before I have a need to use them and am taking notes.
    What I want to do is to store the backup script in the recovery catalog (which I already did under the name BACKUP) and call that script on a daily basis using DBMS_JOBS.
    Here is my script:
    RMAN>CREATE SCRIPT 'BACKUP'
    {ALLOCATE CHANNEL C1 TYPE DISK;
    BACKUP INCREMENTAL LEVEL 0 DATABASE
    FILESPERSET 4;
    BACKUP ARCHIVELOG ALL;
    DELETE ARCHIVELOG UNTILTIME 'SYSDATE-7';}
    This script compiled and is stored in rman. I ran it and it worked. I also autoconfigured the parameters to backup the controlfile automatically when the backup or copy is done.
    Now my next goal is to get this script to run automatically everyday using DBMS_JOBS and this is where it is not working.
    I used the DBMS_JOB.SUBMIT parameters to store the job in this feature but first the procedure 'RUNBACKUP' must compile successfully.
    DBMS_JOB.SUBMIT(:1,'RUNBACKUP', SYSDATE,'SYSDATE+1');
    This RUNBACKUP is a procedure that has to be called by the DBMS_JOBS PACKAGE. But the procedure is where Im having problems trying to write.
    I am assuming that rman is not connected to the target database here. So this is what I think it should look like:
    CREATE OR REPLACE PROCEDURE RUNBACKUP
    BEGIN
    RMAN; --the first thing that           
    has to be called is rman executable.
    CONNECT TARGET AL/AL@BBROWN
    --now we have to connect the target db to rman.
    CONNECT CATALOG RMAN/RMAN@RCAT;
    -- connecting to the recovery catalog.
    RUN {EXECUTE SCRIPT 'BACKUP';} --execute the stored backup script
    END;
    Also, at the end of this procedure I would like to exit rman as the final command.
    Any ideas on this would be appreciated and thanks for your help in advance.
    Al

    You need to create a shell script to execute rman and add that script to cron, something like this:
    #!/bin/ksh
    # Script name: whole_db_backup.ksh
    export PATH=/oracle/app/9i/bin:$PATH
    export ORACLE_HOME=/oracle/app/9i
    export ORACLE_SID=MDR
    rman <<EOF
    connect target /
    connect catalog rmancat/PASS@RMANCAT
    run {execute script whole_db_backup;}
    exit
    EOF

  • Major Bug in SSIS 2012 Script Component - Potentially

    I think there is a major issue with the Script Component in SSIS when running SSDT on Windows 8.1. I have a Script Component that functions as a data source. The script compiles successfully. However, when returning back to the Data Flow Task, I still get the
    following error which I'd get when an error exists in the Script.
    Validation error. Data Flow Task Script Component [2]: The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully.
    The script compiles successfully so this is frustrating. This is incorrect and I believe it's an issue with SSDT/SSIS when run on Windows 8.1. I've applied SQL Server 2012 SP1 with CU7 and the error still exists. Can someone else confirm this as
    a bug? 
    &lt;a href=&quot;http://martinsbiblog.spaces.live.com&quot; target=&quot;_blank&quot;&gt;http://martinmason.wordpress.com&lt;/a&gt;

    I'm simply doing the following: 
    Add a Data Flow Task.
    Add a Script Component. Configure as a Source.
    Double click on the Script Component.
    Click on the Edit Script button.
    Compile the script. Compiles successfully.
    Close the VSTAProject editor.
    Close the Script Component properties page.
    When returning to the Data Flow, the "Binary code for the script is not found" error is return
    Running as an Administrator did not solve the problem. Again, this is only an issue with SSIS on Windows 8.1 so if you're not running on Windows 8.1, do not bother replying. I've applied SP1 and CU7 and the problem was not resolved.
    Really regretting upgrading to Windows 8.1.
    &lt;a href=&quot;http://martinsbiblog.spaces.live.com&quot; target=&quot;_blank&quot;&gt;http://martinmason.wordpress.com&lt;/a&gt;

  • Forms 10g compile : syntax error near unexpected token `in

    Hi,
    I am writing a code to compile FORMS 10g(10.1.2.0.2) in HP_UX one by one.
    this is the code---frm10g.sh
    *#!/bin/ksh*
    *# . ~oracle/forms/server/default.env*
    *# . sid icache*
    TERM=vt220
    *if [ $# != 2 ]*
    then
    echo Usage : $0 module_name module_type
    exit 1
    fi
    case $2 in
    FORM|form|F|f) ext1='fmb' ;ext='fmx' ; modtyp='FORM' ;;
    PLL|pll|p|lib|LIB) ext1='pll' ;ext='plx' ; modtyp='LIBRARY' ;;
    MENU|menu|M|m) ext1='mmb' ;ext='mmx' ; modtyp='MENU' ;;
    **) echo invalid parameter ; exit 1 ;*
    esac
    echo Generating $1.$ext
    frmcmp module=$1.$ext1 userid=abc/abc@abc output_file=../$1.$ext module_type=$modtyp batch=NO compile_all=special > ./log/$1.log
    when I try to excute above file frm10g.sh in command line i get following error. Please let me know how to fix it.
    [abc]u01/app/oracle/product/10.1.2/forms/forms/Forms10g:. frm10g.sh INV FORM
    : command not found
    : command not found
    'bash: ./frm10g.sh: line 13: syntax error near unexpected token `in
    'bash: ./frm10g.sh: line 13: `case $2 in
    I really aapreciate your help.
    Thanks
    Sandy

    Sandy,
    I must apologize. The Compile.sh does not come with the Oracle Dev Suite installation. However, the following is the contents of the compile.sh script we use. This script compiles a single form.
    #!/usr/bin/ksh
    ORACLE_HOME=/d01/oracle/ias1012;export ORACLE_HOME
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:$ORACLE_HOME/ctx/lib:/usr/java1.2/jre/lib/sparc:$ORACLE_HOME/jdk/jre/lib/sparc:/usr/lib:/usr/dt/lib:/usr/openwin/lib:/usr/ucblib:usr/ccs/lib; export LD_LIBRARY_PATH
    MODULE_NAME=`echo $1|cut -d. -f1`
    MODULE_SUFFIX=`echo $1|cut -d. -f2`
    MODULE_MESG=${2:-"Compiling $1"}
    OK_MESG=${3:-"  Compiled sucessfully"}
    . .setpass_cir
    APP_PW='cir/'`eimauth -g cir`'@database'
    echo "************************************************************************* "
    echo ${MODULE_MESG}
    frmcmp.sh module=/d01/oracle/forms/${MODULE_NAME}.fmb userid=${APP_PW} compile_all=yes batch=yes
    RC=$?
    case "$RC" in
      0)
        echo ${OK_MESG}
        echo "Compile errors, return code: $RC "
        cat ${MODULE_NAME}.err
        echo "Compile errors in $1, press [enter] to continue.\c"
        read x
    esac
    eval exit $RCYou should be able to modify this to suit your needs.
    Craig...

  • Podcast Producer Youtube workflow fails. Script produces runtime errors

    A guide was written regarding creating a Podcast Producer workflow for YouTube. Unfortunately, the completed script (even with all of the relevant API bits installed properly) returns an exception when trying to upload the video (client ID, data API have been substituted into the script). The Java script compiles and runs. However, when it failed, I decided to toString() the exception which was called and found out that Google was returning "Bad Request," meaning something with the way the Script was trying to talk to Google was bad. The code is still the reference code with the CID/DevKey subbed in, but because of the Bad Request exception passed by Google, it fails to upload, and thus, fails entirely.
    Is there a proper working YouTube workflow anywhere?

    Apologies: I just found the Podcast Producer forum, so I'm going to mark this one as answered and repost the question in the Podcast Producer forum now that I know a specific forum for it exists.

  • Compilation of adobe air app that uses ANE fails while using the flex ant tasks.

    The resolution seems to be a hack - which when you rename .ane files to .swc, it works.
    I came across this workaround here: http://stackoverflow.com/questions/11112705/using-ant-mxmlc-task-with-native-extension?rq= 1
    <mxmlc file="${app.root}/app.as" 
                   output="${output.dir}/app.swf"
                   allow-source-path-overlap="true"
                   debug="false"
                   actionscript-file-encoding="UTF-8"
                   swf-version="19" >
                <load-config filename="${framework.root}/air-config.xml"/>
                <source-path path-element="${framework.root}"/>
                <source-path path-element="src"/>
                <source-path path-element="other"/>
                <compiler.library-path dir="libs" append="true">
                    <include name="**/*.swc"/>
                </compiler.library-path>
                <!-- THIS DOES NOT WORK -->
                <compiler.external-library-path dir="nativeExtension" append="true">
                    <include name="**/*.ane"/>
                </compiler.external-library-path>
            </mxmlc>
    However, if I rename all the .ane files in the nativeExtension directory to .swc the following change works..
                <!-- THIS WORKS -->
                <compiler.external-library-path dir="nativeExtension" append="true">
                    <include name="**/*.swc"/>
                </compiler.external-library-path>
    Has this issue been addressed?
    I'm using the following:
    - Adobe AIR SDK & Compiler (version 3.7) for Mac OS X
    - ActionScript Compiler 2.0
    - Apache Ant wrapper located in "AIRSDK_Compiler/ant/lib/flexTasks.jar"
    Let me know if any other details will be helpful.

    I'm using something like this in my build.xml (inapp.purchase.flash.swc is the flash wrapper for the ANE):
                <external-library-path dir="${basedir}/extensions/inapp.purchase/inapp.purchase.flash/bin" append="true">
                    <include name="inapp.purchase.flash.swc" />
                </external-library-path>
    I don't think you need ANE when building swf component of your app. ANE is only required for packaging. By linking with external inapp.purchase.flash.swc you're just telling action script compiler that above symbols will be defined later (in ANE).

  • Minimax micro cd with remastering scripts

    Hello all,
    how I promised, new version of Minimax with remastering scripts is out. Check http://www.kotek.net/minimax for details.
    Minimax is 32 MB small live cd. It is based on Arch linux and uclibc. Kernel is 2.6.15 taken from Arch with reiser4 patch and some wifi addons.
    It contains only console utils, but you still can browse web, view images, listen music or burn cds with it.
    Archers will be maybe interested in included installer of Arch linux.
    Changelog from last version:
    * added reiser4 patch and utils
    * removed acpi support, cause problems on old computers
    * removed hardware monitoring kernel support
    * removed bootup penguin logo
    * fixed ndiswrapper util (perl script compiled with perlcc)
    * SDK relased !!!!
    * irssi replaced with epic5 because of size
    * logon screen is smaller
    * added bacula
    * added lighttpd
    * added tor
    * added freedos floppy to grub menu

    http://www.kotek.net/minimax - Link is broken? Anoyone have minimax iso?
    Sorry for my english...

  • Creating and compiling JavaFX objects at runtime

    I am interested in the possibility of creating JavaFX objects at runtime where their definition is not know until runtime and am unsure about how to do this. Clearly I will need the JavaFX Script compiler at runtime which I guess is not that much of a problem but I am looking to accomplish this within the browser context so it would mean that I need the compiler to be available as part of the standard JRE much in the same way as the JavaFX Script interpreter is to obviate the need for it to be downloaded.
    Does anyone know if the JavaFX Script compiler is available as a built-in component within the latest versions of the JRE? If not, is it planned to include it in the future (JSE 7 perhaps)?
    Thanks,
    The Gibbon

    Perhaps the thread [Dynamic Scripting, how?|http://forums.sun.com/thread.jspa?threadID=5379268] can help.

  • Compiling based on variable remote machine

    I am having great trouble getting a script to compile based on a repeat loop from a record. The script compiles fine if the finder actions are something simple like a beep but when I put in my required actions it fails to compile.
    I think the problem is related to how I refer to the "of machine ....." but can't work out why it is related to my finder actions...
    Any help much appreciated.
    set catlist to {{catname:"Ollie", catip:"eppc://192.168.1.12", ssdDrive:":Volumes:Cat109 Content A:"}, {catname:"Richard", catip:"eppc://192.168.1.13", ssdDrive:":Volumes:Cat109 Content A:"}}
    repeat with cat_ref in catlist
    set theMachine to catip of cat_ref
    with timeout of 10 seconds
    tell application "Finder" of machine theMachine
    activate
    set sourceFile1 to document file "001_Sahr.mov" of folder "096-Act 1 - Club shots" of folder "Cast Rotation" of folder "SSD" of disk "Cat109 Content A"
    set destinationFile1 to folder "096-Act 1 - Club shots" of folder "Active" of disk "Cat109 Content A"
    duplicate sourceFile1 to destinationFile1 with replacing
    set foldercontents1 to result
    end tell
    end timeout
    end repeat

    There are many issues to deal with when using remote Apple Events, especially with regard to user permissions/access. In general you can't easily target an application on a remote machine that's running as a different user (e.g. you're logged in as 'joe', but the 'bob' is logged in the remote machine - 'joe' can't tell 'bob's Finder what to do.
    Once you address that issue, please never, ever, ever do this:
    tell application "Finder" of machine theMachine
      activate
    Imagine you're bob running on the remote machine, in the middle of writing a document, editing an image, browsing the web - it doesn't really matter - when all of a sudden, without any notice or warning, the Finder pops to the front for no apparent reason. Aaagghhhh! How annoying would that be?
    There is rarely, if ever, any need to activate the Finder. If it's running, even in the background, you can send it commands and it will do what you ask. It does not have to be frontmost to do so.
    That said, I'd take a slightly different approach to your task and eschew the Finder altogether. A shell command is probably an easier way to achieve what you're trying here:
    tell application "System Events" of machine theMachine
      do shell script "cp -r '/Cat109 Content A/SSD/Cast Rotation/096-Act 1 - Club shots/001_Sahr.mov' '/Cat109 Content A/Active/096-Act 1 - Club shots/'"
    end tell

Maybe you are looking for