How do I cancel a rman job from command line?

Hello to all,
I am having some problems with a rman job that is running via OEM-GC. I get an error message regading the SPFILE and control file being locked due to another job accessing it. I found this in the RMAN ref guide:
To determine which job is holding the conflicting enqueue:
1. After you see the first RMAN-08512: waiting for snapshot controlfile enqueue message, start a new SQL*Plus session on the target database:
% sqlplus sys/sys_pwd@prod1
2. Execute the following query to determine which job is causing the wait:
SELECT s.sid, username AS "User", program, module, action, logon_time "Logon", l.*
FROM v$session s, v$enqueue_lock l
WHERE l.sid = s.sid and l.type = 'CF' AND l.id1 = 0 and l.id2 = 2;
You should see output similar to the following (the output in this example has been truncated):
SID User Program Module Action Logon
9 SYS rman@h13 (TNS V1-V3) backup full datafile: c1 0000210 STARTED 21-JUN-99
Solution
After you have determined which job is creating the enqueue, you can do one of the following:
* Wait until the job creating the enqueue completes
* Cancel the current job and restart it once the job creating the enqueue completes
* Cancel the job creating the enqueue
So with this in mind; How do I cancel the job from RMAN command line!!!
This is my output by the way:
SID User PROGRAM MODULE ACTION Logon ADDR KADDR SID TY ID1 ID2 LMODE REQUEST CTIME BLOCK
475 SYS [email protected] (TNS V1-V3) backup full datafile 0000018 STARTED16 23-APR-09 00000023EB8D488 000000023EB8D4A8
475 CF 0 2 4 0 113123 0
Any help will be gratefully received
Thanks to all that reply

I used the following to get the spid and killed the process on the OS.
set linesize 120
col sid for 999
col username for a14 trunc
col osuser for a18 trunc
col spid for 99990
col logon_time for a12
col status for a9 trunc
col machine for a26 trunc
col running for a10 trunc
select s.sid
, s.username
, s.osuser
, s.machine
, s.status
, p.spid spid
, to_char( logon_time, 'Mon dd@hh24:mi') logon_time
, rtrim (s.module)||decode( nvl(length( rtrim(s.module)),0),0,'',' ')|| upper(s.program) running
from v$session s
, v$process p
where ( p.addr = s.paddr ) and s.type!='BACKGROUND'
and upper(s.program) not like '%CJQ0%' and s.program is not null and s.username is not null
order by s.sid;

