Calling an rss script with rs.exe fails to result in a report pdf from VB6 w/ ShellEx.

Sql 2008 R2
Calling an rss script with rs.exe fails to result in a report pdf from VB6 w/ ShellEx. 
If I call rs.exe with the various parameters from the command prompt I  have success(other than rs.exe using the temp folder, which is a different issue).  But when I try to execute the same process from a Visual Basic 6.0 application utilizing
the ShellEx api call, the report creation and output to PDF format do not occur.   There is no error raised.
Yes, I wish I could use a newer dev tool but that isn't an option right now. I think this should work.  Can ya'll tell me what I'm doing wrong?
sArgs = "-i " & Chr(34) & "'C:\Program Files\Dura Supreme\OrderEntry\RunOrdReports.rss'" & Chr(34) & _
" -s 'http://walnut/reportserver' -v 'DuraOrderNum=" & _
Chr(34) & sOrdDuraID & Chr(34) & "' -e Exec2005 -t"
ShellEx Chr(34) & "C:\Program Files\Dura Supreme\OrderEntry\rs.exe" & Chr(34), EShellShowConstants.essSW_SHOWNORMAL, sArgs
TIA,
Jim M.

ShellEx Chr(34) & "C:\Program Files\Dura Supreme\OrderEntry\rs.exe" & ....
Hello Jim,
The path for rs.exe includes spaces, you should set it in hyphen, as you already did for file "RunOrdReports.rss" in variable "sArgs2
Olaf Helper
[ Blog] [ Xing] [ MVP]

