sql - How best can I recreate an Oracle database? -


Oracle 11 GR2 (x86 Windows):

I have a DB with 250 tablets with indexes and constraints I

I need to re-create these tables, indexes and hurdles in new db and load the data. I need to know how to do the following in SQL Plus and / or SQL Developers, unless this is a magical utility that can automate all this. thank you in advanced!

  1. Unload all data from 250 tables.

  2. Create a SQL script file containing the create table statement for 250 tables.

  3. Create a SQL scripts file containing the CREATE INDEX statement for 250 tables

  4. < P> Create a SQL script file containing the ALTER TABLE ADD CONSTRIENCE statement for 250 tables.
  5. Run the script to create tables in the new DB.

  6. Load the exported data in the table in the new DB.

  7. Run the script to make all indexes.

  8. Run the script to add all the controls.

    Edit: I am connected to a remote desktop that links to source db on a Windows Server 2008. Only one Oracle client is installed in the remote. For security reasons, I do not have permission to link directly to the Win Server from my local computer, so I can dump the whole source db on the remote to zip on my local target machine? I'm trying to replicate the whole DB on my computer, starting with Oracle 10G, you can use expdb and

    "command line Use the procedures given in the DBMS_ DATAPUMP PL / SQL package. " (excerpted from the documentation of Oracle)

    Looking at your needs, you have to create a directory, then generate a full dump of your code expdb :

      SQL & gt; Create or change '/ path / to / dump / folder' as the directory dump_rate;   
      sh $ expdp system @ db10g full = y directory = DUMP_DIR dumpfile = db.dmp logfile = db.log   

    forms of dumps Written using some binary format, you have to use related import utility to import related debits. Originally replacing expdb with impdb in the above command:

      sh $ impdp system @ db10g complete = y directory = DUMP_DIR Dumpfile = db For a simple table dump, use that version instead:  
      sh $ expdp sylvain @ db10g tables = DEPT, DP logfile = db.log   

    EMP directory = DUMP_DIR dumpfile = db.dmp logfile = db.log

    As you have seen, you can use it from your standard user account, provided you For detailed usage clarification, see

    • .

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -