Execute script in remote server

Hello ..
My question, is there any built-in package can do the following:
- Open connection from oracle database to remote server (windows server)
- Execute script located in the remote server
or anything can help to achieve this
Thanks

"or anything can help to achieve this"Your question is rather vague, so it's hard to know what "this" is.
Anyway, there are two aspects to your question:
1. running a script (presumably a .SQL script or similar).
Oracle doesn't provide much in the way of built-ins to run scripts. Scripts are OS tools, and generally intended to be invoked from an OS agent (a shell script, SQL*Plus, etc). One option for running scripts is to build a Java Stored Procedure which mimics teh SQL*Plus HOST command. Tom Kyte has an example of this. Find it here: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:952229840241 Alternatively, as others have pointed out, DBMS_SCHEDULER supports running OS executables (since 10g). This would be a good solution if you want to run the script repeatedly, at definable times.
2. accessing a remote directory
The database can only access local directories. If you want it to be able to access a remote directory you will need to persuade your sysadmin or network admin to share the requisite drive and create a mapping to it on your database server.
As for other ways of doing it, well the best way is to avoid the need for a script in the first place. Oracle has added a whole bundle of functionality to the database which increasingly render shell scripts obsolete. If you can explain what your script does we might be able to explain how to implement it as a pure PL/SQL solution.

