Run Hot bkup from a generic Unix script

I want to run the hot bkup from a current Unix script but not sure what i to be changed because i'm very new to Unix scripting.
Please help.
## script -s <sid> -b <hot/cold> -d </backup/destination directory>
## Critical Env. Variables Verify CNTLFILE Directory File !!!
Setup()
export CNTLFILE=/opt/app/oracle/dba/cntl/backupcntl.sh
if [ ! -f $CNTLFILE ]
then
echo "-- ERROR: CNTL FILE $CNTLFILE does not Exist !!!"
echo "-- ERROR: CNTL FILE $CNTLFILE does not Exist !!!" > /tmp/backuperror
echo "-- Backup Aborted !!" >> /tmp/backuperror
mailx -s "Backup Fail for $ORACLE_SID" $DBA_MAIL $DBA_PAGE < /tmp/backuperror
exit 1
else
if [  -f $CNTLFILE ]
then
. $CNTLFILE
fi
fi
Initialize()
export USAGE="`basename $0` -s <ORACLE_SID> -b <hot|cold>"
export USAGE2=`basename $0`
export _PROCESS=`date +D%m%d%H%M`
export HOST=`uname -n`
export MMDD=`date '+%m/%d/%y'`
export HHMM=`date '+%H:%M'`
export CURTIME="$HHMM $MMDD"
export DEST_BASE=${BASE}/${ORACLE_SID}
export DBASE_BKUPDEST=$DEST_BASE/${BACKUP_TYPE}backup
export DBASE_BKUPTEMP=$DEST_BASE/${BACKUP_TYPE}backup/${_PROCESS}
export BACKUPTEMP_ARCHIVE=${DBASE_BKUPTEMP}/ARCHIVE
export DBASE_ERROR_LOG=${LOG_DIR}/${ORACLE_SID}.${BACKUP_TYPE}backup.$_PROCESS.errlog
export DBASE_BKUP_LOG=$LOG_DIR/${ORACLE_SID}.${BACKUP_TYPE}backup.$_PROCESS.log
export COMMAND_DIR=${DEST_BASE}/sql
export recovery=$DBASE_BKUPTEMP/recovery_readme.doc
export FILE_COMPRESS=${BACKUP_TYPE}-${ORACLE_SID}-${_PROCESS}.tar.Z
export archivetar=${DBASE_BKUPTEMP}/${ORACLE_SID}.${_PROCESS}_archive_logs.tar
export db_archmode=/tmp/db_archmode_${ORACLE_SID}.lst
export db_getarchlog=/tmp/db_getarch_${ORACLE_SID}.lst
export db_getarch2log=/tmp/db_getarch2_${ORACLE_SID}.lst
export db_openlog=/tmp/db_openlog_${ORACLE_SID}.lst
export db_data_files=/tmp/db_datafiles_${ORACLE_SID}.lst
export db_tar_files=/tmp/db_base_files_${ORACLE_SID}.lst
export db_controlfile=/tmp/db_control_${ORACLE_SID}.lst
export db_hotbkp_log=/tmp/db_hotbackup_${ORACLE_SID}.lst
export db_hotbkp_log2=/tmp/db_hotbackuperr1_${ORACLE_SID}.lst
export db_hotbkp_log3=/tmp/db_hotbackuperr2_${ORACLE_SID}.lst
export db_ftperrtmp=/tmp/db_ftperrtmp.log
export db_ftplogtmp=/tmp/db_ftplogtmp.log
export db_ftponelog=/tmp/db_db_ftpone.log
rm $DBASE_ERROR_LOG
rm $DBASE_BKUP_LOG
rm $db_openlog
rm $db_archlog
rm $db_data_files
rm $db_tar_files
rm $db_controlfile
rm $app_statlog
rm $db_hotbkp_log
rm $db_hotbkp_log2
rm $db_hotbkp_log3
rm $COMMAND_DIR/backup_command.sql
rm $db_ftperrtmp
rm $db_ftplogtmp
rm $db_ftponelog
## Reset CURTIME
ResetCURTIME()
export MMDD=`date '+%m/%d/%y'`
export HHMM=`date '+%H:%M'`
export CURTIME="$HHMM $MMDD"
## Get Tablespace for Hotbackup
Gethottblspace()
${ORACLE_HOME}/bin/sqlplus -s "/nolog" << EOF
connect / as sysdba
set echo off feedback off heading off pagesize 0 trimspool off
spool $COMMAND_DIR/tablespace
select a.tablespace_name || ' ' || file_name
from dba_tablespaces a, dba_data_files b
where a.tablespace_name = b.tablespace_name
order by a.tablespace_name, file_name;
select 'CONTROLFILE '||name from v\$controlfile where rownum = 1;
spool off
exit
EOF
## Begin Hotbackup
BeginHotbackup()
rm $COMMAND_DIR/hold_tablespace
rm $COMMAND_DIR/tablespace.lst
echo "-- Begin Hot Backup ...." >> $DBASE_BKUP_LOG
${ORACLE_HOME}/bin/sqlplus -s "/nolog" << EOF
connect / as sysdba
set echo off feedback off heading off pagesize 0 trimspool off
@$COMMAND_DIR/backup_command.sql
echo "-- Hot Backup completed " >> $DBASE_BKUP_LOG
set pages 1000 lines 132;
column recover heading "Requires|Recovery?" format a10;
column time heading "Date Of|Last Backup" format a12;
spool $COMMAND_DIR/verbackup.lis
select substr(tablespace_name,1,20) "Tablespace Name",substr(name,1,45) "Name",
a.status "Status",
decode(fuzzy,'YES','BACKUP','NORMAL') "Mode" ,
recover, time
from v$datafile_header a, v$backup b
where a.file#=b.file#
order by tablespace_name,name;
spool off
exit
EOF

