Need help on submitting ALTER SYSTEM command.

I have a report of a list of active xml threads from our EM repository, which is pulled from 4 RAC instances. I have a region with this statement:
select a.inst_id, a.sid,a.serial#,b.instance_name, b.host_name, a.machine, a.status
from gv$session@emrepo a, gv$instance@emrepo b
where a.action like 'XML%'
and a.inst_id = b.instance_number
order by a.inst_id
The result shows me what I want. Now I want to be able to select the XML threads that I want to kill with the alter system kill command such as:
alter system kill session 'sid, serial#'; (where sid and serial# is pulled from above).
Question is how can I do this, plus need to figure out to make sure I am running this against the right RAC instance. Any help is appreciated. Thanks.
Victor

You can link to a confirmation page and set 2 items on that page SID and SERIAL# through the URL. Then create a process on the 2nd page that fires "On Submit" with the following code:execute immediate 'alter system disconnect session '||''''||:P2_SID||','||:P2_SERIAL||''' immediate';Create a button on the 2nd page to submit the page (fire your process when request = the button request).
As far as how this works with RAC, you're on your own on that one ;)
Thanks,
Tyler

Similar Messages

  • Log 'alter system ' commands

    Hi
    I am looking for a way to track alter system / alter database commands.
    Database triggers are not logging them : I do have a database trigger for DDLs tracking that works great but alter system commands are not captured by it . also trigger 'alter alter on database ' - do not log alter system or alter database
    Is there a way for me to force a command to appear in the alert log ?
    Or any other way you can think of ?
    thanks
    Orna

    Orna,
    YOu can create a database level trigger to capture ALTER statement and insert them into a user defined table. This is just one example you can define trigger at schema level as well.
    CREATE OR REPLACE TRIGGER usiuser.myaltertrg
       BEFORE ALTER
       ON DATABASE
    DECLARE
       tmpvar   NUMBER;
    BEGIN
       tmpvar   := 0;
    -- your code to insert alter statement in user defined table.
    EXCEPTION
       WHEN OTHERS
       THEN
          -- Consider logging the error and then re-raise
          RAISE;
    END myaltertrg;Regards
    Edited by: OrionNet on Dec 29, 2008 1:30 PM

  • Need help with complex column creation command

    Hello, all
    I need help with a complex column creation command and SQL anywhere help is not sufficient for it.
    Here is the situation:
    I need to write a generic DDL "alter table" command, which can add/modify columns without knowing in advance if they already exist in the destination table.
    Is there a command, which looks like:
    alter table "table1" add (on existing modify) column1 <datatype> <default> ?
    Thank you,
    Arcady

    Hi.
    I don't think this is supported in alter table command. But you can code that inside an if statement which queries systables & syscolumns. Your code should be something like that:
    if (select count(*) from sysobjects, syscolumns where sysobjects.id = syscolumns.id and sysobjects.name = 'some_table' and syscolumns.name = 'some_column') < 1
    begin
        alter table some_table add some_column numeric(12) not null
    end
    This is an example..
    Andreas.

  • Alter System command

    Hi all,
    I am just bit confused in the following two commands
    SQL> ALTER SYSTEM SWITCH LOGFILE;
    SQL> ALTER SYSTEM CHECKPOINT;
    So what is the main difference between the first and second cmds?
    Why seniors/books suggest to use first command instead of the second one ?

    372211, if you run manual hot backups then at the conclusion of copying the files for the last tablespace in your hot backup and issueing the "end backup" command you generally issue the ALTER SYSTEM SWITCH LOGFILE command to force all redo necessary to bring the backups to a consistent point in time during forward recovery.
    The archived redo logs and backup copies just made can be duplicated for sending off-site and provide a consistet image in the event of a diaster that results in the loss of archieved redo logs made after the backup.
    Also, to add to what was said about checkpoints - The header blocks for the database files must also be updated with the checkpoint information.
    HTH -- Mark D Powell --

  • Need help finding a audio system ( stressed)

    I have cd with over 100 songs , and I need help finding  a boombox  that will play the CD anyone have any idea, I got no help from the store.

    here are the  specifications  for Philips eXpanium eXp 2461 , if somone can help me find a boomboox with simular specifications it would very helpful
    Philips eXpanium eXp 2461 - CD / MP3 player
    CD System
    CD system type CD / MP3 player
    Media load type Top-load
    Playback modes Repeat all,
    Resume play,
    One track repeat
    CD system response bandwidth -19980.0 Hz
    Signal-to-noise ratio 85.0 dB
    CD shockproof memory 45 seconds
    MP3 shockproof memory 100 seconds
    CD-R compatible Yes
    CD-RW compatible Yes
    CD track programming Yes (50 tracks)
    Digital audio standards supported MP3
    Supported bit rate 32 - 320Kbps
    General
    Product type CD / MP3 player
    Weight 8.0 oz
    Carrying Case
    Case type None
    Built-in Display
    Audio system built-in display LCD
    Audio Features
    Sound effects Digital Dynamic Bass Boost (Digital DBB)
    Sound output mode Stereo
    Additional features

  • Please help how to run System commands and batch files thru java program

    Sir,
    I want execute OS commands like dir,cls..etc and batch files,.exe filesthru java program.
    I have tried it sofar thru Runtime.getRuntime().exec("execute.bat");
    but it is not working.anybody knows about how to run the system commands thru java please give me the code.
    thank you,
    regards,
    j.mouli

    I've seen other posts with this questions, and answers. Unfortunately I didn't pay much attention. But the basic idea is to exec command.com and pass the specifc batch or command as an argument.

  • COMMENTS in ALTER SYSTEM command

    I ran the query
    SQL>ALTER SYSTEM SET sga_target=216M COMMENT='Test';
    which view/table will describe the changes of sga_target and corresponding comment.
    I searched in v$system_parameter and v$parameter, but the value did not get updated.

    I did query on V$PARAMETER, V$SYSTEM_PARAMETER, V$SYSTEM_PARAMETER2 and found that the value of sga_target (148M) is updated in all the views, whereas the comment attribute is updated only in V$PARAMETER view. Also I disconnected from SQL Plus and logged in again (new session), the comment attribute has been reset to old value. As long as the value is updated in all the views, the comment attribute should also be updated in all the views.

  • Need help for Onyx operating system

    Hello there
    I need help
    I using 9700 series and I want to upgrade my OS, but the problem is my carrier is not listed on this page http://na.blackberry.com/eng/support/downloads/download_sites.jsp
    My carrier
    three Indonesia
    my device vendor id is 352
    can you point me out where is the OS for that vendor id from this list http://na.blackberry.com/eng/support/downloads/download_sites.jsp
    thanks in advance
    ~Work like you don't need the money~
    ~Love like you've never been hurt~
    ~Dance like nobody is looking~

    sjafri wrote:
    the problem is that my carrier said that, if I using non official OS from them, my warranty will be void, that's why I asked where my vendor link, and I hope I can get answer at this forum.
    Hello,
    The above highlighted statement is false -- your warranty is not void if you use another carriers OS. However, if your carrier so chooses, then can indeed refuse you any support (including warranty support since it is they who service the warranty) until you are on their approved OS level. All of which means that they must actually supply you with an approved (by them) OS to use...it is their responsibility to do so.
    So, your choices are, as far as I can see:
    1) Wait until you receive an answer from your carrier as to the approved OS you can use along with how to obtain it.
    2) Use another carriers OS and, if anything goes wrong, fall back to your carriers approved OS before seeking more support from them.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • I need help with my operating system

    Okay, little bit of background:
    I bought the iMac second hand from a family friend who we no longer have contact with, the operating system etc was already installed.
    The disk drive on the mac is broke (I dont have the disks anyway, so it would be no use)
    I never purchased the operating system, like I said, it was pre-loaded.
    A few programmes weren't running correctly and the computer was just generally running slowly, so I decided to just restore the system as there was no important data on it and it would run faster in the end, and I figured the programmes would run properly again once restored.
    Anyway, I unknowingly deleted the operating system in the process of the restore (I thought it would only delete personal data like it does on my windows PC)
    I have no restore disk (a broken disk drive anyway), my apple ID was not used to buy the operating system, so therefore it cant be used to restore the operating system, I also never backed up the harddrive externally so it cant be reinstalled from that.
    My problem: I have no operating system and no way of recovering it. I read about Mavericks and because its free, I decided to try and download it, but with no operating system, the mac can only run 'Safari' and wont save things I try to download to the harddrive (it just says theres no space and the download doesnt happen). I also tried to access the App Store from Safari to try to download OS X lion on my apple ID, but once again, when using Safari on a mac without an operating system, it is very restrictive and I cant access the download page.
    I have no idea what to do and live miles away from the nearest apple store.
    Thanks in advance for any help provided by anyone.
    Jordan.
    Additional information:
    Its a 2007 iMac which was running OS X Lion 10.7.4 (I think, it was definitely Lion though).
    Serial No. is W8*******X85
    <Edited by Host>

    Ah. Well, then you have an itty-bitty problem. You need to backup your files to start with. You will need your retail Snow Leopard installer DVD which your friend should have provided to you. If he did not then ask him to bring it to you. It belongs to you along with the original distribution discs that came with computer when it was new.
    Do the following once you have the Snow Leopard DVD:
    Clean Install of Snow Leopard
    Be sure to make a backup first because the following procedure will erase
    the drive and everything on it.
         1. Boot the computer using the Snow Leopard Installer Disc or the Disc 1 that came
             with your computer.  Insert the disc into the optical drive and restart the computer.
             After the chime press and hold down the  "C" key.  Release the key when you see
             a small spinning gear appear below the dark gray Apple logo.
         2. After the installer loads select your language and click on the Continue
             button. When the menu bar appears select Disk Utility from the Utilities menu.
             After DU loads select the hard drive entry from the left side list (mfgr.'s ID and drive
             size.)  Click on the Partition tab in the DU main window.  Set the number of
             partitions to one (1) from the Partitions drop down menu, click on Options button
             and select GUID, click on OK, then set the format type to MacOS Extended
             (Journaled, if supported), then click on the Apply button.
         3. When the formatting has completed quit DU and return to the installer.  Proceed
             with the OS X installation and follow the directions included with the installer.
         4. When the installation has completed your computer will Restart into the Setup
             Assistant. Be sure you configure your initial admin account with the exact same
             username and password that you used on your old drive. After you finish Setup
             Assistant will complete the installation after which you will be running a fresh
             install of OS X.  You can now begin the update process by opening Software
             Update and installing all recommended updates to bring your installation current.
    Download and install Mac OS X 10.6.8 Update Combo v1.1.
    Upgrading to Lion
    You can purchase Lion at the Online Apple Store. The cost is $19.99 (as it was before) plus tax.  It's a download. You will get an email containing a redemption code that you then use at the Mac App Store to download Lion. Save a copy of that installer to your Downloads folder because the installer deletes itself at the end of the installation.
         Lion System Requirements
           1. Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7,
               or Xeon processor
           2. 2GB of memory
           3. OS X v10.6.6 or later (v10.6.8 recommended)
           4. 7GB of available space
           5. Some features require an Apple ID; terms apply.
    After you sign into your App Store account with your Apple ID click on the Redeem option under Quick Links to download your copy of Lion.
    As an aside to this: All actual 2007 iMacs are able to run Mavericks. So rather than buying Lion you may prefer to upgrade to Mavericks which is Free.

  • I need help with doing a system wipe/re-install

    I want to completely wipe my Macbook Pro (running Mountain Lion) and do a OS reinstall so that it is as if it was just taken out of the box. I have already moved files I want to keep over to an external. My question is this, do I need to do anything in regards to Microsoft Office or iTunes? Do I need to deauthorize my iTunes or my Microsoft Office activation code? Also, how do I even go about doing this system reset?

    Follow these instructions step by step to prepare a Mac for sale:
    Step One - Back up your data:
           A. If you have any Virtual PCs shut them down. They cannot be in their "fast saved" state. They must be shut down from inside Windows.
           B. Clone to an external drive using using Carbon Copy Cloner.
              1. Open Carbon Copy Cloner.
              2. Select the Source volume from the Select a source drop down menu on the left side.
              3. Select the Destination volume from the Select a destination drop down menu on the right
                  side.
              4. Click on the Clone button. If you are prompted about creating a clone of the Recovery HD be
                  sure to opt for that.
                   Destination means a freshly erased external backup drive. Source means the internal
                   startup drive.
    Step Two - Prepare the machine for the new buyer:
              1. De-authorize the computer in iTunes! De-authorize both iTunes and Audible accounts.
              2, Remove any Open Firmware passwords or Firmware passwords.
              3. Turn the brightness full up and volume nearly so.
              4. Turn off File Vault, if enabled.
              5. Disable iCloud, if enabled: See.What to do with iCloud before selling your computer
    Step Three - Install a fresh OS:
         A. Snow Leopard and earlier versions of OS X
              1. Insert the original OS X install CD/DVD that came with your computer.
              2. Restart the computer while holding down the C key to boot from the CD/DVD.
              3. Select Disk Utility from the Utilities menu; repartition and reformat the internal hard drive.
                  Optionally, click on the Security button and set the Zero Data option to one-pass.
              4. Install OS X.
              5. Upon completion DO NOT restart the computer.
              6. Shutdown the computer.
         B. Lion and Mountain Lion (if pre-installed on the computer at purchase*)
             Note: You will need an active Internet connection. I suggest using Ethernet if possible because
                       it is three times faster than wireless.
              1. Restart the computer while holding down the COMMAND and R keys until the Mac OS X
                  Utilities window appears.
              2. Select Disk Utility from the Mac OS X Utilities window and click on the Continue button.
              3. After DU loads select your startup volume (usually Macintosh HD) from the left side list. Click
                  on the Erase tab in the DU main window.
              4. Set the format type to Mac OS Extended (Journaled.) Optionally, click on the Security button
                  and set the Zero Data option to one-pass.
              5. Click on the Erase button and wait until the process has completed.
              6. Quit DU and return to the Mac OS X Utilities window.
              7. Select Reinstall Lion/Mountain Lion and click on the Install button.
              8. Upon completion shutdown the computer.
    *If your computer came with Lion or Mountain Lion pre-installed then you are entitled to transfer your license once. If you purchased Lion or Mountain Lion from the App Store then you cannot transfer your license to another party. In the case of the latter you should install the original version of OS X that came with your computer. You need to repartition the hard drive as well as reformat it; this will assure that the Recovery HD partition is removed. See Step Three above. You may verify these requirements by reviewing your OS X Software License.

  • Need help to convert GUI to command line

    Hi Guys ,
    Need some help with respect to scripting
    I am working on a Unix platform(sun), where in I am asked to invoke table menu via command line which has lots of option like STATUS, REPORT ….
    It goes like this
    After login in to unix box , I am entering “yct”
    It brings me a table with lot of option , I need to scroll down and then select “Report “ which display the report
    Is it possible to for me to convert this entire action in to a single unix commad or can i call it via script. 

    Actually WIndows NT has always run Unix (Posix) which was the original Linux before Linux.  Posix used to come on the CD/Disk set.  MS eventually dropped Posix from the box.  Now we just load almost any version Linux into a VM.
    I am surprised at how many new young users think that Unix is a Microsoft product. THey think theonly competitor is Apple so Unix must be Microsoft. Funny thing that Mac is Unix. OS/X was named for Jobs advanced version of Unix called "neXt" or "X".
    The board bought it but wouldn't allow the name.
    The problem that jobs solved with Unix was getting rid of X-Windows in favor of the Mac Windows API on Unix.   Mac API is very close to the WIndows API.  They share the same philosophy.   X-Windows is completely backwards and very
    difficult to design with.
    It is interesting that in Unix the users question has an answer evry much like a PowerShell solution.  We would pipe the data to a formatter which would generate a table (Format-Table) or a list (Format-List).
    I no longer remember the commands to convert a data stream or data file into a report. 
    cat?  grep? list? mtable?
    ¯\_(ツ)_/¯

  • I need help setting up wireless system

    I am trying to set up a wireless system for my laptop and am new to this and don't know if I can do what I want with what I have.  I would like to have wireless internet access in my home so I can surf the net in different rooms and on the porch.  I only have one laptop.  I also would like to set up my printer wireless.  This is what I was sold when I bought my computer and was told that this is what I needed.  Also, My internet service is DSL Highspeed Light thru my telepone coop.
    Computer:   Gateway MT6821 Laptop with Vista operating system
     Printer:        HP Officejet 6310 All-in-One
    Router:         Linksys WRT54GS (Wireless G Broadband Router w/ Speedbooster)
    Print Server: D-Link DPR-1260 (Multifunction Rangebooster G USB Print Server)
    I have hooked up the router and run the install program.  After reading some on this forum one question I have is can I run wireless without a pc wired to the router?  Any help will be appreciated by a novice.             Thanks

    When I bought the Gateway laptop I was told that I didn't need a wireless card as one was already installed.  I was under the impression that after hooking up the router and running the install I could unplug the internet (ethernet) cable from the laptop and surf the net wirelessly, but that is not the case.  After running the installation I got a message that installation was complete and the WRT54GS shows as installed under my "network".  Is there anything I need to do, check, change, or add to make this work?             

  • New to mac need help on cleaning mac system

    Hello guys i am new to the mac i got it yesterday and i am so use to a pc...so i have some questions
    i want to know how i can clean my mac? (the system not the outside)
    how to clean out the internet history etc.( i know on my pc i had these one click apps. that i just open and it would clean my computer out such as the internet history, Cookies etc. and it would clean up left over files that are left from software that i have uninstall is there a software like that for the mac?
    oh this is the new macBook pro the 09 and its the 13inc. 4gb
    Thanks

    Hello Candy:
    Welcome to Apple discussions.
    A Mac running OS X needs no "cleaning." For example, OS X "defrags" files of less than 20 MB on the fly. Routine cache cleaning, etc, is done in the background as long as your computer is either on or sleeping. Let your Macbook Pro sleep so that the background tasks will run once you wake it up.
    _DO NOT_ trash system files or indiscriminately clear cache files (that will make the Mac run slower).
    At the risk of being pedantic, do not worry about maintenance tasks for a Mac running OS X.
    Barry

  • Need help on upgrading operating system from Mac OSX 10.3.9

    We have a Imac G5 with Mac OS X v 10.3.9. We want an upgrade to run new ILife stuff. We don't know what we are doing.
    What should we get to update the operating system, where, and how do we upgrade the system?
    Are there any particular requirements that my computer will need? How do I know that I have them?
    Is there anything in particular in the System Profile that I need to make sure that I have?
    Thanks.

    You don't say what iMac G5 you have, but here's the *Mac OS X 10.5 Leopard installation system requirements* http://support.apple.com/kb/TA24950 You may have to increase your RAM. A minimum of 1GB is recommended. If you click on About This Mac, you will see how much RAM is currently installed.
    Leopard is no longer available at the Apple Store *but may be available by calling Apple Phone Sales @ 1-800-MY-APPLE (1-800-692-7753)*.
    Suggest you download the two PDF documents at the top of this link.
     Cheers, Tom
    Message was edited by: Texas Mac Man

  • Need Help Can i use Merge command along with exist function in oracle?

    I am using Merge command to update the destination table and updating the rows which are already in the destination table.
    But what i want is to delete the existing rows from the destination table and insert fresh rows instead of updating the existing rows in the destination table.
    So can we use exist function to check the existing rows and delete them and use merge command to insert the rows in the table.

    You definitely need to do a DELETE then INSERT since MERGE will not delete rows, although I'm not really sure what that gets you since the net effect would be the same as a MERGE over the same pair of tables.
    If you really want to do it this way, then I would likely do something like:
    DELETE FROM target_table
    WHERE (columns_you_would_match_on) IN (SELECT columns_you_would_match_on
                                           FROM source_table
                                           WHERE predicate_you_would_use_in_using);
    INSERT INTO target_table (column_list)
    SELECT column_list
    FROM source_table
    WHERE predicate_you_would_use_in_using;John

Maybe you are looking for

  • Message to Creative: suggesti

    Hello, It is a nice move from you to have firmwares that enable us (users of the Zen Micro and alike) to plug our MP3 players directly to a PC without having to install any drivers... BUT why isn't the player showing the music the way it has been org

  • Can print PS file but not make PDF

    Printing to a PostScript printer with a customized PostScript driver in WordPerfect 5.1 for DOS is what we do every day, but when we print the same job to a PS file we can't make a PDF in Adobe Acrobat Pro 9.4. What can we do to make a PDF? Here is t

  • Hyperlink to a FTP address

    I would like to create a hyperlink to a ftp site to have access to files. This does not appear to be possible. When the url is created it inserts http:// in the beginning of the address. In order for the link to work it needs ftp:// at the beginning.

  • Download file not being checked-in, similar to GET_FILE

    Hello, Is it possible to simulate the behaviour of the GET_FILE service but for a file that is not checked-in into the Content Server? Meaning, I want to get the download popup with that file as I get it from the call of the GET_FILE service. The fil

  • It is very urgent

    hi all, in a function module BAPI_MOSRVAPS_GETLIST2  which field we have to use the source plant field (DTL_SAP_PLANT)                                           kiran