Similar Messages

  • ERROR - NetFx3 role processing with DISM.exe failed, rc = -2146498529_ZTIOSRole

    Hello,
    when installing the .net framework 3.0 ROLE on Windows 8 Enterprise, the installation stops with error :
    ERROR - NetFx3 role processing with DISM.exe failed, rc = -2146498529 ZTIOSRole 16-1-2013 17:17:49 0 (0x0000)
    How to fix issue?

    Hello Exact same error from me on MDT2012. I add that the connection to the MDT share has been done successfully and that the previous copy on the log seems to succeed, as:
    Validating connection to \\x\y\Operating Systems\Windows 8 Enterprise x86    ZTIOSRole    30.01.2013 12:53:09    0 (0x0000)
    Already connected to server x as that is where this script is running from.    ZTIOSRole    30.01.2013 12:53:09    0 (0x0000)
    Copying source files locally from \\x\Build_Capture_EBUV5$\Operating Systems\Windows 8 Enterprise x86\sources\sxs    ZTIOSRole    30.01.2013 12:53:09    0 (0x0000)
    About to execute command: cmd.exe /c C:\windows\system32\DISM.exe /Online /Enable-Feature /FeatureName:"NetFx3" /Source:"C:\MININT\sources\X86" /LimitAccess /All /NoRestart /logpath:C:\MININT\SMSOSD\OSDLOGS\ZTIOSRole_Dism.log >> C:\MININT\SMSOSD\OSDLOGS\ZTIOSRole_DismConsole.log  
     ZTIOSRole    30.01.2013 12:54:29    0 (0x0000)
    ERROR - NetFx3 role processing with DISM.exe failed, rc = -2146498529    ZTIOSRole    30.01.2013 12:55:18    0 (0x0000)
    Property InstalledRoles001 is now = NETFX3    ZTIOSRole    30.01.2013 12:55:18    0 (0x0000)

  • Running a SqlPlus script with AT.EXE on WIN NT4.0

    Hi guys,
    I've to periodically run a simple batch script to update some tables on an Oracle DB. Since I'm
    running a Server Win NT4.0 SP6 I made a .cmd that calls a sqlplus script and I'm trying to
    schedule it using the AT.EXE service.
    When I run the .cmd outside from the AT it works fine; when I try to run it using AT something
    goes wrong and I got this error:
    ERROR:
    ORA-03113 end-of-file on communication channel
    I suspect it depends on how AT / sqlplus handle standard I/O but I wasn't able to find the
    right way to call them or a work around to make things work.
    Any suggestion ??
    TIA,
    Max
    Here's the script:
    @echo off
    rem
    rem run sql script (connect info in script)
    rem
    sqlplus -S /NOLOG @d:\UpdBatch\upd_table.sql %1 %2
    rem
    rem trace result in EventLong
    rem
    SET result=%ERRORLEVEL%
    IF '%result%'=='1' LOGEVENT -m \\MINERVA -s E -e 1 -r "BATCH UPDATE" "Error updating tables!"
    goto finished
    LOGEVENT -m \\MINERVA -s I -e 0 -r "BATCH UPDATE" "Tables Updated!"
    :finished
    echo "Done!"
    and I register it in AT in this way:
    D:>at 15:30 cmd.exe /C "d:\UpdBatch\my_script.cmd 10 20 > d:\temp\out.txt"
    null

    I did not notice that the cut and paste was poor. It should have read
    SQL> @dm$load.pkb
    SP2-0310: unable to open file "dm$load.pkb"
    SQL> host ls
    dm$load.pkb
    Any ideas will be greatly appreciated.

  • Problem with Place call in a script with HTTP trigger

    Hi!
    I'm trying to develop a sample script, associated to an application that has an HTTP trigger. I'm working with UCCX Premium 8.5.1
    The trigger is working OK, but the place call output is allways "unsuccessful". The number to call and the redirect number are extensions of the same IPT platform.
    Below you will find print-screen of the script. Besides, I'm attaching the .aef file.
    Any help would be appreciated. Thanks in advance.
    Roy.

    The value in your "Call Control Group" must match the "Group ID" in your CM Telephony Call Control Group Configuration
    This is from my lab system so the "AgentsLoggedIn" variable would need to contain 1 or 3. You are telling the script which CTI port group to make the call with. You have a 0 in your AgentsLoggedIn so do you have a Group ID of 0?
    Your CTI group must be able to make the call so must have the correct partition/Calling Search Space
    Graham

  • ERROR - NetFx3 role processing with DISM.exe failed, rc = -2146498529

    I am deploying Windows 8.1 x64 with update using MDT 2013 and everything works perfectly until the Apply Patches is changed from "Nothing" to my "Windows 8.1 x64 Updates" profile (which contains all the offline updates) is there a particular
    patch I should be looking for to eliminate? If I change it back to "Nothing" .NET 3.5 installs fine.
    Chris

    You should have something in your bdd.log. If you're in WinPE, it's on your OSDisk under MININT.
    Also, I've seen a lot of people recommend not patching through the package functionality.  Depending on the patch, stuff like that I usually let Windows Update handle that through our WSUS. The specific feature you're trying to install is a pain in
    the *** though. I came up with a workaround for this when building out my Windows 8.1 image. Instead of trying to patch the .NET 3.5 install, I created an application with the command line -
    Dism.exe /online /enable-feature /featurename:NetFX3 /All /Source:"Y:\Operating Systems\Windows 8.1 Enterprise x64\sources\sxs" /limitaccess
    Your drive letter here will either be Z: if you have no network logging, or Y: if you have network logging enabled.
    All this is doing is pointing back to DS Windows 8.1 SXS directory so the install has it's source directory.  I'm not sure why they went with this method, and it's also extremely annoying in a Windows Recovery/Reset scenario as this install resides
    in an area that will not be captured in the recovery image.  Hope this helps.
    Ryan

  • Running Scripts with sqlplusw.exe

    Hi,
    My requirement is I've to run a script, which will take connection info (logon window) and then run my file.
    much like sqlplusw.exe xx @c:\abc.sql. Now I can't put xx as username. I've to write it such a way that, it'll ask for conn info(username,password and connect string) then execute the script.
    Thanks in advance.
    --Sourav                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    D:\>type test.sql
    conn &1/&2@&3
    set lines 121 pages 1000 trimspool on
    spool spool.log
    select * from emp;
    spool off
    exit
    D:\>sqlplusw /nolog @test.sql scott tiger test9i
    D:\>type spool.log
         EMPNO ENAME      JOB              MGR HIREDATE        SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17/12/80        800                    20
          7499 ALLEN      SALESMAN        7698 20/02/81       1600        300         30
          7521 WARD       SALESMAN        7698 22/02/81       1250        500         30
          7566 JONES      MANAGER         7839 02/04/81       2975                    20
          7654 MARTIN     SALESMAN        7698 28/09/81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01/05/81       2850                    30
          7782 CLARK      MANAGER         7839 09/06/81       2450                    10
          7788 SCOTT      ANALYST         7566 19/04/87       3000                    20
          7839 KING       PRESIDENT            17/11/81       5000                    10
          7844 TURNER     SALESMAN        7698 08/09/81       1500          0         30
          7876 ADAMS      CLERK           7788 23/05/87       1100                    20
          7900 JAMES      CLERK           7698 03/12/81        950                    30
          7902 FORD       ANALYST         7566 03/12/81       3000                    20
          7934 MILLER     CLERK           7782 23/01/82       1300                    10

  • How to call a shell script from a java code

    Hello can any one suggest me how to call a shell script from a java program that takes three parameters.
    i have a shell script (msp_restore_gui) when i run this script in the command line in a RHEL5 ,SUSE10 and Debian machine it works fine .I even tested to call it from a java program and it also worked fine but when i used the same in a J2ee application where the user when clicks the restore button in a webserver this inturn sends the request to a java file named BackupManager.java where i call the shell script.But here it fails.Waiting for your suggestions.If you want i can put the code also here

    yes the script is in /usr/local/mss/tools/backup and the script (msp_restore_gui) is as follows
    #!/bin/sh
    TIMESTAMP=`date +%d_%b_%y-%H-%M`
    touch /var/backups/mss/mss_restore_"$TIMESTAMP".log
    LOGFILE="/var/backups/mss/mss_restore_"$TIMESTAMP".log"
    ### Explode tgz file
    cd /
    # Checks to be done:
    # root login
    # assume he passes the parameter as msp_backup_<timestamp>
    # check for the existence of the .tz and fileList.txt
    # Checking for the root login and if not logged on as root
    # permission will be denied to execute this script
    logmsg(){
    echo "`date`: $*" >> $LOGFILE 2>&1
    echo "$*"
    #usage of this script
    while [ $#  -ne 0 ]
    do
    case $1 in
    -n)
    shift
    ARCHIVE_NAME=`find / \( -name "$1.tz" -o -name "$1.tgz" \) 2>/dev/null`
    FILE_NAME=`find / -name $1_filesList.txt 2>/dev/null`
    if [ x$ARCHIVE_NAME = x -a y$FILE_NAME = y ]
    then
    logmsg "ERROR: Files not found, Restore cannot proceed"
    usage
    else
    tar tvzf $ARCHIVE_NAME > /dev/null 2>&1
    if [ $? -ne 0 ]
    then
    echo "ERROR: The tar file $ARCHIVE_NAME is not proper. Restore cannot proceed"
    exit 1
    else
              echo "Backedup files are present, proceeding with restore......" >> $LOGFILE 2>&1
    fi
    fi
    usage
    SKIP_CLEANUP=1
    STATUS=1
    exit
    esac
    shift
    done
    rm -rf ./newfile
    curr_ver_file="/usr/local/mss/etc/version"
    /usr/local/mss/tools/backup/check_version $curr_ver_file $FILE_NAME
    ret_code=$?
    echo "Exit value of check_version is $ret_code"
    if [ "$ret_code" != 0 ]
    then
    logmsg "MSP Version not matching. Exiting from restore now...."
    errormsg=`cat /usr/local/mss/temp/ver_err_mesg`
    logmsg $errormsg
    rm -f /usr/local/mss/temp/ver_err_mesg
    exit 1
    else
    echo "Version check is successful"
    fi
    #### ShutDown MSS########
    /etc/init.d/mss stop
    sleep 2
    ### Shutdown semm
    /etc/init.d/semm stop
    sleep 2
    rm -rf `grep -v "MSP Version:" $FILE_NAME`
    logmsg "MSP restore in progress......"
    tar mxvfz $ARCHIVE_NAME >> $LOGFILE
    sleep 5
    ### Call mysql restore script
    /usr/local/mss/bin/mysql_alldb_restore.sh >> $LOGFILE 2>&1
    if [ $? -ne 0 ]; then
    logmsg "Database restore Failed. Cannot proceed further"
    exit 1 ;
    else
    logmsg "Database restore Succeeded."
    fi
    ### Remove DB Dump Files
    rm -f /var/lib/mysql-dumps/*
    ### Trigger cleanup of airprism database tables
    #touch /usr/local/mss/airprism/server/config/reinitdb
    ### Trigger re-import of software packages
    touch /usr/local/mss/swdepot/reimport
    ### Remove log files under the "apps" directory
    find /usr/local/mss/apps -name '*.log*' | xargs rm -f
    find /usr/local/mss/logs -follow -name '*[._]log*' | xargs rm -f
    if [ $? -ne 0 ]; then
    logmsg "MSP restore Failed. Cannot proceed further"
    exit 1 ;
    else
    logmsg "MSP restore Succeeded."
    fi
    # reinstall_patch is touched so that patches are re-installed after restoring of MSP.
    touch /usr/local/mss/patch/bin/reinstall_patch
    ##### Start MSS
    logmsg "restarting MSP server "
    /etc/init.d/mss start
    sleep 5
    ### Start semm
    /etc/init.d/semm start
    sleep 5
    logmsg "MSP server is now restarted"
    my jsp page backup.jsp is as follows
    <%@taglib uri="portlet.tld" prefix="uif" %>
    <%@taglib uri="msp-console.tld" prefix="msp" %>
    <uif:defineObjects/>
    <%@page import="javax.portlet.*" %>
    <%@ page import="java.util.Date" %>
    <%@ page import="java.util.Vector" %>
    <%@ page import="java.text.DateFormat" %>
    <%@ page import="com.symbol.mss.console.admin.backup.BackupManager" %>
    <%@ page import="com.symbol.mss.console.admin.system.SystemInfoPortlet" %>
    <%
         String STYLE_NAME = request.getParameter("style");
         if (STYLE_NAME == null) STYLE_NAME = STYLE_DEFAULT;
         final String ua = request.getHeader("User-Agent");
         BackupManager helper = null;
         PortletSession portletSession = renderRequest.getPortletSession();
         helper = (BackupManager)portletSession.getAttribute("helper");
         if (helper == null) {
              //System.err.println("Created new BackupManager");
              helper = new BackupManager();
              portletSession.setAttribute("helper", helper);
         final BackupManager backupManager = helper;
         String action = "";
         final String backupName = renderRequest.getParameter("backupName");
         String completePath = backupManager.getBackupDir() + backupName + backupManager.getBackupFileExt();
         if (backupName != null) {
              action = "backup";
         if(backupManager.backup(backupName)) {
              SystemInfoPortlet.beginRestartMSP();
              } else {
                   action = "backuperror";          
         final String cmd = renderRequest.getParameter("submitButton");
    final String selectedBackup = renderRequest.getParameter("selectedBackup");
    int tarFileStatus =0;
    String backupTarFile ="";
    String backupFileList ="";
         if ("Restore".equals(cmd)) {
    if (selectedBackup != null) {
         tarFileStatus = backupManager.verifyTarFile(selectedBackup);
         //backupTarFile = backupManager.getRestoreFile(Integer.parseInt(selectedBackup));
         //backupFileList = backupTarFile.substring(0, backupTarFile.lastIndexOf(backupManager.getBackupFileExt()))+"_filesList.txt";
                   if (tarFileStatus == 0){
         action = "restore";
         backupManager.restore(selectedBackup);
                        SystemInfoPortlet.beginRestartMSP();
              } else {
                   action = "error";
    } else if ("Remove".equals(cmd)) {
    backupManager.remove(Integer.parseInt(selectedBackup));
         DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
         PortletURL restoreURL = renderResponse.createActionURL();
    %>
    <%@ include file="/jsp/core/constants.jspf" %>
    <% if (action.length() > 0) {
         if ("backup".equals(action))
    %>
         <p>The MSP Appliance has been shut down in order to create the <%=backupName %> backup file,
              and will automatically restart as soon as the file has been created.
              To continue your work, please log out of the MSP Console, wait for the appliance
              to restart, and then log back in. The amount of time you'll have to wait for the
              MSP Appliance to come back online depends on the amount of information you have
              stored in the MSP Database.</p>
         <p>The full pathname for the backup file is: <%=completePath %></p>     
    <%     }
         else if ("restore".equals(action))
    %>
         <p>The MSP Appliance has been shut down in order to restore from the <%=backupTarFile%> backup file,
              and will automatically restart as soon as the restore is complete.
              To continue your work, please log out of the MSP Console, wait for the appliance
              to restart, and then log back in. The amount of time you'll have to wait for the
              MSP Appliance to come back online depends on the amount of information you have
              stored in the MSP Database.</p>     
    <%     } else if ("backuperror".equals(action)) { %>
              <p><img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> Errors occurred while taking back up of MSP. Please see the backup service log file for more details.
              </P>
    <%     } else if ("error".equals(action)) {
              if (tarFileStatus == 4) { %>
                   <p><img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> The backup file <%=backupTarFile%> contains errors. This backup can't be restored. Please restore a valid back up.
                   </P>
              <%} else if (tarFileStatus == 3) { %>
                   <p><img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> The backup file list <%=backupFileList %> is missing. This file is required to restoring backup. Please get the backup file list and proceed with restoring backup.</p>
              <%} else if (tarFileStatus == 2) { %>
                   <p> <img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> The backup file <%=backupTarFile%> contains errors and the backup file list <%=backupFileList%> is missing. This backup can't be restored. </p>
              <%} %>
    <%     }
    } else { %>
    <p><strong>Note</strong>: Both backup and restore will shut down MSP temporarily. MSP will be unable to collect data from devices, send notifications, or provide MSP Console access during this time. When the backup or restore operation is complete, MSP will come back online automatically.</p>
    <h3>Backup</h3>
    <form action="<%= restoreURL.toString() %>" method="post">
    <p>Please provide a name for your backup. MSP will provide the date automatically in the list of backups.</p>
    <p><label for="<uif:namespace />backupName">Name</label> <input type="text" name="<uif:namespace />backupName" id="<uif:namespace />backupName" size="20" maxlength="256" /> <input type="submit" name="<uif:namespace />submitButton" value="Back up now" onclick="return <uif:namespace/>validateName()"/></p>
    </form>
    <h3>Restore</h3>
    <p>This will restore all databases (device assets, collected device data, software packages, policies, etc.) to their state as of the time the backup was made. Changes since then <em>except for backups</em> will be destroyed.</p>
    <%
    Vector restoreList = helper.getRestoreEntries();
    Vector restoreDates = helper.getRestoreDates();
    Vector restoreVersions = helper.getRestoreVersions();
    Vector filesStatus = helper.getBackupFilesStatus();
    %>
    <% if (restoreList.size() == 0) { %>
    <p>There are no backups currently available.</p>
    <% } else { %>
    <form action="<%= restoreURL.toString() %>" method="post">
    <table class="input-radios" id="<uif:namespace />existingBackups">
    <thead>
    <tr>
    <th></th>
    <th>Name</th>
    <th>Date</th>
    <th>MSP Version</th>
    <th>Remarks </th>
    </tr>
    </thead>
    <tfoot>
    <tr>
    <td colspan="4" class="actionsOnSelected">
    <input type="submit" name="<uif:namespace />submitButton" value="Restore" onclick="return confirm('This action requires MSP and all related services to be shut down. Console will be unavailable if the request is submitted. The server will restart automatically once restore has been completed.');" />
    <input type="submit" name="<uif:namespace />submitButton" value="Remove" onclick="return confirm('This action will remove the backup archive. You will no longer be able to restore this backup. Continue?');" />
    </td>
    </tr>
    </tfoot>
    <tbody><%-- First one (most recent) is checked by default. Every other row has class="portlet-section-alternate". Note that each ID must be unique and must match the value of the "for" attribute on the corresponding "label" element. --%>
    <%
    for (int i = 0; i < restoreList.size(); i++) {
    %>
    <tr <%= (i % 2 == 1) ? " class=\"portlet-section-alternate\"" : "" %>>
    <td><input type="radio" name="<uif:namespace />selectedBackup" value="<%= i %>" id="<uif:namespace />selectedBackup-<%= i %>" <%= (i == 0) ? "checked=\"checked\"" : "" %> /></td>
    <td><label for="<uif:namespace />selectedBackup-<%= i %>"><%= restoreList.elementAt(i) %></label></td>
    <td><%= dateFormat.format((Date)restoreDates.elementAt(i)) %></td>
    <td><%= restoreVersions.elementAt(i) %></td>
    <td><%= filesStatus.elementAt(i) %></td>
    </tr>
    <%
    %>
    </tbody>
    </table>
    </form>
    <% } %>
    <% } %>
    <script type="text/javascript">
    <!--//--><![CDATA[//><!--
    function <uif:namespace/>validateName() {
    var name =document.getElementById("<uif:namespace />backupName");
    var msg= "<msp:i18n key="BackupMsg"/>";
    var str=name.value;
    var re = /^[A-Za-z0-9_]+$/;
    if (!str.match(re)) {
         alert(msg);
         name.focus();
         return false;
         } else {
    return confirm('This action requires MSP and all related services to be shutdown. Console will be unavailable if the request is submitted. The server will restart automatically once backup has been completed.');
    //--><!]]>
    </script>
    and my BackupManager.java is as follows where the code in bold and italic is called the restore()
    //============================================================================
    // Symbol Technologies P R O P R I E T A R Y S O U R C E C O D E
    // C O N F I D E N T I A L
    // Copyright (c) 2003 Symbol Technologies. All Rights Reserved.
    // All information contained herein is the property of Symbol Technologies,
    // or its Licensors, and are protected copyrights and trade secrets, and may
    // be covered by U.S. patents. Any reproduction or dissemination of any
    // portion of this document, of the software, or other works derived from it
    // is strictly forbidden unless prior written permission is obtained from
    // Symbol Technologies.
    //============================================================================
    package com.symbol.mss.sdf.services.backup;
    import java.io.*;
    import java.sql.Time;
    import java.text.DateFormat;
    import java.util.logging.FileHandler;
    import java.util.logging.Formatter;
    import java.util.logging.LogRecord;
    import java.lang.Process;
    import java.util.*;
    import org.apache.avalon.framework.configuration.Configurable;
    import org.apache.avalon.framework.configuration.Configuration;
    import org.apache.avalon.framework.configuration.ConfigurationException;
    import org.apache.avalon.framework.logger.LogEnabled;
    import org.apache.avalon.framework.logger.Logger;
    import com.symbol.mss.sdf.admin.AdministratorService;
    import com.symbol.mss.sdf.backup.*;
    import com.symbol.mss.sdf.data.*;
    * @author nramaiah
    * Service to perform scheduled backups of the system state.
    public class BackupManager implements BackupService, DataHandler,
    LogEnabled, Configurable {
    // MSS Home Path
    private static String mssHome = System.getProperty("phoenix.home", File.separator + "usr" +
    File.separator + "local" +
    File.separator + "mss" +
    File.separator);
    // Backup related definitions
    private static final String BACKUP_LIST_FILE_NAME = "conf" + File.separator + "files_to_backup.txt";
    private static final String BACKED_UP_LIST_FILE_NAME_SUFFIX = "_filesList.txt";
    private static final String BACKUP_LOCATION = File.separator + "var" + File.separator + "lib" +
    File.separator + "mss-backups" + File.separator;
    private static final String BACKUP_PARTITION = File.separator + "var" + File.separator + "lib";
    private static final String VERIFY_BACKUP = File.separator + "usr" + File.separator + "local" +
                                                           File.separator + "mss" + File.separator+"tools"+
                                                           File.separator+"backup"+File.separator+"verifyBackup.sh";
    // DB backup/restore related definitions
    private static final String DB_DUMP_LOCATION = File.separator + "var" + File.separator +
    "lib" + File.separator +
    "mysql-dumps" + File.separator;
    private static final String DB_BACKUP_SCRIPT = "bin" + File.separator + "mysql_alldb_backup.sh";
    private static final String DB_RESTORE_SCRIPT = "bin" + File.separator + "mysql_alldb_restore.sh";
    // Private variables
    private AdministratorService m_admin = null;
    private Logger m_logger = null;
    private String backupLocation = null;
    private String backupListFileName = null;
    private String backupPartition = null;
    private int backupPartitionLimit = 90;
    private String dbDumpLocation = null;
    private String dbBackupScript = null;
    private String dbRestoreScript = null;
    private List servicesBackupList = null;
    private String tarFileExtension =".tgz";
    private String errFileExtension =".err";
    private int exitValue=0;
    * Default Constructor
    public BackupManager() {
    servicesBackupList = new ArrayList();
    * Set the administrator service implementation. Link established by Broker service.
    * @param admin reference to an implementation of AdministratorService
    public void setAdministrator(AdministratorService admin) {
    m_admin = admin;
    * Set the job publisher service implementation. Link established by Broker service.
    * @param jobPublisher reference to an implementation of JobPublisherService
    public void setJobPublisher(DataChannel jobPublisher) {
    jobPublisher.subscribe(this);
    * Gets the backup manager object.
    * @return backup manager object
    public BackupService getBackupService() {
    return this;
    * Service lifecycle method.
    * @param logger logger object to be used by the service
    public void enableLogging(Logger logger) {
    m_logger = logger;
    * Service lifecycle method.
    * @param configuration service configuration object
    public void configure(Configuration configuration) throws ConfigurationException {
    // Verify MSS Home path
    if (!mssHome.endsWith(File.separator))
    mssHome += File.separator;
    // Get the location where the backup file needs to be placed
    backupLocation = configuration.getChild("BackupLocation").getValue(BACKUP_LOCATION);
    // Verify backup directory path
    if (!backupLocation.startsWith(File.separator))
    backupLocation = mssHome + backupLocation;
    if (!backupLocation.endsWith(File.separator))
    backupLocation += File.separator;
    // Get the file listing the files/directories to be backed up
    backupListFileName = configuration.getChild("FilesList").getValue(BACKUP_LIST_FILE_NAME);
    // Verify backup list file name path
    if (!backupListFileName.startsWith(File.separator))
    backupListFileName = mssHome + backupListFileName;
    // Get the partition where the backups are kept
    backupPartition = configuration.getChild("BackupPartition").getValue(BACKUP_PARTITION);
    // Verify backup partition path
    if (!backupPartition.startsWith(File.separator))
    backupPartition = File.separator + backupPartition;
    if (backupPartition.endsWith(File.separator))
    backupPartition = backupPartition.substring(0, (backupPartition.length()-1));
    // Get the limit on the amount of free space on the backup partition
    backupPartitionLimit = configuration.getChild("BackupPartitionLimit").getValueAsInteger(backupPartitionLimit);
    // Get the location where the DB dump files will be placed
    dbDumpLocation = configuration.getChild("DBDumpLocation").getValue(DB_DUMP_LOCATION);
    // Verify DB dump directory path
    if (!dbDumpLocation.startsWith(File.separator))
    dbDumpLocation = mssHome + dbDumpLocation;
    if (!dbDumpLocation.endsWith(File.separator))
    dbDumpLocation += File.separator;
    // Get the name of DB dump backup script
    dbBackupScript = configuration.getChild("DBBackupScript").getValue(DB_BACKUP_SCRIPT);
    // Verify backup script path
    if (!dbBackupScript.startsWith(File.separator))
    dbBackupScript = mssHome + dbBackupScript;
    // Get the name of DB dump restore script
    dbRestoreScript = configuration.getChild("DBRestoreScript").getValue(DB_RESTORE_SCRIPT);
    // Verify restore script path
    if (!dbRestoreScript.startsWith(File.separator))
    dbRestoreScript = mssHome + dbRestoreScript;
    * Individual services can supply a list of files/directories to be backed up.
    * These are files apart from the files specified in conf/files_to_backup.txt and
    * will be backed up as well.
    * @param files list of files/directories
    public void filesToBackup(List files) {
    synchronized(this) {
    if (files != null) {
    if (files.size() > 0) {
    // Add the list contents to the current backup list
    for (int i=0; i<files.size(); i++) {
    String tStr = (String)files.get(i);
    // Check for absolute or relative path
    if (tStr.startsWith(File.separator))
    servicesBackupList.add(tStr);
    else
    servicesBackupList.add(mssHome + tStr);
    else
    m_logger.info("Empty list of filenames. Nothing added.");
    else
    m_logger.info("Null list of filenames. Nothing added.");
    * Individual services can supply a list of files/directories to be backed up.
    * Specified files will be added to the file defining the list of files to be backed up.
    * @param files list of files/directories
    private void persistFilesToBackup(List files) {
    synchronized(this) {
    if (files != null) {
    if (files.size() > 0) {
    // Add the list of files provided to the end of file
    try {
    File file = new File(backupListFileName);
    if ((file == null) || (!file.exists()))
    file.createNewFile();
    // Seek to the end of the file
    RandomAccessFile rFile = new RandomAccessFile(file, "rw");
    if (rFile != null) {
    rFile.seek(rFile.length());
    // Write the list contents to the file
    for (int i=0; i<files.size(); i++) {
    String tStr = (String)files.get(i);
    // Check for absolute or relative path
    if (tStr.startsWith(File.separator))
    rFile.writeBytes(tStr + "\n");
    else
    rFile.writeBytes(mssHome + tStr + "\n");
    else
    m_logger.error("Error opening file " + backupListFileName);
    rFile.close();
    catch (Exception ex) {
    ex.printStackTrace();
    m_logger.error("Error adding entries to file " + backupListFileName, ex);
    else
    m_logger.info("Empty list of filenames. Nothing added.");
    else
    m_logger.info("Null list of filenames. Nothing added.");
    * Command to be run during the backup process. Individual services can
    * provide shell commands that will be executed before backing up the files.
    * @param command shell command to be executed
    private void runCommand(String command) {
    * Creates a shell script at the specified location that will backup the
    * files listed in the List passed in.
    * @param scriptFileName location where the script needs to be created
    * @param backupFileName name for the tar file being created
    * @param backupList list of files to be backed up
    private void createBackupScript(String scriptFileName, String backupFileName, ArrayList backupList) throws Exception {
    // Create a new StringBuffer to build the contents to be written to the script file
    StringBuffer buffer = new StringBuffer();
    // Add the initial comment in the start script
    buffer.append("#!/bin/sh\n" + "set -x\n\n");
    // Check if the partition has enough space
    buffer.append("### Check if the partition has enough space\n" +
    // "diskUsed=`df -k | grep \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1`\n" +
                   " diskUsed=`df -k \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1 | grep -v Use`\n" +     
    "echo \"Partition " + backupPartition + " is $diskUsed% used.\"\n" +
    "if [ \"$diskUsed\" -lt \"" + backupPartitionLimit + "\" ]\nthen\n" +
    " echo \"Starting backup...\"\n\n");
    // Shutdown semmd
    buffer.append(" ### Shutdown semm\n" + " /etc/init.d/semm stop\n" +
    " sleep 2\n\n");
    // MSP Limited release and earlier builds stop mysql DB and backup the
    // /var/lib/mysql directory as it is. Starting MSP 1.0 GA release, mysql
    // dump script will be integrated which will create sql scripts to
    // restore the database.
    // Check if mysql dump creation script exists
    File mysqlDumpScript = new File(dbBackupScript);
    if (mysqlDumpScript.exists()) {
    // MSP 1.0 GA and later releases
    // Run the script that will generate sql scripts that would re-create the DB as it is
    buffer.append(" ### Call mysql dump script\n" +
    " " + dbBackupScript + "\n\n");
    else {
    // MSP Limited release
    // Add command to shutdown mysql
    buffer.append(" ### Shutdown mysql\n" + " /etc/init.d/mysql stop\n\n");
    // Change to root directory and create the tgz file
    buffer.append(" ### Create tgz file\n" + " cd /\n");
    // Build up the tar file name from the current date and time
    String fileName = null;
    if ((backupFileName != null) && (backupFileName.length() > 0))
    fileName = backupFileName;
    else {
    // File name not provided by user, build one using the timestamp
    Calendar cal = Calendar.getInstance();
    Date date = cal.getTime();
    fileName = "MSS-"
    + DateFormat.getDateInstance().format(date).replaceAll(" ", "").replaceAll(",", "")+ "-"
    + (new Time(cal.getTimeInMillis())).toString().replaceAll(":", "").substring(0,4);
    String tarFileName = fileName + ".tgz";
    // Get the current MSP Version
    String mspVersion = getMSPVersion();
    // Gather all the files to be backed up. Add them to the tar command and
    // also dump them into the file maintaining the list of files being backed up
    String listStr = "";
    for (int i=0; i<backupList.size(); i++)
    listStr += (String)backupList.get(i) + "\n";
    // Dump the current MSP version and the list of files being backed up into a manifest file
    String listFileName = fileName + BACKED_UP_LIST_FILE_NAME_SUFFIX;
    RandomAccessFile file = new RandomAccessFile(backupLocation + listFileName, "rw");
    m_logger.info("List of files/directories being backed up:\n" + listStr);
    file.writeBytes("### MSP Version: " + mspVersion + " ###\n");
    file.writeBytes(listStr);
    file.close();
    // Add the tar command to the script
    buffer.append(" echo \"Creating " + backupLocation + tarFileName + "...\"\n" +
    " tar cvhfz " + backupLocation + tarFileName + " `grep -v \"MSP Version:\" " +
    backupLocation + listFileName + "`\n\n");
    // Check if free space on the backup partition has reduced below the limit
    // If enough space left, backup is retained, "mss" is made the owner of the files,
    // "backup" is made the group the files belong to,
    // permissions changed to be "0660" and
    // backup action declared a success
    // Else, backup files are deleted and declared a failure
    buffer.append(" ### Check if the partition has enough space left\n" +
    //" diskLeft=`df -k | grep \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1`\n" +
    " diskLeft=`df -k \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1 | grep -v Use`\n" +
    " echo \"Partition " + backupPartition + " is $diskLeft% used.\"\n" +
    " if [ \"$diskLeft\" -gt \"" + backupPartitionLimit + "\" ]\n" +
    " then\n" +
    " ### Failure\n" +
    " echo \"Partition " + backupPartition + " does not have enough space.\"\n" +
    " echo \"Backup " + backupLocation + tarFileName + " will be removed.\"\n" +
    " rm -f " + backupLocation + fileName + "*\n" +
    " echo \"Backup Failed.\"\n" +
    " else\n" +
                        " tar tvzf " + backupLocation + tarFileName + " > /dev/null 2>&1\n" +
    " if [ ! -s " + backupLocation + tarFileName + " -o $? -ne 0 ] \n" +
                        " then\n" +
                        " echo \"MSP Backup operation is not successful. The tar file " + backupLocation + tarFileName + " contains errors.\"\n" +
                        " echo \"Please take the backup again\"\n" +
                        "     touch "+backupLocation+fileName+".err\n" +
    " else \n" +
    " ### Success\n" +
    " ### Change the owner, group and permissions for the backup files\n" +
    " chown mss " + backupLocation + fileName + "*\n" +
    " chgrp backup " + backupLocation + fileName + "*\n" +
    " chmod 0660 " + backupLocation + fileName + "*\n" +
    " echo \"Backup Completed.\"\n" +
    " fi\n" +
    " fi\n\n");
    // MSP Limited release and earlier builds re-start mysql. Starting
    // MSP 1.0 GA release, mysql is not stopped and so re-start is not
    // needed. sql scripts created by the dump script get packed into
    // the tar file and so are deleted.
    // Check if mysql dump creation script exists
    if (mysqlDumpScript.exists()) {
    // MSP 1.0 GA and later releases
    // Remove DB dump files
    buffer.append(" ### Remove DB Dump Files\n" + " rm -f " + dbDumpLocation + "*\n\n");
    else {
    // MSP Limited release
    // Start mysql
    buffer.append(" ### Start mysql\n" + " /etc/init

  • Windows 8.1 Batch Scripts for devcon.exe

    HiI'm using batch script with devcon.exe for cleaning usb ghost devices. On XP and Win 7 it works perfect but on windows 8.1 only if i manualy paste commands on "administrator command line" but it wont start from my batch script. Is there any solution for windows 8 to enable security rule for batch script? Win 8 is so annoying for any type of scripts even gpo. At the moment im trying to resolve this problem with PowerShell.This is how script looks like:
    Text@echo offDEVCON Find * | FIND /I /V "matching device(s)" > "%Temp%\DevconFind.txt"FOR /F "tokens=1 delims=: " %%A IN ('DEVCON FindAll * ^| FIND /I /V "matching device(s)"') DO (TYPE "%Temp%\DevconFind.txt" | FIND "%%~A" >NULIF ERRORLEVEL 1 %Debug% DEVCON Remove "@%%~A")DEL "%Temp%\DevconFind.txt"
    Regards
    This topic first appeared in the Spiceworks Community

    Uninstall it.  Reboot.  Then install.  Reboot.
    All of this should be done as Run as Administrator or it will fail.
    16GIG or Larger usb flash drive is required.  8 gigs is too small.
    http://www.dell.com/support/home/us/en/19/Drivers/DriversDetails?driverId=8HY96

  • WAS 6.40 ABAP stack install - error with sapstartsrv.exe - Help needed!

    Hi all,
    Can anyone assist me with a new installation issue? I am trying to perform an initial install of WAS 6.40 SP3 ABAP stack (non unicode) using the NW Master CD and CD51030103 for the SAP Kernel on a vanilla W2K AS server.
    I also have a previously installed working version of EP6.0 SP9 on WAS 6.40 (SP9) on the same physical server.
    The problem is occuring at the Create and reregister services part of the new 6.40 kernel install, I am getting the message:
    WARNING 2004-12-08 18:45:26
    Execution of the command "F:\usr\sap\IDS\SYS\exe\run/sapstartsrv.exe '-r' '-q' '-p' 'F:\usr\sap\IDS\SYS\profile\START_DVEBMGS00_devbox01' '-s' 'IDS' '-n' '00' '-U' 'devbox01\SAPServiceIDS' '-P' 'XXXXXX' '-e' 'devbox01\idsadm'" finished with return code -1. Output: Test call to Service failed.Profile parameter SAPSYSTEMNAME or SAPSYSTEM doesn't match installation parameters.Service not correctly installed.
    ERROR 2004-12-08 18:45:26
    MOS-01011 'F:\usr\sap\IDS\SYS\exe\run/sapstartsrv.exe' returned with '-1'.
    I have had no problems in the past in installing a 6.20 kernel on the same host as a portal server, but this time with 6.40 I have had no luck.
    I have tried replacing the version of sapstartsrv.exe from the
    ..usr\sap\SID\SYS\exe\run directory with a more recent version to see if the exe version was the problem but this has not resolved.
    I have also tried to run the installation again without deleting the previous files, and this has also made no difference.
    I have read through most of the forum's regarding problems with sapstartsrv.exe failing, but couldn't find anything that can help fix my problem.
    If anybody thinks they can help, it would be most appreciated
    Cheers,
    Paul

    Hi Sergio, hi Paul,
    I'm getting the same error while trying to install with RI 2.5. Interesting enough, I also have a 6.20 installed on the same machine.
    Sergio, do you mean by your last post one should change the system nr when configuring the installation?
    Paul, did you find a workaround/solution?
    Thanks in advance
    Detlev

  • WAS 6.40 ABAP stack install - error with sapstartsrv.exe

    Hi,
    Can anyone assist? I am trying to perform an initial install of WAS 6.40 SP3 ABAP stack (non unicode) using the NW Master CD and CD51030103 for the SAP Kernel on a vanilla W2K AS install, which also has a working EP6.0 SP9 runnning on it.
    At the Create and reregister services part of the kernel install, I am getting the message:
    WARNING 2004-12-08 18:45:26
    Execution of the command "F:\usr\sap\IDS\SYS\exe\run/sapstartsrv.exe '-r' '-q' '-p' 'F:\usr\sap\IDS\SYS\profile\START_DVEBMGS00_devbox01' '-s' 'IDS' '-n' '00' '-U' 'devbox01\SAPServiceIDS' '-P' 'XXXXXX' '-e' 'devbox01\idsadm'" finished with return code -1. Output: Test call to Service failed.Profile parameter SAPSYSTEMNAME or SAPSYSTEM doesn't match installation parameters.Service not correctly installed.
    ERROR 2004-12-08 18:45:26
    MOS-01011  'F:\usr\sap\IDS\SYS\exe\run/sapstartsrv.exe' returned with '-1'.
    I have had no problems in the past in installing a 6.20 kernel on the same host as a portal server, but this time no luck.
    I have also tried replacing the version of sapstartsrv.exe from the
    ..usr\sap\SID\SYS\exe\run directory with a more recent version to see if the exe version was the problem but this has not resolved.
    I have also tried to run the installation again without deleting the previous files, and this has also made no difference.
    I have read through most of the forum's regarding problems with sapstartsrv.exe failing, but nothing of use to fix my problem.
    If anybody thinks they can help, it would be most appreciated
    Cheers,
    Paul
    Message was edited by: Paul Brine

    Hi Sergio, hi Paul,
    I'm getting the same error while trying to install with RI 2.5. Interesting enough, I also have a 6.20 installed on the same machine.
    Sergio, do you mean by your last post one should change the system nr when configuring the installation?
    Paul, did you find a workaround/solution?
    Thanks in advance
    Detlev

  • How do you receive a call on your computer with the new OS X?

    How do you receive a call on your computer with the new OS X?

    The following quotation is from http://www.apple.com/ios/whats-new/continuity/
    The link shows a picture of the Notification. Below it says there is "nothing to set up" but I believe that you need to have FaceTime activated (signed in) on both devices as there is a setting on iPhone/iPad in Settings > FaceTime where you turn "iPhone Cellular Calls" on/off.
    Sometimes when your iPhone rings, it’s not where you are. Maybe it’s charging in another room. Or it’s buried in your backpack. But your Mac or iPad is sitting right there. Now you can make and receive phone calls on those devices as long as your iPhone running iOS 8 is on the same Wi-Fi network. Incoming calls show the caller’s name, number, and profile picture. Just click or swipe the notification to answer, ignore, or respond with a quick message. And making a phone call from your iPad or Mac is just as easy. Simply tap or click a phone number in Contacts, Calendar, or Safari. It all works with your existing iPhone number, so there’s nothing to set up.

  • JSP calling a shell script (permission denied error)

    HI there,
    I am trying to execute a shell script command from JSP, and I am pretty close to getting it done. The actual shell comnmand I am trying to run
    "scp test.txt somebody@somedomain:~/directory1/test.txt"
    is working fine when I run it from the shell command line (when I am logged in as that somebody)
    However, when I try to execute this script with the following JSP code (by accessing the JSP file from the browser, I get a permission denied error). The JSP file is set to 777 permission, and I have been trying lots of stuff with not much luck for a few days now .....
    any input is much appriciated
    <%@page language="java"%>
    <%@page import="java.io.BufferedReader"%>
    <%@page import="java.io.File"%>
    <%@page import="java.io.InputStreamReader"%>
    <%@page import="java.io.StringReader"%>
    <%@page import="java.io.File"%>
    <%@page import="java.io.FileInputStream"%>
    <%@page import="java.io.FileReader"%>
    <%@page import="java.io.Writer"%>
    <html>
    <body>
    <%
    String osName = System.getProperty("os.name");
    out.write(osName+"<br>");
    String s = null;
    String cmd1 = "scp test.txt somebody@somedomain:~/directory1/test.txt";
    out.write("Execing \"" + cmd1 + "\"<br>");
    File workDir = new File("/export/home/web/admintool/web/javatest");
    try {
        Process p1 = Runtime.getRuntime().exec(cmd1, null, workDir);
        int exitValue = p1.waitFor();
        if (exitValue == 0){
            BufferedReader stdInput = new BufferedReader(new InputStreamReader(p1.getInputStream()));
            while ((s = stdInput.readLine()) != null) {
                out.write(s + "<br>");
        else {
            BufferedReader stdErr = new BufferedReader(new InputStreamReader(p1.getErrorStream()));
            while ((s = stdErr.readLine()) != null)
                out.write(s + "<br>");
        out.write("exit value is" + exitValue + "<br>");
    catch (Exception e) {
        System.out.println(e);
    } %>
    </body></html>

    Doesn't matter what perms the JSP has.
    The servlet container and web server must allow it to runtime.exec, for one, which is insecure and dangerous. Talk to your admin if you want that and they may sandbox it for you.
    The next thing is that the JSP will run as the web server -- so the file to exec must be set as 777 or 755 with the web server uid in the same group as the owner (share gid).

  • Failed to initialize  Databank exception when run from OLT

    HI All,
    I've created a script with an associated databank,that runs perfectly fine when run from OpenScript. But when I run from OLT, the following waring is encountered.
    Start failure message from agent "OLT Server": oracle.oats.common.databank.DatabankException: Failed to initialize Databank 'Forms.forms'
    Stopped Autopilot because of error on agent "OLT Server".
    Name of my DB is : forms
    and Script name is :Forms
    Please let me know the solution for this.
    Regards,
    Karthik
    Edited by: user777720 on May 21, 2013 5:00 AM

    Have you tried changing the parameter in the Assets/Databank "Save Path" from "Relative to current script" to "Relative to a repository"?
    Regards, Ian.

  • R3load.exe failed to connect with return code2

    Dear Experts,
    I am installing SAP netwaver 7.4 PI server on Windows server 2012 and MS SQL 2012.
    This is a domain installation so infra team have created 2 users <SID>ADM and SAPService<SID> user with local admin rights.
    I have installed MS SQL with windows authentication only installation and after that i was able to connect Db with SQL management studio.
    As soon as i have started PI installation after SWPN created DB schema ,granted permission for users and restarted Db engine ...boom error in ABAP import phase as "R3load.exe failed to testconnect with return code2".
    I have updated r3trans,r3load,dbsl lib.etc but no good also i have tried to open MS sql management studio but now it is giving error as
    "unable to connect with <SID>ADM user"
    Any suggestion or help will be highly appreciated.
    Warm Regards,
    Sumit 

    Dear Ashutosh and Atul,
    please find logs
    R3load.exe.log
    E:\usr\sap\PID\SYS\exe\uc\NTAMD64\R3load.exe -testconnect
    -------------------- Start of patch information ------------------------
    patchinfo (patches.h): (0.036) R3ldctl: fix CDS views creation in upgrade export mode (note 2017805)
    DBSL patchinfo (patches.h): (0.033) Memory leak in DBSL reconnect (note 2010675)
    --------------------- End of patch information -------------------------
    process id 9136
    (DB) ERROR: db_connect rc = 256
    (DB) ERROR: DbSlErrorMsg rc = 99
    Trans.log
    4 ETW000 R3trans was called as follows: E:\usr\sap\PID\SYS\exe\uc\NTAMD64\R3trans.exe -x
    4 ETW000  trace at level 2 opened for a given file pointer
    4 ETW000  [     dev trc,00000]  Thu Jun 05 14:14:49 2014                                               99602  0.099602
    4 ETW000  [     dev trc,00000]  db_con_init called                                                       135  0.099737
    4 ETW000  [     dev trc,00000]  set_use_ext_con_info(): usage of ssfs switched off (rsdb/ssfs_connect=0)
    4 ETW000                                                                                                 245  0.099982
    4 ETW000  [     dev trc,00000]  determine_block_commit: no con_hdl found as blocked for con_name = R/3
    4 ETW000                                                                                                  47  0.100029
    4 ETW000  [     dev trc,00000]  create_con (con_name=R/3)                                                 22  0.100051
    4 ETW000  [     dev trc,00000]  Loading DB library 'dbmssslib.dll' ...                                    70  0.100121
    4 ETW000  [     dev trc,00000]  DlLoadLib success: LoadLibrary("dbmssslib.dll"), hdl 0, count 1, addr 00007FFFF69A0000
    4 ETW000                                                                                               14312  0.114433
    4 ETW000  [     dev trc,00000]      using "E:\usr\sap\PID\SYS\exe\uc\NTAMD64\dbmssslib.dll"               29  0.114462
    4 ETW000  [     dev trc,00000]  Library 'dbmssslib.dll' loaded                                            32  0.114494
    4 ETW000  [     dev trc,00000]  function DbSlExpFuns loaded from library dbmssslib.dll                    29  0.114523
    4 ETW000  [     dev trc,00000]  Version of 'dbmssslib.dll' is "741.10", patchlevel (0.33)                916  0.115439
    4 ETW000  [     dev trc,00000]  function dsql_db_init loaded from library dbmssslib.dll                 8596  0.124035
    4 ETW000  [     dev trc,00000]  function dbdd_exp_funs loaded from library dbmssslib.dll                  56  0.124091
    4 ETW000  [     dev trc,00000]  New connection 0 created                                                  62  0.124153
    4 ETW000  [     dev trc,00000]  0: name = R/3, con_id = -000000001, state = DISCONNECTED, tx = NO , bc = NO , oc = 000, hc = NO , perm = YES, reco = NO , info = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO , prog = 
    4 ETW000                                                                                                8067  0.132220
    4 ETW000  [     dev trc,00000]  db_con_connect (con_name=R/3)                                             54  0.132274
    4 ETW000  [     dev trc,00000]  determine_block_commit: no con_hdl found as blocked for con_name = R/3
    4 ETW000                                                                                                  38  0.132312
    4 ETW000  [     dev trc,00000]  find_con_by_name found the following connection:                          22  0.132334
    4 ETW000  [     dev trc,00000]  0: name = R/3, con_id = 000000000, state = DISCONNECTED, tx = NO , bc = NO , oc = 000, hc = NO , perm = YES, reco = NO , info = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO , prog = 
    4 ETW000                                                                                                  47  0.132381
    4 ETW000  [     dev trc,00000]  Thread ID:11864                                                         5905  0.138286
    4 ETW000  [     dev trc,00000]  Thank You for using the SLODBC-interface                                  59  0.138345
    4 ETW000  [     dev trc,00000]  Using dynamic link library 'E:\usr\sap\PID\SYS\exe\uc\NTAMD64\dbmssslib.dll'
    4 ETW000                                                                                                  51  0.138396
    4 ETW000  [     dev trc,00000]  7410 dbmssslib.dll patch info                                             40  0.138436
    4 ETW000  [     dev trc,00000]    SAP patchlevel  0                                                      107  0.138543
    4 ETW000  [     dev trc,00000]    SAP patchno  33                                                         36  0.138579
    4 ETW000  [     dev trc,00000]    Last MSSQL DBSL patchlevel 0                                            26  0.138605
    4 ETW000  [     dev trc,00000]    Last MSSQL DBSL patchno         33                                      26  0.138631
    4 ETW000  [     dev trc,00000]    Last MSSQL DBSL patchcomment Memory leak in DBSL reconnect (2010675)
    4 ETW000                                                                                                  38  0.138669
    4 ETW000  [     dev trc,00000]  ODBC Driver chosen: SQL Server Native Client 11.0 native                2199  0.140868
    4 ETW000  [     dev trc,00000]  lpc:(local) connection used on EQSPIDEV                                  370  0.141238
    4 ETW000  [     dev trc,00000]  ERROR: -1 in function SQLConnectWithRetry (SQLConnectWithRetry) [line 2551]
    4 ETW000                                                                                              103595  0.244833
    4 ETW000  [     dev trc,00000]  (18456) [28000] [Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'EQUDOM\pidadm'.
    4 ETW000                                                                                                  51  0.244884
    4 ETW000  [     dev trc,00000]  ERROR: -1 in function SQLConnectWithRetry (SQLConnectWithRetry) [line 2551]
    4 ETW000                                                                                                6321  0.251205
    4 ETW000  [     dev trc,00000]  (18456) [28000] [Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'EQUDOM\pidadm'.
    4 ETW000                                                                                                  49  0.251254
    4 ETW000  [     dev trc,00000]  ERROR: -1 in function SQLConnectWithRetry (SQLConnectWithRetry) [line 2551]
    4 ETW000                                                                                                5918  0.257172
    4 ETW000  [     dev trc,00000]  (18456) [28000] [Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'EQUDOM\pidadm'.
    4 ETW000                                                                                                  50  0.257222
    4 ETW000  [     dev trc,00000]  ERROR: -1 in function SQLConnectWithRetry (SQLConnectWithRetry) [line 2551]
    4 ETW000                                                                                               28076  0.285298
    Database services are running.
    Warm Regards,
    Sumit

  • Error in calling SQL plus program with parameter from Shell script

    This is my Shell script. I am trying to call in the SQL plus program with the parameter and the shell script is registered as a concurrent program.
    PARAMETERS=`echo $1 |tr -d '\"'`
    DB_USER_ID=`echo $PARAMETERS|cut -d" " -f3|cut -d"=" -f2`
    CONN_STRING=$DB_USER_ID
    REQ_DATE=`echo $PARAMETERS|cut -d" " -f9|cut -d"=" -f2`
    timestamp=`date +%m-%d-%y-%H:%M:%S-%Z`
    timestam=`date +%y-%m-%d`
    sqlplus -s $CONN_STRING @ar_statement.sql $REQ_DATE
    chmod 755 statement.sh
    . statement.sh
    My Sql plus program is like this.
    set pagesize 0
    set heading off
    set feedback off
    spool $GEC_TOP/log/ge_ar_statement.sh
    select output_file_name
    from fnd_concurrent_requests
    where trunc(actual_completion_date) = '&2';
    spool off;
    exit;
    When i run the concurrent program, i am getting the following error:
    ar_statement: line 14: REQ_DATE: command not found
    Enter value for 2:
    User requested Interrupt or EOF detected.
    ar_statement.sh: line 1: Enter: command not found
    ar_statement.sh: line 2: User: command not found
    ar_statement
    Program exited with status 127
    I am not strong at Unix Porgamming and i would request someone who can
    help me out as soon as possible.
    I need this solution quickly and thank everyone in advance.
    Thanks.

    Can you put your coding between code statements, like shown in the FAQ. It will be easier to read.
    Looking at your script, my first guess is that crontab will not find your sqlplus since your script does not have $HOME/bin in the $PATH. From what I understand, running .profile in your script will not work either because variables are exported to sub-shells, not to the shell above. You can call your script with a dot like . ./script which means that the script will run like it was typed at the command prompt. But it will be less confusing to define appropriate variables in the script. eg.
    ORACLE_SID=my_instance_name
    ORACLE_HOME=/my_path_to_oracle_home_directory
    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    PATH=$ORACLE_HOME/bin:$PATH
    I remember some slightly different way of coding to handle the sqlplus return codes.
    For instance:
    sqlplus -s /nolog > /dev/null <<-EOF
    connect system/manager
    @ssm.sql
    whenever oserror exit failure
    whenever sqlerror exit failure
    EOF
    sql_err=$?
    if [ $sql_err -ne 0 ]; then
       echo "FAILURE"
    else
       echo "SUCCESS"
    fiThe - in -EOF supresses tab's
    Using connect will prevent ps from showing your login credentials
    In some versions of bash the ending EOF needs to be at the beginning of the line to work.
    Edited by: waldorfm on Jul 14, 2010 7:05 PM
    complaining about putting code between code delimiters and forgot myself ;-)
    Edited by: waldorfm on Jul 14, 2010 7:08 PM
    Btw, if you "source" a script running it like . .script, than an exit in that script will log you out.

Maybe you are looking for

  • Why won't my iphone 4 show up in itunes

    I have an iPhone 4 running IOS 4.3.5 and a Macbook Pro running 10.7.1 and iTunes 10.4.1 (b10). For some reason, in the last few days, my iPhone won't show up in iTunes any more. I generally have a LOT of devices plugged in, but I've tried running wit

  • Same computer, same ipod, no library or playlists in iTunes

    Okay, I'm not sure what category this falls under, but I was trying to move my iTunes library to another location so my brother could share my computer using his own personal ipod. I did everything it told me to do and I consolidated the library like

  • Exchange 2010 - Archiving not working in desired situation

    Hi guys! Recently we had enabled online archiving on Exchange, the problem is that one thing is not working as we have wanted. We wanted that user picks up manually thru Outlook 2013 client which folder he does not wishes to be moved to archive, but

  • Bootcache not updated correctly?

    I am using FileVault2 on OS X 10.8.3 (12D78). After uninstalling Little Snitch, a utility which brings a kernel extension, the kernel extension is still loaded into the kernel during boot: root# kextstat | grep -i snitch    51    0 0xffffff7f80f51000

  • Apps Tab Download Error

    Why does my desktop Creative Cloud keeps loading with a Download Error?