Your script defines functions which will enable you to invoke the backup. But this script only defines functions. You need to invoke them for your backup to work. The sample invocation can look like this (CODE NOT TESTED!!!):
Setup
Initialize
Gethottblspace
BeginHotbackup
Best Regards
Krystian Zieja / mob

Similar Messages

  • Error running HAL routine from a perl cgi script via a browser

    Hi,
    I'm getting an error while trying to run a HAL routine from a perl- cgi initiated from a web browser. Perl-Cgi script runs fine when run from command line.
    07/23/2010|183648|N/A|Info|N/A|Analytic Services Adapter Log File Started
    07/23/2010|183648|AppName/Plan2|Info|Connect|Method Started
    07/23/2010|183648|AppName/Plan2*|Error|Connect|java.lang.UnsatisfiedLinkError: no HssJNIDriver950 in java.library.path*
    07/23/2010|183648|AppName/Plan2|Error|Connect|Method Ended - Connect completed with exceptions.
    07/23/2010|183648|N/A|Info|N/A|Analytic Services Adapter Log File Ended
    I've added the following env. variables in Apache server's httpd.conf file
    SetEnv ARBORPATH "E:\\Hyperion\\products\\Essbase\\EssbaseClient"
    SetEnv APS_HOME "E:\\Hyperion\\products\\Essbase\\aps"
    SetEnv ESSLANG "English_UnitedStates.Latin1@Binary"
    SetEnv EASPATH "E:\\Hyperion\\products\\Essbase\\eas\\server"
    SetEnv HYPERION_HOME "E:\\Hyperion"
    SetEnv ESSBASEPATH "E:\\Hyperion\\products\\Essbase\\EssbaseClient"
    SetEnv EAS_HOME "E:\Hyperion\products\Essbase\eas\console"
    SetEnv CLASSPATH "E:\\Vignette\\V7\\vbis\\Hyperion\\EssbaseAdapter"
    SetEnv PATH "E:\\Hyperion\\common\\ADM\\9.5.0.0\\Essbase\\9.5.0.0\\bin;E:\\Vignette\\V7\\vbis\\Hyperion\\EssbaseAdapter\\adm;C:\\Program Files (x86)\\Java\\jre1.5.0_17\\bin\\;E:\\Hyperion\\products\\Essbase\\EssbaseClient\\bin;E:\\Hyperion\\products\\Essbase\\EssbaseClient;E:\\Hyperion\\common\\CSS\\9.5.0.0\\bin;E:\\Hyperion\\products\\Essbase\\eas\\console\\bin;"
    Any pointers would be appreciated.
    Thanks in Advance!!

    Vipul,
    Vipul Sanghvi wrote:
    I am facing problem in running a Perl CGI Script on Weblogic
    Application
    Server
    I set the CGIServlet Property in the Weblogic Properties file as
    weblogic.httpd.register.cgi-bin=weblogic.servlet.CGIServlet
    weblogic.httpd.initArgs.cgi-bin=\
    cgiDir=/weblogic/myserver/public_html/cgi-bin,\
    *.pl=/bin/perl.exe,\It shouldn't end with ,\ right?
    Was it a mistake?
    -Kumar
    >
    I installed the Perl on my system and put the perl exe in the bin
    directory
    of the Weblogic App Server. But I am getting the error "failed to
    execute
    the test.pl ". Where test.pl is a simple test perl script.
    APP server ver is WLE5 Beta[att1.html]

  • Is it possible to run an application from a user or container login script?

    Is it possible to run an application from a user login script or a container login script?
    A "Force Run" application object works fine if the user's workstation is setup to auto-load "Application Window" or "Application Explorer" but in this case I'd like to run an application when someone does a manual login (ie. they right-click red "N" and choose "Novell Login...")
    Using a User Package's "Scheduled Action Policy" and the Event=Login also does not work when a user logs in manually. This type of Event seems to only apply when the user first logs into the workstation, not at a manual login.
    Thanks,
    Marc

    > Is it possible to run an application from a user login script or a
    container login script?
    Yes, see the documentation:
    http://www.novell.com/documentation/...a/a7q6999.html
    Regards
    Rolf Lidvall
    Swedish Radio (Ltd)

  • When running a scenario from Unix ( $ prompt)it cant found the DTD for xml

    Dear All,
    I have created an interface that extracts xml messages from JMS queue ( OC4J) successfully. After extracting the message from JMS queue, the interface parse the message and put into an oracle database.
    After when I have created a scenario from the above Interface and tried to run the scenario from $ promt in unix using startscen.sh, it is giving following error message.
    # call the configuration setup file--- Mandatory for running ODI scenario
    . $ODI_HOME/bin/odiparams.sh;
    # Call the scenario for getting Message from JMS queue
    . $ODI_HOME/bin/startscen.sh PKG_JMS_XML 001 GLOBAL "-v=5" | tee out_$$.txt;
    The error I am getting as below
    03/09/2009 05:09:40 PM(main): SnpExpTxt.getObjectLst : :
    [FirstDate:2009-03-09 17:09:40.0
    FirstUser:SUNOPSIS AGENT
    IndChange:null
    IntVersion:null
    ITxt:5194100
    LastDate:2009-03-09 17:09:40.0
    LastUser:SUNOPSIS AGENT
    Txt:0 : 08001 : java.sql.SQLException: Cannot load connection class because of underlying exception: 'java.sql.SQLException: No DTD found and no XML file provided: the XML schema cannot be created'.
    java.sql.SQLException: Cannot load connection class bec
    TxtOrd:0, FirstDate:2009-03-09 17:09:40.0
    FirstUser:SUNOPSIS AGENT
    IndChange:null
    IntVersion:null
    ITxt:5194100
    LastDate:2009-03-09 17:09:40.0
    LastUser:SUNOPSIS AGENT
    Txt:ause of underlying exception: 'java.sql.SQLException: No DTD found and no XML file provided: the XML schema cannot be created'.
         at com.sunopsis.jdbc.driver.JMSXMLDriver.connect(JMSXMLDriver.java)
         at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.
    TxtOrd:1, FirstDate:2009-03-09 17:09:40.0
    FirstUser:SUNOPSIS AGENT
    IndChange:null
    IntVersion:null
    ITxt:5194100
    LastDate:2009-03-09 17:09:40.0
    LastUser:SUNOPSIS AGENT
    Txt:java)
         at com.sunopsis.sql.SnpsConnection.c(SnpsConnection.java)
         at com.sunopsis.sql.i.run(i.java)
    TxtOrd:2]
    Anybody please help ?
    regards
    Umapada

    Hello,
    Try to remove and recreate your package and scenario, I had the same issue and solved doing it.
    It seems for me that the package cannot update its contents, for example, if you change something in your interface, you must recreate your package and scenario to update the changes.
    What ODI version do you use? If you use an old version, try to update to ODI 10.1.3.5
    Regards,
    Wallace Galvão
    São Paulo - Brazil

  • Execute UNIX  script from java not working

    Hi
    I am having difficulty running my java program to execute UNIX script on a Windows box. Here is my code.
    public boolean executeScript() {
              try {
                   String testScript= "WEB-INF/scripts/test.sh";
                   File file = new File(copyToQaScript);
                   System.out.println(file.getAbsolutePath());
                   Process proc = Runtime.getRuntime().exec(file.getAbsolutePath());
              } catch (IOException ioe) {
                   ioe.printStackTrace();
                   logger.error(ioe);
              } catch (RuntimeException re) {
                   re.printStackTrace();
                   logger.error(re);
              } catch (Exception e) {
                   e.printStackTrace();
                   logger.error(e);
              return true;
         }When I execute this method, I am getting IOException as below.
    java.io.IOException: CreateProcess: C:\tomcat-5.0.28\webapps\myProject\WEB-INF\scripts\test.sh error=193
    Can anyone help me? Thanks.

    kminkeller wrote:
    Yes I have Cygwin installed. I am quite aware of that thanks Sabre.Then you need something like
          String[] command = {"bash","/home/sabre/bin/fred.sh"};
            Process p = Runtime.getRuntime().exec(command);
      if the executabe directory (/home/sabre/bin in my case) is not on the PATH or
          String[] command = {"bash","fred.sh"};
            Process p = Runtime.getRuntime().exec(command);
      if it is.

  • Applescript for running specific action from action wizard...

    Hi Forum,
    using this applescript I m running my "INDEGN" action from action wizard...
    the first step is activated through the applescript.. (ie. INDEGN action is correctly picked)
    but how to "click next button" to proceed to next steps..
    tell application "System Events"
        tell application process "Acrobat"
            tell application "Adobe Acrobat Pro" to activate
            click the menu item "INDEGN" of menu 1 of menu item "Action Wizard" of the menu "File" of menu bar 1  ## here it is not cliking next button.....
            click button "Next" of window "Action: INDEGN"
    click button "Close" of window "Action: INDEGN"
        end tell
    end tell
    many thanks for the support..

    HI DAVE,
    thanks for the reply,,
    Is there any other way to run "my action" from action wizard. using script....
    Would be  a great help if advised....
    Many thanks...

  • Running a Unix script from a Java class

    I am trying to use SCP (Secure copy) to copy an xml file from my J2EE application to a remote Unix server using a Unix script. How can I run the Unix script from my Java class? I could not find any resource for this on the internet. Can someone help me with this please.
    Thanks

    I am trying this below program ,but i am getting the error please help me
    import com.jcraft.jsch.*;
    import com.jcraft.jsch.Channel;
    import com.jcraft.jsch.JSch;
    //import com.jcraft.jsch.JSchException;
    import com.jcraft.jsch.Session;
    //import com.jcraft.jsch.UserInfo;
    import java.io.*;
    public class testrad {
    public static void main(String args[])
    String user="usertvr";
    String host="5.34.12.1";
    String cmd="ls -l";
    JSch jsch = new JSch();
    try{
    Session session=jsch.getSession(user,host,22);
    session.setPassword("$yhaj23");
    //UserInfo usrInfo=new MyUserInfo();
    //session.setUserInfo(usrInfo);
    session.connect();
    Channel channel=session.openChannel("exec");
    ((ChannelExec) channel).setCommand(cmd);
    channel.setXForwarding(true);
    channel.connect();
    //code
    channel.setInputStream(System.in);
    // channel.setOutputStream(System.out);
    //((ChannelExec) channel).setErrStream(System.err);
    InputStream in = channel.getInputStream();
    channel.connect();
    byte[] tmp = new byte[1024];
    while (true)
    while (in.available() > 0)
    int i = in.read(tmp, 0, 1024);
    if (i < 0)
    break;
    System.out.print(new String(tmp, 0, i));
    if (channel.isClosed())
    in.close();
    // System.out.println("JSCH: exit-status: " +
    //channel.getExitStatus());
    break;
    try
    Thread.sleep(1000);
    catch (Exception ee)
    channel.disconnect();
    session.disconnect();
    }catch(Exception e)
    {e.printStackTrace();
    System.out.println("Exception"+e);}
    /*public static class MyUserInfo implements UserInfo {
    public String getPassword()
    { return "password"; }
    public String getPassphrase()
    { return ""; }
    public boolean promptPassword(String arg0)
    { return true; }
    public boolean promptPassphrase(String arg0)
    { return true; }
    public boolean promptYesNo(String arg0)
    { return true; }
    public void showMessage(String arg0)
    Here is the error
    com.jcraft.jsch.JSchException: UnknownHostKey: 5.128.0.10. RSA key fingerprint is 02:a0:d6:c0:6f:69:2c:a9:a7:fa:7c:71:1c:60:ed:57
         at com.jcraft.jsch.Session.checkHost(Unknown Source)
         at com.jcraft.jsch.Session.connect(Unknown Source)
         at com.jcraft.jsch.Session.connect(Unknown Source)
         at testrad.main(testrad.java:23)
    Exceptioncom.jcraft.jsch.JSchException: UnknownHostKey: 5.128.0.10. RSA key fingerprint is 02:a0:d6:c0:6f:69:2c:a9:a7:fa:7c:71:1c:60:ed:57
    Can some one help me please.
    I running this program from Windows to connect to remote unix boxes.

  • Run a UNIX Script from java

    Hi,
    how can i run a unix script from java application. This java application is on windows.
    How can i do this.
    thanks,

    Hi,
    how can i run a unix script from java application.
    This java application is on windows.
    So I think it's safe to assume that the target script is on a remote unix server.
    Take a look at http://sourceforge.net/projects/sshtools/

  • How to run a unix script from oracle warehouse Builder

    Hi,
    can any one share the information about, running the unix script or scripts using oracle warehouse builder.
    Regards,
    Ak

    One way is define a workflow. Inside the workflow you put
    1)an external process that "points to" the shell script and then
    2)put the mapping
    The external process must have the "COMMAND" parameter set to the name of the shell script. If the script has parameters you must put them in the "PARAMETERS LIST" separated by "?" (for example, ?par1?par2).
    The path where OWB executes the external process I think is the ORACLE_HOME of the OWB.
    f you don't use workflow, you can try with this more complex solution. I tried with 9i and OWB 9.2 and it's working well.
    You create an autonomous procedure (within a package or not) :
    CREATE PROCEDURE Extract_Email_List
    DECLARE
    PRAGMA AUTONOMOUS_TRANSACTION;
    And use the sys.shell script that you need your dba/unix admin to install first of all, with a call like that.
    sys.shell('sh ' || txt_dir_name || '/send_email_marketing.sh ' || txt_dir_name || ' ' || email_addr );
    Then you import your procedure into OWB and use it in your mapping with the "pre-mapping" icon (you can set parameters for your proc with constants if you want).
    To implement sys.shell, go to metalink and find "Note:168065.1" - "How to call a UNIX shell script from PL/SQL".
    Once it's done once, it's not so bad. But I would still recommend the workflow approach also..
    I hope this helps.

  • How to run a Unix Script from a specific user

    Hi,
    I want to run a GoldenGate related unix script from a super user. I have created crontab enter from that super user. But its still running from root user. As GGSCI cannot be invoked other than super user, the Script is failing.
    The Script is running fine on command prompt and from "at" batch job command.
    Please give me a way to run the script from a specific user on Cron
    Thanks,
    Saravana

    Hi.
    can you show:
    grep root /etc/passwd
    grep <super user> /etc/passwd (It's not clear for me, what you call super user. For me - root is super user. )
    ls -la /var/spool/cron/crontabs
    Generaly for add cronjobs for any user need:
    crontab -e <username>
    For more information - man crontab
    Reagrds.

  • RE: Running Escript from a UNIX script

    Hi Doug,
    Yu can try the following within escript:
    (using execcmd to generate an escript script and include to execute the
    generated escript)
    1) startup escript from a ksh
    2) get to the installedPartition level
    3) setOutFile yourOutFile
    4) showag
    5) setOutFile
    6) execcmd " yourAwkGrepScript.ksh yourOutFile "
    7) include yourGeneratedEscript
    yourAwkGrepScript.ksh analyses yourOutFile and finds
    the ActivePartition level subagent with the hex number as part of that
    subagent name
    then generates a new escript script with a fixed name yourGeneratedEscript
    I hope this idea will help you to solve your problem.
    Evert Nooijen.
    -----Original Message-----
    From: [email protected]
    [SMTP:[email protected]]
    Sent: 27 January 1999 15:25
    To: [email protected]
    Subject: Running Escript from a UNIX script
    I'm running a Korn Shell script that uses Escript to navigate down through
    an applications sub agents to get to the LoadBalancingRouter agent. Now I
    also need to get to the CommMgr agent in the same fashion. The problem I'm
    having is that once I get to the InstalledPartition level , I need to get
    to the ActivePartition level which requires the hex number as part of the
    subagent name. I've figured out a way to get the subagent name using awk &
    grep, but haven't been able to do it while I'm in escript. Basically I
    need to find the subagent for the installed partition & pass that name to
    the findsubagent command. Escript doesn't seem to understand grep or awk??
    Does anyone have any ideas or have you done something like this before??
    Doug Scurr
    HealthPartners
    8100 34th Avenue South
    Minneapolis, MN 55440-1309
    (612)883-7317
    <[email protected]>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Escript is pretty dumb, in that it doesn't have any
    looping or conditional expressions itself. I drive
    escript from a korn shell script also.
    Basically, I make two passes when doing things with
    escript in cases like this. One pass I send the
    commands to get the necessary info out of escript,
    and redirect to a file.
    Second pass, I awk/grep/whatever the info out of
    the temporary file and use it to build another
    set of escript commands to do the real work.
    [email protected]
    Unix Systems Administrator
    Sentai Advanced Research Corp.
    (780)423-3113 ext 42
    -----Original Message-----
    From: [email protected]
    <[email protected]>
    To: [email protected] <[email protected]>
    Date: Wednesday, January 27, 1999 8:35 AM
    Subject: Running Escript from a UNIX script
    I'm running a Korn Shell script that uses Escript to navigate down through
    an applications sub agents to get to the LoadBalancingRouter agent. Now I
    also need to get to the CommMgr agent in the same fashion. The problem I'm
    having is that once I get to the InstalledPartition level , I need to getto
    the ActivePartition level which requires the hex number as part of the
    subagent name. I've figured out a way to get the subagent name using awk &
    grep, but haven't been able to do it while I'm in escript. Basically I need
    to find the subagent for the installed partition & pass that name to the
    findsubagent command. Escript doesn't seem to understand grep or awk??
    Does anyone have any ideas or have you done something like this before??
    Doug Scurr
    HealthPartners
    8100 34th Avenue South
    Minneapolis, MN 55440-1309
    (612)883-7317
    [email protected] <[email protected]>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Running Escript from a UNIX script

    I'm running a Korn Shell script that uses Escript to navigate down through
    an applications sub agents to get to the LoadBalancingRouter agent. Now I
    also need to get to the CommMgr agent in the same fashion. The problem I'm
    having is that once I get to the InstalledPartition level , I need to get to
    the ActivePartition level which requires the hex number as part of the
    subagent name. I've figured out a way to get the subagent name using awk &
    grep, but haven't been able to do it while I'm in escript. Basically I need
    to find the subagent for the installed partition & pass that name to the
    findsubagent command. Escript doesn't seem to understand grep or awk??
    Does anyone have any ideas or have you done something like this before??
    Doug Scurr
    HealthPartners
    8100 34th Avenue South
    Minneapolis, MN 55440-1309
    (612)883-7317
    [email protected] <[email protected]>

    Escript is pretty dumb, in that it doesn't have any
    looping or conditional expressions itself. I drive
    escript from a korn shell script also.
    Basically, I make two passes when doing things with
    escript in cases like this. One pass I send the
    commands to get the necessary info out of escript,
    and redirect to a file.
    Second pass, I awk/grep/whatever the info out of
    the temporary file and use it to build another
    set of escript commands to do the real work.
    [email protected]
    Unix Systems Administrator
    Sentai Advanced Research Corp.
    (780)423-3113 ext 42
    -----Original Message-----
    From: [email protected]
    <[email protected]>
    To: [email protected] <[email protected]>
    Date: Wednesday, January 27, 1999 8:35 AM
    Subject: Running Escript from a UNIX script
    I'm running a Korn Shell script that uses Escript to navigate down through
    an applications sub agents to get to the LoadBalancingRouter agent. Now I
    also need to get to the CommMgr agent in the same fashion. The problem I'm
    having is that once I get to the InstalledPartition level , I need to getto
    the ActivePartition level which requires the hex number as part of the
    subagent name. I've figured out a way to get the subagent name using awk &
    grep, but haven't been able to do it while I'm in escript. Basically I need
    to find the subagent for the installed partition & pass that name to the
    findsubagent command. Escript doesn't seem to understand grep or awk??
    Does anyone have any ideas or have you done something like this before??
    Doug Scurr
    HealthPartners
    8100 34th Avenue South
    Minneapolis, MN 55440-1309
    (612)883-7317
    [email protected] <[email protected]>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • How can i run unix script from my apex page

    how can i run unix script from my apex page and take the output of unix script as a hidden variable and display it on the report region of that page

    I had a requirement to run a Fortran program against some data that woudl be extracted from the database after the user set up their filtering criteria and made some additional input. SInce the program was to complex to conver to PL/SQL, we decided to try and invoke it from Apex. This is how I did it.
    1. I followed the steps in Tim Archer's excellent article "Oracle External Procedure to Run Host Commands" (http://www.timarcher.com/?q=node/9). If the link does nto work, google the article's title.
    Using this steps I created a function which accepts any OS command, including calling my own shell scripts, and runs them. I called my PL/SQL function "shell" instead of "USF_RUN_HOST_CMD " as Tim did in his example (step 9).
    2. In Apex,
    a. I created a button to run my shell command. (I named it P2_RUN_SHELL)
    b. I created a PL/SQL process whose source looks as follows:
    shell('/home/ackness/scripts/cr_xcf_file.sh > /tmp/cr_scfp_file.log');
    and which was conditioned on the the button P2_RUN_SHELL.
    It works like a charm.
    Note: since you can run your own scripts using this method, you can encapsulate a series of commands in a UNIX shell script and invoke that script from Apex. This allows you to be able to test or run you commands from the command line as well as Apex and makes it easier to develop/debug/enhance the scripts in the future.
    Ackness

  • How can I run a Unix script from a desktop icon?

    I have a Unix script I've created in vi and would like to run it by double clicking on an icon on my desktop. I would like to do this without the additional application layer of Applescript, Automator or Terminal. Is this possible?
    Thanks in advance.
    Howard

    Sounds like a job for platypus.

  • Running an Unix Script from Informatica Mapping/workflow.

    Hi ,
    I have a need to start /stop service to a remote server (away from the DAC server ,which is on UNIX os)
    how could this be done in a best way?
    I am planning to do this through Informatica Workflow,and need help (technical steps Please) to do this.
    1) workflow will call the Unix Script
    2) Unix Script logins to the remote server
    3) Unix scripts navigates to particular folder
    4) Unix script executes a command to Start/Stop the server.
    5) Unix Script logs out.
    6) if everything done success ,Workflow will success else fail with the error code.
    Regards

    Hi ,
    I have a need to start /stop service to a remote server (away from the DAC server ,which is on UNIX os)
    how could this be done in a best way?
    I am planning to do this through Informatica Workflow,and need help (technical steps Please) to do this.
    1) workflow will call the Unix Script
    2) Unix Script logins to the remote server
    3) Unix scripts navigates to particular folder
    4) Unix script executes a command to Start/Stop the server.
    5) Unix Script logs out.
    6) if everything done success ,Workflow will success else fail with the error code.
    Regards

Maybe you are looking for

  • Copy File From One Drive to Another & Missing Keyword Tags

    Hi, I use LR 2.7.  I want to copy one file from one drive to another drive with the same file name.  I thought you could drag the file, but it doesn't copy over the file in the other drive, can you explain what I have to do?  Also, I tried to import

  • Installing Windows XP pro from a ZIP file

    Hi, I bought a OEM copy of windows XP pro. It comes in a ZIP file. Is there a way to install it using Bootcamp directly or must I first create a CD with this file? Also, is there a difference in using the 64 bit version instead of the 32? Which one i

  • SETUP tables not filling for 2LIS_02_ITM

    Hello all, I am trying to run the SETUP process from OLI3BW for few Purchasing doc's But I do not see any entries  in the setup table 'MC02M_0ITMSETUP' after the SETUP run. and Yes,I have DELETED setup tables data prior to running the Setup process.

  • Add a URL to a Calendar event linking to a message in Mail

    Hi, Before Mavericks 10.9.5 update, I could manually add a URL in a Calendar event to a message in Mail by doing the following: Show the message's header, Find the "Message-Id: " field, Copy the string after "Message-Id: " surrounded by "<" and ">",

  • Movies not saved in Keynote file problem

    I created a new Keynote presentation on Tuesday on my iMac at home. It had a slide with 4 movies overlapping on the same slide, the next slide had two animated GIFs, the next slide had one of the animated GIFs from the previous slide repeated on it.