Putting an already running SQL to background

Hi Gurus,
This sounds like a stupid problem but I'm sure most DBAs have faced it. Is there a way to move a long running SQL (like a create table as select * from big_table) to background process? I was contemplating whether there is a similar UNIX-like ctrl-z...
thanks,
james

Simple answer, no.
Complex answer... well perhaps.
Your client session connects to Oracle. Oracle uses a server process to service your client session. You throw a CTAS (create table as select - yes, we also have acronyms for everything) its way.
The client process now waits. The SQL call it made is a blocking/synchronous call. The server process gets the CTAS, parses it into a cursor, and executes its.
What happens when you pull the client's plug? Nothing. The Oracle server process will only notice that its client session it is suppose to service is gone after the CTAS. As the CTAS is a DDL is has an implicit commit. So after the actual table has been created, the server process will notice you have pulled the client's plug and it will rollback (nothing to rollback), and terminate.
So the CTAS would have completed despite you pulling the client plug.
However.. this is pretty much an ugly hack of putting a server process in background mode so to speak. Also, it assumes that DCD (Dead Connected Detection) does not play a role. Also assumes that this behaviour of the server process is common across different Oracle patchsets and releases.
The correct method would be to use an EXECUTE IMMEDIATE command for the CTAS and to execute that using Oracle's DBMS_JOB or DBMS_SCHEDULER (10g and later).

Similar Messages

  • Running SQLs in background in batch mode via SQL developer ( windows 7)

    Hi
    Can anybody share any tips to run a set of SQLs in background in batch mode via SQL developer in Windows 7 environment
    am trying something as below but not succeeding though
    1) Create a .txt file name 'mysqlfile.txt' in desktop which contains the below statements
    Create table A
    Create table B
    2) Create a .bat file name 'run.bat' and kept in desktop which contains the below statements ( syntax may not be correct though)
    sqldeveloper -s <DBusername>/<pwd>@//<Hostname>:<port>/<SID>@<C:\Users\<username>\Desktop/mysqlfile.txt>
    3) Double click 'run.bat'
    Regards
    -Learnsequel

    SQL Developer doesn't have a command-line interface to support what you're looking for.
    You could use SQL*Plus.
    We have some requests on the Exchange in this area you could add your vote to. This is an area we are investigating for future releases.

  • Why wont firefox load after i close the window ? it tells me it is already running in the background and to close that window before opening again. took 10 tries before it would load again !

    this has been going on for some time. 2 months maybe. i can hear the hard drive winding up/down after i close the window, and then comes a long narrow blue window stating what i have written.

    See
    * [[Firefox is already running but is not responding]]
    Try closing any running instances of ''firefox.exe'' (and plugincontainer.exe) using something such as Task Manager. That should allow you to then restart Firefox.
    As for iLivid. Possibly it also has associated apps or extensions with names not including the word iLivid. Looking at their own FAQs there are instructions to remove iLivid using the Windows Control panel, and mention of other bundled software that you may wish to remove. It seems it is more of a nuisacne rahter than out and out malware.
    * see http://www.ilivid.com/faq.htm (page scrolls for more info) but includes:
    How do I uninstall the software?
    The software can be removed in a simple was like any other software:
    Go to the Windows Start menu and then to Control Panel > Add/Remove ("Programs & Features" in Vista & Windows 7) and click "Remove" next to the software name (e.g iLivid Download manager / Windows iLivid Toolbar ).
    During the installation bundle software are offered, each can easily be removed following those instructions: Uninstall Yontoo Addon , Uninstall Search Toolbar (powered by Bing) or Uninstall Babylon.

  • After closing firefox and then reopening it, a message states that firefox is already running (in the background) and to restart computer.

    the window closes normally, then when i reopen it i receive a message that states Firefox is still running. i open task manager and it is not shown on the application tab but is shown in the process tab, where i "end process" i would appreciate any help. thank you

    See "Hang at exit":
    *http://kb.mozillazine.org/Firefox_hangs
    See "Firefox hangs when you quit it":
    *https://support.mozilla.com/kb/Firefox+hangs

  • Is there a way to open a second firefox instance using a shortcut key (i.e. Ctrl + Alt + 9), while a first instance is already running?

    This happens both in Windows XP and Windows 7. Firefox is the only application that does not allow this consistently (this works with MS-Word, Google Chrome, Notepad etc.).

    Yes, but {Ctrl + N} is useful only when you are already in Firefox. I meant quickly launching Firefox while using another application via a user-assigned shortcut key. For example, I am writing a text in MS-Word and I want to run a quick Wikipedia search; now, if Firefox is already running in the background, my shortcut for Firefox (e.g Ctrl + Alt + 9) won't do anything - it will only launch Firefox, if it is the first Firefox window to be opened. Thanks anyway though!

  • HT3180 Ok, I got the Apple TV all hooked up. Im pretty handy and have a lot of experience putting electronics together, but this one has got me. I can not seem to get it to connect to my iTunes. Probably something running in the background.

    Having problems with Home Sharing with the WiFi. Can not seem to get the Apple TV to connect to my iTunes. Must be something running in the background of the router or laptop. Need help.

    Yes to all, however ive noticed when I turn on the itues Home Sharing, and it says it is on in the File pull down, it disapears from the Livrary pull down. I attempt to view my Library on my iPhone or iPad under the Remote app and it states i have no songs or content. Although it will let me mirror my device on the TV screen.

  • When I click on a new link, it opens a whole new firefox instead of using my default which is running in the background

    I have firefox as my default browser. Anytime I click on an email or search for something, instead of opening my default browser, firefox loads a new firefox page. It is a blank page just as if I had never had one. It has nothing on it except how you would start out before you set up your tabs and history etc. My default firefox is still there running in the background but I must click on it and manually put in the link I was trying to open.
    Any suggestions.

    Some added toolbar and anti-virus add-ons are known to cause
    Firefox issues. '''Disable All of them.'''
    Start '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Firefox in Safe Mode]''' {web Link} by holding down the '''<Shift ''(Mac Options)'' >''' key, and then starting Firefox. Is the problem still there?

  • How to trace an already running session

    Hi,
    Sometime I come across following situation.
    Queries/SQL statements keep on running for a long time and users complain about the same.
    But since they have already started I am not able do anything about it.
    So please guide me "how can I trace already running session."
    Thanks,
    Rushi

    Rushi Shah wrote:
    Hi,
    Sometime I come across following situation.
    Queries/SQL statements keep on running for a long time and users complain about the same.
    But since they have already started I am not able do anything about it.
    So please guide me "how can I trace already running session."
    http://www.petefinnigan.com/ramblings/how_to_set_trace.htm
    Use DBMS_SUPPORT to set trace in another users session
    Next use the interface to again set trace for SCOTT's session that we found earlier. here it is:
         SQL> exec dbms_support.start_trace_in_session(10,20,waits=>true,binds=>false);
         PL/SQL procedure successfully completed.
         SQL> -- execute some code
         SQL> exec dbms_support.stop_trace_in_session(10,20);
         PL/SQL procedure successfully completed.
         SQL>                          
                                  

  • After FF is closed sometime I go to start FF I get a popup saying Ff is already running please close to open new window.

    After closing FF latest version 7.0.1 I try to start ff again I get a popup window saying FF is already running please close FF to start a new window.
    To get FF to run I have to log off then log on to windows and then everything is fine.
    This does not occur all the time it is an intermittent problem, but is a PITA when it happens

    May be your Firefox is running in the background. Ctrl+alt+del will bring up the task manager. See if FF is still running in applications or processes. If yes, kill it.

  • Whenever I try to open it, I get something like "Firefox is already running". HOWEVER, when I check my profiles folder... it is empty!

    Exact message: Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system
    This happened when I first booted up the computer (so I hadn't been running Firefox anyway).
    I already tried:
    -restarting and shutting off. This does not help. However, the system felt the need to run an error check on one of the restarts, which turned up nothing. This might indicate something.
    -Opening task manager. firefox.exe does not appear in the processes list.
    -Using the help file. None of it seems to help since the profiles folder is empty. I can't run profile manager either.
    -uninstalling and reinstalling. I STILL GET THE SAME ERROR. Furthermore, the profiles folder is still empty!
    I am currently running a virus scan, so far nothing. IE seems to be unaffected.
    EDIT: Latest version of Malwarebytes has turned up no threats.

    Well, if the profile folder is empty, either its contents are somewhere else and hopefully you can put them back where they belong, or you lost your profile info. I don't know how could happen, though...
    In any case, see this support article to know about managing profiles:
    http://support.mozilla.com/en-US/kb/Managing+profiles

  • Looking for a drum loop app that will run in the background. What are you using?

    Looking for a drum loop app that will run in the background. Suggestions? What are you using? I tried Loopseque and I like it, but I can't make it run once I switch apps. Help please.

        That's definitely strange, kzmidge. I want a working phone in your hands though. I noticed you mentioned you received the suggestion to complete a reset. Did you already do that? Is it working again? Are you receiving an error message?
    If you hesitated a little longer to complete the reset, you can try to place your phone into Safe Mode http://vz.to/rxg0ii and see if you can access mobile sites from your browser. This mode will stop 3rd party applications from running, so you won't be able to use the apps you mentioned but we may be able to narrow down the trouble in Safe Mode. If the mobile sites work, that means the trouble may be in a recently downloaded application and you may be able to avoid the reset my uninstalling some of your more recently installed applications. If it's still giving you trouble, the reset http://vz.to/18wzOCi is the next best step.
    JenniferH_VZW
    Follow us on Twitter www.twitter.com/vzwsupport

  • "A script is already running" while attempting to run more than one item

    We upgrade recently to ODT 11.2.0.3.20. Since then, attempting to run more than one item from the Solution Explorer (by selecting the items, right-clicking, and selecting "Run") results in a popup error of "Oracle Developer Tools. A script is already running". If many items are selected it results in many error messages and only a random few of the items are actually executed on the server. Also, choosing "Run On" now results in it prompting for the target database for each item selected (rather than once for all items selected like it used to). This all used to work fine in the earlier release we were using. Has anyone else run into this? Any fixes? We used to use multi-select and "Run" or "Run On" to deploy multiple items at once, but this no longer works -- doing one at a time works, but if you have hundreds of items to run, this quickly becomes unusable.
    Thanks for any insight.
    - Josh

    cshay wrote:
    I don't believe that the intention was for you to be able to run a bunch of scripts one after the other. Often there are dependencies between scripts anyway and so you you have to order them. Because we're generally deploying a large set of stored procedures (and not just one-time scripts) the order doesn't really matter -- even if a stored procedure gets created before one it depends on, once all the SPs are on the server, the ones that are "invalid" will compile correctly once you execute them.
    I think a lot of people are creating master scripts that references child scripts using the "@" sql plus syntax.... have you tried that?
    I'll give that a try as a work around. Only issue I have with that solution is every time we add or remove something from the solution, we also have to update the script.
    We are doing a lot of enhancements to our script generation in the coming year. Keep an eye out for a beta to test.
    Like I said, this used to work fine in the older versions of ODT. It seems like the new version is attempting to execute multiple items at once on the same connection simultaneously, thus resulting in the "A script is already running" error. The old version used to be smart enough to execute them one at a time -- so something changed in a more recent version to completely break "Run" and "Run On" when you have more than one item highlighted (even just highlighting 2 items and choosing "Run" runs the first item, but then gives the error for the second item).
    Christian- Josh

  • Getting Error when running sql from concurrent program in R12

    Hi All,
    I created concurrent program and attached EXECUTABLE which executable method as SQL plus .
    Using this program I am running one SQL file in R12 when I am running I am getting below error .
    Same king of program I have define in 11i and running it is running can anyone please help me if I need to do any set ups or security thing to resave this problem.
    ERROR:
    ORA-01017: invalid username/password; logon denied
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    Concurrent Manager encountered an error while running SQL*Plus for your concurrent request 3162719.
    Review your concurrent request log and/or report output file for more detailed information.
    Executing request completion options...
    Finished executing request completion options.
    Regrds,
    Sridhar.

    user12000862 wrote:
    Hi all,
    Thanks a lot giving replay below simple code I have put in my SQL file for testing Eventhough it is giving error .
    Table which i am using in Apps schema only.
    declare
    BEGIN
    insert into BRCD_HZ_DNB_XTBL_TEST values (666,'Y','547','Y','12254','TESTING','N','Y');
    commit;
    END;
    /Try this instead
    WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
    WHENEVER OSERROR EXIT FAILURE ROLLBACK;
    insert into BRCD_HZ_DNB_XTBL_TEST values (666,'Y','547','Y','12254','TESTING','N','Y');
    commit;
    exit;HTH
    Srini

  • "firefox is already running" dialog when logged in and also vncserving

    I've been using vncserver / vncviewer / tightvnc for a while now without any problems. I've never noticed this problem before but maybe that's because I've never knowingly done what I just did.
    OK to show a colleage on the other end of the internet something on my desktop I opened up the firewall and told them to run tightvnc at their end while I, logged in as the user I wanted them to "be", fired up the vncserver on this arch linux box running xfce4 as the desktop environment. Seconds later they're logged in as me, looking aththe system, just as I wanted.
    OK i said crank up firefox ..... they did. Then I went to do the same, and I got an error message "firefox is already running".
    OK I am pretty sure I know why ... I'm logged in as "user x" and they are piggybacking off the vncserver process I fired off as that user so they are, to the system, just an extension odf me, and so when two of us run firefox it thinks there's debris from a previous crash lying around.
    Is there a workround to allow two of us to run firefox at the same time ?

    Well, if the profile folder is empty, either its contents are somewhere else and hopefully you can put them back where they belong, or you lost your profile info. I don't know how could happen, though...
    In any case, see this support article to know about managing profiles:
    http://support.mozilla.com/en-US/kb/Managing+profiles

  • [Forum FAQ] Reporting Service Point cannot be installed on a Site System Server running SQL Server 2012 SP1

    Symptom: When you install Reporting Service Point role on a Site System Server running SQL Server
    2012 SP1, you may encounter an issue that the Reporting Service Point role cannot be installed. The error log “srsrpMSI.log” and “srsrpsetup.log” may throw the error as shown in Figure 1 and Figure 2.
    03:32:03:764]:
    MainEngineThread is returning 1618
    Figure 1: Error -1
    <03/03/14 03:32:03>
    srsrp.msi exited with return code: 1618
    Figure 2: Error -2
    Reason: All the two logs indicate an error return code 1618. From the KB below you may know what
    the return code means.
    ERROR_INSTALL_ALREADY RUNNING 
    1618
    Another installation is already in progress. Complete that installation before proceeding with this install.
    KB link:
    http://support.microsoft.com/kb/290158 “it is related to an Office Suite KB, anyway, the MSI return code is the same meaning”
    You can look into Resource Manager and Event Viewer to find the other currently running MSI installation. You may get a warning in Event Log that means the MSI wants to install a SQL Server
    related Component (Figure 3). The Resource Manager confirms this (Figure 4).
    Event Log:
    Event ID: 1004
    Source: Msinstaller
    Level: Warning
    Detection of product '{A7037EB2-F953-4B12-B843-195F4D988DA1}',
    feature 'SQL_Tools_ANS', component '{0CECE655-2A0F-4593-AF4B-EFC31D622982}' failed.  The resource '' does not exist.
    Figure 3: Event Log
    Figure 4: Resource Manager
    Resolution: the error is exactly what the following KB describes.
    KB Link:
    http://support.microsoft.com/kb/2793634
    After we resolve the SQL Server 2012 issue, the Reporting Service Role is installed successfully.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    This implies that ODP.NET does NOT need to be installed on a client. However, I cannot find OraOPs9.dll on a machine with Client Release 9.2 installed. Should OraOps?.dll automatically come with a Client installation of 9.2 or higher?
    ODP.NET needs to be installed on the client. OraOps9.dll is part of ODP.NET, not the Oracle Client.
    Also, if an application is built with the 10g ODP.NET, can it be run from a machine with OraOps9.dll?
    If an application is built with 10g ODP.NET, it can be run with 9.2 ODP.NET as long as you do not use any 10g APIs. The new features in 10g ODP.NET are included in the doc and the ODP.NET FAQ for your reference.

