Host Exp command

Dear Gurus,
I am trying to execute a command in PL/SQL as
EXECUTE IMMEDIATE EXP PWD1/USER1@TEST FILE=D:\USER1.dmpbut I receive error message as
ORA-00900: invalid SQL statement
how can I write a function/ procedure to take backup of database
*009*

yes, it exists in Oracle 10g and above.
In Oracle 9i you can call, from inside PL/SQL, an exernal procedure that runs host commands.
See this Link:http://download.oracle.com/docs/cd/B10501_01/win.920/a95490/applicat.htm#1005845
Max

Similar Messages

  • SYSTEM HANGS WHILE RUNNING EXP COMMAND IN ORACLE 10G

    WHEN WE ARE RUNNING THE EXP (EXPORT) COMMAND IN ORACLE 10G
    TO TAKE THE BACKUP IT GETS HANGED FOR A LONG TIME AND THEN IN THE LOG FILE WE FIND THE FOLLOWING ERROR MESSAGE.
    SOMETIMES AFTER RESTARTING THE SERVER WE ARE ABLE TO RUN THE EXP COMMAND.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user MANHAR
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user MANHAR
    About to export MANHAR's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    *********************************** AT THIS POINT THE SYSTEM HANGS FOR A LONG TIME.
    EXP-00056: ORACLE error 24324 encountered
    ORA-24324: service handle not initialized
    EXP-00056: ORACLE error 24324 encountered
    ORA-24324: service handle not initialized
    EXP-00000: Export terminated unsuccessfully
    THE EXP COMMAND THAT WE USE IS AS FOLLOWS:
    EXP MANHAR/MANHAR FILE=F:\BACKUP\MANHAR.DMP LOG=F:\BACKUP\MANHAR.LOG BUFFER=1000000 GRANTS=Y CONSTRAINTS=Y
    WE ARE RUNNING THE EXP COMMAND ON THE SERVER ITSELF.
    THE SERVER OPERATING SYSTEM IS WINDOWS 2003 SERVER.
    Kindly give us a solution at the earliest.

    You should ask Oracle support for help. There's only one entry for this error stack (Bug 3361288 - Export of XMLSCHEMA may fail with ORA-24324 in UTF8), but it should have been fixed for your DB version and , as far as I can see, you don't have a Unicode database.
    Werner

  • How to configure host copy command inside EM Console

    hi,
    I want to copy a file from one server to my production server. i found that through host copy command its is possiable in command prompt.but when i configure host copy command inside em console it is not working. i am getting following error
    ORA-06550: line ORA-06550: line 3, column 6: PLS-00103: Encountered the symbol "COPY" when expecting one of the following: := . ( @ % ; , column :
    Any solution for this
    Edited by: mithun on Jun 16, 2011 2:36 AM

    mithun wrote:
    hi,
    I want to copy a file from one server to my production server. i found that through host copy command its is possiable in command prompt.but when i configure host copy command inside em console it is not working. i am getting following error
    ORA-06550: line ORA-06550: line 3, column 6: PLS-00103: Encountered the symbol "COPY" when expecting one of the following: := . ( @ % ; , column :
    Any solution for this
    Edited by: mithun on Jun 16, 2011 2:36 AMThis makes no sense whatsoever.
    Now, as for your original question, there is not "host copy" command. Not in sqlpus, not in em.
    What you are doing in sqlplus is the sqlplus command "host". That is a sqlplus command, documented in the SQLPlus Reference. The sqlplus command "host" takes an argument of an os command (in your case, the OS command is "copy") and creates a sub-process to ask the os to execute that command.
    I can't even imagine what you are referring to when you say "when i configure host copy command inside em console". Can you explain in more detail?

  • How to use a subquery in query parameter in exp command

    I am trying to export certain rows of a table using exp command
    exp TRA/simple@TRA consistent=y indexes=n constraints=n tables=TRA$EMPL query=\"where deptid in \(select objectid from Person\)\" file=/dbase/dump/archv.2009-10-2917:24:00.dmp
    but im getting an error
    LRM-00112: multiple values not allowed for parameter 'query'
    EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
    EXP-00000: Export terminated unsuccessfully

    On what OS you are trying to do that ?
    What oracle version ?
    Did you try to use parameter file ?
    Have in mind that when using parameter file , special characters don't need to be escaped.

  • Host OS command line call from dbs procedure

    Hi
    I am using Win2000 server and 8i, I want to execute a host os command in the middle of a database procedure but do not know how.
    I did a search here and did not find anything.
    Any help greatfully received.
    cheers
    Tony

    You just did search hard enough :)
    Host commands

  • Imp and Exp Command

    Hi,
    Pls explain me the concept of Imp/Exp command and the parameters assocoiated with it?If u can tell me online practicals for Import/Export command?
    Regards
    sudhir

    At 8:03, you "wanna learn" about tablespaces and datafiles.
    At 8:11 you want the concept of Imp/Exp explained to you.
    At 8:10 you "wanna learn" the concept of Roll Back Segmenst [sic]
    And at 8:12 you "wanna learn" all about SQL*Loader
    Not bad for nine minutes of complete thoughtlessness, I suppose.
    If you "wanna learn" all about Oracle, download the software, install it, start playing with it, and come back with some serious questions that show a modicum of thought, effort, persistence and care. Paying some attention to the usual rules of grammar and spelling might be an idea, too.
    You'll find installations documented at http://www.dizwell.com/prod/node/695#installation, and then you can work your way through some concepts at http://www.dizwell.com/prod/node/263 and then you can start doing some basic fiddling at http://www.dizwell.com/prod/node/695#basics and once you've worked your way through that lot, you should be in a position to make sensible use of the stuff over at http://tahiti.oracle.com.
    And after you've had a good read of the official Concepts book there, then you can come back here to ask specific questions and reasonably expect to get meaningful replies.

  • To find whether a form using HOST (Unix) command to exit/execute a process.

    Hi all,
    I have some(Little bit) knowledge on forms.But here I got one requirement which was confusing me .The requirement is ,we have nearly 70 custom forms developed
    using TEMPLATE.fmb.Now I have to open each and every form and have to check whether that form is using any HOST (unix) command to exit to the shell and
    execute a process .I never got this type of requirement previously .Can any one help in how to search for those commands ,I.e is there any standard to use Unix call in
    particular trigger or etc..
    Thanks in advance .
    Regards,
    Gopi.CH

    Your question is a little unclear. The "HOST" command is an Oracle Forms built-in command which allows you to execute OS commands. So the only part of it that belongs to forms is the part that looks like HOST(). The contents within the parentheses would be the command you wanted to execute. For example:
    HOST('/path/to/your/script.sh');Refer to the Forms Builder online help for more information about how to use the HOST command.

  • How to export datbase with exp command

    Hi guys,
    How to export oracle database using exp command without including tables space names.
    I tried with this
    ./exp username/password file=db-export.dmp
    ./imp username/password file=db-export.dmp full=y ignore=y
    But when I try to import database with separate login(username/password) its giving following error for some tables,
    ORA-00959: tablespace 'MANUJA' does not exist
    MANUJA is my username of first database
    any help ?
    Thanks
    Best Regards,
    Manuja

    Option 1:
    ./imp username/password file=db-export.dmp full=y
    If still error then :
    Option 2:
    pre-create your table then import with ignore=y option.
    If still error then :
    make sure userB just have one default tablespace (BC) and quota only on BC. So if you have unlimited quota for userB on all tablespaces, then objects will go to original tablespace and not the tablespace you want to put in(to default tablespace).
    Revoke any unlimited tablespace privs from userB and just have one default tablespace.
    REVOKE UNLIMITED TABLESPACE FROM USERB;
    imp system/manager fromUser=userA toUser=userA file=myexport.dmp log=myexport.log
    Source: OrionNet @ remap tablespace using imp
    Regards
    Girish Sharma

  • -bash: exp: command not found

    Hi!
    we are trying to export a db schema, but receive the following message:
    -bash: exp: command not found
    # Export Schema WLTUSER
    # vi /oracle/app/oracle/scripts/export/export.sh
    # set variables
    export ORACLE_HOME=/oracle/app/oracle/product/10.2.0/db_1
    export ORACLE_SID=xxxxx
    export LD_LIBRARY_PATH=/oracle/app/oracle/product/10.2.0/db_1/lib
    export path=($path $ORACLE_HOME/bin)
    # run schema export
    exp USERID=system/xxxxxx OWNER=WLTUSER FILE=/oracle/app/oracle/scripts/export/export_$TODAY.dmp logfile=/oracle/app/oracle/scripts/export/export_$TODAY.log
    echo "export done..."
    exit 0Please help! Thanks!

    user545194 wrote:
    Hi!
    we are trying to export a db schema, but receive the following message:
    -bash: exp: command not found
    # Export Schema WLTUSER
    # vi /oracle/app/oracle/scripts/export/export.sh
    # set variables
    export ORACLE_HOME=/oracle/app/oracle/product/10.2.0/db_1
    export ORACLE_SID=xxxxx
    export LD_LIBRARY_PATH=/oracle/app/oracle/product/10.2.0/db_1/lib
    export path=($path $ORACLE_HOME/bin)
    # run schema export
    exp USERID=system/xxxxxx OWNER=WLTUSER FILE=/oracle/app/oracle/scripts/export/export_$TODAY.dmp logfile=/oracle/app/oracle/scripts/export/export_$TODAY.log
    echo "export done..."
    exit 0Please help! Thanks!it guess that you have connect with "ROOT" user . try to connect with oracle user or user being the member of dba group , and then take the export ....
    --neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Incremental Export using EXP Command

    Hi all,
    I am trying to get incremental backup using oracle 9i "Exp" command. But this backup is being taken full of table data where changes made. Actually incremental backup should take a backup only the data last changes made.
    Please help me, how can I take the real incremental backup using exp command.
    Thanks
    Khalil

    should take a backup only the data last changes made.In order to be able to do that, Oracle would have to track rows that have changed since the last export. Think of a database with few hundred to a few thousand tables and tables with tens to tens-of-million rows.
    In a table, a single column in a single row may have been updated.
    However, in another table 40 columns in 3million rows may have been updated since the last export.
    In another table, some rows might be deleted. (how would "incremental" compute the difference between "there were 1000 rows yesterday, there are 942 rows today")
    In a fourth table, 3million rows have been inserted since the last export.
    Can you conceive of the scale of "tracking" that Oracle would have to do if you want "only the last changes" to be exported ? Next, how would you "merge" data from two exports when you import them -- e.g. if the non-primarykey columns have been updated ; or primarykey has been updated ; or the table has no primarykey ?
    The only way an "Incremental" change can be identified is by tracking if any change (whether 1 columm in 1 row or all the columns in all the rows) has been made to the table since the last export. If a single byte has been changed in the table, the whole table will be exported.
    Are you sure you were able to use Incremental Export in 9i ? Incremental Export is documented in 8.1.7 but hasn't appeared in the 9.2 documentation.
    The 8.1.7 documentation says "+An incremental Export backs up only tables that have changed since the last incremental, cumulative, or complete Export. An incremental Export exports the table definition and all its data, *not just the changed rows*. Typically, you perform incremental Exports more often than cumulative or complete Exports.+ "
    Oracle had announced the end of Error Correction Support for the Incremental Export effective 31-Dec-1999. It ended Extended Assistance Support 31-Dec-2002. See Oracle Note#170483.1 on the support site.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Imp exp commands

    Hello!
    I am a newbie in dataguard.
    Til now the only backup procedure for the data was accomplished using the exp command on specific schemas.
    Now we want to create a data guard environment but we want to continue using exp on the primary and imp on another server(not the standby).
    Do the new configurations for data guard effect the exp procedure, I mean can we continue using exp on the primary as before without any problem?
    Thanks in advance!

    Uwe has made me think about more.
    If you are asking will IMP/EXP still work then yes is the correct answer.
    However since you state "only backup procedure" I went with the RMAN answer.
    Also I assume you are speaking about the Primary database only.
    Best Regards
    mseberg

  • Anyone knows how to export ROLES and SYNONYMS with exp command?

    Anyone knows how to export ROLES and SYNONYMS with exp/imp commands?
    Help is needed. Thanks.

    Hi,
    Pls. post this query in RDBMS forum since Portal export import forum does not handle this.
    Thanks,
    ~Kirit.

  • Execute EXP command in SQL or PL/SQL window

    Hi,
    Sorry
    Regards
    Sanjit
    Edited by: userSanjit on Jun 2, 2009 2:47 PM

    You cannot use exp or imp commands from PL/SQL.
    Why don't you use [DATA Pump|http://www.oracle-base.com/articles/10g/OracleDataPump10g.php]? If you are using 10g then you can easily incorporated that in your environment.
    Regards.
    Satyaki De.

  • Appending data in dumpfile paremeter in exp command

    Hi,
    I have 10.2.0.1 installed on windows 2003 server.
    I have taking hot backup using command.
    Exp username/pwd FILE=C:\DataBaseBackups\3AMNEO.DMP LOG=C:\DataBaseBackups\3AMNEO.LOGwhich is working fine.
    I made a batch file which have this code and this execute daily on a particular time and overwrite existing (i.e. last day) backup. But i don't want to do so.
    I want to append data with file name so that every day it creates a new backup. (Do not over write existing backup.)
    my aim is to take daily backup without overwrite existing backup automatically.
    Thanks

    Hi,
    First thing is that Taking Export Based Backup is not the Consistent and not a valid Backup and not treated as Hot Backup. I suggest you not the follow this method.. !!
    If my way of understanding is Correct If you are thinking about Cumulative Option that might work out
    where An cumulative export backs up only the tables that have changed since the last cumulative.
    For tht use the Options
    FILE= cumulative01009.dmp
    LOG= cumulative01009.dmp
    INCTYPE=CUMULATIVE
    I apologize I understood your question in different way.. !!
    - Pavan Kumar N
    Edited by: Pavan Kumar on Oct 4, 2008 4:16 PM

  • Error in host copy command

    Friends,
    I tried to copy the dbf files...
    sql>alter tablespace xbd begin backup;
    sql>host copy /u01/app/oracle/oradata/ourdb/xdb01.dbf /u02/bkp/
    the error returns is....
    /bin/bash: line 1: copy command not found
    what might be the reason?
    thanks
    sathyguy

    Please provide the output of following commands
    alias
    which copy

Maybe you are looking for

  • How can i delete my emails on the ipone 5 without deleting it off my hotmail account

    Everytime I delete my emails on my phone it deletes from my account.  How can I correct that so it does not delete from my account, but just from my phone.

  • Regarding posting periods

    Hi All, I already closed previous periods upto 03 2010 in mmpv. Now i created new po and trying to do GR wrt PO. The system issue a message "posting period 004 2010 is not open" Please help me how to post this GR. Thanks & Regards Suresh

  • Default values in select options

    Hi Experts , Could some one please explain how we can fill the select option fields with initial values, my current code is giving a "The current application triggered a termination with a short dump " dump My Code: data:lt_range_table       type ref

  • Header conditions in purchase order.

    Hi experts, I want to omit the header and item conditions for a purchase order with document type 'CS', I mean I want to that purchase order doesn't have conditions when I check it in transaction me23 or the condition value be zerou2026. Does anybody

  • How to convert M2TS files

    With the development of science and technology, more and more new things appear in our daily life. As a video fan, I heard a lot of people say that there are so many video formats which are not accepted by their players. They need a tool to change th