How to copy all tables, triggers, etc from one user schema to another

Hello everybody!
I am searching for a QUERY or Stored Procedure to copy the tables of one user schema to another schema.
Should look kind of: Copy (Select * from all_objects where owner = 'UserIwantToCopyFrom') to user = 'UserIwantToCopyTO'
I am sure that my example is rubbish but I tried to explain what I want to do.
So is there a chance to do that within sql-code? I have to build a template of a user schema with hundreds of tables, triggers, etc and copy it to several other user schemas.
Thanks for your advice!
Jan

There are numerous examples available.
What you typically will want to do is:
For the export use the job_mode => 'SCHEMA' option
Export example
http://www.oracle-base.com/articles/10g/OracleDataPump10g.php
DECLARE
  l_dp_handle       NUMBER;
  l_last_job_state  VARCHAR2(30) := 'UNDEFINED';
  l_job_state       VARCHAR2(30) := 'UNDEFINED';
  l_sts             KU$_STATUS;
BEGIN
  l_dp_handle := DBMS_DATAPUMP.open(
    operation   => 'EXPORT',
    job_mode    => 'SCHEMA',
    remote_link => NULL,
    job_name    => 'EMP_EXPORT',
    version     => 'LATEST');
  DBMS_DATAPUMP.add_file(
    handle    => l_dp_handle,
    filename  => 'SCOTT.dmp',
    directory => 'TEST_DIR');
  DBMS_DATAPUMP.add_file(
    handle    => l_dp_handle,
    filename  => 'SCOTT.log',
    directory => 'TEST_DIR',
    filetype  => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);
  DBMS_DATAPUMP.metadata_filter(
    handle => l_dp_handle,
    name   => 'SCHEMA_EXPR',
    value  => '= ''SCOTT''');
  DBMS_DATAPUMP.start_job(l_dp_handle);
  DBMS_DATAPUMP.detach(l_dp_handle);
END;
/for the import you will have to use the remap_schema option with:
DBMS_DATAPUMP.METADATA_REMAP (
   handle      IN NUMBER,
   name        IN VARCHAR2,
   old_value   IN VARCHAR2,
   value       IN VARCHAR2,
   object_type IN VARCHAR2 DEFAULT NULL);There are much more details in the document that Thierry provided.