Maybe you are looking for

  • How to use File Adapter in BPEL

    Hi, How to use File Adapter in BPEL. I am using Oracle SOA 10g. Any sample or best example in blog or elsewhere ?

  • G3 beige minitower doesn't see HDD

    I just tried putting a new hard 80GB unformatted drive into a Beige G3 minitower (300Mhz) whose original HDD failed long, long ago. The G3 itself had not been booted in nearly two years. Everything about the machine seems to be working fine--the flop

  • Message change for duplicate EAN

    my client don't want to alllow duplicate EAN, I came to know that using message type control we can change the present status of warning to error. plz suggest the process flow where can i make changes for message number M3348 from warning to error. I

  • Reading a GPG keyring using BouncyCastle OpenPGP

    Has anyone successfully used the BouncyCastle OpenPGP library to read a public keyring? Here's my attempt:     File publicKeyFile = new File(System.getProperty("user.home"), ".gnupg/pubring.gpg");     Security.addProvider(new BouncyCastleProvider());

  • Error on trying to do the JDeveloper's Tutorial (9.0.3.1)

    On trying to do the Tutorial of JDeveloper 9.0.3, in the chapter "Business Components Programmatic Client Tutorial - Step 3: Finding and Displaying Data by Primary Key", when is ran the Batch.class, the following errors are displayed: D:\Jdev9031\jdk