title: Oracle export database with different SID
body: <p>I have been using the exp and imp commands in oracle to export and import my databases.</p>
  
  <p>I usually use</p>
  
  <pre><code>exp My_DB/MyPass file=dump_My_DB_20130729.dmp
  
  imp My_DB/MyPass file=/tmp/dump_My_DB_20130729.dmp fromuser=My_DB touser=My_DB
  </code></pre>
  
  <p>Where My_DB is hte user/db and MyPass is the password.</p>
  
  <p>My databases have always used SID = orcl</p>
  
  <p>Our infrastructure team have now cloned My_DB database and put in on another SID (orcl2)
  The users/databsae name is the same. The SID is the only difference</p>
  
  <p>How can I use the exp and imp to export and import. I found <a href="http://www.orafaq.com/wiki/ORACLE_SID" rel="nofollow">this link</a> which describes setting the global sid variable which I presume would update which database I export/import. Ideally I would like a switch on the command so I can dont have to go changing environmental variables.</p>
  
  <p>I cannot see any way of doing this via the <a href="http://docs.oracle.com/cd/B10501_01/server.920/a96652/ch01.htm" rel="nofollow">docs</a> though</p>
  
  <p>Is there an easy way of changing SID for export?</p>
  
  <p>Thanks</p>