Can't we manually type commands within run block ?

11.2.0.3/linux
I was doing an RMAN restore to a new server.
Below is the code I wanted to execute to restore
run
SET NEWNAME FOR DATABASE TO '/fnup/hwrc/oradata/spikey';
restore database  ;
}Since it is just 2 lines within a run block , so I thought of typing it manually. After typing the first line (SET NEW NAME..) ending with semi colon, i pressed ENTER key to get the next line and type the RESTORE command . But I was getting the following error.
RMAN> run
2> {
3> set new name for database to '/fnup/hwrc/oradata/spikey';   ###### After typing the semicolon I pressed ENTER here
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "new": expecting one of: "archivelog, autobackup, auxiliary, auxname, backup, command, compression, controlfile, database, dbid, decryption, echo, encryption, high, incarnation, maxcorrupt, maxseq, newname, nocfau, restore, snapshot, to restore point, until restore point, until"
RMAN-01007: at line 3 column 5 file: standard input
------| Second Attempt |----------------------------------------------
RMAN> run
2> {
3> set new name for database to '/fnup/hwrc/oradata/spikey'; ###### After typing the semicolon I pressed ENTER here
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "new": expecting one of: "archivelog, autobackup, auxiliary, auxname, backup, command, compression, controlfile, database, dbid, decryption, echo, encryption, high, incarnation, maxcorrupt, maxseq, newname, nocfau, restore, snapshot, to restore point, until restore point, until"
RMAN-01007: at line 3 column 5 file: standard inputEventually I had to put the above 2 lines in a script and executed it using cmdfile parameter. Can we execute RMAN commands within a run block only through a script ?

A short note...
run
ALLOCATE  CHANNEL ckpt_db1 DEVICE TYPE disk;
ALLOCATE  CHANNEL ckpt_db2 DEVICE TYPE disk;
ALLOCATE  CHANNEL ckpt_db3 DEVICE TYPE disk;
ALLOCATE  CHANNEL ckpt_db4 DEVICE TYPE disk;
ALLOCATE  CHANNEL ckpt_db5 DEVICE TYPE disk;
ALLOCATE  CHANNEL ckpt_db6 DEVICE TYPE disk;
ALLOCATE  CHANNEL ckpt_db7 DEVICE TYPE disk;
ALLOCATE  CHANNEL ckpt_db8 DEVICE TYPE disk;
SET NEWNAME FOR DATAFILE 1 TO '/u02/oradata/ckpt_db/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '/u02/oradata/ckpt_db/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 3 TO '/u02/oradata/ckpt_db/undotbs01.dbf';
SET NEWNAME FOR DATAFILE 4 TO '/u02/oradata/ckpt_db/users01.dbf';
SET NEWNAME FOR DATAFILE 5 TO '/u02/oradata/ckpt_db/psdefault.dbf';
SET NEWNAME FOR DATAFILE 6 TO '/u02/oradata/ckpt_db/amapp.dbf';
SET NEWNAME FOR DATAFILE 7 TO '/u02/oradata/ckpt_db/AMARCH.dbf';
restore database;
switch datafile all;
RELEASE CHANNEL ckpt_db1;
RELEASE CHANNEL ckpt_db2;
RELEASE CHANNEL ckpt_db3;
RELEASE CHANNEL ckpt_db4;
RELEASE CHANNEL ckpt_db5;
RELEASE CHANNEL ckpt_db6;
RELEASE CHANNEL ckpt_db7;
RELEASE CHANNEL ckpt_db8;
}

Similar Messages

  • Installing new library commands within Mac OS X Terminal

    Hello,
    I would like to know how can I install new library commands within the Mac OS X Terminal.
    Can anyone provide me some instructions on how to do that task?
    John P.

    Mac OS is Unix - so it's basically up to you to decide where you want to install command line tools.
    You will need to understand that the command line tools will use a 'search path' to look for the executable code for the commands issued in the Terminal or in scripts etc.
    In Terminal…
    echo $PATH
    Will output something like… (this is NOT the default search path).
    -> /bin:/sbin:/usr/X11/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/ usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
    Which means the OS will look in each of those places for any command I run starting on the left (the colon is a separator). Bear in mind each user has their own search $PATH, this can be configured in the users profile (the ~/.bash_profile,  ~/.bashrc and many other config files for other environments).
    You can see where tools are installed via the 'which' command…
    which echo ping
    -> /bin/echo
    -> /sbin/ping
    Those locations are considered 'system' folders. In practice you will probably install into /usr/local/bin for any tools that you compile yourself. Compiled tools have arguments that can allow you to specify where it should be installed when you make the code.
    Needless to say this is a complex thing to discuss, if you can be specific about what you hope to install that may help, otherwise we are left to point out vague generalities that may send you down the wrong path. What are you actually aiming to install & does it require compilation etc?
    In general I'd avoid adding items to /bin, /sbin, /usr/bin, /usr/sbin , these are considered Apple's locations - software update will overwrite them. Stick with /usr/local as the location for third party tools.
    Or you can create your own folder for commands/ scripts in your home folder & then add the path to the $PATH variable.
    (Please excuse the lack of formatting - this forum is refusing access to the 'advanced editor' to make the code look cleaner).

  • Command to run kextcache manually?

    For reasons I won't bore you with, I want to force the kextcache to run manually on my PPC 10.4.11. I've looked through man kextcache, but the components of commands I see there are unfamiliar territory. Can someone please help me out with the correct command?
    Or, would
    *sudo touch /System/Library/Extensions*
    produce the same result?

    Thanks. Maybe I should supply a few of the boring details. For some reason, kextcache is running at every bootup and by itself consuming up to 80% CPU for about a minute and a half on this already slow enough G3. Then it appears to quit running and the CPU drops back down. Nothing in the log to indicate why or whether the rebuild is successful or not. (Verbose boot keeps showing 0 cached.) I tried trashing the mkext, but it wasn't recreated on the next boot (so I moved it back.) Applying the 10.4.11 Combo didn't fix this, apparently. Although, I am now seeing a newly created, or just newly dated, mkext and kextcache.
    My idea in manually forcing kextcache to run is to see if it will give it a kick in the pants and make it finally stop running, if it is really successful. I think I would want to know if it was successful or not. I don't understand how to put the command together with the proper options.
    -t
    Perform all possible tests on the named kext(s) and indicate
    whether the kext is loadable (and therefore eligible for inclu-
    sion in the cache), or if not, what problems it has. Note that
    tests are performed in three stages, validation, authentication,
    and dependency resolution; a failure at any stage can make tests
    in further stages impossible. Thus, a kext with validation
    failures may have unreported authentication problems or missing
    dependencies.
    There are over 300 kexts, so If it is a flakey kext causing this I don't think the -t option would be very practical. I think that option must be meant for testing at least a small number of kexts. I guess I just need to know in general whether the rebuild is successful or not. I can't possibly test every single kext.
    DIAGNOSTICS
    kextcache exits with a zero status upon success. Upon failure, it prints
    an error message and exits with a nonzero status.
    I'm not sure why the mkext wasn't recreated after trashing. Perhaps that is a big clue as to what is going on.
    (3) the exit status of touch doesn't reflect whether the rebuild was successful.
    So, maybe touch will be successful, but it won't, apparently, provide any clues about what's going on if it isn't? Or, maybe touch will be good enough. I can just run that, reboot and see if kextcache kicks up again.
    Message was edited by: WZZZ

  • When I open Safari, I always type command-plus to enlarge the view.  However, I can't figure out how to permanently set the Safari screen to this view setting in the preferences.  Any ideas?

    When I open Safari, I always type command-plus to enlarge the view.  However, I can't figure out how to permanently set the Safari screen to this view setting in the preferences.  Any ideas?

    Sorry, but you must Command + for every page. It's not permanent.
    If you haven't tried yet, check out Zoom in Safari > Preferences > Accessibility

  • Oracle PL/SQL type defined within a package can't be passed from JAVA

    Hello,
    I am trying to create an Oracle ArrayDescriptor in order to receive a colloection element of type "TABLE".
    The PL/SQL array type is defined in a package - the array descriptor creation fails.
    The type is created within a package call MyPackage
    TYPE SERVERLIST IS TABLE OF VARCHAR2(50);
    I try to create the ArrayDescriptor using MyPackage.SERVERLIST but it fails with the message:
    java.sql.SQLException: invalid name pattern: MyPackage.SERVERLIST
    If I create the SERVERLISTtype at the database level - everything works. The problem is that we have a requirement not to pollute the global namespeace with our types, so I can't create the type at the top level.
    I got no input from the Oracle JDBC tean - so any ideea would be very much appreciated.
    Database is Oracle 8.1.7
    And I am using oracle-jdbc thin driver.

    This is only possible, when u define ur custom type globally. The reason being, in JDBC code when u define struct statement, the code with db connection in constructor finds that if the custom type is present in DB , it does not search in specific procedure, so it would only get this , if ur cuustom type is defined globally.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Ever since updated to waterfox 34 I cannot open a new tab nor can I manually type a web address

    Ever since updated to waterfox 34 I cannot open a new tab nor can I manually type a web address

    Please note that Mozilla did not created Waterfox, nor do we provide support for this product.
    Waterfox was created by another company by using the Firefox codes which are freely available.
    For help on this problem, please contact the Waterfox support team.

  • I just installed Adobe InDesign CC 2014 and now I can't scale objects/type using Command+Shift Key. Has anyone else had this problem and if so, any solution?

    I just installed Adobe InDesign CC 2014 and now I can't scale objects/type using Command+Shift Key. Has anyone else had this problem and if so, any solution?

    There is a conflict with third party software or your system keyboard shortcuts. Lately, there have been many postings about conflicts with Chrome extensions so check there first.
    It's not a new problem. I wrote about it on InDesignSecrets.com in 2006:
    The Missing Keystrokes Mystery | InDesignSecrets

  • I am running snow leopard 10.6.8. on my IMAC. How can I post panoramic type pictures to my desktop so that they maintain panoramic dimensions? Thanks

    How can I post panoramic type (and sized) pictures to my desktop so that they maintain panoramic dimensions? I try to do it through systems preferences but they do not maintain panoramic dimensions. Thanks

    Your post is pretty lengthy and I have to admit I didn't read it all. Please try restarting in Safe Mode, if that doesn't work please do both a SMC and PRAM reset. These may take 2-3 attempts.
    SMC RESET
    Shut down the computer.
    Unplug the computer's power cord and all peripherals.
    Press and hold the power button for 5 seconds.
    Release the power button.
    Attach the computers power cable.
    Press the power button to turn on the computer.
    PRAM RESET
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • I have a new iMac, running Mountain Lion, with CS6. I have the tablet with the keyboard. I'm finding that in CS6 I have to type command-C and command-V repeatedly to copy or paste anything. It is not the keyboard; I've switched that out. What is it?

    I have a new iMac, running Mountain Lion, with CS6. I have the tablet with the keyboard. I'm finding that in CS6 I have to type command-C and command-V repeatedly to copy or paste anything. It is not the keyboard; I've switched that out. Is it some kind of tablet interference?

    Yes, EEK!
    Have you run Microsoft Update and installed the latest 14.2.4 Office update yet?
    Humor me. When you perform copy, do you then establish keyboard focus by clicking the mouse pointer on the destination screen for the paste action -- before keying the paste?
    Have you installed any third-party keystroke mapping software that may be getting between the operating system and these two applications?
    Under System Preferences > Accessibility > Keyboard, have you enabled Sticky, Slow, or EEK! Keys?
    In System Preferences > Keyboard > Keyboard Shortcuts > Keyboard & Text Input, doe the check marks look like the following:

  • Please I can not get a .jar file to run on XP SP3 start/run/cmd/

    I can not get a .jar file to run on XP SP3 start/run/cmd/
    Please help if can figure this out. I'm convinced it is a Windows XP SP3 problem from searching on google and seeing other ppl on XP SP3 with same problem (but no working solution for myself). I'll try to be complete-listing all I've done.
    I had installed: Java SE Runtime Environment v6u14 for Windows Multi-language
    I had checked here it was working properly: http://www.java.com/en/download/manual.jsp
    I'm trying to run this jar file (soht-client-0.6.2.jar):
    http://prdownloads.sourceforge.net/telnetoverhttp/soht-java-client-0.6.2.zip?download
    http://www.ericdaugherty.com/dev/soht/javaclient.html < this is the information for the program.
    (yes the file can be executed and should open the program's window
    I wanted to post screenshot of it but friend that it's working for isn't here)
    _(Please find log of all cmds I did in this post here: http://pastebin.com/f792983df )_
    _I have extracted +'all' the files to: C:\062\+_ (I have tried using other directories, same problem)
    ++I then start/open/run/cmd+
    then I: cd C:\062\+
    then I try various commands - all+ of these do absolutely nothing- meaning no errors, no reply, no window opens, nothing except enters that directoy again:
    java -jar soht-client-0.6.2.jar
    java -jar -client soht-client-0.6.2.jar
    java -client -jar soht-client-0.6.2.jar
    java -jar soht-client-0.6.2.jar soht.properties
    soht-client-0.6.2.jar
    So I try this cmd: java soht-client-0.6.2.jar
    Reply:
    C:\062>java soht-client-0.6.2.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: soht-client-0/6/2/jar
    Caused by: java.lang.ClassNotFoundException: soht-client-0.6.2.jar
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: soht-client-0.6.2.jar. Program will exit.
    I try this cmd:
    java -jar soht-client-0.6.2.jar -client
    Reply:
    C:\062>java -jar soht-client-0.6.2.jar -client
    Unable to load configuration file: -client - java.io.FileNotFoundException: -cli
    ent (The system cannot find the file specified)
    SOHT Java Client
    The SOHT Java Client requires a properties file. Either start
    the application in the same directory as the soht.properties
    file, or specify the file name on the command line:
    java -jar soht-cleint-<version>.jar c:\soht.properties
    So then I do these cmds which produce the exact same error/reply just above; Unable to load..:
    j_ava -jar soht-client-0.6.2.jar -client soht.properties_
    java -jar soht-client-0.6.2.jar -client C:\062\soht.properties
    So then I copy soht.properties to C root and do:
    java -jar soht-client-0.6.2.jar -client C:\soht.properties <same error as above
    Then from other information I have read I right click on the .jar file, select open with Always open with:
    _"C:\Program Files\Java\jre6\bin\javaw.exe"_
    Try again.. same problem.
    Then I do cmd:
    _"C:\Program Files\Java\jre6\bin\javaw.exe" -jar "C:\062\soht-client-0.6.2.jar"_
    does nothing, retry the other commands same thing (either nothing or those same replies)
    Then I read (http://forums.sun.com/thread.jspa?threadID=5384879) someone had the same problem as I and they solved it by uninstalling all Java/reboot/ then install JDK 6 Update 14 with NetBeans 6.5.1 start NetBeans and then it worked for them.
    So I unistalled all Java, rebooted and gave the cmd another try (before re-installing), now a new error, of course:
    C:\062>java -jar soht-client-0.6.2.jar
    'java' is not recognized as an internal or external command, operable program or batch file.
    Then I install  Java SE and NetBeans Cobundle (JDK 6u14 and NB 6.5.1) Final Release/ reboot/ open Netbeans/
    go to test java page; all is good, run cmds again -and still nothing..
    C:\062>java -version
    java version "1.6.0_14"
    Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
    Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)
    I reassociate program with: C:\Program Files\Java\jre1.6.007\bin\javaw.exe_
    same thing.. nothing
    Thank you very much for your time :D_
    PS. My computer has been newly reformatted so needing another reformat I'm sure is not the solution.

    Thank you very much for your replies Taggert_77 & swmtgoet_x :D
    Taggert77_: I have never used NetBeans. I only installed it in the bundle as I had read on another post that somehow installing the bundle magically helped another user with the same problem (he didn't know why it worked after that either).
    Before XP SP3 I was able to execute .jar file through cmd prompt. Now I am not.
    This file is executable, grab it and you will see. Here is a screen shot (program in front is FlashFXP, behind is the cmd prompt and what should happen):http://www.freeimagehosting.net/uploads/53273b4ddf.jpg
    swmtgoetx_: I only did the other cmd's to try to make it spit out something, anything lol :D
    The proper cmd is simply: java -jar soht-client-0.6.2.jar
    I did give your cmd a try, and it produced nothing :( (just like the other correct cmds)
    java -client -jar soht-client-0.6.2.jar soht.properties
    Thank you again...the mystery remains
    PS. If you do a search for this you'll find an amazing amount of XP SP3 users with the same problem and no solution posted that I could find except one chap that did the unistall install order that I did above).

  • How Can I Print from my Microsoft Surface Running Windows 8 RT?

    How Can I Print from my Microsoft Surface Running Windows 8 RT?
    Most new wireless printers won’t have a problem printing from the Microsoft Surface with Windows 8 RT.  All you should have to do for these printers is tell them to print and they will.  Older wireless, Ethernet, and USB printers might not have an officially supported driver in Windows 8 RT, but there is a way to get the printers working.  There are different requirements depending on how the printer is being connected to the Surface. 
    Note:  All steps below are only for PhotoSmart, OfficeJet, DeskJet, and other HP Inkjet printers.  These steps are not for Laserjet printers or printers from other manufacturers.  These steps may not work for all Inkjet printers.  If these steps don’t work, try different drivers from the list until you find one that will work (you’ll understand what I mean once you follow the steps below).  If none of the drivers work, your printer will not work with the Surface.
    For networked printers (wireless or Ethernet), all you need is either the Surface keyboard, or an external USB keyboard to connect to the Surface.  This just makes anything you have to type easier to type.  You will also need to have the Surface and the printer connected to the same network. 
    Starting from the right edge, swipe your finger left on the Surface screen to bring up the Charms bar.
    Touch Search.
    Below the Search Box, touch Settings.
    In the search Box, type Devices and Printers.
    Touch Devices and Printers.
    Touch Add a Printer.
    Touch “My printer is not listed”.
    Select the TCP/IP option and touch Next.
    Enter the printer’s IP address and touch Next.  Note:  You can get this from the printer’s Network Configuration Page, or from your router’s DHCP list.
    The Surface will locate the printer and try to install it.  The install will fail and the Surface will ask you what you want to do, search the internet for the driver, or manually install the driver.  Choose to install the driver yourself.
    Touch “I want to choose from a list of drivers”.
    If no drivers appear in the list, make sure the box next to “Show compatible drivers” is not checked.
    Choose HP from the Manufacture list.
    Choose DeskJet PCL 3 Class Driver from the Drivers list.  If that driver doesn't work, try using the Photosmart PCL3 driver, or the Officejet PCL 3 driver.  (Thank you JonW for letting me know about these other alternates. )
    Touch Next.
    Touch Finish.
    Test printing.
    For USB connected printers, you will need a USB cord to attach the printer to the computer.
    Connect the printer to the computer via USB.
    Windows will try to find the drivers but will not be able to.
    Here Windows may ask you if you want to choose the driver to install.  If it does skip to step 14 below.
    Starting from the right edge, swipe your finger left on the Surface screen to bring up the Charms bar.
    Touch Search.
    Under the Search box, touch Settings.
    In the Search box, type Device Manager.
    Touch Device Manager.
    Touch View and select Show Hidden.
    Search for the printer in the Device Manager.  It should be under Other Devices with a yellow caution sign beside it.
    Select the printer from the list.
    Touch Action.
    Touch Update Driver, or Install whichever one it displays.
    The Surface will ask you what you want to do, search the internet for the driver, or manually install the driver.  Choose to install the driver yourself.
    Touch “I want to choose from a list of drivers”.
    If no drivers appear in the list, make sure the box next to “Show compatible drivers” is not checked.
    Choose HP from the Manufacture list.
    Choose DeskJet PCL 3 Class Driver from the Drivers list.  If that driver doesn't work, try using the Photosmart PCL3 driver, or the Officejet PCL 3 driver.  (Thank you JonW for letting me know about these other alternates. )
    Touch Next.
    Touch Finish.
    Test printing.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    This question was solved.
    View Solution.

    Hope this helps.  
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • How to call methods from within run()

    Seems like this must be a common question, but I cannot for the life of me, find the appropriate topic. So apologies ahead of time if this is a repeat.
    I have code like the following:
    public class MainClass implements Runnable {
    public static void main(String args[]) {
    Thread t = new Thread(new MainClass());
    t.start();
    public void run() {
    if (condition)
    doSomethingIntensive();
    else
    doSomethingElseIntensive();
    System.out.println("I want this to print ONLY AFTER the method call finishes, but I'm printed before either 'Intensive' method call completes.");
    private void doSomethingIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    private void doSomethingElseIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    }Question: how do you call methods from within run() and still have it be sequential execution? It seems that a method call within run() creates a new thread just for the method. BUT, this isn't true, because the Thread.currentThread().getName() names are the same instead run() and the "intensive" methods. So, it's not like I can pause one until the method completes because they're the same thread! (I've tried this.)
    So, moral of the story, is there no breaking down a thread's execution into methods? Does all your thread code have to be within the run() method, even if it's 1000 lines? Seems like this wouldn't be the case, but can't get it to work otherwise.
    Thanks all!!!

    I (think I) understand the basics.. what I'm confused
    about is whether the methods are synced on the class
    type or a class instance?The short answer is; the instance for non-static methods, and the class for static methods, although it would be more accurate to say against the instance of the Class for static methods.
    The locking associated with the "sychronized" keyword is all based around an entity called a "monitor". Whenever a thread wants to enter a synchronized method or block, if it doesn't already "own" the monitor, it will try to take it. If the monitor is owned by another thread, then the current thread will block until the other thread releases the monitor. Once the synchronized block is complete, the monitor is released by the thread that owns it.
    So your question boils down to; where does this monitor come from? Every instance of every Object has a monitor associated with it, and any synchronized method or synchonized block is going to take the monitor associated with the instance. The following:
      synchronized void myMethod() {...is equivalent to:
      void myMethod() {
        synchronized(this) {
      ...Keep in mind, though, that every Class has an instance too. You can call "this.getClass()" to get that instance, or you can get the instance for a specific class, say String, with "String.class". Whenever you declare a static method as synchronized, or put a synchronized block inside a static method, the monitor taken will be the one associated with the instance of the class in which the method was declared. In other words this:
      public class Foo {
        synchronized static void myMethod() {...is equivalent to:
      public class Foo{
        static void myMethod() {
          synchronized(Foo.class) {...The problem here is that the instance of the Foo class is being locked. If we declare a subclass of Foo, and then declare a synchronized static method in the subclass, it will lock on the subclass and not on Foo. This is OK, but you have to be aware of it. If you try to declare a static resource of some sort inside Foo, it's best to make it private instead of protected, because subclasses can't really lock on the parent class (well, at least, not without doing something ugly like "synchronized(Foo.class)", which isn't terribly maintainable).
    Doing something like "synchronized(this.getClass())" is a really bad idea. Each subclass is going to take a different monitor, so you can have as many threads in your synchronized block as you have subclasses, and I can't think of a time I'd want that.
    There's also another, equivalent aproach you can take, if this makes more sense to you:
      static final Object lock = new Object();
      void myMethod() {
        synchronized(lock) {
          // Stuff in here is synchronized against the lock's monitor
      }This will take the monitor of the instance referenced by "lock". Since lock is a static variable, only one thread at a time will be able to get into myMethod(), even if the threads are calling into different instances.

  • How to know which stock type updated within movement type

    Expert,
    I need to know which stock type updated within each movement type.
    I'm using two different system (SAP and Oracle) which is in each system updating stock. So i need to do stock calculation manually from that two systems.
    I'm planning to imported material document data (from MKPF & MSEG) to Oracle and then combine the stock calculation.
    And then i'm facing this :
    Ilustration :
    MIGO transaction - Goods Receipt PO - Stock Type Unrest
    in MSEG field BWART : 101, SHKZG : S, INSMK : blank --> no problem
    MIGO transaction - Goods Receipt PO - change Stock Type to Quality Inspection
    in MSEG field BWART : 101, SHKZG : S, INSMK : 2 --> no problem
    MIGO transaction - Transfer Posting - movement type 322 (reversal QI to Unrest.)
    in MSEG field BWART : 322, SHKZG : S, INSMK : blank --> problem
    in MSEG field BWART : 322, SHKZG : H, INSMK : blank --> problem
    I have a problem that in MKPF & MSEG there is no indicator which stock type updated within movement type (BWART) 322.
    How to know that first row will be updating stock QI and second row will be updating stock Unrest.??
    I've already checked to OMJJ, SM30-V_156SC_VC, table T156... and still having no clue.
    Or is it just a 'hardcode' ? And i need to do 'hardcode' too in Oracle system?
    Thank you so much.

    The stock type indicator doesn't update for the movement type 322 in table MSEG.
    At the time of transferring, you do not have to enter the stock type for movement type 322.
    I can give you one clue, check can it fulfill your requirement.
    You have two line items for movement type 322 in MSEG table, There are a field XAUTO will be updated as X for credit entry.
    You can assume, the line item (without value for XAUTO) is for less from QI stock and the line item (with value X for XAUTO) is for add to unrestricted stock.

  • I can't find the qtmedia command

    I am new to using Mac OS Server, but I have been tasked with setting up a Quick Time Streaming Server on a Mac Mini Server running Mac OS X Server 10.6. During my reading of the QTSS Setup Manual it refered to the command qtmedia to manulate quick time files. I wanted to explorer and possible use this tool to help me get files ready for streaming, but I can't find the command to run it.
    Where is this file located and how do I access it? Thanks in advanced for the help. -Dave

    The Quicktime Streaming Server Manual refers to the command, but all it says is to run it to find out more. I am dissapointed that the command is missing and that I can't find out anything more about it. My guess is that it is a legacy command that was dropped awhile back and the documentation was never updated. I would like a tool that would streamline the creation of compatable media for streaming, so I hope apple comes up with replacement or addition documentation or tools, but I am not holding my breath. -Dave

  • Why the following command cannot run successfully?

    Why the following command cannot run successfully?
    SQL> exec DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE;
    BEGIN DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to
    'EVOLVE_SQL_PLAN_BASELINE'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    Here is an example how you can invoke it:
    SET SERVEROUTPUT ON
    SET LONG 10000
    DECLARE
        report clob;
    BEGIN
        report := DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE(
                      sql_handle => 'SYS_SQL_593bc74fca8e6738');
        DBMS_OUTPUT.PUT_LINE(report);
    END;
    /With kind regards
    Krystian Zieja
    http://www.projectenvision.com

Maybe you are looking for

  • Problem with updating

    When I hook up my ipod to my computer it says "Songs on the ipod cannot be updated because all of the playlists selected for updating no longer exist" It also deleted everything from the ipod what do I do?

  • FileReferenceList[i]. load(); how to?

    So I am trying to retrieve the image ByteArray after select event fires for individual fileReferences within fileReferenceList and can't seem to get anywhere....no problem with single fileReference. If you call load() on individual postion in array n

  • Burning issues

    Hey! Sorry if this question has already been addressed but I am new to this forum. I am using a powerbook G4. I have iMovie HD 5.0.2 and iDVD 5.0.1 I have created an iMovie that is just a little over an hour long. It is just photos set at 3 sec time

  • Release date colum

    Is the release date a function of Itunes or is it in the ID3 tag somewhere? I have several Podcasts (.mp3format) that I would like to import into Itunes, and they are organized by "release date". How do I add this to my file ID3 tags

  • Itunes downloads err time out or network reset...

    Dear Sir, I have 15 available downloads in my Id account. However, all of them can not be downloaded seccuessfully. and it feed back err 408 or err 3253. There were problems downloading some purchased items. For more information on the items that cou