Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First of all, make sure you test this procedure in test or development environments before proceeding to perform it on production. Disclaimer: I'm not responsible if you bust any of your databases by misusing the following advice. Note that I'm also ignoring how tablespace storage is set up for your schemas, which you should definitely hold in consideration when creating new schemas.</p> <p>Here is the simplest possible method using command line. You will need to use <code>exp</code> and <code>imp</code> utilities which come with complete Oracle database distributions. Assuming that you have the path to Oracle executables set correctly in your environment path, you will need to do:</p> <ol> <li><p>Export your source schema on the source database server:</p> <p><pre><code>[oracle@src_server ~]$ exp source_schema_username@SRC_SID owner=source_schema_username file=source_schema.dmp</pre></code></p></li> <li><p>Import your source schema into destination schema on the destination database server (assuming you have already created the destination schema, if not, see <a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_8003.htm" rel="nofollow"><code>CREATE USER</code></a>, also make sure that destination schema user has RESOURCE role):</p> <p><pre><code>[oracle@dst_server ~]$ imp <strong>system</strong>@DST_SID <strong>fromuser</strong>=source_schema_username <strong>touser</strong>=destination_schema_username file=source_schema.dmp</pre></code></p></li> </ol> <p>Note that you must run imp as a user that has DBA role. I'm using system here because this user typically exists on all Oracle databases and has DBA role. You will of course need to know the password for system user. You may not need to specify SIDs if ORACLE_SID is already set in your environment on both servers (<code>echo $ORACLE_SID</code>), however I wanted to be explicit here to make sure that you do not import into the wrong database.</p> <p>For more information on usage of export and import utilities run <code>exp help=y</code> and <code>imp help=y</code>.</p> <hr> <p>To answer your questions about Oracle:</p> <p><Blockquote> First: What's the equivalent of MySQL database in Oracle? tablespace? </Blockquote> </p> <p>Oracle equivalent is database name (db_name parameter). It identifies a database on Oracle database server(s). On a single instance database, this is also typically <a href="http://www.adp-gmbh.ch/ora/misc/identifiers.html" rel="nofollow">Oracle SID</a>. On Oracle RAC, a single database will have many SIDs.</p> <p><Blockquote> Third: Then I move the file "full.dmp" to the other server, but I'm not sure how to restore my backup file full.dmp into a new tablespace with a different name to the one it the backup was gotten from: </Blockquote> </p> <p>You want to create a new user, which is identical to a schema in Oracle. Tablespaces are abstracted collections of disk locations where Oracle stores tables and indicies. For example, when you create a table, it has to be assigned to some tablespace.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload