Launching scripts from windows task

Hi group
I need to launch some scripts from a Windows Task, they are included on .bat file but when I execute it, it only stay on the first line (SQL> connected). Please help
sqlplus sys/********@MERIDIAN as sysdba;
column date_column new_value today_var
select to_char(sysdate,'YYYYMMDDHH24MM') date_column
from dual
spool E:\object\BD_Meridian\ks_&today_var.txt
/* I need to
execute oracle packages here */
disconnect;
spool off
exit
---------------------------------------

Hi,
it only stay on the first line (SQL> connected). Please helpYeah, you cannot wrap!
The solution is to encapsulate it into a xxx.sql file and invoke it from the prompt:
ECHO spool %LOG%OraCall.log > %LOG%OraCall.sql
ECHO set linesize 132 >> %LOG%OraCall.sql
ECHO COL x_tns NEW_VALUE v_tns NOPRINT >> %LOG%OraCall.sql
ECHO COL x_dbid NEW_VALUE v_dbid NOPRINT >> %LOG%OraCall.sql
ECHO COL x_dbname NEW_VALUE v_dbname NOPRINT >> %LOG%OraCall.sql
ECHO SELECT '%DBTNS%' x_tns FROM dual; >> %LOG%OraCall.sql
ECHO SELECT dbid x_dbid FROM v$database; >> %LOG%OraCall.sql
ECHO SELECT name x_dbname FROM v$database; >> %LOG%OraCall.sql
ECHO @SQLSelect.sql >> %LOG%OraCall.sql
ECHO spool off >> %LOG%OraCall.sql
ECHO exit >> %LOG%OraCall.sql
sqlplusw -s "%DBUser%/%DBPass%@%DBTNS%" @%LOG%OraCall.sql > %LOG%OraCall.lst
Jeff Hunter has some great example here:
http://www.dba-oracle.com/t_interface_oracle_windows_bat_file_script.htm
Hope this helps . . .
Donald K. Burleson
Oracle Press author
Author of "Oracle Tuning: The Definitive Reference"
http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm
Edited by: burleson on Dec 22, 2008 11:32 AM

