How to run a PS script on a remote machine

Hi,
I have a script located on a remote machine at c:\Temp\Script1.ps1  I want to run this script remotely from a driver system.  Via Powershell remoting on the driver machine, I run the following:
$cred = Get-Credential Domain1\User1
$Sessid = New-Pssession DC1
Invoke-Command -session $sessid -cred $cred -ScriptBlock {c:\temp\Script1.ps1}
I get an error 'Invoke-Command : Parameter set cannot be resolved using the specified named parameters.
I see the Session ID created and opened fine and the script runs fine on its own on the remote machine.
Any suggestions as to how to resolve the error
Thanks for your help! SdeDot

You don't say what the client machine is, but if it is a windows PC you could use the TEXT_IO package that comes as part of Oracle Forms or procedure builder. Alternatively you could use the client version of SQL*Loader. If neither of these options are feasible, why not just copy the file on to the server and use UTL_FILE, SQL*Loader, or define an extrnal table?
Regards,
Steve Rooney

Similar Messages

  • How to run the SQL Script in SQL Prompt?

    Hi ExpertGroup,
    I have written one SQL Script name called "MySQLSCript.SQL". I want to know how to run the SQL Script in SQL Prompt?.
    Generally, I run SQL Script in PL/SQL Developer tool. But In this case, some SET command is not working/supporting in PL/SQL Developer Tool.
    Let me know, How to Run in SQl Prompt.
    Thanks & Regards,
    Senthil K Kumar.

    This is my SQL Script....
    SET COLSEP '|'
    SET LINESIZE 32767
    SET PAGESIZE 50000
    /* SET LINESIZE 3000
    SET PAGESIZE 50000
    SET DEFINE OFF */
    SET ECHO OFF
    SET FEEDBACK OFF
    --SET HEADING OFF
    SET TRIMSPOOL ON
    SET NEWPAGE NONE
    SET UNDERLINE OFF
    SPOOL &&EnterPath;
    SELECT * FROM &&TableName;
    SPOOL OFF
    SET FEEDBACK ON
    --SET DEFINE ON
    PROMPT Done.
    I am able to run this script in SQL Prompt....
    Its executing fine...
    But, If I am executing again it maynot asking for new set of data....
    alternativily its taking old values only.....
    how can i exeute with new set of data in the sql prompt.....

  • How to run the open script code from eclipse?

    Hi,
    How to run the open script code from eclipse.
    Please let me any soulutions on this.

    Hi Konda
    I am not quite sure you can do that and it would even be not supported... Again, what is the purpose? Why do you want to run your openscript code in Eclipse?
    What is the code you try to run?
    As an example, even if you include al the jar files and so on. don't think the function "Launch Browser" could work because it isn't only java code orjar files.....
    If you give us more background. maybe we can guide you to a better solution...
    JB

  • How to run unix shell script from java web applet

    hi all
    i have created one java applet. my apache web server is on unix server.
    i have created one shell script in same directory where my .class and .htm files reside...
    how to run this shell script from applet? it should search this .sh file on server and not on the client browser machine...
    thanks in advance

    I suppose you could make the shell script into a CGI, configure the server to execute CGIs, and then make the applet open the URL of that CGI.

  • How to run an Oracle Script File

    Hi,
    Please anybody tell me how to run an Oracle script file (*.sql file) from Query template.
    In SQL*Plus we run a script file as @Script_file_name.sql
    how do we do it in Query Template.

    Dave,
    Please only post your question in one thread at a time....
    [SAP xMII synchronus commincation|SAP xMII synchronus commincation]
    Sam

  • How to run a sql script in oracle forms

    Hi,
    For me there is an sql script. I need to run that sql script in forms.
    Actually we will run that sql file in pl/sql developer by giving @and the file name.
    But how to run that file in forms.
    Can any one help on these.Which book I have to look.
    Thanks

    Actually there is a script files which will drop all the indexes and tables.
    DROP querry will be there for each index and each table.
    So I run the script all the indexes and all the tables will be deleted. So using forms I have to run that script.
    Thanks

  • How to run a unix script from oracle warehouse Builder

    Hi,
    can any one share the information about, running the unix script or scripts using oracle warehouse builder.
    Regards,
    Ak

    One way is define a workflow. Inside the workflow you put
    1)an external process that "points to" the shell script and then
    2)put the mapping
    The external process must have the "COMMAND" parameter set to the name of the shell script. If the script has parameters you must put them in the "PARAMETERS LIST" separated by "?" (for example, ?par1?par2).
    The path where OWB executes the external process I think is the ORACLE_HOME of the OWB.
    f you don't use workflow, you can try with this more complex solution. I tried with 9i and OWB 9.2 and it's working well.
    You create an autonomous procedure (within a package or not) :
    CREATE PROCEDURE Extract_Email_List
    DECLARE
    PRAGMA AUTONOMOUS_TRANSACTION;
    And use the sys.shell script that you need your dba/unix admin to install first of all, with a call like that.
    sys.shell('sh ' || txt_dir_name || '/send_email_marketing.sh ' || txt_dir_name || ' ' || email_addr );
    Then you import your procedure into OWB and use it in your mapping with the "pre-mapping" icon (you can set parameters for your proc with constants if you want).
    To implement sys.shell, go to metalink and find "Note:168065.1" - "How to call a UNIX shell script from PL/SQL".
    Once it's done once, it's not so bad. But I would still recommend the workflow approach also..
    I hope this helps.

  • How to run the perl script from java ?

    Hi , I need to run the pearl script from the server and to get the result of the script thro' java using SSH
    Is there any 3rd party SSH API in java ?
    Please help me out
    thanks in advance
    karthik

    This seems like a very strange thing to want to do.
    What is the perl script doing?
    Do other programs (not some shell script) access this server-side perl script from a different machine?
    If so how do they do it?
    What currently triggers the perl script to execute?
    What currently handles the output from the perl script?
    If you can answer these questions (and understand the answers) you should be able to come up with a different approach to this.
    You do not really want to call a remote perl script from a Java program, you want to achieve the effect you think that would have if you could do it.
    So find the answers to the above questions, write them on 3" x 5" cards and lay them out on your desk.
    What flow of control needs to happen? Which piece of code needs to produce or consume which piece of data?
    If that fails, ask you self or who ever is making you do this what are the use-cases?
    If you do not know what use-cases are or do not understand them well enough try reading
    Use Case Modeling (The Addison-Wesley Object Technology Series) by Kurt Bittner and Ian Spence (Paperback - Aug 30, 2002)
    http://www.amazon.com/s/ref=nb_ss_gw/002-7908514-4043267?url=search-alias%3Dstripbooks&field-keywords=use+cases&x=0&y=0
    It is a short and easy to read book on the subject and also one of the best.
    You MUST understand WHAT you are trying to achieve before you can decide HOW you are going to achieve it.

  • How to run a Python Script in Terminal ?

    Hello,
    how can you run a Python Script in Terminal ? (OS X 10.4.5 - not OS X Server)
    It´s about this Sript:
    http://www.macosxhints.com/article.php?story=20060225091102170
    Thanks
    iMac G5 20"   Mac OS X (10.4.5)  

    While this isn't really specific at all to OS X Server (please keep your questions in the "Mac OS X Server" topic area related to OS X Server, it helps you and everyone else
    Now then:
    Please note the comments of "robg" (the site-"mom"/host):
    "You'll want to save the script without the .txt extension, and remember to make it executable with chmod a+x site2template.sh
    Save the file to your Desktop, and remove the ".txt" from the name so it's named: site2template.sh
    then in the Terminal, issue:
    chmod +x ~/Desktop/site2template.sh
    "~" is shortcut for "the current user's (my) home directory"
    From there you can simply use:
    ~/Desktop/site2template.sh /your/site
    But, far better to:
    choose a location to save the script, typically /usr/local/bin:
    make the directory if you don't have one:
    sudo mkdir /usr/local/bin
    sudo cp ~/Desktop/site2template.sh /usr/local/bin/
    then adjust the permissions:
    sudo chmod 755 /usr/local/bin/site2template.sh
    You may want to add /usr/local/bin to your path.
    cat /etc/profile
    and if you don't see it, add:
    PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
    export PATH
    ie:
    sudo cp /etc/profile /etc/profile.bak
    (back it up to play safe)
    sudo pico /etc/profile
    and add
    :/usr/local/bin
    to the path info.
    Save it (ctl w)
    exit (ctl x)
    then type: source /etc/profile
    (start learning vi or emacs eventually)
    and you'll be able to run:
    site2template /path\ to/your/site/to\ convert

  • How to run a shell script from the GUI?

    This is probably a dumb question...
    How do I run a shell script from the GUI? I've been told to double click it but when I do, it opens as a text file.

    The behavior you describe is that used by the KDE and GNOME desktops of Linux.
    Under OS X, if you make a script then mark it as executable, double-clicking on it in the Finder will not execute it. Actually, it uses a rather complex algorithm ([summarized here|http://arstechnica.com/reviews/2q00/macos-qna/macos-x-qa-2.html]) to determine what to do with it. This is implemented in Mac OS X' LaunchServices framework (incidentally, the associations are cached in /Library/Caches/com.apple.LaunchServices*.csstore and ~/Library/Caches/com.apple/LaunchServices*.csstore). You can read the details in the developer docs about LaunchServices.
    Anyway, in short, the suffix '.command' is a built-in type in the LaunchServices network that identifies a shell script. If you run
    /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServic es.framework/Support/lsregister -dump
    ... it will tell you as much.

  • How to run multiple Test Script versions at once

    HI
    How to Run different versions of Test Scripts ( TCD record & SAP GUI) continiously.
    Thankyou

    >
    d s wrote:
    > HI
    > How to Run different versions of Test Scripts ( TCD record & SAP GUI) continiously.
    >
    > Thankyou
    Hi DS,
    If I understand your question correctly,you want to execute different version of TCD and SAPGUI continously,then please find the steps below:
    1)Create a new script.
    2)Call the individual scripts created in TCD and SAPGUI in the new script using REF command in the pattern you want to execute.
    3)eCATT will automatically choose the relevant version automatically suitable for the system.
    4)Maintain the input and output paramters in the main script.
    5)Paramterize the input and output values.
    6)Once the script is without errors,you can execute the scripts and they run continously.
    Hope this answers your query.
    Regards,
    SSN.

  • How I run a shell script from the scheduler on 10.2.0.2.0 ?

    Hello Oracle People,
    I'd like to run a shell script from the Scheduler in my 10g database.
    Right now it is a simple shell script.
    Eventually it will wrap RMAN commands to back up my DB.
    I wrote a simple pl/sql script to create a job:
    -- cr_job10.sql
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'my_backup_job',
    job_type => 'EXECUTABLE',
    job_action => '/h/oracle/scripts/tst.sh',
    start_date => '06-SEP-07 5.33.00PM US/Pacific',
    repeat_interval => 'FREQ=DAILY',
    end_date => '08-SEP-07 4.00.00PM US/Pacific',
    enabled => TRUE,
    comments => 'My Backup Job');
    END;
    I see no errors when I run the above procedure.
    I checked DBA_SCHEDULER_JOBS and the job is in there.
    The scheduler, though, errors out with an error which I see in a trace file:
    /h/oracle/admin/orcl/bdump/orcl_j000_22396.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ORACLE_HOME = /h/oracle/product/10r2
    System name: SunOS
    Node name: sol
    Release: 5.10
    Version: Generic_118855-14
    Machine: i86pc
    Instance name: orcl
    Redo thread mounted by this instance: 1
    Oracle process number: 15
    Unix process pid: 22396, image: oracle@sol (J000)
    *** ACTION NAME:(MY_BACKUP_JOB) 2007-09-06 17:33:00.175
    *** MODULE NAME:(DBMS_SCHEDULER) 2007-09-06 17:33:00.175
    *** SERVICE NAME:(SYS$USERS) 2007-09-06 17:33:00.175
    *** CLIENT ID:() 2007-09-06 17:33:00.175
    *** SESSION ID:(140.13520) 2007-09-06 17:33:00.175
    *** 2007-09-06 17:33:00.175
    ORA-12012: error on auto execute of job 53267
    ORA-27369: job of type EXECUTABLE failed with exit code: 274662
    I googled on this:
    ORA-27369: job of type EXECUTABLE failed with exit code: 274662
    Google returned only 1 hit.
    There, I see some evidence that I need to configure something inside
    of Oracle to run shell scripts from the scheduler, but possibly just
    for machines running windows. I'm running Solaris.
    Do any of you know what I need to configure inside of Oracle to
    run shell scripts from the scheduler?
    -Owen

    Hello people,
    I should have added this bit of information:
    "The script runs fine from oracle's crontab."
    "The script runs fine from a shell owned by oracle."
    I'm getting responses telling me to check my env variables and permissions
    which would be helpful to a UNIX novice.
    I have a feeling that no one is using the scheduler to run RMAN scripts.
    Tim Hall suggested I take a close look at these files:
    $ORACLE_HOME/rdbms/admin/externaljob.ora
    $ORACLE_HOME/bin/extJob
    Currently I'm setup like this:
    bash sol root /h/oracle/product/10r2/bin 31 #
    bash sol root /h/oracle/product/10r2/bin 31 # ll $ORACLE_HOME/rdbms/admin/externaljob.ora
    -rw-r--r-- 1 root dba 52 Sep 7 15:29 /h/oracle/product/10r2/rdbms/admin/externaljob.ora
    bash sol root /h/oracle/product/10r2/bin 32 #
    bash sol root /h/oracle/product/10r2/bin 32 # cat $ORACLE_HOME/rdbms/admin/externaljob.ora
    # externaljob.ora
    run_user = rman
    run_group = rman
    bash sol root /h/oracle/product/10r2/bin 33 #
    bash sol root /h/oracle/product/10r2/bin 33 #
    bash sol root /h/oracle/product/10r2/bin 33 #
    bash sol root /h/oracle/product/10r2/bin 33 # ll $ORACLE_HOME/bin/ext*
    -rwsr-x--- 1 rman dba 30388 Sep 21 2006 /h/oracle/product/10r2/bin/extjob*
    -rwsr-x--- 1 rman dba 30392 Sep 21 2006 /h/oracle/product/10r2/bin/extjobo*
    -rwsr-x--- 1 rman dba 34468 Sep 21 2006 /h/oracle/product/10r2/bin/extproc*
    -rwxr-xr-x 1 oracle dba 300 Sep 21 2006 /h/oracle/product/10r2/bin/extusrupgrade*
    bash sol root /h/oracle/product/10r2/bin 34 #
    bash sol root /h/oracle/product/10r2/bin 34 #
    bash sol root /h/oracle/product/10r2/bin 34 #
    On my system, the user 'nobody' has no shell so I cannot use nobody.
    I created a user named rman:
    bash sol root /h/oracle/product/10r2/bin 34 #
    bash sol root /h/oracle/product/10r2/bin 34 #
    bash sol root /h/oracle/product/10r2/bin 34 # su - rman
    Sun Microsystems Inc. SunOS 5.10 Generic January 2005
    $
    $ id
    uid=220(rman) gid=220(rman)
    $
    $
    $ date
    Fri Sep 7 16:30:03 PDT 2007
    $
    $
    Jared points out that rman needs access to extproc:
    $ ls -la /h/oracle/product/10r2/bin/extproc
    -rwsr-x--- 1 rman dba 34468 Sep 21 2006 /h/oracle/product/10r2/bin/extproc
    $
    $
    Here is a demo of rman running his script:
    bash sol root /h/oracle/product/10r2/bin 35 # su - rman
    Sun Microsystems Inc. SunOS 5.10 Generic January 2005
    $
    $
    $ ls
    scripts
    $
    $
    $ scripts/tst.sh
    $
    $
    $ cat scripts/tst.sh
    #! /bin/sh
    /usr/bin/date > /tmp/tst.sh.out.txt 2>&1 &
    exit 0
    $
    $
    $ cat /tmp/tst.sh.out.txt
    Fri Sep 7 16:31:23 PDT 2007
    $
    $ rm /tmp/tst.sh.out.txt
    $
    I am focused on this error:
    ORA-27369: job of type EXECUTABLE failed with exit code: 274662
    And I am focused on this exit code: 274662
    What does 274662 mean?
    If the Scheduler gives me an error like "274662" rather than some English,
    it's obvious to me the Scheduler is a POS and I should not use it.
    And of course,
    If I cannot run RMAN from Oracle Scheduler, I'll use cron.
    -Owen

  • How to run an eCATT script in a cyclic mode?

    Hi,
    I want to run an eCATT script in a cyclic mode. i.e. It should be run for every 15 min.
    Is there any option to do this?
    Please revert back if you want any other info.
    Thanks,
    Nagarajan M,
    9820586549

    Yes, java.lang.Runtime.exec().
    Read this carefully before you do:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Don't write a line of code before you're reviewed and understood the article completely. - MOD

  • How to run cmlogs.sh script

    Hi,
    I am following the following metalink note
    CMLOGS.TXT - Script for Retrieving Log Files Associated to a Request & Manager Doc ID: Note:134009.1
    Mine is 11.5.10.2 on HP-UX...
    When I run the above script
    $cmlogs.sh -c apps/<apps pasword> < Request ID>
    I am getting the following error
    $ cmlogs.sh -c apps/apps 987123
    cat: Cannot open /tmp/987123.lst: No such file or directory
    $
    What might be the problem......

    I have tried to run the script on my test instance as follows:
    appltest@data/home/appltest>cmlogs.sh apps/apps_pw 571922Retrieving file names...
    Log file for 571922 is: /u01/oracle/testcomn/admin/log/TEST_data/l571922.req, on machine data
    Output file for 571922 is: /u01/oracle/testcomn/admin/out/TEST_data/o571922.out, on machine data
    Manager log file for 571922 is: /u01/oracle/testcomn/admin/log/TEST_data/w31478.mgr
    Successfully retrieved manager logfile.
    Internal concurrent manager logfile is: /u01/oracle/testcomn/admin/log/TEST_data/TEST_1225.mgr
    Successfully retrieved ICM logfile.
    All log files are now in: ./571922.logs
    The script will spool all log files under a directory "571922.logs" (i.e. Req_ID.log) created under the current user directory.
    appltest@data/home/appltest>cd 571922.logs
    appltest@data/home/appltest>ls
    TEST_1225.mgr w31478.mgr

  • How to run a Calc script in ASO application

    Hi,
    I have gone through the Essbase Release 11.1.2 and I tried to implement the Calc scripts in ASO application.
    When I tried to Create a Calc Script using Calc script editor for ASO Application in EAS console it say's "Calc script is not supported in ASO application". When i saved the Calc scripts it appears in Backend but it is not visible in EAS console.
    I tried to call the Calc script using MDX script but it says "Unable to open the file Custom calculation terminated with Essbase error 1241109"
    Can anyone help me how to work on Calc scripts in ASO application?
    Thanks in advance

    I think you might be confusing BSO calc scripts with ASO custom calcs, there is a whole section in the documentation on ASO calcs - http://docs.oracle.com/cd/E40248_01/epm.1112/essbase_db/aso_custcalc_alloc.html
    There are also examples on the internet if you search spend some time researching.
    Cheers
    John
    http://john-goodwin.blogspot.com/

Maybe you are looking for

  • How do i bring up list of music on my ipod shuffle

    I have a ipod shuffle and want to display my music list on screen so I can add or delete music

  • Photoshop Elements tags to Sharepoint?

    I just started working as a work study at our local college and I've just been given the task of organizing and tagging 10,000+ photos on our college SharePoint server. The person who was working on this project before I joined was using Photoshop El

  • Creating Views with DI APIs DoQuery-Method in SQL 2005

    Hi @All, I've had the following (solved) problem: The DB installer of one of our AddOns is also creating a bunsh of views for our UDTs. The installer always executes the following two statements for each view: IF OBJECT_ID ('[dbo].[@NSP_EXAMPLE_VIEW]

  • Audio drops out of Premiere Pro CC2014

    Working on an older Mac Pro running Mavericks, the audio drops out suddenly. It can be from initial launch of a new project, or one in progress while you're in the middle of an edit session. And when I say "drops out", it literally goes entirely away

  • Creating Attribute Dimensions

    I have a Cost Center dimension with 10,500 members. I want to quickly tag these cost centers with 2 attributes. 1st is the first 3 characters of the string(8 in total) as company and the 4th position as dept. How can I do this in an automated way sin