Wrong output when executed in UNIX machine

Hi All,
We have created a java class which takes a file name as command line arguments and trying to test whether that file which has taken from command-line is accessible if it is already in use (like copying from/to other path). For this we are passing filename as argument to FileInputStream Class .
This java class when executed in windows machine is giving expected output i.e. throwing Exception if the file is already in use. But the same code when ran from UNIX machine, there it is not giving expected result as mentioned above. Can anyone please help us in resolving this problem?
Thanks in Advance

Not sure if this has anything to do with it, but did ftp the text file up to the UNIX machine? If you did, were you using ascii mode?
Windows:
file in  use.becomes
file in use.^Min unix when I transfer the file using the binary mode.
-J

Similar Messages

  • Function module not genrating a output when executing

    Hello
    I am using this function module to calculate the difference between the number of days using factory calendar. The function module is working fine but it is not giving the output. It is not generating the result. here is the code for the function module
    please can you check and let me know what can be the reason
      DATA:
        DURATION_F       TYPE F.
      IF  START_DATE IS INITIAL
      AND END_DATE IS INITIAL.
        MESSAGE E032 RAISING PARAMETERS_NOT_VALID.
    Bitte geben Sie ein gültiges Start- und Enddatum an
      ENDIF.
      IF FLG_UNITS IS INITIAL.
        PERFORM TIME_UNITS.
        FLG_UNITS = 'X'.
      ENDIF.
      IF UNIT = SPACE.
        UNIT = UNIT_DAY.
      ENDIF.
      PERFORM DURATION_COMPUTE
         USING
              START_DATE
              START_TIME
              END_DATE
              END_TIME
              FACTORY_CALENDAR
              UNIT
         CHANGING
              DURATION_F
              START_DATE
              END_DATE
              START_TIME
              END_TIME.
      DURATION = DURATION_F.
    ENDFUNCTION.

    when calling the function module get the duration field as output
    write that output on the list

  • KSB1: wrong output when data is tranfer to excel file

    Hello All,
    Kindly help me with my problem regarding extracting reprot in KSB1.
    Example:
    Doc no.     Cost Ctr.       Val/CoArea Cur      CoCur  Val/ObjCur     ObjCur
    00001       1                     10.11                      USD      20                JPY
    00002       1                     20.22                      USD      40                JPY
    00003       1                     30.33                      USD      60                JPY
                                  Total  60.66                                   120
    However when i convert this report in spreadsheet the value for Val/ObjCur becomes 1.20. For all other data it divides by 100.
    Please help me on this.
    Thanks in advance!
    Jhero

    Hello Thanks for the feedback.
    No. The "Fixed decimal" is not ticked.
    As per info I provided, the value must be 120 however when I click spreadsheet icon after executing KSB1 tcode the value in the excel file is 1.20. when I run the report using other period the value in KSB1 is 1345 however in the excel sheet is 13.45.
    Please help.
    Thanks in advance!
    Jhero

  • When executed on unix, it throws file not found error

    Hi,
    Can anybody please let me know what I am doing wrong. The
    code works fine on windows box and fails on unix box.
    import java.io.*;
    import org.apache.axis.encoding.Base64;
    public class writeToFile {
        public static void main(String args[]){
        try{
        File oFile = new File("/\\mydir1\\mydir2\\mydir3\\ddd.txt");
         FileOutputStream fos = new FileOutputStream(oFile);
         fos.write(1);
         fos.flush();
         fos.close();
        } catch(Exception e){
              e.printStackTrace();
    java.io.FileNotFoundException: \/mydir1/mydir2/mydir3/ddd.txt(No such file or directory)

    As it says, you don't have a file named
    \/mydir1/mydir2/mydir3/ddd.txt
    You might have a file named
    /home/your user name/mydir1/mydir2/mydir3/ddd.txt

  • WRONG OUTPUT

    Hi all,
    i am getting wrong output when executing the below code
    i.e the output is coming regard less of the order number  in select statement.
    Kindly please help me.
    REPORT  ZTEMP2.
    TYPES: BEGIN OF TY_BKPF,
           MONAT TYPE MONAT,
           BUDAT TYPE BUDAT,
           BELNR TYPE BELNR_D,
           GJAHR TYPE GJAHR,
           BUKRS TYPE BUKRS,
    END OF TY_BKPF.
    TYPES: BEGIN OF TY_BSEG,
           BUKRS TYPE BUKRS,
           BELNR TYPE BELNR_D,
           GJAHR TYPE GJAHR,
           HKONT TYPE HKONT,
           WRBTR TYPE WRBTR,
           SGTXT TYPE SGTXT,
           AUFNR TYPE AUFNR,
    END OF TY_BSEG.
    TYPES: BEGIN OF TY_COLL,
           MONAT TYPE MONAT,
           BUDAT TYPE BUDAT,
           BELNR TYPE BELNR_D,
           WRBTR TYPE WRBTR,
           SGTXT TYPE SGTXT,
    END OF TY_COLL.
    DATA: TOT LIKE BSEG-WRBTR.
    DATA: IT_BKPF TYPE TABLE OF TY_BKPF,
          WA_BKPF TYPE TY_BKPF,
          IT_BSEG TYPE TABLE OF TY_BSEG,
          WA_BSEG TYPE TY_BSEG,
          IT_COLL TYPE TABLE OF TY_COLL,
          WA_COLL TYPE TY_COLL.
    SELECTION-SCREEN: BEGIN OF BLOCK B1.
    SELECT-OPTIONS: S_HKONT FOR WA_BSEG-HKONT memory id one,
                    S_AUFNR FOR WA_BSEG-AUFNR memory id twq,
                    S_BELNR FOR WA_BKPF-BELNR memory id twe,
                    S_BUDAT FOR WA_BKPF-BUDAT memory id two.
    SELECTION-SCREEN: END OF BLOCK B1.
    START-OF-SELECTION.
    SELECT MONAT
           BUDAT
           BELNR
           GJAHR
           BUKRS FROM BKPF
           INTO TABLE IT_BKPF
           WHERE BELNR IN S_BELNR
           AND  BUDAT IN S_BUDAT.
    IF NOT IT_BKPF[] IS INITIAL.
      SELECT BUKRS
             BELNR
             GJAHR
             HKONT
             WRBTR
             SGTXT
             AUFNR FROM BSEG
             INTO TABLE IT_BSEG
             FOR ALL ENTRIES IN IT_BKPF
             WHERE HKONT IN S_HKONT
             AND AUFNR IN S_AUFNR
             AND BELNR IN S_BELNR
             AND GJAHR = IT_BKPF-GJAHR
             AND BUKRS = IT_BKPF-BUKRS.
    ENDIF.
    END-OF-SELECTION.
    SORT IT_BKPF BY MONAT.
    SORT IT_BSEG BY HKONT.
    LOOP AT IT_BKPF INTO WA_BKPF.
    Read table IT_BSEG INTO WA_BSEG WITH KEY BUKRS = WA_BKPF-BUKRS
                                             BELNR = WA_BKPF-BELNR
                                             GJAHR = WA_BKPF-GJAHR BINARY SEARCH.
    WA_COLL-BELNR = WA_BKPF-BELNR.
    WA_COLL-BUDAT = WA_BKPF-BUDAT.
    WA_COLL-WRBTR = WA_BSEG-WRBTR.
    WA_COLL-SGTXT = WA_BSEG-SGTXT.
    WA_COLL-MONAT = WA_BKPF-MONAT.
    COLLECT WA_COLL INTO IT_COLL.
    CLEAR: WA_BKPF, WA_BSEG.
    ENDLOOP.
    SORT IT_COLL BY MONAT.
    LOOP AT IT_COLL INTO WA_COLL.
        WRITE:/06 WA_COLL-BELNR,
               22 WA_COLL-BUDAT,
               32 WA_COLL-WRBTR,
               54 WA_COLL-SGTXT.
        AT end of MONAT.
          SUM.
          WRITE:/ WA_COLL-MONAT.
          WRITE:32 WA_COLL-WRBTR.
        ENDAT.
    ENDLOOP.
    Thanks in advance,
    ben2012.

    Hi,
    I tried this way to calculcate opening balance,
    but it is not working kindly suggest me.
    REPORT  ZTEMP1.
    " Types Declaration part
    TYPES: BEGIN OF TY_COLL,
           MONAT TYPE MONAT,
           BUDAT TYPE BUDAT,
           BELNR TYPE BELNR_D,
           WRBTR TYPE WRBTR,
           SGTXT TYPE SGTXT,
           TOT TYPE WRBTR,
    END OF TY_COLL.
    DATA: TOT LIKE BSEG-WRBTR.
    DATA: IT_BKPF TYPE TABLE OF TY_BKPF,
          WA_BKPF TYPE TY_BKPF,
          IT_BSEG TYPE TABLE OF TY_BSEG,
          WA_BSEG TYPE TY_BSEG,
          IT_BKPF1 TYPE TABLE OF TY_BKPF1,
          WA_BKPF1 TYPE TY_BKPF1,
          IT_BSEG1 TYPE TABLE OF TY_BSEG1,
          WA_BSEG1 TYPE TY_BSEG1,
          IT_COLL TYPE TABLE OF TY_COLL,
          WA_COLL TYPE TY_COLL.
    SELECTION-SCREEN: BEGIN OF BLOCK B1.
    SELECT-OPTIONS: S_HKONT FOR WA_BSEG-HKONT memory id one,
                    S_AUFNR FOR WA_BSEG-AUFNR memory id twq,
                    S_BELNR FOR WA_BKPF-BELNR memory id twe,
                    S_BUDAT FOR WA_BKPF-BUDAT memory id two.
    SELECTION-SCREEN: END OF BLOCK B1.
    START-OF-SELECTION.
    PERFORM SELECT1.
    PERFORM OPB.
    END-OF-SELECTION.
    PERFORM P_SELECT1.
    PERFORM P_OPB.
    PERFORM P_COLL.
    *&      Form  SELECT1
    FORM SELECT1 .
    SELECT MONAT
           BUDAT
           BELNR
           GJAHR
           BUKRS FROM BKPF
           INTO TABLE IT_BKPF
           WHERE BELNR IN S_BELNR
           AND  BUDAT IN S_BUDAT.
    IF NOT IT_BKPF[] IS INITIAL.
      SELECT BUKRS
             BELNR
             GJAHR
             HKONT
             WRBTR
             SGTXT
             AUFNR FROM BSEG
             INTO TABLE IT_BSEG
             FOR ALL ENTRIES IN IT_BKPF
             WHERE HKONT IN S_HKONT
             AND AUFNR IN S_AUFNR
             AND BELNR = IT_BKPF-BELNR
             AND GJAHR = IT_BKPF-GJAHR
             AND BUKRS = IT_BKPF-BUKRS.
    ENDIF.
    ENDFORM.                    " SELECT1
    *&      Form  OPB
    FORM OPB .
    SELECT MONAT
           BUDAT
           BELNR
           GJAHR
           BUKRS FROM BKPF
           INTO TABLE IT_BKPF1
           WHERE BELNR IN S_BELNR
           AND  BUDAT < S_BUDAT+3(8).
    IF NOT IT_BKPF1[] IS INITIAL.
      SELECT BUKRS
             BELNR
             GJAHR
             HKONT
             WRBTR
             SGTXT
             AUFNR FROM BSEG
             INTO TABLE IT_BSEG1
             FOR ALL ENTRIES IN IT_BKPF1
             WHERE HKONT IN S_HKONT
             AND AUFNR IN S_AUFNR
             AND BELNR = IT_BKPF1-BELNR
             AND GJAHR = IT_BKPF1-GJAHR
             AND BUKRS = IT_BKPF1-BUKRS.
    ENDIF.
    ENDFORM.                    " OPB
    *&      Form  P_SELECT1
    FORM P_SELECT1 .
    SORT IT_BKPF BY MONAT.
    SORT IT_BSEG BY HKONT.
    LOOP AT IT_BSEG INTO WA_BSEG.
      READ TABLE IT_BKPF INTO WA_BKPF WITH KEY BUKRS = WA_BSEG-BUKRS
                                               BELNR = WA_BSEG-BELNR
                                               GJAHR = WA_BSEG-GJAHR BINARY SEARCH.
    IF sy-subrc EQ 0.
    WA_COLL-BELNR = WA_BKPF-BELNR.
    WA_COLL-BUDAT = WA_BKPF-BUDAT.
    WA_COLL-WRBTR = WA_BSEG-WRBTR.
    WA_COLL-SGTXT = WA_BSEG-SGTXT.
    WA_COLL-MONAT = WA_BKPF-MONAT.
    COLLECT WA_COLL INTO IT_COLL.
    endif.
    CLEAR: WA_BKPF, WA_BSEG.
    ENDLOOP.
    ENDFORM.                    " P_SELECT1
    *&      Form  P_OPB
    FORM P_OPB .
    SORT IT_BKPF1 BY MONAT.
    SORT IT_BSEG1 BY HKONT.
    LOOP AT IT_BSEG1 INTO WA_BSEG1.
      READ TABLE IT_BKPF1 INTO WA_BKPF1 WITH KEY BUKRS = WA_BSEG1-BUKRS
                                                 BELNR = WA_BSEG1-BELNR
                                                 GJAHR = WA_BSEG1-GJAHR BINARY SEARCH.
    IF sy-subrc EQ 0.
    WA_COLL-TOT = WA_BSEG1-WRBTR.
    COLLECT WA_COLL INTO IT_COLL.
    endif.
    CLEAR: WA_BKPF1, WA_BSEG1.
    ENDLOOP.
    ENDFORM.                    " P_OPB
    *&      Form  P_COLL
    FORM P_COLL .
    SORT IT_COLL BY MONAT.
    LOOP AT IT_COLL INTO WA_COLL.
        WRITE:/06 WA_COLL-BELNR,
               22 WA_COLL-BUDAT,
               32 WA_COLL-WRBTR,
               54 WA_COLL-SGTXT.
        AT end of MONAT.
          SUM.
          WRITE:/ WA_COLL-MONAT.
          WRITE:32 WA_COLL-WRBTR.
          WRITE: WA_COLL-TOT.  " getting value 0
        ENDAT.
    ENDLOOP.
    ENDFORM.                    " P_COLL

  • Permission denied when I execute a unix command from inside my Java applet.

    Hi Gang,
    Forgive me if I'm posting this to the wrong forum! I didn't get any answers on the previous forum that I posted this to.
    I've written a simple java applet that runs a unix command and then displays some information. The applet compiles fine, and runs perfectly from the command line on my unix system.
    However, when I point a browser at the applet from my desktop PC I get the following error as taken from the java console:
    Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
    This is of course the first line in a long line of error messages. It appears that I am not able to execute a command on the unix system through my applet. I know the problem is with trying to execute a unix command since commenting it causes no error in the web browser. This is the command I'm using in java to execute the unix command:
    p = Runtime.getRuntime().exec("ps");
    Here's the html file on the unix system:
    <html>
    <head></head>
    <body>
    <appletcode=G.class height="250" width="400">
    Your browser does not support the applet tag.
    </applet>
    </body>
    </html>
    I won't list the java code since it is compiling and working on the command line. But, if you want to see it I'll provide it.
    I've done quite a bit of research on this and it seems that a great number of people have similar problems reading or executing files through java. I have yet to find a solution to this problem.
    Here are some details about my setup:
    Server:
    HP9000 running HP/UX 11.23
    Apache Web Server 2.0.35
    Java 1.5
    Desktop PC:
    Win2K Pro
    Internet Explorer 6
    Java 1.6
    If you have a solution I would be very grateful! This problem is keeping me from writing my application!
    thanks!
    kev

    Multi-posted.
    Already answered here http://forum.java.sun.com/thread.jspa?threadID=5225314&messageID=9916327#9916327

  • Report Output Changed when Executed in Background

    Hi Guys,
    I have generated a report,which when executed online displays
    four records.
    But when i am executing the same report in background by generating a spool,my output is changed,such as third record is missing and i am getting only three records.
    In the place of the third record an empty line is displayed.
    whats the reason for it?
    Can anyone help me in this regard.

    Hey Aparna,
    I have a report which has more than 400 characters in width. When I execute the report in background, I dont have a printing format of more than 255 characters. Therefore the generated spool has only 255 characters.
    How can I get the complete spool? Is there a way to define printing format or any other T-Code to print the generated spool?
    Regards,
    Anosh

  • Permission denied when I execute a unix command from within my java applet.

    Hi Gang,
    Forgive me if this is not the appropriate forum for this problem. I'm posting this problem on this forum since I got no answers on the other forum I posted on.
    I've written a simple java applet that runs a unix command and then displays some information. The applet compiles fine, and runs perfectly from the command line on my unix system.
    However, when I point a browser at the applet from my desktop PC I get the following error as taken from the java console:
    Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
    This is of course the first line in a long line of error messages. It appears that I am not able to execute a command on the unix system through my applet. I know the problem is with trying to execute a unix command since commenting it causes no error in the web browser. This is the command I'm using in java to execute the unix command:
    p = Runtime.getRuntime().exec("ps");
    Here's the html file on the unix system:
    <html>
    <head></head>
    <body>
    <appletcode=G.class height="250" width="400">
    Your browser does not support the applet tag.
    </applet>
    </body>
    </html>
    I won't list the java code since it is compiling and working on the command line. But, if you want to see it I'll provide it.
    I've done quite a bit of research on this and it seems that a great number of people have similar problems reading or executing files through java. I have yet to find a solution to this problem.
    Here are some details about my setup:
    Server:
    HP9000 running HP/UX 11.23
    Apache Web Server 2.0.35
    Java 1.5
    Desktop PC:
    Win2K Pro
    Internet Explorer 6
    Java 1.6
    If you have a solution I would be very grateful! This problem is keeping me from writing my application!
    thanks!
    kev

    Multi-posted.
    Already answered here http://forum.java.sun.com/thread.jspa?threadID=5225314&messageID=9916327#9916327

  • Unix script not working when executed from SAP PI communication channel

    Hi Experts,
    I am currently using the Run OS command after message processing functionality of the file adapter.
    However, the unix script doesn't seem to work when run via communication channel.
    The script runs properly when executed manually.
    The communication channel logs don't show any error as well.
    Do you have any ideas as to where the error might be.
    Thanks,
    Mike

    Hi All,
    Thank you for your replies. I appreciate this.
    @Anand, here is the script:
    #!/usr/bin/sh
    #version 1
    hostname=$(uname -a | cut -f 2 -d " ")
    MAILTO="[email protected] "
    homedir=$PWD
    echo $homedir | mailx -m -s "OB10 $hostname" $MAILTO
    /opt/java6/bin/jar -xvf OB10.zip
    ll | mailx -m -s "OB10 $hostname" $MAILTO
    What's puzzling me is that I am able to receive the email alerts.
    This means that the user has sufficient authorization to execute the script.
    But the unzip command is not working.
    I have seen the unzip work when run manually.
    Thanks,
    Mike

  • Output Designer Executable Problem When Compiling

    I am currently experiencing a problem compiling some templates, where the Output Designer crashes with the following message 'Output Designer Executable has encountered a problem and needs to close. We are sorry for the inconvenience.'
    I have been working with a number of templates and most have compiled successfully without any problem. However occasionally they are crashing where they previously worked before. I also experience this problem using Test Presentment.
    This crash is happening intermittently, but often enough to be causing me problems.
    My feeling is it something to do with XP and memory allocation for compiles but I have not got to the bottom of this.
    Can anyone give me any advice over this problem. Have any of you experienced this problem, if so how did you resolve it ?
    Is there any settings that would solve this ?
    Thanks
    Stephen

    Stephen,
    I am having a similar problem. Have you been able to figure it out yet?
    Thanks,

  • Process.Start - getting different output when running command using this method than I am if I run same command in CMD prompt

    Hi
    Creating an application to analyze .dmp files - all working well except this odd issue
    If I open command prompt and enter this command:-
    kd -z C:\Windows\MiniDump\042414-24632-01.dmp -c "!analyze -v"
    Then it works and shows me all the output I need (shown at bottom of post)
    If I run same command in VB.net using following code - then it doesn't give the same output - the bits I need at the end created by the !analyze -v switch don't appear
    Any ideas why it is not seeing the switch correctly - setting a breakpoint and checking contents of startinfo seems to be showing correct cmd line i.e. "kd -z C:\windows\minidump\042414-24632-01.dmp -c "!analyze –v;q""
    Dim myprocess As New Process()
    myprocess.StartInfo.FileName = "C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86\kd"
    myprocess.StartInfo.Arguments = "-z C:\windows\minidump\042414-24632-01.dmp -c ""!analyze –v;q"""
    myprocess.StartInfo.UseShellExecute = False
    myprocess.StartInfo.RedirectStandardOutput = True
    myprocess.StartInfo.CreateNoWindow = True
    myprocess.Start()
    TextBox1.AppendText(myprocess.StandardOutput.ReadToEnd())
    Output when run from cmd prompt:-
    C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86>kd -z C:\Windows\MiniDump\042414-24632-01.dmp -c "!analyze -v;q"
    Microsoft (R) Windows Debugger Version 6.3.9600.17298 X86
    Copyright (c) Microsoft Corporation. All rights reserved.
    Loading Dump File [C:\Windows\MiniDump\042414-24632-01.dmp]
    Mini Kernel Dump File: Only registers and stack trace are available
    Symbol search path is: *** Invalid ***
    * Symbol loading may be unreliable without a symbol search path. *
    * Use .symfix to have the debugger choose a symbol path. *
    * After setting your symbol path, use .reload to refresh symbol locations. *
    Executable search path is:
    * Symbols can not be loaded because symbol path is not initialized. *
    * The Symbol Path can be set by: *
    * using the _NT_SYMBOL_PATH environment variable. *
    * using the -y <symbol_path> argument when starting the debugger. *
    * using .sympath and .sympath+ *
    Unable to load image \SystemRoot\system32\ntkrnlpa.exe, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for ntkrnlpa.exe
    *** ERROR: Module load completed but symbols could not be loaded for ntkrnlpa.exe
    Windows 7 Kernel Version 7601 (Service Pack 1) MP (4 procs) Free x86 compatible
    Product: WinNt, suite: TerminalServer SingleUserTS
    Built by: 7601.18205.x86fre.win7sp1_gdr.130708-1532
    Machine Name:
    Kernel base = 0x82e3e000 PsLoadedModuleList = 0x82f874d0
    Debug session time: Thu Apr 24 13:36:18.672 2014 (UTC + 1:00)
    System Uptime: 0 days 0:00:38.703
    * Symbols can not be loaded because symbol path is not initialized. *
    * The Symbol Path can be set by: *
    * using the _NT_SYMBOL_PATH environment variable. *
    * using the -y <symbol_path> argument when starting the debugger. *
    * using .sympath and .sympath+ *
    Unable to load image \SystemRoot\system32\ntkrnlpa.exe, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for ntkrnlpa.exe
    *** ERROR: Module load completed but symbols could not be loaded for ntkrnlpa.exe
    Loading Kernel Symbols
    Loading User Symbols
    Loading unloaded module list
    ************* Symbol Loading Error Summary **************
    Module name Error
    ntkrnlpa The system cannot find the file specified
    You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the
    command that caused symbols to be loaded.
    You should also verify that your symbol search path (.sympath) is correct.
    * Bugcheck Analysis *
    Use !analyze -v to get detailed debugging information.
    BugCheck 50, {afa99150, 0, 88c557d7, 0}
    *** WARNING: Unable to verify timestamp for mssmbios.sys
    *** ERROR: Module load completed but symbols could not be loaded for mssmbios.sys
    *** WARNING: Unable to verify timestamp for mfehidk.sys
    *** ERROR: Module load completed but symbols could not be loaded for mfehidk.sys
    *** WARNING: Unable to verify timestamp for HipShieldK.sys
    *** ERROR: Module load completed but symbols could not be loaded for HipShieldK.sys
    ***** Kernel symbols are WRONG. Please fix symbols to do analysis.
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    Probably caused by : mfehidk.sys ( mfehidk+377d7 )
    Followup: MachineOwner
    1: kd> kd: Reading initial command '!analyze -v;q'
    * Bugcheck Analysis *
    PAGE_FAULT_IN_NONPAGED_AREA (50)
    Invalid system memory was referenced. This cannot be protected by try-except,
    it must be protected by a Probe. Typically the address is just plain bad or it
    is pointing at freed memory.
    Arguments:
    Arg1: afa99150, memory referenced.
    Arg2: 00000000, value 0 = read operation, 1 = write operation.
    Arg3: 88c557d7, If non-zero, the instruction address which referenced the bad memory
    address.
    Arg4: 00000000, (reserved)
    Debugging Details:
    ***** Kernel symbols are WRONG. Please fix symbols to do analysis.
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    ADDITIONAL_DEBUG_TEXT:
    You can run '.symfix; .reload' to try to fix the symbol path and load symbols.
    MODULE_NAME: mfehidk
    FAULTING_MODULE: 82e3e000 nt
    DEBUG_FLR_IMAGE_TIMESTAMP: 4d2e1e3e
    READ_ADDRESS: GetPointerFromAddress: unable to read from 00000000
    GetPointerFromAddress: unable to read from 00000000
    unable to get nt!MmSpecialPoolStart
    unable to get nt!MmSpecialPoolEnd
    unable to get nt!MmPagedPoolEnd
    unable to get nt!MmNonPagedPoolStart
    unable to get nt!MmSizeOfNonPagedPoolInBytes
    afa99150
    FAULTING_IP:
    mfehidk+377d7
    88c557d7 0fb70c06 movzx ecx,word ptr [esi+eax]
    MM_INTERNAL_CODE: 0
    CUSTOMER_CRASH_COUNT: 1
    DEFAULT_BUCKET_ID: WIN7_DRIVER_FAULT
    BUGCHECK_STR: 0x50
    CURRENT_IRQL: 0
    ANALYSIS_VERSION: 6.3.9600.17298 (debuggers(dbg).141024-1500) x86fre
    LAST_CONTROL_TRANSFER: from 82e7eaa8 to 82ecb879
    STACK_TEXT:
    WARNING: Stack unwind information not available. Following frames may be wrong.
    ad0baf90 82e7eaa8 00000000 afa99150 00000000 nt+0x8d879
    ad0bafa8 88c557d7 badb0d00 00000000 88c4ceb0 nt+0x40aa8
    ad0bb040 88c4f97d 001a99b0 afa91000 00000000 mfehidk+0x377d7
    ad0bb090 88c52b16 00770220 ad0bb0fc 00000010 mfehidk+0x3197d
    ad0bb0bc 98d5fb73 ae770220 ad0bb0fc 00000010 mfehidk+0x34b16
    ad0bb140 98d5fc43 ae738c30 98d6b62a aace7220 HipShieldK+0xb73
    ad0bb168 98d6b882 ad0bb19c 00000000 98d77b44 HipShieldK+0xc43
    ad0bb1b8 98d631a9 00000bd4 0000102c ad0bb208 HipShieldK+0xc882
    ad0bb330 88c47795 00000bd4 0000102c ad0bb401 HipShieldK+0x41a9
    ad0bb400 88c22b57 0000102c ad0bb460 85b3dee0 mfehidk+0x29795
    ad0bb41c 88c232c6 ad0bb430 0000000c 8c4b6ce0 mfehidk+0x4b57
    ad0bb43c 830a5acb adb6b9b8 0000102c ad0bb460 mfehidk+0x52c6
    ad0bb4f4 830adaf8 adb16030 01b6b9b8 ad0bb550 nt+0x267acb
    ad0bbc00 82e7b8c6 038ae710 038ae6ec 02000000 nt+0x26faf8
    ad0bbc34 77a470f4 badb0d00 038ae3dc 00000000 nt+0x3d8c6
    ad0bbc38 badb0d00 038ae3dc 00000000 00000000 0x77a470f4
    ad0bbc3c 038ae3dc 00000000 00000000 00000000 0xbadb0d00
    ad0bbc40 00000000 00000000 00000000 00000000 0x38ae3dc
    STACK_COMMAND: kb
    FOLLOWUP_IP:
    mfehidk+377d7
    88c557d7 0fb70c06 movzx ecx,word ptr [esi+eax]
    SYMBOL_STACK_INDEX: 2
    SYMBOL_NAME: mfehidk+377d7
    FOLLOWUP_NAME: MachineOwner
    IMAGE_NAME: mfehidk.sys
    BUCKET_ID: WRONG_SYMBOLS
    FAILURE_BUCKET_ID: WRONG_SYMBOLS
    ANALYSIS_SOURCE: KM
    FAILURE_ID_HASH_STRING: km:wrong_symbols
    FAILURE_ID_HASH: {70b057e8-2462-896f-28e7-ac72d4d365f8}
    Followup: MachineOwner
    quit:
    output when run in my app:-
    Microsoft (R) Windows Debugger Version 6.3.9600.17298 X86
    Copyright (c) Microsoft Corporation. All rights reserved.
    Loading Dump File [C:\Windows\MiniDump\042414-24632-01.dmp]
    Mini Kernel Dump File: Only registers and stack trace are available
    Symbol search path is: *** Invalid ***
    * Symbol loading may be unreliable without a symbol search path. *
    * Use .symfix to have the debugger choose a symbol path. *
    * After setting your symbol path, use .reload to refresh symbol locations. *
    Executable search path is:
    * Symbols can not be loaded because symbol path is not initialized. *
    * The Symbol Path can be set by: *
    * using the _NT_SYMBOL_PATH environment variable. *
    * using the -y <symbol_path> argument when starting the debugger. *
    * using .sympath and .sympath+ *
    Unable to load image \SystemRoot\system32\ntkrnlpa.exe, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for ntkrnlpa.exe
    *** ERROR: Module load completed but symbols could not be loaded for ntkrnlpa.exe
    Windows 7 Kernel Version 7601 (Service Pack 1) MP (4 procs) Free x86 compatible
    Product: WinNt, suite: TerminalServer SingleUserTS
    Built by: 7601.18205.x86fre.win7sp1_gdr.130708-1532
    Machine Name:
    Kernel base = 0x82e3e000 PsLoadedModuleList = 0x82f874d0
    Debug session time: Thu Apr 24 13:36:18.672 2014 (UTC + 1:00)
    System Uptime: 0 days 0:00:38.703
    * Symbols can not be loaded because symbol path is not initialized. *
    * The Symbol Path can be set by: *
    * using the _NT_SYMBOL_PATH environment variable. *
    * using the -y <symbol_path> argument when starting the debugger. *
    * using .sympath and .sympath+ *
    Unable to load image \SystemRoot\system32\ntkrnlpa.exe, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for ntkrnlpa.exe
    *** ERROR: Module load completed but symbols could not be loaded for ntkrnlpa.exe
    Loading Kernel Symbols
    Loading User Symbols
    Loading unloaded module list
    ************* Symbol Loading Error Summary **************
    Module name Error
    ntkrnlpa The system cannot find the file specified
    You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the
    command that caused symbols to be loaded.
    You should also verify that your symbol search path (.sympath) is correct.
    * Bugcheck Analysis *
    Use !analyze -v to get detailed debugging information.
    BugCheck 50, {afa99150, 0, 88c557d7, 0}
    *** WARNING: Unable to verify timestamp for mssmbios.sys
    *** ERROR: Module load completed but symbols could not be loaded for mssmbios.sys
    *** WARNING: Unable to verify timestamp for mfehidk.sys
    *** ERROR: Module load completed but symbols could not be loaded for mfehidk.sys
    *** WARNING: Unable to verify timestamp for HipShieldK.sys
    *** ERROR: Module load completed but symbols could not be loaded for HipShieldK.sys
    ***** Kernel symbols are WRONG. Please fix symbols to do analysis.
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    Probably caused by : mfehidk.sys ( mfehidk+377d7 )
    Followup: MachineOwner
    Darren Rose

    Try it by opening the Cmd prompt as the actual process and passing the Filename and its arguments as the arguments of the Cmd process.  If you notice there is a "-C" before the Filename and Arguments in this example.  The "-C"
    tells the cmd to execute the commands and then close itself.  You can also use a "-K" which tells the cmd to execute the commands and keep itself open.  Being you are not showing the cmd window you don`t want to keep it opened because the
    user can`t close it so, that is why i used "-C".
     I don`t have the program so, you can just experiment to see what it does.  Maybe you should try using "-K" and show the cmd window by commenting out the CreateNoWindow line so you can see what is in the cmd window while testing.
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim filepath As String = """C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86\kd"""
    Dim args As String = " -z C:\windows\minidump\042414-24632-01.dmp -c ""!analyze –v;q"""
    Dim p As New Process
    With p.StartInfo
    .FileName = "cmd.exe"
    .Arguments = "-c " & filepath & args
    .UseShellExecute = False
    .CreateNoWindow = True
    .RedirectStandardOutput = True
    End With
    p.Start()
    TextBox1.Text = p.StandardOutput.ReadToEnd
    End Sub
    If you say it can`t be done then i`ll try it

  • Execute a unix shell script from forms9i

    Hi ,
    I would like to execute a unix shell script form a form when they pressed a button. The forms server is on Linux machine. I tried but when I pressed the button nothings happen. Could some one please help me how I could get working.
    Is there is a way I could execute the unix shell script from PL/SQL proceudre or package.
    Please some one help me.
    Bain

    You would not expect to see anything happening because the
    script cannot directly send output to the web form. However, you can get it to write output to a file and use web.show_document in the form after the host command to display the file and see the output.

  • Error while trying to execute a unix shell script from java program

    Hi
    I have written a program to execute a unix shell script in a remote machine. I am using J2ssh libraries to estabilish the session connection with the remote box.The program is successfully able to connect and authenticate with the box.
    The runtime .exec() is been implemented to execute the shell script.I have given below the code snippet.
    try {
         File file_location = new File("/usr/bin/");
         String file_location1 = "/opt/app/Hyperion/scripts/daily";
         String a_mib_name = "test.sh";
         String cmd[] = new String[] {"/usr/bin/bash", file_location1, a_mib_name};
         Runtime rtime = Runtime.getRuntime();
         Process p = rtime.exec(cmd, null, file_location);
    System.out.println( "Connected to the server1" );
    BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line = br.readLine();
    while(line !=null)
    System.out.println(line);
    line = br.readLine();
    br.close();
    p.getErrorStream ().close ();
    p.getOutputStream().close();
    int retVal = p.waitFor();
    System.out.println("wait " + retVal);
    //session.executeCommand("ls");
    catch (IOException ex) {
    I get an error message
    Connected to the server
    java.io.IOException: Cannot run program "/usr/bin/bash" (in directory "\usr\bin"
    ): CreateProcess error=3, The system cannot find the path specified
    at java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at SftpConnect.main(SftpConnect.java:143)
    Caused by: java.io.IOException: CreateProcess error=3, The system cannot find th
    e path specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    I am sure of the file path where the bash.sh and test.sh are located.
    Am i missing something? Any help would be greatly appreciated.
    Thanks
    Senthil

    Hi, I am using a simple program to connect to a RMI server and execute shell script. I use the Runtime.exec aommand to do the same.
    The script is sh /tmp/pub/alka/test.sh /tmp/pub/alka/abc/xyz/ul ul
    The script when run from the server, gives no errors. But when ran using rthe above method in java, gives errors as follows,
    Mycode:
    String command = "/bin/sh /tmp/pub/alka/test.sh /tmp/pub/alka/abc/xyz/ul ul";
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(command);
    int exitVal = proc.exitValue();
    System.out.println("Process exitValue: " + exitVal);
    java.io.IOException: CreateProcess: /bin/sh /tmp/pub/alka/test.sh /tmp/pub/alka/abc/xyz/ul ul error=3
         at java.lang.ProcessImpl.create(Native Method)
         at java.lang.ProcessImpl.<init>(Unknown Source)
         at java.lang.ProcessImpl.start(Unknown Source)
         at java.lang.ProcessBuilder.start(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at DecryptTest.main(DecryptTest.java:18)
    Can anyone please help

  • COPY DATABASE ON THE SAME UNIX MACHINE

    제품 : ORACLE SERVER
    작성날짜 : 1997-10-10
    INTRODUCTION
    The following article deals with creating a copy of a database on the same
    unix machine. A database might need to be copied in order to duplicate the
    production system, for example for testing purposes. It is recommended that
    the reader refer also to the following documentation:
    -Oracle 7 Server Administrators Guide
    Performing full backups: Chapter 18 page 18-7
    OVERVIEW OF PROCEDURE
    Before copying the database to a new location, it is necessary to perform
    a full cold backup of the database, whilst the database is shutdown. This
    will ensure that no data will be lost if the copying of the database is
    unsuccessful.
    WARNING
    Creating a copy of a database involves usage of the CREATE CONTROLFILE command
    (explained below). If this command is not executed correctly it could corrupt
    the production database. If this happens, and if the files in question are
    important, this will mean that the original database will need to be restored
    from a backup.
    Note: If you are using Oracle 7.1.6 on Sun Solaris 2.X there is a serious
    bug with CREATE CONTROLFILE. Call Oracle Worldwide Support asking for
    details of <Bug:274054> before proceeding.
    1. OBTAIN DATABASE INFORMATION FROM CONTROLFILE
    In order to move the database, it is necessary to create a script containing
    information about the files of the database.
    This is done by executing the following commands.
    a. SQLDBA
    b. CONNECT INTERNAL, STARTUP MOUNT
    c. ALTER DATABASE BACKUP CONTROLFILE TO TRACE RESETLOGS;
    This will create a trace file in the trace file directory. The file
    will have the extension .trc, and is located either in the directory
    defined by the initialization parameter 'user_dump_dest', or, if
    this is not defined, in ORACLE_HOME/rdbms/log. The file should be
    copied to a name such as ccf<NEW_SID>.sql, where <NEW_SID> is to be
    the ORACLE_SID of the copied database.
    2. IDENTIFY FILES TO BACKUP/COPY
    a. Identify database and log files
    The CREATE CONTROLFILE command in the file ccf<NEW_SID>.sql can then be
    used to identify the various database files and redo log files that need
    to be backed up. The file names will be in single quotes and separated
    by commas after the words LOGFILE and DATAFILE, e.g:
    CREATE CONTROLFILE REUSE DATABASE "FRITZ" RESETLOGS ARCHIVELOG
    MAXLOGFILES 6
    MAXLOGMEMBERS 2
    MAXDATAFILES 10
    MAXINSTANCES 1
    MAXLOGHISTORY 100
    LOGFILE
    GROUP 1 (
    '/oracle/tberryha/fritz/log_disk1/fritzlog1v713.dbf',
    '/oracle/tberryha/fritz/log_disk2/fritzlog1v713.dbf'
    ) SIZE 50K,
    GROUP 2 (
    '/oracle/tberryha/fritz/log_disk1/fritzlog2v713.dbf',
    '/oracle/tberryha/fritz/log_disk2/fritzlog2v713.dbf'
    ) SIZE 50K
    DATAFILE
    '/oracle/tberryha/fritz/fritz_system/fritz_system01.dbf' SIZE 8M,
    '/oracle/tberryha/fritz/fritz_data/fritz_data01.dbf' SIZE 20M,
    '/oracle/tberryha/fritz/fritz_rollback/fritz_rollback01.dbf' SIZE 20M,
    '/oracle/tberryha/fritz/fritz_temp/fritz_temp01.dbf' SIZE 20M,
    '/oracle/tberryha/fritz/fritz_data/fritz_data02.dbf' SIZE 5M,
    '/oracle/d2/V7141/dbs/x' SIZE 1M
    It is also possible to obtain a listing of the files of the database
    by executing the following sql commands:
    SQLPLUS username/password
    Note: The user must have sufficient privileges to be able to see
    the dba views 'sys.dba_data_files', 'sys.v$logfile' and in addition
    the database must be open.
    SPOOL files.log
    SELECT file_name FROM sys.dba_data_files ORDER BY tablespace_name;
    SELECT member FROM sys.v$logfile
    SPOOL OFF
    Note: This will create a spool file called 'files.log' which
    will record the results of the previous commands.
    b. Identify controlfiles
    This can be done either by referring to the init<SID>.ora
    'control_files' parameter, or from 7.0.16 onwards, the table
    sys.v$controlfile can be used to identify the controlfiles of the
    database via the following statement:
    SPOOL control.log
    SELECT name FROM v$controlfile;
    SPOOL OFF
    This will create a file called control.log in the current directory
    which will contain the names of the controlfiles for the database.
    3. BACKUP EXISTING DATABASE
    Shutdown instance via SQLDBA, SHUTDOWN NORMAL, and then take full cold
    backup of:
    a. All the files identified in step 2 above.
    b. All parameter files.
    Note: the main parameter file will usually be called init<SID>.ora, in
    addition to which there may also be other parameter files. These will
    be identified by 'ifile' (included file) parameters in the init<SID>.ora.
    These additional parameter files are usually called config<SID>.ora.
    4. MAKE A COPY OF THE DATABASE
    Copy all parameter files, controlfiles, and all files noted in step 1 above
    to their new location taking care to preserve ownership and permissions.
    When the database has been copied, it will not be possible to use the same
    SID and therefore the ORACLE_SID environment variable must
    be changed to a new SID, and the copied init<SID>.ora must be
    renamed to init<NEW_SID>.ora, and any parameter files pointed to by an
    'ifile' parameter (e.g. parameter files such as config<SID>.ora) should be
    renamed to incorporate the NEW_SID (i.e. config<NEW_SID>.ora).
    5. SET UP PARAMETER FILES FOR THE COPIED DATABASE
    Edit the value of the control_files parameter in the init<NEW_SID>.ora to be
    the name and location that you want to use for the new control files.
    The controlfiles should be given a different name to distinguish them from
    the old database. In addition, change the DB_NAME parameter in the
    init<NEW_SID>.ora to be an appropriate name for the new database. Any
    'ifile' parameters of the parameter file will need to be edited to point to
    the new name of the include file in the new location.
    6. PREPARE THE 'CREATE CONTROLFILE COMMAND' FOR THE COPIED DATABASE
    In order to establish the new database in the new location, the CREATE
    CONTROLFILE command in the file ccf<NEW_SID>.sql should be executed. The
    following steps illustrate how CREATE CONTROLFILE command is prepared.
    a. The file ccf<NEW_SID>.sql must be edited before use. The CREATE
    CONTROLFILE command will be preceded by a series of comments and a
    STARTUP NOMOUNT command. These need to be stripped out of the file. In
    addition, after the create controlfile command, there will be a number
    of comments and the commands RECOVER DATABASE and ALTER DATABASE OPEN,
    which should also be stripped out, leaving just the create controlfile
    command itself.
    b. The CREATE CONTROLFILE command itself should also be edited. Change
    the CREATE CONTROLFILE command in 'ccf<NEW_SID>.sql' to have the new
    database name, and add the word 'SET', e.g:
    CREATE CONTROLFILE REUSE DATABASE "olddbname" RESETLOGS
    becomes
    CREATE CONTROLFILE REUSE set DATABASE "newdbname" RESETLOGS
    c. The CREATE CONTROLFILE command also specifies the files which make up
    the database, and these must also be changed to name the files of the
    new database in the new location, e.g:
    LOGFILE
    GROUP 1 (
    '/old_path/old_logfile_name1',
    '/old_path/old_logfile_name2'
    ) SIZE 50k
    would become:
    LOGFILE
    GROUP 1 (
    '/new_path/new_logfile_name1',
    '/new_path/new_logfile_name2'
    ) SIZE 50k
    and
    DATAFILE
    '/old_path/old_file_name1' SIZE 5M,
    '/old_path/old_file_name2' SIZE 10M
    would become:
    DATAFILE
    '/new_path/new_file_name1' SIZE 5M,
    '/new_path/new_file_name2' SIZE 10M
    7. EXECUTE THE 'CREATE CONTROLFILE' COMMAND FOR THE COPIED DATABASE
    Having prepared the create controlfile script, it is now necessary to run
    the script from within the new instance. This is done by executing the
    following:
    a. at the operating system prompt, change the value of the environment
    variable ORACLE_SID from OLD_SID to NEW_SID. This can be done by using
    the following unix command from within the C shell:
    %setenv ORACLE_SID NEW_SID
    b. SQLDBA
    c. CONNECT INTERNAL, STARTUP NOMOUNT PFILE=/<full path>/init<NEW_SID>.ora
    d. @ccf<NEW_SID>
    Note: if any files which should be specified in the CREATE CONTROLFILE
    command are omitted, these files cannot be added to the new database
    at a later date. In addition, if any of the files specified in the
    CREATE CONTROLFILE command are NOT changed from their original names,
    then the corresponding files of the original database will become part
    of the copied database, and it will not be possible to restore them to
    the original database. If this happens, and if the files in question
    are important, this will mean that the original database will need to
    be restored from a backup.
    e. ALTER DATABASE OPEN RESETLOGS
    8. MAKE A FULL COLD BACKUP OF THE COPIED DATABASE
    SHUTDOWN and take a full cold backup of the database in the new location.
    The full cold backup can be done as detailed in steps 2 and 3.

    Yes.
    vipul wrote:
    >
    Thanks Peter,
    But in such a case do we need to configure the WSL in the ubb file and set environment
    variables like WSNADDR, WSENVFILE etc .etc. for the WS client.
    Regards
    Vipul.
    Peter Holditch <[email protected]> wrote:
    vipul,
    Yes.
    In fact, you don't even need 2 installs. If you do a server installation
    of
    Tuxedo onto your UNIX machine, and build all the clients with the buildlcient
    -w
    option, then the clients will use /WS libraries, instead of the native
    ones, to
    contact Tuxedo.
    Regards,
    Peter.
    vipul wrote:
    Can I install Tuxedo/T server and Tuxedo/WS on the same UNIX machinein different
    directories
    and make the application behave like a client-server. In such a casecan we make
    the clients act
    like WS clients and not native clients.

  • How to output an executable

    I am writing a program that compiles some code and tries to output an executable file for windows/dos (I kow... do it in c... but the point is that at some later stage I want to port it to solaris/linux/unix/os2... ) so I wanted to know if someone knew how to write executable code to a disk file. Sample code will be appreciated.

    Well I think that you will have to read the "Compiler Construction" book for the language who�s source code you are trying to compile. Generating an .exe file from a source code requires a lot of steps.
    - Tokenizing
    - Lexical Analysis
    - Parsing (top down, bottom up, recursive, non-recursive, forward chaining, desent, predictive, non-predictive, multi-threaded etc. etc. are a few techniques to implement your parser)
    - Generating two-address code
    - Optimization
    - Machine Language Conversion
    - Assembling
    - Linking
    etc. etc.
    And before you do all of this you have to know the complete Grammar of your language and then depending on the type of your parser you will have to create the first and follow sets and manage your state manipulations and error recovery techniques. You can find a lot of books on creating parsers for every available language in the market.
    I implemented a compiler for Pascal in my college days (it was part of the curriculum, so no big deal.... ;-) ), two of the books I used that I still remember were
    - Compiler Design by Renhard Wilhelm
    - Principles and Practice of Compiler Construction by Kenneth Louden
    Hope that I have not completely off shooted from the actual question.
    Regards
    Omer

Maybe you are looking for