Similar Messages

  • Run Powershell script from Scheduled Task as "NT Authority \ SYSTEM"

    Hello, dear Colleagues.
    Cannot make Powershell script from Scheduled Task as "NT Authority \ System"
    Action: Start a program - 
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "C:\script.ps1"
    The matter is that script is working, moreover if to run Task with Domain Account it works too.
    Checked Run with highest privileges, changed "Configure for" field, tried different arguments (-noprofile, -noexit, -executionpolicy bypass, -command, -file,") - no luck.
    Didn't you try to make it work with SYSTEM account?
    Thanks.

    Hi fapq,
    Try this link task schedulers
    Note
    To identify tasks that run with system permissions, use a verbose query (/query/v). In a verbose query display of a system-run task, the Run As User field has a value of NT AUTHORITY\SYSTEM and
    the Logon Mode field has a value of Background only.
    Naveen Basati

  • Run Scripts from windows command line

    Hi, We're creating a test enviroment and we need to "rebuild" our Database (Tablespace) from scratch everytime we run a test.
    What we need is to run all scripts files from windows command line, there is any command or application we can use here?
    thanks.
    Fernando.

    Create a scripts.bat file with something like this in it:
    @sqlplus -S username/password@connect @scriptname.sql

  • Running scripts from windows

    How to run sql/batch scripts if they are located on some window directory.
    like
    SQL>@'C:\<path>' for sqlscripts
    C:\script.bach for batch jobs
    right, send me some link to study scripting on windows plz

    Did you try it?
    I think you could get a quicker answer by trying it yourself (or heaven forbid, reading the SQL Plus manual).

  • Problem launching Firefox from Windows with file path that contains space characters in the html file's file name

    We have a software application that programmatically launches the default web browser using the Windows shell execute function ("ShellExecuteA" in the "shell32.dll" library of the Windows API) along with a file path for a saved local html file that is to be displayed. In the case that FireFox is the default browser and the file path for the html file contains any space characters in the html file's file name, Firefox (in this case v7.01) will display an error message "File not Found..." and then will also proceed to open tabs for each of the individual words in the file name, launching as the URL path, each individual word appended to ".com".
    In the following example, the path "C:\KSSecOfState\Forms\Kansas Secretary of State - Filings and Forms.htm" when launched programmatically, resulted in the error message "File not Found...Firefox can't find the file at /C:/KSSecOfState/Forms/Kansas." and opened up browser windows for "http://www.secretary.com/", "http://www.of.com/", "http://www.state.com/", "http://www.and.com/", and attempted to launch "http://forms.htm". If the same file (renamed) is launched using the path string "C:\KSSecOfState\Forms\KansasSecretaryOfState-FilingsAndForms.htm" the file opens up correctly in Firefox. Clearly the presence of spaces in the file name is causing the problem.
    I should also note that either path (with or without space characters) works properly if pasted directly into the Firefox URL path menu bar for a live instance of Firefox. The test path strings I used were:
    C:\KSSecOfState\Forms\KansasSecretaryOfState-FilingsAndForms.htm
    C:\KSSecOfState\Forms\Kansas Secretary of State - Filings and Forms.htm
    Does anyone know anything about this problem or how to work around it (other than the obvious answer of taking the spaces out of the file name which is not possible for this application). It seems the problem is specific to Firefox. IE works properly if launched programmatically with spaces in the file name passed to it. I haven't tested other browsers yet.
    Thanks!

    If starting from ShellExecute works the same as starting from the command line then there are two options:<br>
    Put everything inside double quotes<br>
    '''C:\Program Files\Mozilla Firefox\>'''firefox.exe '''"c:\test\svg test.htm"'''<br>
    Convert to a valid url with file:// protocol and percentage-escaping the space<br>
    '''C:\Program Files\Mozilla Firefox\>'''firefox.exe '''file://c:\test\svg%20test.htm'''<br>

  • SQL Developer 1.5.1 does not close from Windows Task Mgr

    I am not sure why but ever since I have upgraded to 1.5.1, when I close SQL Dev, the window GUI goes away but I see sqldeveloper.exe in the task manager. This drove me crazy because I was first fighting the problem where my connections got lost (thank goodness I always backup my install directory before upgrading due to the numerous upgrade problems).
    I am also having problems saving any preferences. I cannot tell it to skip the tips at startup, change the system theme, etc. This may be due to the fact that I have to kill the app in the task manager after I perform a Menu Exit within Oracle SQL Developer.
    I don't know but hopefully you guys will have gone through this.
    One other, hmmmm, rant if I may.
    Why is it that updates/upgrades of this application are such a PIA? I realize it is free but a guy can only take so much before just scraps passes on a piece of software and goes els were.
    Thanks in advance...
    Tom

    Here's the dump. A lot of information. I hope it provides a clue.
    WARNING: Unknown directive: ;IncludeConfFile
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .migration.jar!/META-INF/extension.xml:15: Duplicate declaration of addin oracle
    .dbtools.migration.workbench.core.MigrationAddin. Previously defined in extensio
    n oracle.sqldeveloper.migration
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.thirdparty.sqlserver.jar!/META-INF/extension.xml:13: Duplicate declaration
    of addin oracle.dbtools.thirdparty.sqlserver.SQLServerBrowserAddin. Previously
    defined in extension oracle.dbtools.thirdparty.sqlserver
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.snippet.jar!/META-INF/extension.xml:15: Duplicate declaration of addin ora
    cle.dbtools.raptor.snippet.SnippetAddin. Previously defined in extension oracle.
    dbdev.snippet
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.snippet.jar!/META-INF/extension.xml:16: Duplicate declaration of addin ora
    cle.dbtools.raptor.snippet.SaveSnippetAddin. Previously defined in extension ora
    cle.dbdev.snippet
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .thirdparty.access.jar!/META-INF/extension.xml:13: Duplicate declaration of addi
    n oracle.dbtools.thirdparty.access.AccessBrowserAddin. Previously defined in ext
    ension oracle.sqldeveloper.thirdparty.access
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.migration.sqlserver2005.jar!/META-INF/extension.xml:12: Duplicate declarat
    ion of addin oracle.dbtools.migration.workbench.plugin.SQLServer7Plugin. Previou
    sly defined in extension oracle.dbtools.migration.sqlserver2005
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.migration.sqlserver2005.jar!/META-INF/extension.xml:13: Duplicate declarat
    ion of addin oracle.dbtools.migration.workbench.plugin.SQLServer2000Plugin. Prev
    iously defined in extension oracle.dbtools.migration.sqlserver2005
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.migration.sqlserver2005.jar!/META-INF/extension.xml:14: Duplicate declarat
    ion of addin oracle.dbtools.migration.workbench.plugin.SQLServer2005Plugin. Prev
    iously defined in extension oracle.dbtools.migration.sqlserver2005
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .migration.mysql5.jar!/META-INF/extension.xml:13: Duplicate declaration of addin
    oracle.dbtools.migration.workbench.plugin.MySQLPlugin. Previously defined in ex
    tension oracle.sqldeveloper.migration.mysql5
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .migration.mysql5.jar!/META-INF/extension.xml:14: Duplicate declaration of addin
    oracle.dbtools.migration.workbench.plugin.MySQL4Plugin. Previously defined in e
    xtension oracle.sqldeveloper.migration.mysql5
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .migration.mysql5.jar!/META-INF/extension.xml:15: Duplicate declaration of addin
    oracle.dbtools.migration.workbench.plugin.MySQL5Plugin. Previously defined in e
    xtension oracle.sqldeveloper.migration.mysql5
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .migration.msaccess.jar!/META-INF/extension.xml:12: Duplicate declaration of add
    in oracle.dbtools.migration.workbench.plugin.MSAccessPlugin. Previously defined
    in extension oracle.sqldeveloper.migration.msaccess
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .sqlworksheet.jar!/META-INF/extension.xml:12: Duplicate declaration of addin ora
    cle.dbtools.sqlworksheet.sqlview.SqlEditorAddin. Previously defined in extension
    oracle.sqldeveloper.sqlworksheet
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.thirdparty.mysql.jar!/META-INF/extension.xml:12: Duplicate declaration of
    addin oracle.dbtools.thirdparty.mysql.MySQLBrowserAddin. Previously defined in e
    xtension oracle.dbtools.thirdparty.mysql
    Jul 1, 2008 7:43:17 AM oracle.ideimpl.extension.WarnAboutDisabledExtensionsAddin
    logDisabledExtensions
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/jdev/extensions/oracle.ide.xmlef.jar!/
    META-INF/extension.xml:0: Not loaded: Missing dependencies: oracle.ide.daf, orac
    le.ide.palette2
    Addin: Translator PlSql is trying to register a input type (.plsql) which confli
    cts with translator PlSql who already using this input type
    Exception initializing 'oracle.jdevimpl.runner.profile.ProfilerShell' in extensi
    on 'Database Developer': java.lang.NumberFormatException: For input string: "f1_
    prfdprojsetmemory_html"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.
    java:48)
    at java.lang.Integer.parseInt(Integer.java:447)
    at java.lang.Integer.valueOf(Integer.java:553)
    at oracle.ide.util.ArrayResourceBundle.getIntegerImpl(ArrayResourceBundl
    e.java:182)
    at oracle.jdevimpl.runner.profile.ProfArb.getInteger(ProfArb.java:66)
    at oracle.jdevimpl.runner.profile.ProfilerShell.createRunMenuItem(Profil
    erShell.java:193)
    at oracle.jdevimpl.runner.profile.ProfilerShell.createMenus(ProfilerShel
    l.java:175)
    at oracle.jdevimpl.runner.profile.ProfilerShell.initialize(ProfilerShell
    .java:166)
    at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManage
    rImpl.java:405)
    at oracle.ideimpl.extension.AddinManagerImpl.initializeAddins(AddinManag
    erImpl.java:214)
    at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(Ad
    dinManagerImpl.java:128)
    at oracle.ide.IdeCore.initProductAndUserAddins(IdeCore.java:1804)
    at oracle.ide.IdeCore.startupImpl(IdeCore.java:1481)
    at oracle.ide.Ide.startup(Ide.java:662)
    at oracle.ideimpl.DefaultIdeStarter.startIde(DefaultIdeStarter.java:35)
    at oracle.ideimpl.Main.start(Main.java:110)
    at oracle.ideimpl.Main.main(Main.java:72)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at oracle.ide.boot.PCLMain.callMain(PCLMain.java:66)
    at oracle.ide.boot.PCLMain.main(PCLMain.java:58)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at oracle.classloader.util.MainClass.invoke(MainClass.java:128)
    at oracle.ide.boot.IdeLauncher.bootClassLoadersAndMain(IdeLauncher.java:
    190)
    at oracle.ide.boot.IdeLauncher.launchImpl(IdeLauncher.java:90)
    at oracle.ide.boot.IdeLauncher.launch(IdeLauncher.java:66)
    at oracle.ide.boot.IdeLauncher.main(IdeLauncher.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at oracle.ide.boot.Launcher.invokeMain(Launcher.java:729)
    at oracle.ide.boot.Launcher.launchImpl(Launcher.java:115)
    at oracle.ide.boot.Launcher.launch(Launcher.java:68)
    at oracle.ide.boot.Launcher.main(Launcher.java:57)
    oracle.xml.parser.v2.XMLParseException: Start of root element expected.
    at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:323)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidati
    ngParser.java:345)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingP
    arser.java:307)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:298)
    at oracle.dbtools.raptor.utils.AbstractFolderedXml.processXML(AbstractFo
    lderedXml.java:70)
    at oracle.dbdev.oviewer.base.ViewerAddin.loadXMLEditors(ViewerAddin.java
    :198)
    at oracle.dbdev.oviewer.base.ViewerAddin$1.addinsLoaded(ViewerAddin.java
    :117)
    at oracle.ide.IdeCore.fireIdeEvent(IdeCore.java:843)
    at oracle.ide.IdeCore.mav$fireIdeEvent(IdeCore.java:124)
    at oracle.ide.IdeCore$3.run(IdeCore.java:815)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Could not load:oracle.dbtools.thirdparty.mysql
    Full thread dump Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode):
    "Keep-Alive-Timer" daemon prio=8 tid=0x05663610 nid=0x398 waiting on condition [
    0x05e0f000..0x05e0fae8]
    at java.lang.Thread.sleep(Native Method)
    at sun.net.www.http.KeepAliveCache.run(KeepAliveCache.java:149)
    at java.lang.Thread.run(Thread.java:595)
    "pool-1-thread-1" prio=6 tid=0x05658c00 nid=0x1304 waiting on condition [0x05bcf
    000..0x05bcfb68]
    at sun.misc.Unsafe.park(Native Method)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
    .await(AbstractQueuedSynchronizer.java:1767)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.jav
    a:359)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.ja
    va:470)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
    .java:674)
    at java.lang.Thread.run(Thread.java:595)
    "Native Directory Watcher" prio=2 tid=0x00a056c0 nid=0x16b4 runnable [0x0563f000
    ..0x0563fa68]
    at oracle.ide.natives.NativeHandler.enterWatcherThread(Native Method)
    at oracle.ide.natives.NativeHandler$2.run(NativeHandler.java:252)
    at java.lang.Thread.run(Thread.java:595)
    "IconOverlayTracker Timer" prio=6 tid=0x009d71f0 nid=0x15ec in Object.wait() [0x
    0516f000..0x0516fb68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x12ee5448> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:474)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x12ee5448> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "IconOverlayTracker Timer" prio=6 tid=0x009ce7f0 nid=0xc4c in Object.wait() [0x0
    4f6f000..0x04f6fc68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x12e6e6c8> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:474)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x12e6e6c8> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "TimerQueue" daemon prio=6 tid=0x00946e70 nid=0xd80 in Object.wait() [0x043cf000
    ..0x043cfd68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1289c378> (a javax.swing.TimerQueue)
    at javax.swing.TimerQueue.run(TimerQueue.java:233)
    - locked <0x1289c378> (a javax.swing.TimerQueue)
    at java.lang.Thread.run(Thread.java:595)
    "AWT-EventQueue-0" prio=6 tid=0x0093f460 nid=0xcd0 in Object.wait() [0x0428f000.
    .0x0428f9e8]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1283ac20> (a java.awt.EventQueue)
    at java.lang.Object.wait(Object.java:474)
    at java.awt.EventQueue.getNextEvent(EventQueue.java:345)
    - locked <0x1283ac20> (a java.awt.EventQueue)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:189)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    "AWT-Windows" daemon prio=6 tid=0x0093ae70 nid=0x121c runnable [0x0408f000..0x04
    08fae8]
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(WToolkit.java:269)
    at java.lang.Thread.run(Thread.java:595)
    "AWT-Shutdown" prio=6 tid=0x00939450 nid=0xdf4 in Object.wait() [0x03f8f000..0x0
    3f8fb68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1283ada8> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:474)
    at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
    - locked <0x1283ada8> (a java.lang.Object)
    at java.lang.Thread.run(Thread.java:595)
    "Java2D Disposer" daemon prio=6 tid=0x009384f0 nid=0x16c0 in Object.wait() [0x03
    e8f000..0x03e8fbe8]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1283ae30> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x1283ae30> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at sun.java2d.Disposer.run(Disposer.java:107)
    at java.lang.Thread.run(Thread.java:595)
    "Low Memory Detector" daemon prio=6 tid=0x009200d0 nid=0x828 runnable [0x0000000
    0..0x00000000]
    "CompilerThread0" daemon prio=6 tid=0x0091f580 nid=0xfdc waiting on condition [0
    x00000000..0x0354f6cc]
    "Signal Dispatcher" daemon prio=6 tid=0x0091e3b0 nid=0x584 waiting on condition
    [0x00000000..0x00000000]
    "Finalizer" daemon prio=8 tid=0x0091d950 nid=0x176c in Object.wait() [0x0334f000
    ..0x0334fa68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x127d01f8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x127d01f8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=6 tid=0x0091c5a0 nid=0x17c in Object.wait() [0x0
    324f000..0x0324fae8]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x127d0070> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:474)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
    - locked <0x127d0070> (a java.lang.ref.Reference$Lock)
    "main" prio=6 tid=0x009135b0 nid=0xc68 waiting on condition [0x00000000..0x0013f
    b70]
    "VM Thread" prio=6 tid=0x0091b8b0 nid=0x179c runnable
    "VM Periodic Task Thread" prio=6 tid=0x009232a0 nid=0x1490 waiting on condition

  • Scheduling unix shell scripts from windows using DOS batch files

    Hi,
    I want to schedule unix shell scrips using windows scheduled. I have the option of scheduling the DOS batch files. But not able to connect to telnet using DOS. Please let me know if there is an option.
    Regards,
    -Anand

    Drive letters are user specific. When you run jboss it runs as you, with your shared drives. When you run it as a service, it runs as guest or another user so your drive letters are meaningless.
    Either setup the user or use UNC

  • How to run Powershell script (function) through Windows Task Schduler ??

    Hello All,
    i have Powershell script which is created as a function. I have to give parameters to run the script. And it is working fine. Now i want to run this script through windows task scheduler but it is not working. I dont know how to call powershell function
    through task scheduler.
    From command line i run it like this:
    . c:\script\Get-ServiceStatusReport.ps1
    dir function:get-service*
    Get-ServiceStatusReport -ComputerList C:\script\server.txt -includeService "Exchange","W32Time" -To [email protected] -From [email protected] -SMTPMail mail01.xxx.gov.pk
    In windows Task scheduler I am giving this: it runs but i dont receive any output :
    Program/Script:
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Parameter:
    -file ". 'Get-ServiceStatusReport.ps1 -ComputerList C:\script\server.txt -includeService  "Exchange","W32Time" -To [email protected] -From [email protected] -SMTPMail  mail01.xxx.gov.pk'"
    Please HELP !!!

    Thanks for the reply:
    The script is already saved as Get-ServiceStatusReport.ps1 .
    On powershell it does not run like .\Get-ServiceStatusReport.ps1 (parameter).
    But i have to call it as function:
    Like this:
    Get-ServiceStatusReport -ComputerList C:\script\server.txt -includeService "Exchange","W32Time" -To [email protected] -From [email protected] -SMTPMail mail01.xxx.gov.pk
    As you said:
    I tried to run it like this:
    Program/Script:
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Parameter:
    -file "c:\script\Get-ServiceStatusReport.ps1 -ComputerList C:\script\server.txt -includeService  "Exchange","W32Time" -To [email protected] -From [email protected] -SMTPMail  mail01.xxx.gov.pk'"
    But its not working , on scheduler its giving error: (0xFFFD0000)
    Please HELP !!!
    WHOLE SCRIPT:
    function Get-ServiceStatusReport
    param(
    [String]$ComputerList,[String[]]$includeService,[String]$To,[String]$From,[string]$SMTPMail
    $script:list = $ComputerList
    $ServiceFileName= "c:\ServiceFileName.htm"
    New-Item -ItemType file $ServiceFilename -Force
    # Function to write the HTML Header to the file
    Function writeHtmlHeader
    param($fileName)
    $date = ( get-date ).ToString('yyyy/MM/dd')
    Add-Content $fileName "<html>"
    Add-Content $fileName "<head>"
    Add-Content $fileName "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"
    Add-Content $fileName '<title>Service Status Report </title>'
    add-content $fileName '<STYLE TYPE="text/css">'
    add-content $fileName "<!--"
    add-content $fileName "td {"
    add-content $fileName "font-family: Tahoma;"
    add-content $fileName "font-size: 11px;"
    add-content $fileName "border-top: 1px solid #999999;"
    add-content $fileName "border-right: 1px solid #999999;"
    add-content $fileName "border-bottom: 1px solid #999999;"
    add-content $fileName "border-left: 1px solid #999999;"
    add-content $fileName "padding-top: 0px;"
    add-content $fileName "padding-right: 0px;"
    add-content $fileName "padding-bottom: 0px;"
    add-content $fileName "padding-left: 0px;"
    add-content $fileName "}"
    add-content $fileName "body {"
    add-content $fileName "margin-left: 5px;"
    add-content $fileName "margin-top: 5px;"
    add-content $fileName "margin-right: 0px;"
    add-content $fileName "margin-bottom: 10px;"
    add-content $fileName ""
    add-content $fileName "table {"
    add-content $fileName "border: thin solid #000000;"
    add-content $fileName "}"
    add-content $fileName "-->"
    add-content $fileName "</style>"
    Add-Content $fileName "</head>"
    Add-Content $fileName "<body>"
    add-content $fileName "<table width='100%'>"
    add-content $fileName "<tr bgcolor='#CCCCCC'>"
    add-content $fileName "<td colspan='4' height='25' align='center'>"
    add-content $fileName "<font face='tahoma' color='#003399' size='4'><strong>Service Stauts Report - $date</strong></font>"
    add-content $fileName "</td>"
    add-content $fileName "</tr>"
    add-content $fileName "</table>"
    # Function to write the HTML Header to the file
    Function writeTableHeader
    param($fileName)
    Add-Content $fileName "<tr bgcolor=#CCCCCC>"
    Add-Content $fileName "<td width='10%' align='center'>ServerName</td>"
    Add-Content $fileName "<td width='50%' align='center'>Service Name</td>"
    Add-Content $fileName "<td width='10%' align='center'>status</td>"
    Add-Content $fileName "</tr>"
    Function writeHtmlFooter
    param($fileName)
    Add-Content $fileName "</body>"
    Add-Content $fileName "</html>"
    Function writeDiskInfo
    param($filename,$Servername,$name,$Status)
    if( $status -eq "Stopped")
    Add-Content $fileName "<tr>"
    Add-Content $fileName "<td bgcolor='#FF0000' align=left ><b>$servername</td>"
    Add-Content $fileName "<td bgcolor='#FF0000' align=left ><b>$name</td>"
    Add-Content $fileName "<td bgcolor='#FF0000' align=left ><b>$Status</td>"
    Add-Content $fileName "</tr>"
    else
    Add-Content $fileName "<tr>"
    Add-Content $fileName "<td >$servername</td>"
    Add-Content $fileName "<td >$name</td>"
    Add-Content $fileName "<td >$Status</td>"
    Add-Content $fileName "</tr>"
    writeHtmlHeader $ServiceFileName
    Add-Content $ServiceFileName "<table width='100%'><tbody>"
    Add-Content $ServiceFileName "<tr bgcolor='#CCCCCC'>"
    Add-Content $ServiceFileName "<td width='100%' align='center' colSpan=3><font face='tahoma' color='#003399' size='2'><strong> Service Details</strong></font></td>"
    Add-Content $ServiceFileName "</tr>"
    writeTableHeader $ServiceFileName
    #Change value of the following parameter as needed
    $InlcudeArray=@()
    #List of programs to exclude
    #$InlcudeArray = $inlcudeService
    Foreach($ServerName in (Get-Content $script:list))
    $service = Get-Service -ComputerName $servername
    if ($Service -ne $NULL)
    foreach ($item in $service)
    #$item.DisplayName
    Foreach($include in $includeService)
    write-host $inlcude
    if(($item.serviceName).Contains($include) -eq $TRUE)
    Write-Host $item.MachineName $item.name $item.Status
    writeDiskInfo $ServiceFileName $item.MachineName $item.name $item.Status
    Add-Content $ServiceFileName "</table>"
    writeHtmlFooter $ServiceFileName
    function Validate-IsEmail ([string]$Email)
    return $Email -match "^(?("")("".+?""@)|(([0-9a-zA-Z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-zA-Z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,6}))$"
    Function sendEmail
    param($from,$to,$subject,$smtphost,$htmlFileName)
    [string]$receipients="$to"
    $body = Get-Content $htmlFileName
    $body = New-Object System.Net.Mail.MailMessage $from, $receipients, $subject, $body
    $body.isBodyhtml = $true
    $smtpServer = $MailServer
    $smtp = new-object Net.Mail.SmtpClient($smtphost)
    $validfrom= Validate-IsEmail $from
    if($validfrom -eq $TRUE)
    $validTo= Validate-IsEmail $to
    if($validTo -eq $TRUE)
    $smtp.UseDefaultCredentials = $true;
    $smtp.Send($body)
    write-output "Email Sent!!"
    else
    write-output "Invalid entries, Try again!!"
    $date = ( get-date ).ToString('yyyy/MM/dd')
    sendEmail -from $From -to $to -subject "Service Status - $Date" -smtphost $SMTPMail -htmlfilename $ServiceFilename

  • Running shell command from Java, but from Windows Schedule Task?

    I have a simple java program that will start a dos based program. The java program works great when I run it, but when I run it from the Windows Task Scheduler, the dox box that should pop up, does not. It is running because I can see it in the task manager but I can not see the command window.
    Any ideas how to show the command window from a java application that is ran from Windows Task Scheduler?
    Example program below. Runs fine by itself, should get a dos popup that issues the directory command, run it from the scheduler and it does not show the dos box. You can however see it in the Processes as CMD.exe.
    import java.io.IOException;
    public class Test {
          * @param args
         public static void main(String[] args) {
              try {
                   Runtime.getRuntime().exec("cmd /k start dir");
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }Now the my real program is quite a bit more complicated. It actually goes out and checks the status of an Oracle Database, if all the tablespaces are online, then the middle tier application is allowed to start. The middle tier application is started by my java application, and is comes up with a dos console which shows status and users connected to the database.

    Jag,
    Actually, the question of whether it works for me seems to depend on the version of the OS (or Oracle). On RedHat Linux (Oracle 8.1.6) it didn't work at all, but on Solaris (Oracle 9.0.2) it did. Here's the output from that run:
    SQL> /
    output of the command run:
    init.ora
    initDBPart9i.DBPSun01.ora
    initdw.ora
    lkDBPART9I
    orapw
    orapwDBPart9i
    spfileDBPart9i.ora
    Done
    PL/SQL procedure successfully completed.
    But, I did need to change a line of your code to this:
    Process p = Runtime.getRuntime().exec("/usr/bin/ls");
    your original was:
    Process p = Runtime.getRuntime().exec("ls");
    You might consider, if possible, use of some of the Java File classes instead of ls, as this might make things more predictable for you. There were some examples in oramag.com a few months ago, but they were pretty simple (you might not need them).
    Hope this helps,
    -Dan
    http://www.compuware.com/products/devpartner/db/oracle_debug.htm
    Debug PL/SQL and Java in the Oracle Database

  • Cannot Execute Any UNIX Scripts From DAC

    Hello,
    I have a BI system implementation on Oracle Solaris Servers. Both DAC as well as Informatica are on single server. My business requirement calls for a frequent Data load into BI and Cache purge. i checked the forum and found so many articles on how to automate Purging of Cache Post ETL. I am successful in creating a script to purge the cache and i already tested it by executing the script manually. But when i call this script from a DAC task it fails. In order to make sure that there is no problem with the Script i created a simple script which just says "Hello" and tried to invoke the script from DAC task but failed.
    All Task Batches
    External Program Batch
      EXTERNAL PROGRAM TASKTest:/PurgeCache/CachePurge.sh:(Source : FULL Target : FULL)
      2013-10-13 17:40:38.015 Acquiring Resources
      2013-10-13 17:40:38.015 Acquired Resources
      2013-10-13 17:40:38.015 EXTERNAL PROGRAM TASKTest:/PurgeCache/CachePurge.sh:(Source : FULL Target : FULL) has started.
      ANOMALY INFO::: Error while executing : EXTERNAL PROGRAM TASKTest:/PurgeCache/CachePurge.sh:(Source : FULL Target : FULL)
      MESSAGE:::com.siebel.analytics.etl.execution.exceptions.ExternalProcessException:
      EXCEPTION CLASS::: java.lang.RuntimeException
      com.siebel.analytics.etl.etltask.GenericTaskImpl.doExecuteWithRetries(GenericTaskImpl.java:536)
      com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:372)
      com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:253)
      com.siebel.analytics.etl.etltask.GenericTaskImpl.run(GenericTaskImpl.java:655)
      com.siebel.analytics.etl.taskmanager.XCallable.call(XCallable.java:63)
      java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      java.util.concurrent.FutureTask.run(Unknown Source)
      java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      java.util.concurrent.FutureTask.run(Unknown Source)
      java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      java.lang.Thread.run(Unknown Source)
      ::: CAUSE :::
      MESSAGE :::
      EXCEPTION CLASS::: com.siebel.analytics.etl.execution.exceptions.ExternalProcessException
      com.siebel.analytics.etl.etltask.ExternalProgramTask.doExecute(ExternalProgramTask.java:99)
      com.siebel.analytics.etl.etltask.GenericTaskImpl.doExecuteWithRetries(GenericTaskImpl.java:477)
      com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:372)
      com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:253)
      com.siebel.analytics.etl.etltask.GenericTaskImpl.run(GenericTaskImpl.java:655)
      com.siebel.analytics.etl.taskmanager.XCallable.call(XCallable.java:63)
      java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      java.util.concurrent.FutureTask.run(Unknown Source)
      java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      java.util.concurrent.FutureTask.run(Unknown Source)
      java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      java.lang.Thread.run(Unknown Source)
      (Number of retries : 1)
      /PurgeCache/CachePurge.sh
      2013-10-13 17:40:38.031 EXTERNAL PROGRAM TASKTest:/PurgeCache/CachePurge.sh:(Source : FULL Target : FULL) has finished execution with Failed status.
    (Failed)
    Any help would be greatly appreciated.
    thanks and regards,
    Sree

    See the thread below:
    Re: FDM - Script

  • Run vbs script from maxl shell

    Hi -
    I created one vbs script (test.vbs) which copy file from one location to another one. I'm calling this vbs script from one maxl script (copy.msh).
    Here is the code in copy.msh:
    login "$user" "$pw" on "$server";
    shell "$(path)test.vbs xx.rul";
    When I run copy.msh script from windows command line, I get the window popup message:
    "Windows can not open this file test.vbs" ...
    Do I have to configure something on my machine to run vbs script? Any help on this would be highly appreciated.
    Thank You!

    Ensure the $path variable is being assigned the correct value. Based on the error you quoted, its not being assigned a value at all.
    It would help if you posted your actual code. Pls put the code inside &#123;code&#125; &#123;code&#125; tags for easier viewing.
    Robb Salzmann

  • An error The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered after launching a ps1 script from cmd file.

    I'm trying to load sharepoint script from *.cmd file. 
    I have Sharepoint 2010 installed on Windows 7 x64 and SQL server 2008r2.
    My cmd file is: 
    Powershell -v 2 -NonInteractive -NoLogo -File 1.ps1
    My sharepoint file 1.ps1 is:
    $snapin="Microsoft.SharePoint.PowerShell"
    if ($action -eq $null -or $action -eq '')
    {<br />
    # Action by default is complete uninstallation.
    $action='uninstall'
    $uninstall = $true
    else
    $action = $action.ToLower()
    switch($action)
    { $_ -eq "uninstall" } { $uninstall = $true; break }
    { $_ -eq "removesolution" } { $removeSolution = $true; break }
    { $_ -eq "deactivatecorpus" } { $deactivateCorpus = $true; break }
    { $_ -eq "deactivatesupport" } { $deactivateSupport = $true; break }
    default { Write-Host -f Red "Error: Invalid action: $action "; Exit -1 }
    Check the Sharepoint snapin availability.
    if (Get-PSSnapin $snapin -ea "silentlycontinue")
    Write-Host "PS snapin $snapin is loaded."
    elseif (Get-PSSnapin $snapin -registered -ea "silentlycontinue")
    Write-Host "PS snapin $snapin is registered."
    Add-PSSnapin $snapin
    Write-Host "PS snapin $snapin is loaded."
    else
    Write-Host -f Red "Error: PS snapin $snapin is not found."
    Exit -1
    $url = "http://pc1/sites/GroupWork/"
    $site= new-Object Microsoft.SharePoint.SPSite($url )
    $loc= [System.Int32]::Parse(1033)
    $templates= $site.GetWebTemplates($loc)
    foreach ($child in $templates){ write-host $child.Name " " $child.Title}<br />
    $site.Dispose()
    The script works fine from the Sharepoint 2010 management shell after launching the shell from the start menu (or from windows cmd by entering powershell -v 2):
    PS C:\2> .\1.ps1 
    PS snapin Microsoft.SharePoint.PowerShell is loaded.
    GLOBAL#0 Global template
    STS#0 Team Site
    STS#1 Blank Site
    STS#2 Document Workspace
    MPS#0 Basic Meeting Workspace
    MPS#1 Blank Meeting Workspace
    MPS#2 Decision Meeting Workspace
    MPS#3 Social Meeting Workspace
    MPS#4 Multipage Meeting Workspace
    CENTRALADMIN#0 Central Admin Site
    WIKI#0 Wiki Site
    BLOG#0 Blog
    SGS#0 Group Work Site
    TENANTADMIN#0 Tenant Admin Site
    {248A640A-AE86-42B7-90EC-45EC8618D6B4}#MySite2 MySite2
    {95629DC2-03B1-4C92-AD70-BC1FEAA49E7D}#MySite1 MySite1
    {7F01CFE4-F5E2-408B-AC87-E186D21F624C}#NewSiteTemplate NewSiteTemplate
    PS C:\2>
    I have an access to the database Sharepoint_Config from current domain user and from other 2 users. All users have db_owner rights to the Sharepoint_Config database. But
    i've loaded in windows from the user which is dbo in the database (dbo with windows authentication with domain\username for the current user). The dbo user has do_owner rights in the Sharepoint_Config database. I've tried to login under other users and launch
    the cmd file but without success.
    My PowerShell has version 2.0: 
    PS C:\2> $psversiontable
    Name Value
    CLRVersion 2.0.50727.5477
    BuildVersion 6.1.7601.17514
    PSVersion 2.0
    WSManStackVersion 2.0
    PSCompatibleVersions {1.0, 2.0}
    SerializationVersion 1.1.0.1
    PSRemotingProtocolVersion 2.1
    After launching the script from 1.cmd file i get an errors:
    C:\2>Powershell -v 2 -NonInteractive -NoLogo -File 1.ps1
    PS snapin Microsoft.SharePoint.PowerShell is registered.
    The local farm is not accessible. Cmdlets with FeatureDependencyId are not regis
    tered.
    Could not read the XML Configuration file in the folder CONFIG\PowerShell\Regist
    ration.
    Could not find a part of the path 'C:\2\CONFIG\PowerShell\Registration'.
    No xml configuration files loaded.
    Unable to register core product cmdlets.
    Could not read the Types files in the folder CONFIG\PowerShell\types.
    Could not find a part of the path 'C:\2\CONFIG\PowerShell\types'.
    "No Types files Found."
    Could not read the Format file in the folder CONFIG\PowerShell\format.
    Could not find a part of the path 'C:\2\CONFIG\PowerShell\format'.
    No Format files Found.
    PS snapin Microsoft.SharePoint.PowerShell is loaded.
    New-Object : Exception calling ".ctor" with "1" argument(s): "The Web applicati
    on at http://Pc1/sites/GroupWork/ could not be found. Verify t
    hat you have typed the URL correctly. If the URL should be serving existing con
    tent, the system administrator may need to add a new request URL mapping to the
    intended application."
    At C:\2\1.ps1:48 char:18
    + $site= new-Object <<<< Microsoft.SharePoint.SPSite($url )
    + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvoca
    tionException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.Power
    Shell.Commands.NewObjectCommand
    Please help me. I don't understand why the script is launched from the sharepoint management shell but doesn't work from the cmd file.

    I have an answer for my problem:  for solving a problem I've made several steps:
    1. Run farm installation under AD admin credentials - runas /user:Domain1\DomainAdmin1 "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\psconfigui.exe".
    This user has been added as farm administrator in the wizard.
    This user has been added as DBO in the SQL Server. (This is the main difference with my previous attempts)
    2. Execute a command Add-SPShellAdmin Domain1\UserAccount1 in
    the Management Shell of Sharepoint.
    3. Run SQL server and add Sharepoint_Shell_Access to the Domain1\UserAccount1
    (my main account) in the Config database
    4. Run CMD file only from Start->Run menu. 
    runas /user:Domain1\UserAccount1 "C:\1.cmd".
    Do not use Total Commander command prompt or file list for executing *.cmd of *.bat files without root administrator account.
    Thanks all for help.

  • Opening Excel Workbook Fails when run from Scheduled Task on Windows Server 2008 Rw

    Hi,
    I have a little vbs script that instantiates the Excel.Application object and then opens a work book to perform some tasks on it. The script runs fine when run from the command line. When I attempt to run it as a scheduled task (it is supposed to update
    data that is pulled from a SQL Server at regular intervals), it fails with the following error:
    Microsoft Office Excel cannot access the file 'c:\test\SampleWorkbook.xlsm'. There are several possible reasons: .....
    The file does exist. The path reported in the error is correct. The account under which the task is running is the same account I use to run it from the command line. User Account Control is not enabled, and the task is set up to run with highest privileges.
    When I run the same script through the Task Scheduler from a Windows Server 2003 machine, it works without issue.
    I was just wondering if somebody on this forum has run into a similar issue in connection with Windows Server 2008 R2 and figured out what the magic trick is to make it work. I'm sure it is rights related, but I haven't quite figured out what which rights
    are missing.
    Thanks in advance for any advice you may have.

    This is truly killing me ... trying to get it working on Windows Server 2012 without success.
    I desperately need to automate running Excel macros in a "headless" environment, that is non-interactive, non-GUI, etc.
    I can get it to work using Excel.Application COM, either via VBScript or Powershell, successfully on many other Windows systems  in our environment - Windows Server 2008 R2, Windows 7 (32-bit), etc.,  -BUT-
    The two servers we built out for running our automation process are Windows Server 2012 (SE) - and it just refuses to run on the 2012 servers - it gives the messages below from VBScript and PowerShell, respectively- 
    I have tried uninstalling and re-installing several different versions of Microsoft Excel (2007 Standard, 2010 Standard, 2010 Professional Plus, 32-bit vs. 64-bit, etc.), but it makes no difference.
    Would be extremely grateful if any one out there has had any success in running Excel automation on Server 2012 in a non-interactive environment that they could share.
    ( I have tried adding the "%windir%\syswow64\config\systemprofile\desktop"
    folder, which did fix the issue for me when testing on Windows Server 2008 R2, but sadly did not resolve it on Windows Server 2012 )
    [VBScript error msg]
    Z:\TestExcelMacro.vbs(35, 1) Microsoft Office Excel: Microsoft Office Excel cannot
    access the file 'Z:\TestExcelMacro.xlsm'. There are several possible reasons:
    • The file name or path does not exist.
    • The file is being used by another program.
    • The workbook you are trying to save has the same name as a currently open work
    [Powershell error msg]
    Exception calling "Add" with "0" argument(s): "Microsoft Office Excel cannot open or save any more documents because th
    ere is not enough available memory or disk space.
     To make more memory available, close workbooks or programs you no longer need.
     To free disk space, delete files you no longer need from the disk you are saving to."
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ComMethodTargetInvocation
    You cannot call a method on a null-valued expression.
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull

  • Completed Task cannot be launched again from the UWL.

    Here is the situation.
    The identified agent clicked the task in the UWL.
    Task was launched in a new window and opened an ABAP webdynpro application correctly.
    Agent then approved the task using the approve button in the application. Task was thus completed.
    Now the agent pulled the "Completed Tasks" from the Show dropdown on the Tasks tab in the UWL.
    The task which the agent approved earlier showed up.
    But when the agent clicked this link in the UWL. The application would not be launched again.
    The task preview does appear but the agent wants to the same application form displayed again to confirm what they have approved.
    Any ideas how this can be done. I remember we could do that in the PCR application on ISR framework.
    Edited by: Linkin Pereira on Dec 5, 2008 7:12 PM

    I did some investgation and figured out that there is no standard way to invoke an already completed Task.Therefore for our requirement I have proposed a new solution.
    I am storing the Workitem Id, when the task gets created, in a custom table along with all the data which is necessary for the I-View display.
    To enable users to open the I-View of the task they already completed and take a print out of the I-View etc, I have designed another application. and in this application I am using the Workitem Id to read which completed task they want to view.
    See if this works for you.

  • IIS Issue:when trying to download code from AWS S3 and deploy in IIS server using Power Shell script while Windows startup Default Application pool is not started.

    Hi,
    I am trying to launch Amazon EC2 windows server 2008 R2 instance using AWS Auto Scaling feature. I have used cusmized AMI in Autoscaling Launch configuration to launch an instance.I have placed Power Shell script in AMI. 
    The responsibility of script is to download code from AWS S3 and deploy in IIS server while windows startup first time.
    When i check status, IIS is started succesfully. But default Application pool is not started.
    To resolve this issue i have written one scheduled script. It helps to start the application pool if any application pool is in stopped state.
    After this Application pool is started but i am not able to communicate with IIS server through browser.  
    Please help any one to resolve this issue.
    Thanks in advance

    Hi Vchreddy,
    For the IIS issue, we recommend you can post in IIS forum for more effective support:
    http://forums.iis.net/
    Thanks for your understanding.

Maybe you are looking for

  • What's wrong with this button code

    Dear All, I am trying to set up a button handler for many buttons rather just one. The intention of this code is to say if I press Load1 to Load40 that button and only that button's alpha should change to 50%. This code makes them all 50% alpha when

  • I bought a song the other day and it only downloaded about a third of it. How do I fix the problem when iTunes doesn't recognize the mistake?

    Bought a song the other day and it did not download correctly. I am over 50 and a little new to using this technology so please pardon me if it is an easy fix. iTunes will not allow me to download it again or to even buy it again, so I cannot figure

  • Documents from UCM not opening in some browsers

    Hi , I am using the RIDC GET_FILE service to display the pdf in the WebCenter portal page. When the method is called the pdf document opens in Chrome browser in some machines but not in Firefox or other browsers. The file is returned as "application/

  • Hidden photos still appear in all photos album

    Hi In the new iPhoto when I hide photos they still appear in the All Photos album and will not hide , this is very inconveinant can somebody tell me if this is a bug or intentional and if so is there a work around. thx

  • Any easier way to set due dates?

    By and large, I'm pretty happy with the functionality of iCal, even if it's a bit basic. But setting due dates on to dos and events is very frustrating! Let's say you add a new to do, then click the due date box. Today's date is filled in, say, 26/08