Similar Messages

  • How to execute program in remote server?

    In my code I am executing a program that resides on another
    server. But when I execute the program the server where the code is
    resided runs the program and sucks up CPU.
    How can I make it execute the program in the remote server? I
    don't want it to just fetch the exe and run it locally. I want it
    to execute the program IN the remote server, using ITS resources.
    The remote server is a network share, \\server2 for example.
    Any thoughts?

    You should be able to use <cfexecute...> to do this,
    you will have to
    make sure all the connections and permissions are set up.
    Just remember that by default, at least on windows systems,
    CF is
    configured to only have access and permissions to the local
    system, you
    will need to modify this if it has not been done.

  • Calling stored procedure from script on remote server

    We are migrating our database to a virtual server environment. On the current dedicated environment, the database and scripts(calling stored procedures) are on the same server. In the new envoirnment, the scripts, input and output files will be on a different server. Does anyone have any examples of scripts on one server calling stored procedures on another server. Don't laugh, but the db server is currently running Oracle 9i (part of the new enviornment to move to 11g).

    brifry wrote:
    sorry my terminolgy is not correct. the stored procedure is in the database and the database is on server a. The script is on server b. In your example you show how to log onto the database. That I know. In your example your example, how would you point to server b so you can log onto the database?Do you want to mean that your procedure (location A) want to call a script from location B ?
    make the script located folder as shared and ,You may try this
    //server_name/folder_name/file_name.xxxHope this helps

  • Optimize Powershell script (reboot remote Server and Check Services)

    Hi there,
    For my next maintenance Weekend i try to write a script to reboot all Servers and check after the reboot all automatic Service if there are running or not.
    Now the Script works fine for me so far, but it is not perfect. I would like to ask if anybody could help me to optimize it.
    # First Part: Reboot Servers
    $date = Get-Date -Format dd-MM-yyyy
    # Get list of Servers
    $Servers = Get-Content "D:\Scripts\Reboot\servers.txt"
    # Reboot each server
    ForEach ($Server in $Servers)
    "Computer $Server initiated reboot at $(Get-Date)" | Add-Content -Path D:\Logs\Reboot\Rebootlogs_$date.txt
    Restart-Computer $Server -Force -Wait
    # Check each Server
    forEach ($Server in $Servers)
    if (Test-Connection $Server -quiet) { "Computer $Server verified to be responding to ping at $(Get-Date)" | Add-Content -Path D:\Logs\Reboot\Rebootlogs_$date.txt }
    else { "Computer $Server unresponsive to ping at $(Get-Date)" | Add-Content -Path D:\Logs\Reboot\Rebootlogs_$date.txt }
    # Seconde Part: Check Services
    # Get list of Servers
    $Servers = Get-Content "D:\Scripts\Reboot\servers.txt"
    # Check Auto Services on each Server
    ForEach ($Server in $Servers)
    ForEach-Object {
    Write-Output $Server | Out-File -FilePath "D:\Logs\Reboot\services_$date.txt" -Append
    # get Auto that not Running:
    Get-WmiObject Win32_Service |
    Where-Object { $_.StartMode -eq 'Auto' -and $_.State -ne 'Running' } |
    # process them; in this example we just show them:
    Format-Table -AutoSize @(
    'Name'
    'DisplayName'
    @{ Expression = 'State'; Width = 9 }
    @{ Expression = 'StartMode'; Width = 9 }
    'StartName'
    ) | Out-File -FilePath "D:\Logs\Reboot\services_$date.txt" -Append
    As you can see i do it in two parts, the perfect way might be in one, where i check one server and write also just one log with all information.
    At the Moment the log files Looks like that:
    Reboot:
    Computer server1 initiated reboot at 04/28/2015 15:14:51
    Computer server2 initiated reboot at 04/28/2015 15:16:40
    Computer server1 verified to be responding to ping at 04/28/2015 15:17:41
    Computer server2 verified to be responding to ping at 04/28/2015 15:17:44
    Service:
    Server1
    Name           DisplayName         State   StartMode StartName                
    RemoteRegistry Remote Registry     Stopped Auto      NT AUTHORITY\LocalService
    sppsvc         Software Protection Stopped Auto      NT AUTHORITY\NetworkSer...
    Server2
    Name           DisplayName         State   StartMode StartName                
    RemoteRegistry Remote Registry     Stopped Auto      NT AUTHORITY\LocalService
    sppsvc         Software Protection Stopped Auto      NT AUTHORITY\NetworkSer...
    Now my Question is how to Change maybe my Loop or code to get one Log like that:
    Computer server1 initiated reboot at 04/28/2015 15:14:51
    Computer server1 verified to be responding to ping at 04/28/2015 15:17:41
    Name           DisplayName         State   StartMode StartName                
    RemoteRegistry Remote Registry     Stopped Auto      NT AUTHORITY\LocalService
    sppsvc         Software Protection Stopped Auto      NT AUTHORITY\NetworkSer...
    Computer server2 initiated reboot at 04/28/2015 15:16:40
    Computer server2 verified to be responding to ping at 04/28/2015 15:17:44
    Name           DisplayName         State   StartMode StartName                
    RemoteRegistry Remote Registry     Stopped Auto      NT AUTHORITY\LocalService
    sppsvc         Software Protection Stopped Auto      NT AUTHORITY\NetworkSer...
    Thanks for helping.

    You could probably have something nice using Function and CmdletBinding so you can get something like:
    function reboot-myservers { blablabla }function check-myservices { blablabla }$Servers = Get-Content "D:\Scripts\Reboot\servers.txt" $servers | reboot-myservers | check-myservices
    Bruce Jourdain de Coutance - Consultant MVP Exchange http://blog.brucejdc.fr

  • Run perl script on remote server

    Hello
    I have 2 servers, server 1 and server2.
    I have a perl script on server2 and I want to execute that perl script so my code is like
    $command= { param($p1,$p2) cmd /c test.pl $p1 $p2 }
    Invoke-Command -session $sesion -ScriptBlock $command -ArgumentList 1,2
    session is already created with server2 from server1. 
    perl script kept on server2 spawn another cmd which interacts with server3.
    When I run above code that perl script start executing but it stays in executing step for infinite time..as per observation, I have found that it stucks when it tried to spawn another cmd which interacts with server3 from server2.
    How can I handle this?

    Second hop restriction and some issue in the perl script that prevents it from honoring the error.
    Run script interactively to test results.
    Enter-PsSession $session
    Type your command and see if you see an error.
    \_(ツ)_/

  • Power shell script to install apps in remote server

    Hello Masters , 
    Tried pssession , invoke command to run a PS1 script in remote server 
    script wil install a exe file and run a script to install features 
    no luck no luck no luck 
    please help !

    Your code looks fine.  Your main problem is that you aren't providing anyone with any useful information about what's going wrong.  Is there an error message?  Do chickens fly out of the computer speakers instead of your script running as
    you expect it to?
    My gut instinct tells me that psremoting isn't enabled, or a security configuration isn't working.  Use the following links or try psexec instead.
    http://technet.microsoft.com/en-us/library/dd315349.aspx
    http://technet.microsoft.com/en-us/library/dd347642.aspx
    I hope this post has helped!

  • Error while executing script for sharepoint online (office 365) - the remote server returned an error: (503) server unavailable

    error while executing script for sharepoint online (office 365) - the remote server returned an error: (503) server unavailable.
    I am creating many site collections reading records from sharepoint list using powershell in sharepoint online tenant (office 365).
    Few site collections are created and then getting above error so this error record will be skipped then few succeeding record processed then again getting error.
    pattern is like:
    success
    success
    success
    success
    Error
    success
    success
    success
    success
    success
    success
    error
    success

    Hi,
    As it is an online environment, to troubleshoot this issue in an easier way, I suggest you contact Office 365 Support to see if there is any useful information in
    the log files in the server side:
    https://support.office.com/en-us/article/Contact-Office-365-for-business-support-32a17ca7-6fa0-4870-8a8d-e25ba4ccfd4b?ui=en-US&rs=en-US&ad=US
    Best regards
    Patrick Liang
    TechNet Community Support

  • How do I execute a PHP script on a remote server?

    I have a PHP script that sends a confirmation email to guest users that fill out one of my forms. The script runs fine when I test it, but when it is called from a custom JSP, Vibe blocks it from running. I understand that what I want to do is to most likely to use a remote application, but I don't want to send data back and forth and all the examples use java servlets, I just simply want to run my script without Vibe blocking it. Is there a easier way to do this? or can someone point me in the right direction?

    Vibe is not configured to run PHP scripts so you cannot run your script from custom jsp.
    You have already PHP script running on the server and running it as remote application is realy easy. All you have to do is to get request paramater in PHP script, register remote application in Vibe and in some point call remote application (you can do it also from custom jsp).
    Regards
    Pawel

  • Executing powershell script from remote computer using RSAT

    Hi.
    I want to execute powershell script on AD server from remote computer (in the same domain). I installed and tested RSAT - it is working fine. But i cant execute PS from c# code.
    ps.Commands.AddCommand("Import-Module").AddArgument("ActiveDirectory");
    ps.Invoke();
    ps.Commands.AddCommand("Get-ADOrganizationalUnit -Filter 'Name -like \"*\"'");
    var res = ps.Invoke();
     And i get exception:
    An unhandled exception of type 'System.Management.Automation.CommandNotFoundException' occurred in System.Management.Automation.dll
    Additional information: The term 'Get-SBNamespace' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

    Hi
    CapitanPlanet
    For the
    CommandNotFoundException, it means the command cannot be found.
    On the other hand, your issue is about the PowerShell, if you still have the issue, I suggest that you should post it in the
    PowerShell forum for efficient response.
    Here are some useful information, please check
      Powershell
    commands from C# not working (System.Management.Automation.CommandNotFoundException)
    Powershell, Service Bus For Windows Server Programmatically: Command found, module could not be loaded
    https://msdn.microsoft.com/en-us/library/dn282152.aspx
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Execute commands on a remote server

    hello,
    1. how can i execute commands on a remote server using java (how to connect and how to execute) without having java on the remote server
    (i cannot connect with Socket object)
    2. how can i execute commands on the local computer
    please help me

    Well, for #1, if you can possibly know what commands you'd have to call you could set a perl script up on the remote machine to perform that command and return to you the results. problem is, you'll have to have a web server of some sort to do this (as far as i know).
    I know it's not a very good solution, but it's helped me plenty of times where i couldnt install Jakarta or the likes on a server and couldnt connect to it using sockets.
    Justin

  • How to execute an SSIS package on a scheduled basis from remote server and pass in input files

    I have an application server and a db server.  My db server has all things SQL Server stored on it (DBMS, SSRS, SSIS, etc.)  I have several nightly batch process SSIS packages (dtsx files currently) that will pickup an input file and import them
    into the database.  I would like to execute all batch processes from my application server as I have quite a few other ones as well that do other stuff outside of SQL Server via powershell.  My question is how to do this?  Is there away to execute
    them remotely via DTexec.exe, should I set them up as Agent jobs and somehow pass in the file names\location (how?), create and SSIS catalog, etc.?  
    I need to easily be able to see if the packages execute successfully or not and if not capture the detailed information of why they failed from the remote server so I can use that to drive my process flow logic in the batch processes.

    Hi Jason,
    According to your description, you want to execute a package on a schedule and receive notification when package ends with error in the job.
    After testing the issue in my environment, we can directly add the package in a step of a job, then add a schedule and set the Alert and Notification property in the job to achieve your requirement. For more details, please see:
    Create a Database Mail in the SSMS.
    Right-click the SQL Server Agent services to Enable mail profile, then select the appropriate Mail profile.
    Under the Operators folder, create an operator with the correct E-mail name.
    Right-click the Jobs folder to add a new job.
    In the Steps pane, New a step with SQL Server Integration Services Package Type to run the package.
    In the Schedules pane, New a schedule for the job.
    In the Alerts pane, New an alert with SQL Server event alert, then enable Notify operators option with an operator in the Response pane.
    In the Notifications pane, enable Email option with same operator and When the job fails selection.
    Then when the package fails, the job would be failed and we can receive the error message in the mailbox.
    Besides, please make sure the account that execute the job has correct permissions for the file, for the folder that contains the file, and for the database.
    References:
    Configure Database Mail – Send Email From SQL Database
    How to setup SQL Server alerts and email operator notifications
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Execute sql script in oracle server

    hi how can i run an SQL script in oracle server in every first day of the month? i dont want to run that script manually every first day of the month.

    What OS and version are you running?
    You can schedule this from the OS side as well if you don't want to use the scheduler.
    In linux you can make use of the crontab:
    crontab -e
    #then paste the following lines with the path to your scripts
    #.---------------- minute (0 - 59)
    #|   .------------- hour (0 - 23)
    #|   |   .---------- day of month (1 - 31)
    #|   |   |   .------- month (1 - 12) OR jan,feb,mar,apr ...
    #|   |   |   |  .----- day of week (0 - 7) (Sunday=0 or 7)  OR sun,mon,tue,wed,thu,fri,sat
    #|   |   |   |  |
    #*   *   *   *  *  command to be executed
    00 01 1 * * /<path to your scripts>/script_name.shThe above script will run on the 1st day of every month at 01h00.
    your script (the one you are calling in the cron) will have to call the sql script and should look similar to this:
    #export all your environment variables here
    # for example
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/<your path>
    export ORACLE_SID=ORCL
    export PATH=$ORACLE_HOME/bin:$PATH
    sqlplus user/password@DB @/path/your_sql_script.sqlHope this helps

  • Issue in executing an application from another remote server

    Hi Experts,
    I have an application on one of the remote server which is running on Windows Server 2003.
    I would like to execute this application from another remote server (also running on Windows Server 2003). I am able to browse the application path using "\\", but when double clicking on the application
    gives "you may not have appropriate permission to access the item"
    How do I set the permission & what permission is required?
    Please anybody can explain?
    Thanks in advance.
    Regards,
    Naveen J V

    Is this a single exe file, or is it part of an installed application with exe, dlls, registery settings, etc?
    If this is an installed application, you cannot run it like this. That would be like trying to start microsoft office which is installed on a different computer.

  • Need a bat script to check Server status remotly.

    Hi,
    I need bat script to check server status remotly (Ping) for multiple servers. It should generate a txt file for result.
    Thanks.

    Hi Ravi,
    To ping multiple computers and generate report cia cmd, please refer to the script below, the "fnm" is computer name list and the "lnm" is the result, and you can save the script below as .bat file:
    @echo off
    set fnm=d:\test1\computers.txt
    set lnm=d:\test1\ping.txt
    if exist %fnm% goto Label1
    echo.
    echo Cannot find %fnm%
    echo.
    Pause
    goto :eof
    :Label1
    echo PingTest STARTED on %date% at %time% > %lnm%
    echo ================================================= >> %lnm%
    echo.
    for /f %%i in (%fnm%) do call :Sub %%i
    echo.
    echo ================================================= >> %lnm%
    echo PingTest ENDED on %date% at %time% >> %lnm%
    echo ... now exiting
    goto :eof
    :Sub
    echo Testing %1
    set state=alive
    ping -n 1 %1
    if errorlevel 1 set state=dead
    echo %1 is %state% >> %lnm%
    Refer to:
    Explain the Batch script to ping multiple computers
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Use VI server to start an LabVIEW executable on a remote computer ?

    I have VI server starting an executable on the same computer; however, when I try to start an executable on a remote computer I get a message that the remote host refuses connection.
    I think I may have to set priveleges both at the Windows (XP) and perhaps at the LabVIEW LEVEL (in the INI file ?).
    Any help would be greatly appreciated.

    You cannot use the TCP VI Server to start an executable remotely. Open Application Reference opens a connection to an executable that is already running.
    You have to use DCOM/ActiveX to do that. See here.
    LabVIEW, C'est LabVIEW

Maybe you are looking for

  • Adobe AIR app installation issue due to certificate problem on mac 10.9.5

    Im trying to upgrade and then reinstall an Adobe Air application but get the error message failing to install due to a certificate issue. The developer says the fix is to uninstall the app and install again but this also fails. Checked my machine clo

  • Why has Mountain Lion created 3 iMessage accounts on download

    Does anyone have any idea why Messages is not working since I downloaded Mountain Lion. I was using a Beta version on Lion with no problem. Since I have downloaded Mountain Lion, three iMessage Accounts have appeared in my Accounts panel, along with

  • WiSM password recovery / config reset

    I am configuring a WiSM blade. Consoling in I completed Side A with the initial config. It saved and reloaded. I was able to re-signed on with default name/pw and things looked good. I plugged into B side (console) and used same default name/pw. Comp

  • Moving from 4s to 5s but only half my apps are enve listed.

    I have synced my old 4s till I am blue in the face but in iTunes and Apps it shows face icons on the right ride of the paqe as 108 apps. I can see them all in my layout. But on the left side of the page where the apps are all listed in a single row,

  • Firefox and OS 10.2.8 - Firefox won't install

    I've been trying to get Firefox to install on a G4 running OS 10.2.8. Roam was kind enough to offer some suggestions, (I've posted under a different user account but didn't like having my full name "out there") but I'm still at square one, which is: