Host command in rman

I have many oracle databases on two different sun servers.
In RMAN script I am copying some files (like password, tnsnames etc) by using host command. It works fine on one sun box but on other I am getting this error
host command complete
released channel: d1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-06135: error executing host command: Additional information: 512
Additional information: 4
This error I got when I run it via oracle schedular. If I run on command propmt it ask me to enter ORACLE_SID for each 4 times (I have four host commands) and after entering that it is fine.
As my knowledge in oracle + unix is less but it looks to me that it might be some environmental variables settings. Can anyone get rid of this error. Thanks

According to oracle note 75003.1
Where are oraenv and coraenv found and how do they get created on various
Unix platforms?
These scripts are used to allow the DBA to set a common environment
for all users and make it easier for users to move between databases.
By setting the variable "ORAENV_ASK" to yes, the user will be
prompted to enter the <SID> value of the database they would like to
access. If "ORAENV_ASK" is set to no, the current value of "ORACLE_SID"
will be used.
Next, the script 'dbhome' is called to determine the "$ORACLE_HOME"
for that SID and set "$ORACLE_HOME" to the corresponding value.
'dbhome' will also add "$ORACLE_HOME/bin" to the user's PATH and
on some platforms (such as Digital UNIX), it will run "ULIMIT".
These scripts can usually be found in:
/usr/local/bin, $ORACLE_HOME/bin HP-UX
/usr/bin, $ORACLE_HOME/bin Solaris, AIX
Both oraenv and coraenv are created during install and copied to
your "/usr/local/bin" when "root.sh" is run during post installation
steps.
Use oraenv when you are using the Bourne and Korne Shells.
Use coraenv when you are using the C shell.
These scripts perform the same functions, but are designed
for the different shells.

Similar Messages

  • System command en RMAN prompte

    Hi,
    on 10g R2 under Unix AIX,
    how can I use system command when in RMAN prompt :
    RMAN> host ls
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commandsThank you.

    try
    RMAN> host 'ls';
    test1  test2  test3
    host command completeRegards,
    - wiZ

  • Spool host commands

    Hello,
    Is it possible to use spool in order to record host commands typed from within the SQL*PLUS ?
    For example every RMAN command I type after "HOST RMAN TARGET /" wont be included in the spool until I type "EXIT" and go back to the SQL*PLUS environment.
    Is there any way to change this behavior ?
    Tnx allot :)

    Depending on how you execute your tasks you can try with redirection.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:896428357362

  • 10g Host command imp.exe not working

    Hi,
    Just created a relatively simple form that uses host command.
    I create a sql script using text_io to create a new user.
    I then use host to run that script on the app server.
    All this works fine.
    Then i use host command to try and import into the db. This is when it does nothing.
    I have cut it down to bear bones and a button with the command:
    host('D:\oracle\database\BIN\imp.exe LOG=D:\test.log');This doesnt even create the log "test.log"
    If i copy and paste this into the run box on the app server the log is created?
    Any ideas?
    Thanks

    hi
    first try to import by using dos go to start,run and cmd something like this.
    c:\Imp user/pass@orcl file=c:\file.dmp log=c:\log_name.log full=y
    What is import/export and why does one need it?
    Oracle's export (exp) and import (imp) utilities are used to perform logical database backup and recovery. When exporting, database objects are dumped to a binary file which can then be imported into another Oracle database.
    These utilities can be used to move data between different machines, databases or schema. However, as they use a proprietary binary file format, they can only be used between Oracle databases. One cannot export data and expect to import it into a non-Oracle database.
    Various parameters are available to control what objects are exported or imported. To get a list of available parameters, run the exp or imp utilities with the help=yes parameter.
    The export/import utilities are commonly used to perform the following tasks:
    Backup and recovery (small databases only, say < +50GB, if bigger, use RMAN instead)
    Move data between Oracle databases on different platforms (for example from Solaris to Windows)
    Reorganization of data/ eliminate database fragmentation (export, drop and re-import tables)
    Upgrade databases from extremely old versions of Oracle (when in-place upgrades are not supported by the Database Upgrade Assistant any more)
    Detect database corruption. Ensure that all the data can be read
    Transporting tablespaces between databases
    Etc.
    From Oracle 10g, users can choose between using the old imp/exp utilities, or the newly introduced Datapump utilities, called expdp and impdp. These new utilities introduce much needed performance improvements, network based exports and imports, etc.
    NOTE: It is generally advised not to use exports as the only means of backing-up a database. Physical backup methods (for example, when you use RMAN) are normally much quicker and supports point in time based recovery (apply archivelogs after recovering a database). Also, exp/imp is not practical for large database environments.
    [edit] How does one use the import/export utilities?
    Look for the "imp" and "exp" executables in your $ORACLE_HOME/bin directory. One can run them interactively, using command line parameters, or using parameter files. Look at the imp/exp parameters before starting. These parameters can be listed by executing the following commands: "exp help=yes" or "imp help=yes".
    The following examples demonstrate how the imp/exp utilities can be used:
    exp scott/tiger file=emp.dmp log=emp.log tables=emp rows=yes indexes=no
    exp scott/tiger file=emp.dmp tables=(emp,dept)
    imp scott/tiger file=emp.dmp full=yes
    imp scott/tiger file=emp.dmp fromuser=scott touser=scott tables=dept
    Using a parameter file:
    exp userid=scott/tiger@orcl parfile=export.txt
    ... where export.txt contains:
    BUFFER=10000000
    FILE=account.dmp
    FULL=n
    OWNER=scott
    GRANTS=y
    COMPRESS=y
    NOTE: If you do not like command line utilities, you can import and export data with the "Schema Manager" GUI that ships with Oracle Enterprise Manager (OEM).
    [edit] Can one export a subset of a table?
    From Oracle 8i one can use the QUERY= export parameter to selectively unload a subset of the data from a table. You may need to escape special chars on the command line, for example: query=\"where deptno=10\". Look at these examples:
    exp scott/tiger tables=emp query="where deptno=10"
    exp scott/tiger file=abc.dmp tables=abc query=\"where sex=\'f\'\" rows=yes--------------------------
    You can also use DBMS_DATAPUMP.
    For example, you can start the export job from a PL/SQL package with the following PL/SQL code:
    declare
        handle  number;
    begin
        handle := dbms_datapump.open('EXPORT','SCHEMA');
        dbms_datapump.add_file(handle,'SCOTT3.DMP','DUMPDIR');
        dbms_datapump.metadata_filter(handle,'SCHEMA_EXPR','= ''SCOTT''');
        dbms_datapump.set_parallel(handle,4);
        dbms_datapump.start_job(handle);
        dbms_datapump.detach(handle);
    end;
    / sarah

  • Forms HOST command no longer works after database upgrade from 10g to 11g

    Hi,
    After upgrading the database 10g to 11g the forms HOST command no longer works on Unix server. The form used to work fine prior the upgrade. I read all the threads I could find and did not see any solutions. Adding PATH and LD_LIBRARY_PATH does not work because it does not even run a basic shell script. (I saw this solution, adding PATH and LD_LIBRARY_PATH, in many questions / threads).
    1. I wouldn't expect the database upgrade to be an issue, but it is the only change we had.
    2. Note, 11g is Oracle Fusion Middleware which is quite a bit different than 10g.
    I even tried the most basic commands like "echo" which is a build-in Unix command and there is no directory for it (ie. no /usr/bin - so variable PATH is irrelvent). i.e HOST('echo hi'); and HOST('echo "hi" '); and even HOST ('echo hi > /my_file.txt'); all returns FORMS_FAILURE (actually the if is IF FORM_SUCCESS THEN ... else ... and the else part always runs now - whereas it didn't before.).
    Or basic commands like /usr/bin/ls as in HOST(/usr/bin/ls). At that point I was just testing the Unix command would return FORM_SUCCESS even though I could not see the results (because they weren't writing to a log file). Notice that I'm using the direct path /usr/bin so no Unix environment variables were needed.
    The form does use webutil but that part works. For example, we have webutil_file_transfer( ....) The file shows up on the application server and in the expected directory.
    Here's the main goal. Upload a file from clients local PC to the datebase server. The form uploads the file to the Application server, then we have a Unix script to scp (secure copy) the file from the application server to the database server. IF webutil, or any other Oracle functions could put the file on the database server that would be better. But, I don't know of any procedures that do that - or would have done it cleanly (i.e. storing to database and write back to server and then using a blob etc. )
    Anyway, I was hoping someone would help with either of these.
    1) Get the HOST command to work. - If we can get that to work then I wouldn't need any more help. We can just call the already existing Unix script to copy the file from the application server to the database.
    2) OR be able to upload directly to the database server - wanted to do that originally
    Any help would be appreciated

    Solution for those interested and for anyone else searching this forum for a solution
    I found this on My Oracle Support:
    <h3>Host Command from Forms Not Working in 11g in Sun Solaris Sparc OS [ID 1157346.1]</h3>
    Applies To: Oracle Forms - Version 11.1.1.1.0 and later
    Sun SPARC Sun OS
    Symptoms:
    When trying to execute a Shell script or any OS command using the host() Built-in from Forms 11g, the host()command is not getting executed. The same functionality works on other operating systems and in previous versions like 10gR2.
    Steps to be followed:
    1) Take a backup and edit the $DOMAIN_HOME/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.1/config/default.env or any custom environment file.
    2) Locate the following environment variable:
    LD_PRELOAD=/ora10gas/app/11.1.0/Middleware/as_1/jdk/jre/lib/sparcv9/libjsig.so
    3) Comment out this variable. After the changes, it will look like the following:
    #LD_PRELOAD=/ora10gas/app/11.1.0/Middleware/as_1/jdk/jre/lib/sparcv9/libjsig.so
    3) a) Instead of LD_PRELOAD, kindly use LD_PRELOAD_64 as given below :
    LD_PRELOAD_64=/ora10gas/app/11.1.0/Middleware/as_1/jdk/jre/lib/sparcv9/libjsig.so
    (This makes HOST AND RUN_REPORT_OBJECT work fine).
    4) Save the file and execute your forms. The Host() built-in will work as expected
    The LD_PRELOAD setting in default.env is only required for the working of signal chaining facility in JVM version 1.5 and later. If you are not using theSignal chaining facility, this variable is not required. For more information, refer to the following documentation
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e14772/forms.htm#CJAJGAFF

  • Host command is not working on linux

    Hi
    I m using linux for application server n windows for client. I need to create folder from client machine by cliking a button of forms10g runtime.HOST command is not working which was working fine in windows.
    Any help is appriciateable.
    kazi mokarem

    Hi
    I had the same issue on linux a few weeks back. What tuned out was, when you install the Oracle app svr it does not include the system paths by default.
    The path where mkdir is located may not be visible to the app.
    Try to hardcode the path for mkdir as /bin/mkdir .... and seee if that works.
    If the above statement works then add that path in the paths variable in default.env file located in $ORACLE_HOME/forms/server directory
    HTH
    Arvind

  • How to run a HOST command from Report 2.5

    Hello everybody,
    I want to pass an unix command from a Report. I am running the report (Report 2.5) on an Unix server and I want to pass a unix host command inside the Before Report Trigger of the report. But Report2.5 is not recognising the HOST built-in. Is there is any way around?
    Thank in advance.
    Samujjwal Basu

    First off is that openssl command correct? Should it be this instead:
    openssl pkcs8 -inform der -nocrypt -in test.der -out result.pem
    Try out your openssl command within a command prompt so that you know that it works ok. I think the command line you specified waits on stdin (well it does for me).
    After that.....
    runtime.exec creates a Process object. If you do this:
    Process openssl = runtime.exec("....")
    then you can examine the return code from openssl to see the exit code - for instance if the input file does not exist then exit = 1. You can test for this with Java
    Alternatively you could get the stderr from the process and look inside it - if it is 0 length then all is good, if it has some text in there then it has likely failed. You could then throw an exception and include the stderr output in the exception messgae. You may need to experiment with this, runnig it first when openssl is happy then running it again when openssl is upset.
    M

  • Host command in forms 10g

    hi all
    i am using host command in forms 10g. but it is not executing .
    is there any distinct syntax or pre-requirement for executing this command
    kindly help
    thanks

    i am using the following code create a text file in root directory.
    the textfile should contain the list of folders,files present in the root directory.
    XCMD:=NULL;
    XCMD:='CD\' ;
         CLIENT_HOST('CMD /C' || XCMD);
    XCMD:='dir >C:foldnm.txt' ;
         CLIENT_HOST('CMD /C '|| XCMD);
    but the file is creating in the specific users directory. ie.
    \ documents and settings\username\desktop
    kindly help

  • HOST command not working in forms 10g

    Hi,
    I have migrated forms 6i to forms 10g, and having a requirement to open sqlplus prompt using a form menu. I have used the below command: -
    "host('sqlplus '||user_name||'/'||pass||'@'||sid, no_screen);"
    But I am not able to get the sqlplus window, and the main form is still in process for long time, till i bounce the server.
    The forms are deployed on Oracle Applications Server 10g and i want to run it on server side.
    Please help me with the problem.
    Thanks,
    Ankit

    The deployment architecture is different between forms 10g and forms 6i.
    In Forms 6i HOST built-in command will run on the client machine since you are running as client/server, but in WebForms (Forms10g) the HOST built-in command will run on the middle tier which is your application server machine.
    In order to run hosts commands in WebForms you need to use webutil and use CLIENT_HOST in the webutil.
    check the [Forms 10g R2 Demo|http://download.oracle.com/otndocs/demos/Forms_Demos_10gr2.zip] for sample codes of webutil.
    You are using NO_SCREEN in your example, this will hide the window.
    Tony
    Edited by: Tony Garabedian on Nov 26, 2009 2:43 PM

  • Use Host command in Oracle forms 6i

    hi
    all
    i use Oracle forms 6i i run in a web and in that i have connect one server so,
    i have to use Host Command and i have to fire this command
    host (' net use \\windchillsvr\e\jyotionline /user:dwg_users dwg_users');
    But it's Not Connect
    My Forms in run in Web
    so help

    JavaBean does d othe job for you but it requires signing process; I used it when I was working on forms6i for our project.
    I could use another approach that is the file type command executable which it stays in client's PC to do it and it does not requires signing at all since I am now working on the Java EE project for downloading and launching the third party tool in client's PC.
    I plan to write a article for forms use, which could do all the heavy WebUtil can do, but not need to go thru the signing process.

  • How can I use variable name as a prameter value in HOST Command ???

    Hi All,
    How can it possible to use variable value in parameter in HOST command ??
    Following in my code:
    host('rwclient server=reptest report=c:\cust_print.rdf p_1= s_sam_cust_id userid=wh1/wh1@dwh desformat=pdf desty=file desname=c:/temp/'||v_sam_cust_id||'.pdf');
    Regards

    Hello,
    The Syntax of the builtin HOST is :
    SyntaxPROCEDURE HOST
    (system_command_string VARCHAR2);
    PROCEDURE HOST
    (system_command_string VARCHAR2,
    screen_action NUMBER);
    So , you can build the system_command_string as any VARCHAR2
    Example are provided in online help :
    http://www.oracle.com/webapps/online-help/forms/10g/topics/f1_help/builth_m/host.html?tp=true
    Regards

  • How to execute host command in trigger

    dear professional:
    i'm trying to create a trigger that when a certain value inserts into a table , it fires some UNIX command to do the job following
    here is what i tried ,create a trigger that gives host command , but when i tried insert , it fails to work
    i also tried dbms_pipe ,but seems same when using dynamic sql to do the job
    any idea of how to accomplish this task ?
    many thanks ~
    br/ricky
    SQL> CREATE OR REPLACE TRIGGER price_exec
    2 BEFORE INSERT ON omc.price_test
    FOR EACH ROW
    BEGIN
    IF :NEW.price = 4 THEN
    execute immediate 'host ll';
    END IF;
    END price_exec;
    / 3 4 5 6 7 8 9
    Trigger created.
    SQL> insert into price values ('test',4);
    insert into price values ('test',4)
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> insert into price_test values ('test',4);
    insert into price_test values ('test',4)
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    ORA-06512: at "OMC.PRICE_EXEC", line 3
    ORA-04088: error during execution of trigger 'OMC.PRICE_EXEC'

    hi,
    my db is 9.2
    i'm aware of schedule you mentioned , but if it's up to the task , you don't know when a row with certain value is inserted
    simple way :
    when a row inserted into a table with value "catch me" you want to know who inserted this test value
    so you tried to create a trigger to catch program, machine, module ,and terminal info from v$session
    so you can figure out where it is coming from
    and i want to go a step further , by executing some os command to digging out more
    and i come up with this , when value 4 is inserted i exec a procedure host to execute command,
    the problem is it's not working as i exepcted , so spare me the lecture of reading docs and just tell me what to do
    i'd really appreciate it , thanks
    CREATE OR REPLACE TRIGGER price_exec
    BEFORE INSERT ON omc.price_test
    FOR EACH ROW
    BEGIN
    IF :NEW.price = 4 THEN
    execute immediate 'host('echo')';
    END IF;
    END;
    Warning: Trigger created with compilation errors.
    SQL> show errors
    Errors for TRIGGER PRICE_EXEC:
    LINE/COL ERROR
    3/30 PLS-00103: Encountered the symbol "ECHO" when expecting one of
    the following:
    . ( * @ % & = - + ; < / > at in is mod not rem return
    returning <an exponent (**)> <> or != or ~= >= <= <> and or
    like between into using || bulk
    The symbol ". was inserted before "ECHO" to continue.

  • HOST command does not seem to work in deployment system

    I am developing forms software for a SUSE Linux system, but the HOST command does not seem to operate correctly when used in conjunction with Application Server.
    All I am trying to do is launch Adobe Acrobat reader as a background job using the command :-
    HOST('/opt/Adobe/Reader8/bin/acroread &');
    but nothing seems to happen.
    If I enter the command :-
    */opt/Adobe/Reader8/bin/acroread &*
    directly from a shell window (using the same login account) the command works correctly.
    I have tried other commands e.g. directory listings etc and all seem to have the same problem.
    Furthermore when the same form is run from the development environment using "Internet Developer Suite" it operates correctly with no problems.
    I am running on a deployment system where all three tiers of oracle are on the same machine (i.e. Database, AS and web front end).
    Can anybody suggest any possible causes or anything I can try to help resolve this problem ?

    brian_a_j wrote:
    Although I still dont understand why HOST would not work given my configuration (the Application Server and Web Browser operate on the same machine).One little test, put the execution command in a shell script and try to execute the script with the HOST command instead of the command itself.
    Using HOST the script will be executed on the AS machine no matter from where it is executed.
    Tony

  • Webutil_file_transfer and host command doesn't work

    I use a host command in forms to execute a sql-script, which creates a file on AS. After the host command I use webutil_file_transfer to ftp the created file to the client. If I try to do this again in the same session, the host command fails. I have to restart the application to get it working again. If I leave out the webutil_file_transfer I have no problems whatsoever. It looks like webutil is changing something perhaps in the environment. Anyone has the same problem (and a suitable solution)?

    I can remove the files on AS (so there seems to be no lock). After removal of the files, no new files wil be created, even if I change the name of the file that needs to be created. Only restarting the application helps.
    Raoul

  • WEBUTIL problems importing a file with the HOST command.

    We are investigating a problem where the users are trying to import a file in from the webserver to be used by the application. The users have successfully moved the file from their local PC to the application server. But, when we perform a HOST command to have the form moved to the UNIX directory, the form hangs. The very last statement of the .BAT file used in the HOST command does the move of the file. And, we can see the entire file in the UNIX directory, we just don't get return back to the form.
    I added displays before and after the HOST command in the form. I see the display before the command but don't receive anything after. The weird thing is this is only happening in our development server. The same issue is not happening in production. Also, if I run the form in client server mode, it works fine also. So, it has to be something on the development application server.
    If anyone has any advice, I would appreciate their help.
    Thanks.

    On the server (assuming Windows since you mention a batch file), locate the Oracle Process Manager Service (for mid tier) on the MS Services Console. Open the properties for this service and click on the "Log on" tab. Check the box labeled "Allow service to interact with desktop".
    That said, if you are executing a batch file on the Windows server to transfer another file to a Unix machine, the above likely won't work either. This is because Windows will not allow a service permission to access network resources (for security purposes). In this case, rather than the above, you will need to change the same setting so a real domain user and not the "Local System" account.

Maybe you are looking for

  • E90 micro SD card problem

    Hi. I've got Apacer 1 Gb micro SD card. Everything was working fine. But after I renewed the software of my Nokia E90, the micro SD cannot be found by PC with USB adapter. I thought the card crashed or smthng. So I bought a SanDisk 4Gb card. Firstly

  • Cleaning up Image quality of old VHS tapes

    Is there anything you can do in final cut pro to clean up the image quality of captured footage.. even slightly? I am capturing a bunch of old VHS and Hi8 tapes from the early 90's and the image quality is quite bad. Is there anything I can do to fix

  • Iphoto is not working on my Mac, I click on it and nothing happens

    All of a sudden I can't open iPhoto

  • WRT310N returns "page not found" when attempting to change _anything_

    I just switched from ADSL (Bell Canada) to cable (Rogers). I am trying to change over the settings on my WRT310N. I logged into the router using Safari, which worked perfectly. However, when I selected the pop-up for the connection type, as soon as I

  • Converting from BASE 64 to Decimal Base 10

    I have an requirement to convert a value from base 64 to decimal base 10 for ex if i give b the resultant output should be 27 as per the website -- http://convertxy.com/index.php/numberbases/ I tried using the UTL_ENCODE.BASE64_ENCODE with UTL_RAW.CA