Similar Messages

  • How to run form in the background from command line

    please can anybody tell me to
    how to run form in the background from command line
    vishal

    Ummm....Oracle Forms is a foreground runtime kind of thing. What you want is a database procedure (or an OS utility - it depends on what sort of processing you want to do in the background).
    Cheers, APC

  • How do I cancel a print job from my computer to my HP Photosmart 7510. Touchscreen is unavailable.

    HP Photosmart 7510 All-in-One CQ877a Model C3112; Operating system Windows Vista 64-bit.
    Can't find how to easily cancel a print job. The touch screen is unavailable during the printing process (just shows the HP icon spinning around during the print process). There isn't a "cancel" button or touch area to cancel. We're wasting ink and paper by not being able to cancel jobs easily. Read the 24-page manual and it doesn't mention it. Looked on line for an answer, can't seem to locate one. Can always go to Start, Printers, and select the printer and then cancel from within there, but by then, the job is finished.

    There should be a cancel button (X) on the printer. Check out the pic below taken from page 7 of the User manual for your printer:
    http://goo.gl/mW7Fy
    Alternately, instead of going the Start button route, did you check out the Final tip at the bottom of the article?
    "Final Tip (Shortcut)
    Before using the method above to open the print queue, look for the printer icon in the notification area. If you see it, double-click it to bring up the print queue. "
    If I have helped in any way, just click the Kudos star on the left. Also, if your issue has been resolved, don't forget to select Accept as Solution

  • How to delete more than one workbook from command line

    Hi, I'd like to delete more than one workbook from command line:
    The following syntax, it doesn't work....but I followed the manual instructions:
    dis51adm.exe /connect eul/eul@uatdb /delete /workbook "ALE_TEST_1, ALE_TEST_2" /eul eul /log D:\Ale\delete.log
    where:
    eul/eul@uatdb: is the db’s schema/user where the EUL is installed;
    /delete "ALE_TEST_1, ALE_TEST_2": is the command to delete the workbooks, specified inside the “” (with the relative path)
    /log D:\Ale\delete.log: is the command to write a log’s file named “delete.log” to track the action     
    The log file says:
    22/4/2008 4:00:26 μμ
    dis51adm.exe /connect /delete /workbook ALE_TEST_1, ALE_TEST_2 /eul eul /log D:\Ale\delete.log
    Document ALE_TEST_1, ALE_TEST_2 not found in EUL.
    Internal EUL Error: ObjectNotFound - Can't find EUL element
    There are 0 eul elements to be deleted.
    Completed deleting eul elements.
    22/4/2008 4:00:29 μμ
    Anyone can tell me how is the right syntax ?
    Thanks in advance
    Alex

    Hi Rod
    I was coming to that conclusion myself but wanted to wait until the other avenues had been exhausted first - aka making sure of the workbook names.
    I checked through all of the command line documentation and read nothing which clearly indicated that only one workbook could be processed at a time, other than the fact that the syntax says workbook and not workbooks, which could be a big clue.
    I think you are right though in that it has to be one at a time, which would be a pain.
    Best wishes
    Michael

  • How to restore or backup Apex application from Command line ? URGENT

    We have Oracle apex 4.1 installed in Oracle 11g R2 database (windows 64-bit) 2008 R2
    For some reason our database dictionary objects are corrupted.
    We wanted to backup our Apex applications in some workspaces ASAP.
    We are not able to access apex from http://localhost:7777/pls/apex/htmldb_login
    We have an underlying database schema export (expdp).
    1) Is there a way to export or backup the apex application without logging into the apex URL ? if yes how ?
    2) Does Oracle has any of its own native tool to backup and restore from command line ?
    Thanks in advance

    My (MS Windows) experience, if I may; perhaps you'll find something useful.
    You'll find the README.TXT file in /apex/utilities directory. Read it.
    In order to use APEXExport, you need JDK version 1.5 or higher. Check your version by typing (and viewing the result):
    C:\>java –version
    java version "1.6.0_06"
    Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
    Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)Its directory should be part of the PATH environment variable: on my computer, directory name isC:\Program Files\Java\jre1.6.0_06\binFurthermore, Oracle JDBC class libraries must be part of the CLASSPATH environment variable. Check whether it exists (in Control Panel - System - Advanced - Environment Variables). For my 10gXE, it is here:C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jarI couldn't make it work; didn't know that ".\" directory must be entered into CLASSPATH as well (found that information in Arie Geller's book). Therefore, my final CLASSPATH version is:.\;C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jarOK, setup is done. Now, go to your /apex/utilities directory and, from the command prompt, run (mind the upper case!)java oracle.apex.APEXExportwhich will show a short help.
    I chose to export the whole workspace. In order to do that, I need the workspace ID (got it from Apex's SQL Workshop; that might be a problem as you can't get there, can you? I can't tell how to find that information apart from SQL Workshop, but I'm pretty sure someone, who is much more experienced than me, will know it). OK, here's how you find it:select v('WORKSPACE_ID') from dual;Finally, here's the final step - export:C:\apex\utilities>java oracle.apex.APEXExport -db localhost:1521:xe -user scott -password tiger -workspaceid 1038408092496568The result are fxxx.sql files (where "xxx" represents application number).
    I hope you'll manage to export your applications; basically, nothing special here (except that ".\" directory in the CLASSPATH variable).
    Best of luck!

  • How to shutdown startup 11g OEM/GRID from Command Line

    Please describe how to shutdown and startup OEM/GRID 11g from command line and how to startup all of its services. Thanks in advance!

    After a some tests i found this method...
    SHUTDOWN
    srvctl stop listener -l LISTENER_NAME
    srvctl stop database -d DBNAME
    srvctl stop diskgroup -g VGGROUP
    srvctl stop asm
    crsctl stop has
    STARTUP
    crsctl start has
    srvctl start asm
    srvctl start database -d DBNAME
    Pls try before to use it and i hope it isn't late...

  • How to programatically start j2ee application/service  from command line

    Hi all
    We have developed a j2ee application and deployed  the .ear file on SAP J2EE (Netweaver'04) engine.
    We are able to successfully start/stop the application from Visual administrator -> Deploy -> Service -> Start application (or) Stop application.
    We need to start and stop the same application programatically or via command line instead of doing it from VA.  Any thoughts from anyone on how to do it ?
    Thanks in advance.
    Regards
    Nagesh

    The cammands are there in the respective folders, these are just the batch files / .sh scripts that can be run from command line.
    /usr/sap/<instance>JC<client>/j2ee/admin
    go.sh and go.bat can run either on command line
    j2ee/configtool
    configtool.sh / configtool.bat  
    similarly for other smaller utilities. For the main server, the related commands are in exe directory of sapmnt
    /sapmnt/<instance>/exe
    Regards,
    Nitin
    Edited by: Nitin Mahajan on Jun 16, 2009 11:16 PM

  • Cancel all print jobs via command line

    Hi there,
    I'm trying to write a logout hook that cancels all existing print jobs on my client machines.
    From the man pages of lprm I believe it should be:
    lprm -
    But when I run this as root I get the following returned:
    lprm: The printer-uri attribute is required!
    I used to run this using Apple Remote Desktop under 10.4 and it worked fine, it doesn't work now either remotely or as admin on the client itself.
    Have things changed under Leopard?

    Hi
    +*". . . Have things changed under Leopard? . . ."*+
    Absolutely. Did you have any doubts? For example apropos has disappeared yet the man page is still there. Its not the only thing that has disappeared. Clearly nicl had to go because of NetInfo's demise. These are just some of the differences I've found. No doubt there will be others?
    You could look at the man pages for cancel and lp. They appear to be the same thing. Might be up to what you want?
    Tony

  • Parental Control, how can I know the remaining time (from command line)

    Hello,
    I did setup Parental Control on my kid's iMac.
    I configured a "Weekday Time Limit". On their desktop, they can get the information about the remaining time by clicking simply on the clock.
    I would like to know how I can get this information while I am connected via ssh
    Thank you in advance.

    Apparently all the Parental Controls preferences files are stored here:
    /Library » Application Support » Apple » ParentalControls » Users » username
    I imagine somewhere in there it keeps a record of the remaining time etc.  You'll need root authority to access Users onwards.

  • Help wanted! How can generate forms in batch mode from command line?

    Hi Guys!
    I saw few years ago one utility wich can do this. We have application in designer repository. We want to regenerate all forms but now we must use designer gui for that.
    Could anybody knew any utility tools for make this generation easier and quicker?
    It would be nice to have this tool. We want to bye if anybody sell it?

    See if the following Oracle Designer Help topics are relevant:
    'About batch generation and design capture'
    'About the batch processing wizards'
    'Performing batch processing'

  • How to run an executable from command-line

    I'm learning how to use the Terminal and I got stuck in a silly thing (I suppose it is). How can I run an executable file from command-line in Terminal?
    For example: I have a file named "Hello" in the folder /sample. If I use the ls command (ls sample), I can see the file Hello. Then I move to the directory (cd /sample) and try to run the file Hello (typing "Hello") but I got "command not found" message.
    If I drag the Hello file from Finder to Terminal and hit Return, it runs perfectly. And if I type the full path to the file (even if I'm already inside its directory), it also runs.
    So, my doubt is if there is any command to run an executable from command-line.
    Thanks

    KJK555 wrote:
    Hi VK:
    Can you enlighten me on why it's neccessary to do the "./" thingy in OS X when in unix/linux
    I never had to resort to doing that?
    Kj
    I took the trouble of reading *man bash* and it explains the issue. to add the current directory to PATH you need to add an empty path to PATH like this
    PATH=$PATH::
    you can add it to ~/.bash_profile so that it's executed automatically when you start bash. I suspect the linux system you are talking about had this set up by default or had it added to PATH in /etc/profile which defines PATH globally.

  • How to run a Servlet Project's .war from Command Line??

    Hi there,,
    Can anybody help me with how to run a Servlet Project's .war file from command line??In fact I tried it using the following command,
    java -jar TestServProj.war
    but I get the following error,,,
    Failed to load Main-Class manifest attribute
    I can't find the project''s manifest file in the META-INF folder.
    Moreover,plz help me about know how to execute a single servlet class from command line...
    Thanks in advance...

    you cant run a .war file from command prompt
    .war files should be executed in a server
    how to execute a single servlet class
    do you mean to run the servlet or compile the servlet?
    any way you need a server and if you are a beginner Apache tocat will be the best server to start with you can down load it from
    http://tomcat.apache.org/

  • How do I cancel a printing job half way through?

    How do I cancel a printing job half way through?  hp psc 1310 series
    This question was solved.
    View Solution.

    Press the "Cancel" button on the printer.  It is the button on the upper left, just below the power button.  See page 2 of the manual here.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • How do you cancel a erase pending from icloud to an ipod5?

    So i lost my ipod5 a month ago, and waited 2 weeks and then decided to send a erase. Now i found it at my friends house, and its still offline. I haven't on it yet because i dont want the stuff to be erase. i havent backed it up in a long time and i dont want to lose anything. how do you cancel a erase pending from icloud to an ipod5? PLEASE HELP

    Hello adv1234,
    Welcome to the Apple Support Communities!
    I realize that you have found your iPod that you previously thought to be lost and had initiated an erase from iCloud. Once set to erase, the process cannot stop, but you can restore from any previous iCloud or iTunes backups that you may have for the device.
    iCloud: Erase your device
    If you erase then find your iOS device, you can restore the information on the device using iCloud Backup (if backup was turned on before you erased it) or iTunes. For more information, see iCloud storage and backup overview, or the Safety, Handling & Support section of the iOS 8 user guide for your iPhone, iPad, or iPod touch. If your device has iOS 7 or earlier, get the user guide from the Apple Support website.
    Best regards,
    Joe

  • How could i cancel a purshed app from itune store and stop payment from my crediet card

    How could i cancell a purshed app from itune store and stop payment from my vredit card

    Contact iTunes Store support staff through the report a problem links in your account history or,
    iTunes Customer Service Contact - http://www.apple.com/support/itunes/contact.html - Apple states all sales are final, but you can ask.

Maybe you are looking for

  • Font Book problem

    When I find a font I think I'll use someday I save it as link source. I have been noticing when I install fonts,the Font Book install window tells me not installed (see attachment, bottom left) I see it in the book,I even use it , no problem. But why

  • Samsung 8000 55 inch

    Considering this tv for our home.  Unit will be in somewhat bright room.  Is this the appropriate unit or should we consider others?  Also want to know if this tv displays standard def channels well.  Read that std def was blurry.  Finally, opinion o

  • Delivery Related Query

    Dear Sap Gurus, I want to create an outbound delivery upto 5 days after creating sales order, after 5 days system should not allow the creation of delivery (error message).....is this function is available in SAP, if yes thn how to configure the sett

  • Can i update Mac OS X v10.6.8Build  10K549 i don't have icloud in my system preferences

    can i update Mac OS X v10.6.8 Build 10K549 with this version I don't have icloud in my system preferences

  • TS1425 My screen is frozen on the ok to disconnect and wont respond to anything I do.

    My IPOD is stuck on the OK to disconnect screen and unresponsive to any other imputs.