Similar Messages

  • How do I transfer files and documents from one user account to another?

    How do I transfer documents and files from one user account to another?

    You haven't understood me. Follow these steps:
    1. Log in the user where are the files you want to transfer, and open a Finder window.
    2. In Finder, select Go menu (on the menu bar) > Go to Folder, and type /Users/Shared. Now you're on Shared folder, so leave that window.
    3. Open a new Finder window without closing the old one, go to the folder with the files you want to transfer, and copy them to Shared folder.
    4. After copying the files to Shared folder, go to  > Log Out, and log in the other user.
    5. Repeat the step 2, and you will get access to the transferred files. Now, you can open them directly from this folder, or you can copy them to a folder on your user folder

  • How to copy a Module Pool Program from one SAP server to another SAP server

    Hi Experts,
    My requirement is to copy some Module pool programs from one SAP server to another SAP server which do not have any link.
    Please advise on this.
    Regards
    Dipak

    put all relevant objects inside a transport request and release it. this will generate two files, a control file in /usr/sap/trans/cofiles/ and a data file in /usr/sap/trans/data/
    you can take these two files, zip'em up and e.g. email them to your destination. There they have to be put into the same directories of that other server and can then be added to the import queue and finally imported.
    These last steps would usually be done by an administrator.
    Both systems should be on the same release, as far as I know.
    Cheers
    Thomas

  • How do move itunes info (musice etc) from one apple ID to another apple ID?

    ow do move itunes info (musice etc) from one apple ID to another apple ID?

    Click here and request assistance.
    (80562)

  • How to Copy documents (like Sales Order) from one Company/Database to another

    Hi everyone!
    I'm developing an AddOn for SAP 9.1 version.
    Part of this implementation is to import some data from a Sales Order Document from one Company to another (Document selected by "DocNum" by the user).
    So, my doubt is: after select data saved in arraylist, how I fill the document with that values saved in my arraylist ?
    I wish you could help me.
    Regards!
    Diogo Carvalho

    Hi Diogo,
    You can achieve this requirement and you will be required to get user credentials for your 'copy from' company to make a connection.
    After you make the connection with your 'copy from' company, you can provide a screen with a matrix which have the document numbers of the type of document you want.
    Create two documents of the type you want from each company. You can fill the document which created from current company while you reading from the document which created from 'copy from' company using get by key method.
    Most importantly, the master data of the two companies should be same. Otherwise, you will have errors in creating the document or document won't be identical.
    Hope this will helpful to you.
    Best Regards,
    J S L Geeganage

  • Can you tell me how to copy all staff assignments(structure) in one to anot

    Dear Experts,
        can you tell me how to copy all staff assignments(structure) in one organization unit to another organization unit ?
    Looking forward to your reply.
    Thanks in advance.
    Best Regards,
    Merry

    RHCOPY00
    use this report to copy the objects
    even though if u are maintaint he staff assingments the same will be displayed in other types of the OM Module like expertmode simple maintainence etc the only thing is  the method woudl be changeing

  • I would like to "get off the cloud".  How do I copy all my contacts, etc from where they are to "on my Mac"?

    I would like to "get off the cloud".  How do I copy all my contacts, etc from where they are on the cloud to "on my Mac"?

    Export the information to your Desktop. Stop syncing in iCloud, which should give you the 'On My Mac' option. Then import the information.

  • How can I copy a time machine backup from one Time Capsule to another ?

    How can I copy a time machine backup from one Time Capsule to another ? I bought a 1 Tb Time Capsule to replace my 512Mb Time Capsule. Now, I like to copy my time machine backup from the old Time Capsule to the new one so I can keep using my backup.

    from this support article: 
    (click on image to enlarge)

  • How do I copy an address book from one user account to another?

    How do I copy an address book from one user account to another?

    You haven't understood me. Follow these steps:
    1. Log in the user where are the files you want to transfer, and open a Finder window.
    2. In Finder, select Go menu (on the menu bar) > Go to Folder, and type /Users/Shared. Now you're on Shared folder, so leave that window.
    3. Open a new Finder window without closing the old one, go to the folder with the files you want to transfer, and copy them to Shared folder.
    4. After copying the files to Shared folder, go to  > Log Out, and log in the other user.
    5. Repeat the step 2, and you will get access to the transferred files. Now, you can open them directly from this folder, or you can copy them to a folder on your user folder

  • How do I transfer Pages from one user account to another

    How do you transfer Pages from one user account to another on the same Mac?

    Welcome to the Apple Support Communities
    If you haven't modified anything, Pages is installed on /Applications. All users have access to this folder, identified as "Applications" on the Finder sidebar, so you don't have to move anything, because Pages will work on all your users.
    If you have installed Pages on ~/Applications (being ~ your user folder), then you have to move Pages to /Applications. After doing this, you will be able to access to Pages on all users

  • How do I export photo's from one user acct. to another user acct

    Trying to export photo's from one user acct. to another user acct. on same computer into second users Iphoto app.

    File -> Export to the destop. Drag to Users/Shared Folder and then import from other account.
    Or use iPhoto Sharing:
    For iPhoto 09 (version 8.0.2) and later:
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Any user can drag a pic from the Shared Library to their own in the iPhoto Window.
    Remember iPhoto must be running in both accounts for this to work.
    If you want the other user to have the same access to the library as you: to be able to add, edit, organise, keyword etc.
    Quit iPhoto in both accounts. Move the Library to the Users / Shared Folder
    (You can also use an external HD set to ignore permissions, a Disk Image or even partition your Hard Disk.)
    In each account in turn: Double click on the Library to open it. (You may be asked to repair the Library Permissions.) From that point on, this will be the default library location. Both accounts will have full access to the library, in fact, both accounts will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.
    Regards
    TD

  • How can i transfer a digital movie from one apple id to another apple id?

    how can i transfer a digital movie from one apple id to another apple id?

    You buy it from that ID or ask the iTunes Store staff for assistance.
    (80985)

  • How do you move a quicktime movie from one iphoto library to another?

    How do you move a quicktime movie from one iphoto library to another?

    1 - export it from Library A via the File ➙ Export ➙ File Export menu with Kind = Original.
    2 - import it into Library B as you normally would.
    OT

  • How do I transfer Adobe CC application from one hard drive to another?

    How do I transfer Adobe CC application from one hard drive to another?

    I think you have to start Creative Cloud application, uninstall those CC applications from "Apps" panel, then click "Preferences..." menu item, select "Apps", change "Install Location" to another hard drive, then install those applications from "Apps" panel again.

  • How we can import an IDOC structure from one SAP system to another w/o ALE

    Hi Gurus,
    How we can import an IDOC structure from one SAP system to another? we're not able to use ALE tech, these two sap systems are isolated.
    Any response will be awarded!
    Thanks a lot.
    Samson

    hi,
    1.One is by change pointer concept i.e by executing the RBDMIDOC.We can generate the idoc and automatically to the inbound System.
    2.By executable program also like bd10 and bd11.
    Regards,
    SHIVA(reward if helpful).

Maybe you are looking for

  • IPhone 4 battery draining + flash not working

    I've had my phone since February 2011, and haven't had any problems up until today. The flash no longer works, I've attempted taking pictures and using flashlight apps, but it's not working whatsoever. And yesterday, the battery started draining like

  • To get the User status of the Production Order

    Dear all, I have a  requiement to get the user status of the production order, This is just below the Status of the Production Order, I was able to get the Status of the Production order using the Function Module ( REL MSPT PRC ) etc Can any body ple

  • A question about OS 5.0

    Hi, When will RIM release OS 5.0 for the Curve 8520? Best regards, Paulo Lino Solved! Go to Solution.

  • Anyone Notice Wirless  Sync

    Anyone  notice that you don't need to have the phone plugged in for it to sync wirelessly?  They seem to stress that the phone needs to be plugged in for it to sync.  Is that a bug or something?

  • How to create 3 levels of detail based on Wizard code

    I have 3 tables: Orders, Recipes, Ingredients. An Order can have several Recipes attached, and each Recipe has multiple ingredients. I want to create a data entry form for these 3 levels of detail. What I have in mind is a window which shows a form f