Logging out prevented by a script that runs forever

I have a script that needs to loop forever. Unfortunately, it doesn't quit when the user logs out, blocking the logout.
How can I either test if there's a logout pending (in which case the script can exit) or actually allow a logout to kill the script?
The alternate is to execute a non-looping script automatically every few minutes, but I don't know to do that without digging using cron somehow.

In a word - you're doing it wrong.
If your script looks like this:
on run
  repeat
    -- do something
  end repeat
end run
Then your script does not give the app any time to respond to system events, such as a quit or shutdown.
Instead you should write your script using an idle handler. The idle handler runs periodically (on a schedule you set), and allows the app to respond to the system in between each iteration:
on run
  -- nothing really happens here
end run
on idle
  -- do something - i.e. your code goes here
return 10 -- run again in 10 seconds
end idle

Similar Messages

  • I just downloaded creative cloud and when I try to log in it says that I have been logged out, why is it doing that?

    I just downloaded creative cloud and when I try to log in it says that I have been logged out, why is it doing that?

    Sign Out When Sign In http://forums.adobe.com/thread/1450581?tstart=0 may help
    -and http://helpx.adobe.com/creative-cloud/kb/unable-login-creative-cloud-248.html
    -and 'looping' https://forums.adobe.com/thread/1504792
    or
    A chat session where an agent may remotely look inside your computer may help
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Script that runs MSI from discovered location.

    Hello everyone -
    Still a noob here in scripting with powershell...
    We use SCCM 2012, and i'd like a script that can parse through the ccmCache folder, find the desired MSI, and the use this path to work from(parameters, etc).
    Below is what i have attempted, but to no avail.
    When running the below...i get the  T h i s   i n s t a l l a t i o n   p a c k a g e   c a n n o t   b e   o p e n e d  message in the script output...further telling me that the msi cannot be found.
    The purpose of this is to wrap together a "find app version" script before the below script, so where it can back out if the desired version is already installed(we have a lot of image drift in with certain apps at my company).
    I know its something im missing...and ideas?
    TIA
    $PathtoInstall = Get-ChildItem -Path C:\windows\ccmcache\ "jre1.7.0_05-c.msi" -Recurse
    Foreach ($File in $PathtoInstall) {
        If ($File.Exists)  {
            $install = $File.Name
            & cmd /c "c:\windows\system32\msiexec.exe /i" $Install

    Seems that I was able to get around this with my below edits to my script.
    This script will find the relevant cache folder, throw the msi into the variable, then run the cmd line arguements that you wish to run.
    Thanks to all for the assistance!
    randy
    $PathtoInstall=Get-ChildItem-PathC:\windows\ccmcache\"jre1.7.0_05-c.msi"-Recurse
    Foreach
    ($Filein$PathtoInstall.Directory)
    If($File.Exists) 
    cd$PathtoInstall.Directory
    &cmd/c"C:\Windows\system32\msiexec.exe
    /i $PathtoInstall/qb
    /lv C:\temp\JavaTESTINSTALL.log"

  • HOW can I FIX Mavericks and Safari 7.0 to allow Gmail to work?  Gmail has been FUBAR'd since downloading Mavericks today.  Finally found the brute-force logout site to just getr logged out; can't keep doing that.  Other features no longer work, either.

    Made big mistake of downloading Mavericks today.
    Been struggling with all the FUBARd messes it caused, ALL DAY.
    Google basic buttons don't work--can't log out or other basic functions.
    Website use is impaired.
    It took almost 3 hours to do a basic online order on one of them--at this rate, I'll be out of business soon, and it's seriously impairing Christmas preparations!
    Google Voice/Video are screwed up, had to RE-download their voice/video plugin all over again--again.
    Voice/video quality is REALLY poor.
    Lag times in so many things are bad.
    Thought this would download WITH the better writing/bookkeeping programs--NOT!
    Mac Maps is piddle compaired with GoogleMaps.
    The Email program on the desktop is REALLY hard to use, has few useful functions.  It's MAYbe good if one only has ONE email; using it with severeal various email accounts is a serious liability in many ways--like filing, sorting, marking, etc.; no clear way to move email files to an external drive to save, to unload the HD.
    HOW can Safari and Mavericks be fixed?
    IF not, HOW can I REMOVE Mavericks and get back to Mountain Lion--which was not too great, but certainly more functional than Mavericks!
    I NEED my web-based emails to work--NOW...NOT when Mac finally gets around to fixing things sometime later.
    I NEED online ordering to work--NOW--not later when Mac finally gets around to fixing things.
    PLEASE someone--any help out there?  I couldn't even find but a rare hint that Safari 7.0 even exists--much less that anyone admits it's got problems, nor fixes for it.
    What to do?  Throw the whole unit out? Wipe and reboot?  Dumb it back to OS 10? HOW? WHAT?
    [freaking out here...]

    Zak Adelman, LexSchellings,
    It's a shiney new computer.  Came loaded with Mountain Lion.
    Too busy learning to use the blessed thing, to download anything....except...
    The only pluggin that had to be loaded, was Google Voice-Video pluggin, while Lion was still it's OS.  [AND been using the Safari that came already in it.]   Had to do that a couple times--nothing new there--that plug-in had to be re-loaded when using a PC, too--THAT happened even before Google slammed everyone into coerced use of it's Google+. 
        [I understood from others, that Firefox won't work in Mac units--or I woulda put that in it to see if that solved anything]
    This unit seemed a bit sluggish from the git-go, out-of-the-box. 
    I figured that was probly the local DSL here---rural DSL is...um...our DSL's not something to brag about, but it's the best we can do...
    The difference between speed of loading pages, etc. on the new Mac, was --not-- toooo terribly different--though yes, slower on Mac....and chalked it up to my inexperience with Mac. 
    Been trying to get things up and running for a bit over a month now.
    NOT doing very well at it--just barely getting by; rapidly falling behind what needs done [work]. 
    Google worked just --OK-- when OS was Lion, as did the Google voice/video--slower, and voice-video was kinda scratchy or glitchy, but worked enough to --get by--.
    Loading Mavericks, ruined that.  
    VOIP calls via Google talk have bad echio, static, cut-outs; video calling was pixilated or not working; WAS cued to re-load it's Voice-Video plug-in....which seemed to help a bit, though not very well; it only helped the Voice-Video some, not all--figured that was probably Google issues, less than Mac's, since Google has been increasingly dysfunctional as they have twisted it to be a social media-dominant thing.
    [[now seeking an email venue that does what Gmail was good at, including the Voice-video calling, that has no intention of turning itself inside out to be "social"]]
    Can't sign out of Gmail or Google+, nor use buttons in upper right corner with the drop-down menu.  
    NO buttons in upper right corner cluster on Gmail work, except the name+ button to toggle over to Google+---which I don't need! [yeah--THAT's a Google problem!] 
    Can only switch to HTML version by catching that button as the account signs in--if one fails to be fast enough with their fingers, it goes to Google+; can't get to email unless type in mail.google.com.
    Managed to catch that button today, and clicked to use HTML "permanently" until these issues get solved.
    ALSO:
    Have fairly new [about 1 year?] HP bluetooth printer-scanner. 
    BUT, after Mavericks loaded: it HAS the unit listed, HAS drivers for it, HP unit IS listed as default printer, everything --seems-- "go",
    .....except Mac keeps posting it's out of ink, and/or, not hooked up, and/or not turned on--even when it is on.
    It's SUPPOSED to be blue-toothing that printer/scanner.   
    It did it for Lion, before loading Mavericks, even though it was troublesome to get it to work, it at least HAD printed one document when Lion was the OS.  
    Thank you...Downloaded EtreCheck: 
    BTW:  Trying to copy/paste data from that check list, to this post, was achaic: 
    had to use Edit, select all, then use edit again to get it pasted--the mouse buttons weren't allowed to copy-paste using right-click functions [is this a relic limited-function "thing" with Mac?, or is it because I wanted to keep using this new wirless, non-Mac mouse?].
    Advice?
    See below...
    Hardware Information:          Mac mini (Late 2012)            Mac mini - model: Macmini6,1
                  1 2.5 GHz Intel Core i5 CPU: 2 cores;           8 GB RAM
    Additional:
       Monitor used = Visio flat screen. [not Mac]
       Keyboard = Logitech solar wireless [not Mac]
       Mouse = Logitech wireless
    Video Information:            Intel HD Graphics 4000 - VRAM: 1024 MB
    Audio Plug-ins:
              BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
              AirPlay: Version: 1.9 - SDK 10.9
              AppleAVBAudio: Version: 2.0.0 - SDK 10.9
              iSightAudio: Version: 7.7.3 - SDK 10.9
    System Software:
              OS X 10.9 (13A603) - Uptime: 2 days 19:33:25
    Disk Information:
              APPLE HDD ST500LM012 disk0 : (500.11 GB)
                        EFI (disk0s1) <not mounted>: 209.7 MB
                        Macintosh HD (disk0s2) /: 499.25 GB (456.94 GB free)
                        Recovery HD (disk0s3) <not mounted>: 650 MB
    USB Information:
              MediaTek Inc MT1806 
              Logitech Logitech USB Headset
              Logitech USB Receiver
              Apple Inc. BRCM20702 Hub
                        Apple Inc. Bluetooth USB Host Controller
              Apple, Inc. IR Receiver
    FireWire Information:
    Thunderbolt Information:
              Apple Inc. thunderbolt_bus
    Kernel Extensions:
    Problem System Launch Daemons:
    Problem System Launch Agents:
    Launch Daemons:
              [loaded] com.adobe.fpsaud.plist
              [loaded] com.google.keystone.daemon.plist
    Launch Agents:
              [loaded] com.google.keystone.agent.plist
              [loaded] com.hp.devicemonitor.plist
              [loaded] com.hp.messagecenter.launcher.plist
    User Launch Agents:
    User Login Items:
              iTunesHelper
              SpeechSynthesisServer
    3rd Party Preference Panes:
              Flash Player
    Internet Plug-ins::
              FlashPlayer-10.6: Version: 11.9.900.170 - SDK 10.6
              QuickTime Plugin: Version: 7.7.3
              Flash Player: Version: 11.9.900.170 - SDK 10.6
              Default Browser: Version: 537 - SDK 10.9
              o1dbrowserplugin: Version: 4.9.1.16010
          ======  npgtpo3dautoplugin: Version: 0.1.44.29 - SDK 10.5  ===[this was in red]=====
              googletalkbrowserplugin: Version: 4.9.1.16010
    Bad Fonts:
              None
    Old applications:
              HP Device Monitor:          Version: 2.7.0 - SDK 10.5
                        /Library/Printers/hp/hpio/HP Device Monitor.app
    Time Machine:
    ===      Time Machine not configured!  ===[this was in red]===
    Top Processes by CPU:
                   6%          WindowServer
                   4%          Safari
                   4%          SafariDAVClient
                   2%          EtreCheck
                   0%          com.apple.iCloudHelper
    Top Processes by Memory:
              303 MB          Mail
              270 MB          Safari    ======[this is version 7.0 ]======
              262 MB          mds_stores
              147 MB          softwareupdated
              147 MB          com.apple.IconServicesAgent
    Virtual Memory Statistics:
              1.77 GB          Free RAM
              2.85 GB          Active RAM
              2.36 GB          Inactive RAM
              1017 MB          Wired RAM
              4.64 GB          Page-ins
              111 MB          Page-outs

  • Is there a standard script that runs when a projector stops?

    I know there are a couple of scripts I can use to set things up when starting a Director movie (startMovie and PrepareMovie).  But are there also scripts I can use that run when the user chooses to shut down a projector?  I want to run a script that sets the user's screen rez back to its original setting before shutting the projector down.
    Thanks!
    Dewey

    Yes, I am looking at that one.  But isn't that script activated each time a .dir movie is exited, even if it opens a different .dir movie?  Or, is it only activated when the 'PROJECTOR stops?
    The script I want to run should only run when you exit the projector.
    Dewey

  • How to create script that run sudo-command?

    I often need to run command:
    sudo "/Library/Application Support/VMware Fusion/boot.sh" --restart
    This needs to be run as admin.
    Can anybody tell me how to create script that will login as admin and run that command in terminal?
    Or from where can I get help how to add commands to a script?
    Thanks
    Tomi

    Your best bet on getting a cogent answer is to post to the Unix forum under OS X Technologies.

  • Logging out of a PHP script with digest authentication

    This has come up all the time, and I feel like I'm just getting over the hunch of learning digest auth.  The problem is that the HTTP specifications have no definitive way to "log out" a user.  If you give the user a 401 and force them to log in again, cached credentials will permit them to log in without seeing another login prompt.  What's your method for forcing a user to login again?
    I think if I append uniqid() to the username or password, essentially giving it a temporary random salt, every login will be unique making the user getting asked for credentials regardless.  The problem here is that I can't append uniqid() to whatever the browser is giving me to check for this because it's already hashed from the browser.
    The other thing I'm thinking of: this happens in webapps all the time.  I'm even entering this in a forum that is doing it.  If there's no HTTP spec to log out, how and why is it so common?

    Because of the stateless art of the HTTP protocol, there are no (server-)sessions when using digest auth. At least this is not, what it is intended for. The browser resends the credentials every time after you entered them until your browsing session ended (e.g. you close the browser).
    By trying to do something with "uniqid()" you are just trying to workaround a (IMHO) faulty implementation of your authentication process. I guess you just should rethink the whole process and provide a login-interface instead of sending digest-headers. With this you easily can control when to logout by destroying the session. Since in this case the browser does not send the credentials every time, you can re-present the login-form after logout (force the user to manually login again).

  • Msg 8631 Internal error: Server stack limit has been reached on SQL Server 2012 from T-SQL script that runs on SQL Server 2008 R2

    I have an Script mostly that is generated by SSMS which works with-out issue on SQL Server 2008, but when I attempt to run it on a new fresh install of SQL Server 2012 I get an Msg 8631. Internal error: Server stack limit has been reached. Please look for
    potentially deep nesting in your query, and try to simplify it.
    The script itself doesn't seem to be all that deep or nested.  The script is large 2600 lines and when I remove the bulk of the 2600 lines, it does run on SQL Server 2012.  I'm just really baffled why something that SQL Server generated with very
    few additions/changes AND that WORKS without issue in SQL Server 2008 R2 would suddenly be invalid in SQL Server 2012
    I need to know why my script which is working great on our current SQL Server 2008 R2 servers suddenly fails and won't run on an new SQL Server 2012 server.  This script is used to create 'bulk' Replications on a large number of DBs saving a tremendous
    amount of our time doing it the manual way.
    Below is an 'condensed' version of the script which fails.  I have removed around 2550 lines of specific sp_addarticle statements which are mostly just copy and pasted from what SQL Management Studio 'scripted' for me went I when through the Replication
    Wizard and told it to save to script.
    declare @dbname varchar(MAX), @SQL nvarchar(MAX)
    declare c_dblist cursor for
    select name from sys.databases WHERE name like 'dbone[_]%' order by name;
    open c_dblist
    fetch next from c_dblist into @dbname
    while @@fetch_status = 0
    begin
    print @dbname
    SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
    use ['+@dbname+']
    exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
    use ['+@dbname+']
    exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
    -- Adding the transactional publication
    use ['+@dbname+']
    exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
    '''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
    = N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
    @immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
    exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
    @frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
    -- There are around 2400 lines roughly the same as this only difference is the tablename repeated below this one
    use ['+@dbname+']
    exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script =
    null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509F, @identityrangemanagementoption = N''manual'', @destination_table = N''TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false'', @ins_cmd = N''CALL sp_MSins_dboTABLE_ONE'',
    @del_cmd = N''CALL sp_MSdel_dboTABLE_ONE'', @upd_cmd = N''SCALL sp_MSupd_dboTABLE_ONE''
    EXEC sp_executesql @SQL
    SET @dbname = REPLACE(@dbname, 'dbone_', 'dbtwo_');
    print @dbname
    SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
    use ['+@dbname+']
    exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
    use ['+@dbname+']
    exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
    -- Adding the transactional publication
    use ['+@dbname+']
    exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
    '''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
    = N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
    @immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
    exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
    @frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
    -- There are around 140 lines roughly the same as this only difference is the tablename repeated below this one
    use ['+@dbname+']
    exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''DB_TWO_TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''DB_TWO_TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script
    = null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N''manual'', @destination_table = N''DB_TWO_TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false''
    EXEC sp_executesql @SQL
    fetch next from c_dblist into @dbname
    end
    close c_dblist
    deallocate c_dblist
    George P Botuwell, Programmer

    Hi George,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    If you have any feedback on our support, please click
    here.
    Allen Li
    TechNet Community Support

  • How to create script that run sudo-command, via automator?

    Hi
    I'd want to create script to automate one command I need quite often. I just can't get this to work.
    I'm not using english OS, but I think this is what I do. In automator I choose Utilities -> Run script
    Here's the script I try to run:
    sudo "/Library/Application Support/VMware Fusion/boot.sh --restart"
    I found some tip to do it like this:
    do shell script "sudo /Library/Application Support/VMware Fusion/boot.sh --restart password "pass" with administrator privileges
    Where pass is my admin password.
    This does not work, either.
    Could anybody help me on this?
    Thanks...
    Tomi Toivonen
    Message was edited by: Tomi

    This is not working. What's wrong?
    What's wrong is that the '--restart' is a parameter for boot.sh, and therefore needs to be included within the quotes.
    Additionally, the shell uses spaces to divide parameters, so the spaces in the command will make it appear as multiple commands - '/Library/Application', 'Support/VMware' and 'Fusion/boot.sh'. You need to escape them using a backslash:
    <pre class=command>do shell script "/Library/Application\ Support/VMware\ Fusion/boot.sh --restart" password "pass" with administrator privileges</pre>
    If it's outside of the quotes it would be interpreted as a parameter to 'do shell script' and it won't know what to do with that.

  • [Cisco FAQ] - What is the USRM equivalent of the releaseOldSessions script that runs on the DNCS?

    HOw do i tear down VOD Sessions that are older than 4 hours

    NOTE: When the VOD Session Manager is a USRM, Cisco refers to this USRM as a VSM.
    Here is an explanation of how the VOD Session Manager (VSM) initiates a release of VOD sessions that are older than 4 hours (configurable). The algorithm described below is similar to the releaseOldSessions script on the DNCS that many of our customers are familiar with. Both release VOD sessions that are older than 4 hours old. Also, the VSM has a retry and session audit mechanism built into its algorithm that is absent in the releaseOldSessions script on the DNCS. The main difference is that this functionality is built into the VSM, but the releaseOldSessions script must either be run manually on the DNCS or put into the DNCS crontab. The VSM will make the decision to release a VOD session base on age, typically configured for 4 hours, and then the VSM will send up to 3 teardown requests to the Edge Resource Manager (ERM). NOTE: Both the VSM and ERM are Linux servers running Cisco USRM software.
    The “releaseOldSessions” algorithm is configured on the VSM in the Web UI under Applications.VodSm.Configuration as shown in the screen shot below:
    Applications.VodSm.Configuration.SessionTimeout = 14,400 seconds (default, configurable)
    ReleaseRetryCount = 3 (default, not configurable)
    ALGORITHM: The VSM, being the VOD Session Manager, will send a session release request to the appropriate Edge Resource Manager (ERM) based on the configured “SessionTimeout”. By default this value is 14,400 seconds (4 hours, configurable). When the age of a VOD session reaches the SessionTimeout, the VSM will locate the appropriate ERM and send it a session release request for that session. If the ERM fails to acknowledge this release request, the VSM will retry the session release for the number of times configured in ReleaseRetryCount, which is 3. NOTE: Cisco Development has chosen a value of 3 for this parameter (the ReleaseRetryCount is not configurable). If after the 3rd release retry, the VSM still does not have an acknowledgement of session teardown from the ERM, the VSM will initiate a session audit of that ERM as a final attempt to tear down the session.

  • Script that runs very slow when exporting output to XLS file

    I am using TOAD for oracle to export result to XLS. Need help on this script to chec how can I speed up the process:
    select a.div, a.zname, a.MBr, a.Loc,a.lname, b.mid as SLID, c.slname, a.FDID, b.FName as FDNAME,
    a.apptdate,b."Contact Nos",
    b."Credit Line",b."PastDue Acct"
    From
    select zname, Loccode,
    lname,
    FDID,
    ApptDate,
    div,
    MainBr
    from tbl1
    )a,
    select distid,name,managerid, dayphoneno || ' ' || mobilephoneno as "Contact Nos",
    street || ' ' || zip as Address,
    dealercreditamt as "Credit Line",
    pastdueamt as "PastDue Acct"
    from tbl2@DB2
    )b,
    select distid slid,name slname from tbl2@DB2
    )c
    where a.FDID=b.DISTID
    and b.distid=c.slid;
    SQL> @?/RDBMS/ADMIN/UTLXPLS
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost |
    | 0 | SELECT STATEMENT | | 2137K| 515M| 243K|
    | 1 | HASH JOIN | | 2137K| 515M| 243K|
    | 2 | TABLE ACCESS FULL | tbl1 | 62280 | 4074K| 66 |
    | 3 | HASH JOIN | | 2137K| 379M| 236K|
    | 4 | REMOTE | | 2137K| 124M| 114K|
    | 5 | REMOTE | | 2137K| 254M| 114K|
    --------------------------------------------------------------------------

    mrp wrote:
    I am using TOAD for oracle to export result to XLS. Need help on this script to chec how can I speed up the process:XLS is a poor output format for larger result sets. Why? because all tools that I know use a kind of cell-by-cell processing to fill the fetched values into Excel.
    It is way faster to output into any kind of text (CSV) format.

  • Is there a way to have applications run in the background after I log out?

    New to Mavericks, have a new iMac after being on Leopard for years. After I log out, all the applications I had running stop and close. Is there a way to keep those running? It seems like logging out, and the applications stopping, would negate the ability to see any notifications on the lock screen. I have multiple users set up on this computer, is that the reason?

    By definition, logging out means quitting all your processes. If you want to log in as a different user without logging out, see below.
    OS X Mavericks: Switch quickly between users

  • Running 10.8.2, Keeps Randomly Logging out

    wth? i just got a new macbook air, and i can't even keep it logged in. it randomly keeps logging out. i searched and saw that people were having this issue pre 10.8.2 with multiple graphics cards, but last i checked, the MBA only had one gfx card.
    i'm plugged into a thunderbolt monitor, i use spaces, blah blah blah.

    Really, Apple? nothing? mountain lion should have been called Apple Vista. Worst OS you've released in forever.

  • If i log out of an icloud account on an ipod and log into a different one can that old account still be tracked?

    if i logged out of an icloud account that was the main one on the ipod and log into a different one can the old one still be tracked? if its not even in use

    nitamariee wrote:
    if i logged out of an icloud account that was the main one on the ipod and log into a different one can the old one still be tracked? if its not even in use
    It depends on what you mean. If you mean that you changed the iCloud account to which Find My iPod is set up in the Mail, Contacts, Calendars settings, then the iPod will only be trackable through that iCloud account, not any previous one.
    If that's not what you meant, please post back and clarify.
    Regards.

  • Capturing log files from multiple .ps1 scripts called from within a .bat file

    I am trying to invoke multiple instances of a powershell script and capture individual log files from each of them. I can start the multiple instances by calling 'start powershell' several times, but am unable to capture logging. If I use 'call powershell'
    I can capture the log files, but the batch file won't continue until that current 'call powershell' has completed.
    ie.  within Test.bat
    start powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > a.log 2>&1
    timeout /t 60
    start powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > b.log 2>&1
    timeout /t 60
    start powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > c.log 2>&1
    timeout /t 60
    start powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > d.log 2>&1
    timeout /t 60
    start powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > e.log 2>&1
    timeout /t 60
    start powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > f.log 2>&1
    the log files get created but are empty.  If I invoke 'call' instead of start I get the log data, but I need them to run in parallel, not sequentially.
    call powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > a.log 2>&1
    timeout /t 60
    call powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > b.log 2>&1
    timeout /t 60
    call powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > c.log 2>&1
    timeout /t 60
    call powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > d.log 2>&1
    timeout /t 60call powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > e.log 2>&1
    Any suggestions of how to get this to work?

    Batch files are sequential by design (batch up a bunch of statements and execute them). Call doesn't run in a different process, so when you use it the batch file waits for it to exit. From CALL:
    Calls one batch program from another without stopping the parent batch program
    I was hoping for the documentation to say the batch file waits for CALL to return, but this is as close as it gets.
    Start(.exe), "Starts a separate window to run a specified program or command". The reason it runs in parallel is once it starts the target application start.exe ends and the batch file continues. It has no idea about the powershell.exe process
    that you kicked off. Because of this reason, you can't pipe the output.
    Update: I was wrong, you can totally redirect the output of what you run with start.exe.
    How about instead of running a batch file you run a PowerShell script? You can run script blocks or call individual scripts in parallel with the
    Start-Job cmdlet.
    You can monitor the jobs and when they complete, pipe them to
    Receive-Job to see their output. 
    For example:
    $sb = {
    Write-Output "Hello"
    Sleep -seconds 10
    Write-Output "Goodbye"
    Start-Job -Scriptblock $sb
    Start-Job -Scriptblock $sb
    Here's a script that runs the scriptblock $sb. The script block outputs the text "Hello", waits for 10 seconds, and then outputs the text "Goodbye"
    Then it starts two jobs (in this case I'm running the same script block)
    When you run this you receive this for output:
    PS> $sb = {
    >> Write-Output "Hello"
    >> Sleep -Seconds 10
    >> Write-Output "Goodbye"
    >> }
    >>
    PS> Start-Job -Scriptblock $sb
    Id Name State HasMoreData Location Command
    1 Job1 Running True localhost ...
    PS> Start-Job -Scriptblock $sb
    Id Name State HasMoreData Location Command
    3 Job3 Running True localhost ...
    PS>
    When you run Start-Job it will execute your script or scriptblock in a new process and continue to the next line in the script.
    You can see the jobs with
    Get-Job:
    PS> Get-Job
    Id Name State HasMoreData Location Command
    1 Job1 Running True localhost ...
    3 Job3 Running True localhost ...
    OK, that's great. But we need to know when the job's done. The Job's Status property will tell us this (we're looking for a status of "Completed"), we can build a loop and check:
    $Completed = $false
    while (!$Completed) {
    # get all the jobs that haven't yet completed
    $jobs = Get-Job | where {$_.State.ToString() -ne "Completed"} # if Get-Job doesn't return any jobs (i.e. they are all completed)
    if ($jobs -eq $null) {
    $Completed=$true
    } # otherwise update the screen
    else {
    Write-Output "Waiting for $($jobs.Count) jobs"
    sleep -s 1
    This will output something like this:
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    When it's done, we can see the jobs have completed:
    PS> Get-Job
    Id Name State HasMoreData Location Command
    1 Job1 Completed True localhost ...
    3 Job3 Completed True localhost ...
    PS>
    Now at this point we could pipe the jobs to Receive-Job:
    PS> Get-Job | Receive-Job
    Hello
    Goodbye
    Hello
    Goodbye
    PS>
    But as you can see it's not obvious which script is which. In your real scripts you could include some identifiers to distinguish them.
    Another way would be to grab the output of each job one at a time:
    foreach ($job in $jobs) {
    $job | Receive-Job
    If you store the output in a variable or save to a log file with Out-File. The trick is matching up the jobs to the output. Something like this may work:
    $a_sb = {
    Write-Output "Hello A"
    Sleep -Seconds 10
    Write-Output "Goodbye A"
    $b_sb = {
    Write-Output "Hello B"
    Sleep -Seconds 5
    Write-Output "Goodbye B"
    $job = Start-Job -Scriptblock $a_sb
    $a_log = $job.Name
    $job = Start-Job -Scriptblock $b_sb
    $b_log = $job.Name
    $Completed = $false
    while (!$Completed) {
    $jobs = Get-Job | where {$_.State.ToString() -ne "Completed"}
    if ($jobs -eq $null) {
    $Completed=$true
    else {
    Write-Output "Waiting for $($jobs.Count) jobs"
    sleep -s 1
    Get-Job | where {$_.Name -eq $a_log} | Receive-Job | Out-File .\a.log
    Get-Job | where {$_.Name -eq $b_log} | Receive-Job | Out-File .\b.log
    If you check out the folder you'll see the log files, and they contain the script contents:
    PS> dir *.log
    Directory: C:\Users\jwarren
    Mode LastWriteTime Length Name
    -a--- 1/15/2014 7:53 PM 42 a.log
    -a--- 1/15/2014 7:53 PM 42 b.log
    PS> Get-Content .\a.log
    Hello A
    Goodbye A
    PS> Get-Content .\b.log
    Hello B
    Goodbye B
    PS>
    The trouble though is you won't get a log file until the job has completed. If you use your log files to monitor progress this may not be suitable.
    Jason Warren
    @jaspnwarren
    jasonwarren.ca
    habaneroconsulting.com/Insights

Maybe you are looking for

  • Using Font Folio in InDesign to export in PDF to app store

    Our customer is creating applications using In Design.    These applications are exported into PDF format for viewing on mobile devices.    Is there any additional licensing needed from Adobe in this scenario? Also, in the future (not now) if the cus

  • Can't load organizer in windows 7

    Just loaded windows 7 and installed photoshop elements 9. Organizer is not loading. First try I had a error 1935 and this went away after I deleted som antivirus software that came in from the net.

  • Catalyst 4507R-E

    Hi  I am using catalyst 4507 R-E   I did the password recovery and then when I reloaded the below info appears in the rommom mode please help as how can solve this problem I have reloaded several times but its the same  * Welcome to Rom Monitor for  

  • HOW TO CONVERT SAP DB TABLE TO XML FILE

    Initially I want to store sap db table as xml file so that an external program can read it. Also i want that when table is updated only updated data is stored in xml file. Edited by: Sandip Mane on Apr 2, 2008 9:19 PM Edited by: Alvaro Tejada Galindo

  • Aperture 3 Faces recognition problem

    Have a really funky problem that is consuming hours to days of time in Faces.  Need serious help, or for Apple to recognize this as a bug. When I select Faces, Confirm Faces for a person, it shows loads of faces completely not that persons face.  So