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

Hello everyone!

I'm looking for a QUERY or a stored procedure to copy the tables of a schema of the user to a different schema.

Should resemble the kind of: copy (select * from object where owner = 'UserIwantToCopyFrom') user = "UserIwantToCopyTO".

I'm sure that my example is rubbish, but I tried to explain what I want to do.

Then there is a chance to do in sql code? I have to build a model of a schema of the user with hundreds of tables, triggers, etc. and copy it into several other user patterns.

Thanks for your advice!

Jan

There are many examples available.
What you generally want to do is:

For the export, use the job_mode-online option "SCHEMA".
Example of export

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 import, you can 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 many more details in the document as provided Thierry.

Tags: Database

Similar Questions

  • How to copy a profile for a child from one device to another family safely direct windows for Windows 7

    How to copy a profile for a child from one device to another family safely direct windows to Windows 7? I have several devices on Windows 7 and my child has ins journal to each device. I want safety to be entirely copied from one to the other devices. How can I do?

    Hello

    Thanks for posting your question on the Microsoft community.

    Thank you for your query details.

    I also appreciate your concerns about security for the family.

    I suggest to read the following article and check.
    Reference:
    http://Windows.Microsoft.com/en-us/Windows/set-up-family#set-up-family=Windows-7

    See also this wiki article created by Lonnie_L on August 24, 2013.
    Family Safety: frequently asked Questions
    http://answers.Microsoft.com/en-us/Windows/wiki/windows_other-security/family-safety-frequently-asked-questions/5672f7b2-e3c0-498a-9a6c-c9cab39f68e5

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • How do I move the express email outlook from one computer to another

    Hello

    How can I move my mail express outlook from one computer to another?

    Thank you!

    Assuming that the other machine is using Outlook Express too...

    Backup restore &:
    http://www.insideoe.com/backup/

    Backup and cloning of your OE identities:
    http://www.insideoe.com/backup/clone.htm

    In other words if you wish is to create folders on the desktop and do drag OE messages to these folders. Copy them to the Office on the new machine and then drag messages in office files to the OE files.

  • How to copy outlook express email and files from one account to another

    Outlook Express

    My husband & I share a computer. It has 1 side and I the other.  Until recent Outlook Express has been available on its side of the computer.  It is the primary identity and I hace an account out of it.  Recent updates have allowed to have Outlook Express on my side of the computer also.  How to copy all my files on his side of the computer & bring to my side?  I am old and computer illiterate...  Also, I don't understand the questions they ask me when I try to open Outlook express on my side of the computer... What is a pop3 server?  How can I know if this is what I have?

    My husband & I share a computer. It has 1 side and I the other.

    1. What is a 'Party '? Different user profiles?
    2. You have your own e-mail address?

    You must copy the entire message of his profile store and put it on the desktop of your profile and then in OE, import from an OE store directory. You can import only the records you want.

    Backup restore &:
    http://www.insideoe.com/backup/

    How to import Outlook Express 5 and OE6 mail folders?
    http://www.insideoe.com/FAQs/how.htm#importOE5

    Setting up email in Outlook Express servers:
    http://www.Microsoft.com/Windows/IE/community/columns/mailserver.mspx

  • How do I move/transfer all files/folders etc. from one user to another-windows xp sp3

    because I couldn't get some apps to work reading under my username, I created a new user and they work, but I don't want the two users.  How can I mover everything of the old user to the new user?

    Sign in with your administrator account, go to C:\Documents and Settings and you will find all users. Copy the files/folder that you want from a user and paste to the other user. For example, you can copy files from C:\Documents and Settings\User1\Desktop and paste to C:\Documents and Settings\User2\Desktop.

  • How to find all the table names in all modules in EBS R12?

    How to find all the table names of all the modules in EBS R12?

    In addition, you can go to http://etrm.oracle.com, you select the version of the EBS, select "FND Data" or "S/n data", select the Type of the object TABLE and you will get all the tables of EBS in module.

  • How can I move all my files from the user from one user to another on my pc?

    original title: moving files

    How can I move all my files from the user from one user to another on my pc?

    Log an administrator account. Open your folder 'user '. Select all the files, copy them, and paste them into the other folder 'user '.

  • How to transfer files from one user to another in Windows Vista?

    How to transfer files from one user to another under Vista?

    How to transfer files from one user to another under Vista?

    A simple way is to move the file to the Public folder.
    Public folder is accessible by all users.

    How...
    Right click on the file > click Move To > navigate to the Public folder > click on move.

    If you do not Move To option in your right click context Menu, here is the tutorial...
    http://www.Vistax64.com/tutorials/89196-context-menu-add-copy-folder-move-folder.html

    Use an easier method.

    PS you can also use methiod drag-and-drop rather than pass to the method. I prefer the latter.

  • How many times can I transfer my license from one computer to another?

    How many times can I transfer my license from one computer to another?

    If it is a retail license, you can transfer as many times as you want as long as it is removed from the previous computer, on which it was installed.

    If it is preinstalled on your computer, it is related to the first computer on which it is installed.

    The OEM of Windows 7 versions are identical to the versions commercial full license with the following exception:

    -OEM versions don't offer any free direct support from Microsoft technical support Microsoft

    -OEM Licenses are tied to the computer first you install and activate it on

    -OEM versions allow all hardware upgrades except for an upgrade to a different model motherboard

    -OEM versions does not move directly from an older Windows operating system

    What is OEM software? :

    http://support.Microsoft.com/GP/oemsupport_1/en-GB

    Licensing FAQ:

    http://www.Microsoft.com/OEM/en/licensing/sblicensing/pages/licensing_faq.aspx

  • Copy some files from one user to another

    Hello!

    How can I copy (not share) some files from one user to another?

    The reason for this is because we rename users to other allocation model.

    Thank you!

    You must share the folders you want to transfer the ownership of the new username, or one responsibility that the new user has (I guess that's an Oracle Applications EUL). The user connects to Discoverer more with their new name. They open the workbook (s) and then do a SAVE AS. Who will save the workbook with them as the new owner. You must then sign with the old name of the owner and to delete these old files (after the first backup them) once you are sure that everything works fine. Yes, it is a nasty process. What we do is we use a "dummy" username when we create/modify the workbooks. In this way the fictional user name is the owner of the workbooks. So, it does not matter if a person leaves or if you change the user naming conventions. If you have many users to create cabinets, then a dummy user name doesn't quite work. You could always submit an enhancement request to Oracle for a copy function. I hope that you will get a lot of customers to support such a request.
    John Dickey

  • Can I turn off the change of focus from one object to another?

    Hello.

    I have a game where i control a MC with the arrows on the keyboard, when I click outside of the application flash and back in the MC loses focus. The focus moves to a button in the scene. What I have observed, is that Flash Player has a built-in control, which moves the focus from one element to the other with the arrow keys.

    Is there a way I can disable the change of focus from one object to another?

    Thank you.

    Why you need such a thing...

    Is it true that you lose the focus of your video clip and that's your keyboard listeners do not work?

    And you want to work.

    For this situaton I ideally add my Council key on the stage event listeners and the rest of the creation of the logic accordingly.

  • How to copy all the names of files in a folder for Notepad?

    I often have to copy all the file names with extensions and the full path to a folder to a ".txt" document, but cannot. Is there an easy way to do this? How? Is there a simple batch file that will do it? Freeware might work, but I'd rather have a simple batch.bat or .exe file that works.

    You can do it, but I don't think that it will include the entire path:
     
    Dir *. * > dir.txt
     
    Steve
     

    I often have to copy all the file names with extensions and the full path to a folder to a ".txt" document, but cannot. Is there an easy way to do this? How? Is there a simple batch file that will do it? Freeware might work, but I'd rather have a simple batch.bat or .exe file that works.

  • How to copy all the object?

    Hello.

    I want to copy and paste the entire object.

    app.activeDocument .everyItem () .select ( rectangles).

    App.Cut ();

    I can copy (or cut) and paste only if an object type.

    How to copy all objects?

    Thank you.

    app.activeDocument.pageItems.everyItem)

    Do not use the cut/copy/paste. There are better and longer way of doing things in javascript to imitate what you do in the interface.

    var items is app.activeDocument.pageItems.everyItem () .move (newDocument);. is equivalent to a cut and paste.

  • How to list all the tables that have no data

    Hi all


    I want to list all the tables that have no data. (registration number is 0)

    Someone help me.

    Thank you
    Thiensu2810

    Select owner, table_name from dba_tables where num_rows = 0;

    This assumes that the table statistics are COMMON.

  • Help! I need to transfer my files from one user to another on your own computer. How can I do this?

    Please be very descriptive.  need help now

    Hello rokr676,

    Thanks for posting your question on the Microsoft answers Community Forum.

    One of the easiest ways to transfer files is to use Windows easy transfer.

    Windows Easy Transfer is installed with Vista and is found under Accessories - tools system or by searching for "easy" (with the quotes).

    You can transfer files and settings using a network share, or transfer files and settings using removable media such as CD/DVD or external hard drive. Windows Easy Transfer does not migrate installed applications.

    Using Windows Easy Transfer, you can migrate most of the files and the program settings. The following table describes the types of data and parameters that can be moved.

    Data type
    Specifications

    Files and folders We can choose to be automatically moved all the files found in the folder My Documents, my pictures and Shared Documents. You can also add other documents located in other places. The messages and settings E-mail messages, contacts, settings, account and address books from Outlook Express, Outlook, Windows Mail and other programs. The program settings Programs that are compatible with Vista will have their settings transferred to the new computer. So that this works, the program must already be installed on the computer running Vista. User settings Desktop settings, color, screen savers, fonts settings, options Windows, printers, etc. Settings Internet Favorites, cookies, and Internet Explorer settings. Photos, videos and music The music files, playlists and album. Images (gif, jpg, bmp files) and personal videos.
    Manually transfer:
    Open a session with the new user account that you may have created. To ensure that this new user account has administrator privileges.

    Open Explorer > organize > folder and Search Options > view tab > check show the hidden files and folders > OK to save the settings.

    Now navigate to your C:\Users\(Old Username folder) and copy all the files and folders in the folder C:\Users\(Old Username) in the C:\Users\(New Username folder).

    If please reply back and let us know if this helped with your question or if you need assistance.

    Sincerely

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • WLAN on Satellite L505-10Z PSLS3E with Windows Server 2008

    I have Toshiba Satellite L505 - 10Z PSLS3E on Windows Server 2008 and to install the WiFi driver but can't find the right installation files and I downloaded the Vista driver installation and the driver may be installed on the right but when I try to

  • error fatal msi.flashplayer

    I am running windows7 Asus Home premium 64-bit. My photosmart 2600 fails to install with what appears to be a failure error tn_19166 Adobe MSI. Adobe offers to download the latest version I did. I have also disabled the loading of other programs, but

  • When I try to update for DirectX 11 9 installer tells me that I'm already up to date

    Running Win 7 64 Pro Any advice on how I can actually upgrade to DX 11? (or 10 also!)

  • coil

    I have a main_script1.sql with main_script1.txt and inner_script1.sql with reel inner_script1.txt.I have more internal scripts with their own queued file locations.But I'm losing the reel of main_script1.sql once it runs the spool command in inner_sc

  • Y at - it a command line option to print in A3 format?

    HelloWe like to print detailed pdf high to a larger format files; A3 or less. Is this possible via command line or from the Adobe library should be used?Kind regardsBernard