How to wrap import and export in a Unix shell script?

Hi all,
I want to write a simple korn shell Unix script to kick off export and import
for our Oracle 10g refresh databases. Do any of you have a script to do this?
The goal would be:
1. Take export using exp of 10 tables in PROD database on database server1
for the prod schema user
2. Use sftp or scp to copy over the export dump file to database server 2
3. Use a shell script to import the dump file into TEST database server for schema
test
4. use nohup to run the export and import in background through cron job
We are running Oracle 10g Release 2 on Red Hat Linux.
Thanks,
Ben Prusinski

Wouldn't it be easier to have both databases in your tnsnames.ora file. Then you can export and import on the same server without copying the files to another server.
script:
exp <username>/<password>@PROD file=<file>.dmp log=<explog>.log owner=prod
imp <username>/<password>@TEST file=<file>.dmp log=<implog>.log fromuser=prod touser=test
run this script as: nohup <scriptname> &
Since you are on oracle10g you can also use datapump (expdp and impdp) for faster exporting and importing, but I do not know the syntax by heart

Similar Messages

  • How do I import and export PDF's from Ibooks

    How do I import and export PDF files from Ibooks on the IMAC running Mavericks?
    How do I sync my PDF files in IBooks to the IPAD when they were not purchased from the bookstore?
    I noticed that I could email the PDF and then add it to IBOOKS on the IPAD.
    Is there a 3rd party IBOOK type reader that will address this issue?
    When I upgraded Mavericks it moved all of my PDF files in ITUNES application to IBOOKS and removed all reference to those
    books in ITUNES. When I purchase a book from IBOOKS store on the IMAC, the books shows up in IBOOKS on the IPAD.
    All of my PDF files will not sync up with the IPAD.
    I do hope this is a problem that Apple will address and would like to know when the fix will be available.

    Hello,
    Thank you. I found that option you pointed out. I can now change it from 1080i to 1080p and I can chance the resolution. However I still can't change the frame rate. It still stays at 29.97.
    Could this be due to the camera? I am using a Canon VIXIA HF S100 with 30p and 24p frame rate options. I suspect that it does not really shoot at true 24p and only does 24p within 60i.
    Frankly, I don't really care about getting 24p support too much but it would be very nice to have the option.
    I'll keep toying with the program. Still, anymore ideas or thoughts would be greatly appreciated.
    Thank you Wild Giles.

  • HT2513 how do i import and export HOMEAWAY calander and AIR BNB Calendar into my ICLOUD Calendar??

    how do i import and export HOMEAWAY calander and AIR BNB Calendar into my ICLOUD Calendar??

    If these calendars are listed under On My Mac on your Mac, follow Roger Wilmut's instructions here: http://www.wilmut.webspace.virginmedia.com/notes/icloudmovecalendars.html under "To move 'On MY Mac' calendars to iCloud".

  • Import and export MDM with the SAP Portal

    Hi,
    Would you have any clue on how to handle import and export from the SAP portal ?
    I need your help because I haven't found any standard iView to perform these functions
    The only information i got were some explanations on WebDynpro Java iViews using events to export from the Portal.
    Thank you in advance

    Hi,
    MDM iViews are only meant to perform MDM Data Manager operations but on limited basis. EP-MDM scenario has been designed for end users only which should not allow to perform complex data manager operations and they need not install MDM Clients.
    Thats why importing and exporting functionalities are not possible in standard MDM iviews.
    Regards,
    Jitesh Talreja

  • Import and Export  of  R prediction model

    hi ,
    How can i  import and export a oracle R prediction model   e.g  from/to file ?   Basically,   We need it for the following requirements
    1.  We would like to ship a sample prediction model as part a  product.      So, The product will work with sample prediction model for some time after install    till a  newer model is created   with data  in customer env.
    2. Before regenerating a prediction model,   we would like to  take a backup of the existing prediction model.   And if it turns out that  the prediction results are not as good  with new model,  we should be able  to reinstate the older model.
    3. Support a mode where oracle R prediction model can be loaded to an  environment  which is different from the  the source environment where the model was actually generated.
    Please advise
    Regards,
    Arif

    I tried the above method  but  i am facing an issue that  although the prediction model is imported in to R  using load command,   it  is not loaded in ORE environment.     Due to this i am not able to use the imported predictionmodel for scoring
    I tried the following
    #Generate the prediction model
    >  PREDICTIONMODEL <-  ore.odmKMeans(data= TEST_DATA_TABLE, formulat=  COLUMN1 ~ . )
    >  class(PREDICTIONMODEL)
    [1] "ore.odmKMeans" "ore.model"
    >  save( PREDICTIONMODEL,  file="test.model")
    After this i quit the R session  (without saving my workspace)   and then   create a   new R session  and tried the following
    # load a prediction model from a file
    > load(file="test.model")
    > ls()
    [1}  "PREDICTIONMODEL"
    > ore.ls()
    charcter(0)
    You can see from above that  ore.ls() is not printing anything after load(). However,  ls()  prints the loaded  PREDICTIONMODEL.    Now, if i try to do scoring against the loaded predictionmodel,  I get an error
    >  x <- data.frame(COLUMN2="CC_PROCESSING", COLUMN3="CallWorkflow", COLUMN4="CallWorkflow", COLUMN1=NA)
    > X <- ore.push(x)
    >
    > result<- ore.predict(PREDICTIONMODEL, X)
    Error in .oci.GetQuery(conn, statement, data = data, prefetch = prefetch,  :
      ORA-40284: model does not exist
    So, it seems that  even though i imported the  model from the file,  ORE is still not aware of it .   Any idea about this ?

  • Import and export privillge

    Hi,
    Plz clarification required,
    1. Users no need to import and export a particular schema, so how to revoke import and export privillge ?
    2. what is the privillge to invoke and revoke for import and export?
    3. Is it possible ?
    Thanks in advance!

    user8677094 wrote:
    Hi,
    Plz clarification required,
    1. Users no need to import and export a particular schema, so how to revoke import and export privillge ?
    2. what is the privillge to invoke and revoke for import and export?
    3. Is it possible ?
    Thanks in advance!To export objects owned by another user, you must have the EXP_FULL_DATABASE privilege. Just revoke it from the user

  • Import and export xml file in Oracle

    Hi Gurus,
    Can any one explain , how can we Import and export an XML file in Oracle Please
    Thanks

    Some examples can be found on this {thread:id=410714} forum and also on [Marco&apos;s blog|http://www.liberidu.com/blog/] (He's an Oracle Ace in the {forum:id=34} forum)

  • Import and Export header in CAUFVD

    Hello all,
    Can anyone tell me How to use Import and Export header for CAUFVD in function exit EXIT_SAPLCOZV_001 as my requirement is to populate overhead key automatically at the time of po order release. Do i have to use any function module ?? If yes then what and how?? I am new for enhancements so dont have much idea.
    Thanks!!

    Hi bala,
    Thanks for your prompt reply. But can you please ellaborate where excatly i need to wirte this export parameter. My code looks like this:
    IF wa_caufvd-zschl EQ space.
      "Overhead Key
      SELECT matnr matkl FROM mara INTO CORRESPONDING FIELDS OF TABLE it_mara
      WHERE matnr = wa_caufvd-matnr.
      SELECT werks zschl
       FROM zppoverhead
       INTO CORRESPONDING FIELDS OF TABLE it_zppoverhead
       FOR ALL ENTRIES IN it_mara
       WHERE matkl = it_mara-matkl
       AND  werks = wa_caufvd-werks
       AND  auart = wa_caufvd-auart.
      IF sy-subrc EQ 0.
        wa_caufvd-zschl = wa_zppoverhead-zschl.
      ENDIF.
    ENDIF.
    "Process Order Release
    SELECT objid arbpl FROM crhd INTO CORRESPONDING FIELDS OF TABLE it_crhd
    WHERE objid = wa_caufvd-st_arbid.
    IF it_crhd IS NOT INITIAL.
      SELECT werks zsubplant FROM zplantmaster INTO CORRESPONDING FIELDS OF TABLE it_zplantmaster
      FOR ALL ENTRIES IN it_crhd
      WHERE p_resource = it_crhd-arbpl.
    ENDIF.
    IF sy-subrc EQ 0.
      wa_zpporders-zsubplant = wa_zplantmaster-zsubplant.
    ENDIF.
    As per my understanding i need to use export parameter for zschl, but how and where excatly.
    Please guide me.
    Thanks!!

  • DRM/MDM Import and Export File types - Question

    Hi Guys,
    We have been implementing Hyperion DRM to our existing Oracle Environment for managing the company's sales data which comes from multiple data sources. In my experience and research, I feel DRM is an excellent tool but there are some questions I have in our mind. The following are the few questions that I\we have.
    a) How does the Import and Export of data functionality works in DRM? In this forum, I have found some one saying we can only import the data through flat files, in other words, "text file" with the delimiters [ ] seperated by comma. My question is, Is there any other possible way to import the data, Such as getting the data directly from the database tables? To get the data, Do we need to have any integration points or do we need to use SOAP APIs (& programming)?
    b) While we exporting the data, can we export it directly to the Oracle database tables? What are the integration points needed for this kind of export?
    c) Is there any sample guide or design document available for creating the hierarchy and nodes. I just want to know how the attributes that we have "is transformed" into the hierarchies and nodes in DRM? In the past, I used Essbase, which is integrated with DRM and that process was straight forward since we imported and exported data directly from DRM to Essbase.
    I would appreciate any suggestion offered to me regarding the questions posted above.
    Thanks in advance,
    Leo
    Edited by: user10201910 on Apr 1, 2009 4:58 PM
    Edited by: user10201910 on Apr 1, 2009 5:00 PM

    Hi,
    1.As per my knowledge the Import can be done using Flat files only,we can import the data from Oracle Tables once the structure is ready in DRM.
    2.We have an utility called Export to Table(in the last tab when you performing an Export along with Export to File), which requires the DB mapping to be done properly,
    Thanks!

  • How usnig manuplate the Import and export Key word.

    How usnig manuplate the Import and export Key word? and
    how do the clear of those variable?

    HI ,
    For IMPORT Keyword :---
    To retrieve data from the global memory area, use the IMPORT statement.  The most basic form of the IMPORT statement is:
    IMPORT <variable> FROM MEMORY.
    To give the variable a different name in your program from what it is called in the global memory area, use the TO clause.  You must define the local variable name with a DATA statement in your program.  The format is:
    IMPORT <global var> TO <program var> FROM MEMORY.
    As with the EXPORT statement, you can specify multiple variables per statement, and you have the option of specifying which cluster ID you wish to import from.
    After each IMPORT statement, SY-SUBRC is set to indicate whether or not the cluster ID you specified exists (but not whether specific variables were imported specifically).  SY-SUBRC is zero if the cluster exists.
    It is also possible to IMPORT and EXPORT to database tables .
    ABAP memory that is used to store exported data is user and transaction specific, so when passing data between programs in this manner you must make sure that transaction boundaries are not crossed. Otherwise the contents of this memory will get destroyed and will not be available to the importing program.
    For Export Keyword :---
    The EXPORT statement moves data from your program into a global memory area.  The most basic form of the EXPORT statement is:
    EXPORT <variable> TO MEMORY.
    This places the specified variable into a global memory area that another program can later read using the IMPORT statement.
    You may specify multiple fields in the same EXPORT statement.  For example:
    EXPORT KNA1-KUNNR KNA1-BUKRS TO MEMORY.
    You can give variables a different name in the global memory area using the FROM clause.  For example, the following code exports SY-SUBRC and gives it the name RETVAL in the global memory area:
    EXPORT RETVAL FROM SY-SUBRC TO MEMORY.
    You can specify a cluster ID when exporting data to memory.  You can freely choose the name of the cluster ID, which can be up to 32 characters long.  Each cluster ID specifies a particular area in memory.  Each time you EXPORT data to the same cluster ID, all data previously written to that ID is erased.  For example:
    EXPORT SY-SUBRC TO MEMORY ID u2018LJS1u2019.
    Hope u understand
    Thanks
    Shambhu

  • How to check weather BI Objectu2019s are imported and exported

    Hi to all,
    Some one has created INFOCUBE, DSO, DTP, transformation.
    My question is how I will check it, weather Objectu2019s   are imported and exported or not.
    How   to check under which request  number it have   been saved.
    Please can any one tell the step for that?
    I SHALL BE THANKFULL TO YOU FOR THIS.
    Regards
    Pavneet Rana

    Hello Pavneet,
    If you goto trans SE09/SE10--> Enter your User ID or * under user & then click on Display.
    You will be able to see all the TR's & if you drill it, you will be able to see all the objects collected under that TR.
    Hope its helps!
    Regards,
    Pavan

  • How do import and export pictures from my HP laptop

    How do I import or export pictures and video from laptop to iPad.

    Start Here >  http://www.apple.com/support/ipad/syncing/
    Also, see here >  Ipad User Guide

  • How to import and export the screen parameters

    hi all
    how to import and export the parameters of the screen
    i need to export all the parameters and then import it
    and also how to export and import a variable to the memory
    thanks and regards
    naval bhatt

    Hi,
    Check this example for exporting and importing to memory..
    DATA: V_VALUE(2) VALUE '2'.
    EXPORT V_VALUE = V_VALUE TO MEMORY ID 'ZTEST'.
    IMPORT V_VALUE = V_VALUE FROM MEMORY ID 'ZTEST'.
    Thanks,
    Naren

  • Problem with Import and Export Data Wizard

    Downloaded and installed SQL Server Express 2008 R2 today because I want to explore how Access interacts with SQL Server (using my home computer). I'm using Access 2010 (under Windows 7), so the 2008 version of SQL Server Express seemed to be the version
    to use.
    After a couple of false starts, installation appeared to go okay. After the installation. My Start menu listed Microsoft SQL Server 2008 and Microsoft SQL Server 2008 R2. The latter listed Import and Export Data (64-bit). When I clicked that, the first Import
    and Export Data Wizard page was displayed. I wasn't ready at that time to explore the wizard, so I closed it. An hour or so later I again attempted to open the Import and Export Data wizard. This time, the wizard didn't open. Instead this error message was
    displayed: "The SSIS Runtime object could not be created. Verify that DTS.dll is available and registered."
    I found DTS.dll on my computer at C:\Program Files\Microsoft SQL Server\100\DTS\Binn, so the file is available, but don't know whether it is registered.
    How can I correct this problem?

    First can you please post all log file errors
    >> I can't really give you a solution or specific recommendation since I did not saw this error yet myself, but on your own risk you can try:
    1. You may try to just register 'dts.dll' using regsvr32.exe, but this error may indicate a bigger problem with setup.
    If you are running SQL Server 64bit then try running this at the command prompt: %windir%\syswow64\regsvr32 "%ProgramFiles(x86)%\Microsoft SQL Server\90\dts\binn\dts.dll"
    2. You can try reinstall from start (In this case you have to make sure that you un-install all)
    [Personal Site] [Blog] [Facebook]

  • How do i import and sync my icloud / iphone contacts into address book on my macbook pro, how do i import and sync my icloud / iphone contacts into address book on my macbook pro

    HELP
    how do i import and sync my icloud / iphone contacts into address book on my macbook pro, how do i import and sync my icloud / iphone contacts into address book on my macbook pro
    Runnig 10.6.8 on a MacBook PRO.....

    The easiest fix if you're running Snow Leopard is to export all your contacts, then import them into something like google (I already had a gmail account), and then just use google to sync your contacts instead of icloud (via the sync with Google button in the address book settings).
    Its a bit sluggish to update, but it works well.  You can then point your iphone, and other iOS devices to use google for contacts too.
    If Apple don't want to look after their customers, other companies will gladly do so....

Maybe you are looking for

  • How to declare bind variable in package

    hi, i have created one package with insert and returning the value in procedure using bind variable. -- spec part. SET SERVEROUTPUT ON VARIABLE id NUMBER CREATE OR REPLACE PACKAGE pack_sale AS PROCEDURE pro_insert_SOHeader ( SO_HEADER_ID NUMBER, SO_N

  • Can't install Reader for Pocket PC on HTC Touch Diamond

    can't install Reader for Pocket PC on HTC Touch Diamond? why?

  • Bizarre Task failure

    I have a function module that performs a call transaction to create a transfer order. I have two tasks that call this function module; one tasks method calls the function and passes a flag to inform the transaction to be processed in foreground, the

  • Configure Storage Replication - where to create Source Log Disk

    Hey guys, I tried to create a Scale-Out-Fileserver storage replication. Unfortunately i can't find an option to create the "source log disk" neither I couldn't find anything about the prereq of this drive? Anyone who found the missing piece?

  • ITunes 9.1.1 (12) very slow

    My wife's iMac has os 10.4 with iTunes 9.1.1 (12) on it. As more and more playlists are added, iTunes is very slow to respond and the CPU usage is going up! CPU usage is averaging 40% and the fan that cools the system is running at max speed (which i