<¿À¶óŬ °èÁ¤»ý¼º>
1. ¿À¶óŬÀ» Á¢¼ÓÇÑ´Ù. °èÁ¤Àº ¾Æ¹«°Å³ª Á¢¼ÓÇصµ ¹«°üÇÔ.
(cmdâ¿¡¼ ¹Ù·Î Á¢¼Ó½Ã C:\>sqlpluse "/as sysdba" ,
¸®´ª½º´Â ·çÆ®±ÇÇÑÀ¸·Î ·Î±×ÀÎÈÄ su - oracle Á¢¼ÓÇÏ¿© sqlplus "/as sysdba")
2. Á¢¼ÓÈÄ sys°èÁ¤À¸·Î Á¢¼ÓÀ» º¯°æÇÕ´Ï´Ù.
sql>conn /as sysdba
3. Å×ÀÌºí ½ºÆäÀ̽º »ý¼º
sql>create tablespace tester_sp
datafile '/home/oracle/tester_sp.dbf' size 50M
autoextend on next 1M maxsize 100M;
create tablespace Å×ÀÌºí½ºÆäÀ̽º¸í datafile 'ÀúÀå°æ·Î' size 50M
autoextend on next 1M maxsize 100M;
¡Ø ±âÁ¸ ¹é¾÷ µðºñ º¹±¸½Ã¿¡´Â Å×ÀÌºí½ºÆäÀ̽º »çÀÌÁ º¹±¸ÇÏ°íÀÚ ÇÏ´Â ÆÄÀÏÀÇ »çÀÌÁî Å©±â¿Í µ¿ÀÏÇϰųª Å©°Ô ÇØÁà¾ßµÈ´Ù.
4. Àӽà Å×ÀÌºí ½ºÆäÀ̽º »ý¼º
sql>create temporary tablespace tester_sp_temp
tempfile '/home/oracle/tester_sp_temp.dbf' size 20M;
create temporary tablespace Àӽà Å×ÀÌºí½ºÆäÀ̽º ¸í
tempfile 'ÀúÀå°æ·Î' size 100M;
5. sys°èÁ¤ Á¢¼®ÈÄ À¯Àú°èÁ¤»ý¼º ÇÕ´Ï´Ù.
sql>create user test identified by test default tablespace tester_sp temporary tablespace tester_sp_temp;
create user À¯ÀúÀ̸§ identified by ¾ÏÈ£ default tablespace »ý¼ºÇÑ Å×ÀÌºí ½ºÆäÀ̽º À̸§
temporary tablespace »ý¼ºÇÑ ÀÓ½ÃÅ×ÀÌºí ½ºÆäÀ̽º À̸§;
<»ý¼ºÇÑ°èÁ¤ ±ÇÇѺο©>
sql>grant connect, resource to test;
grant connect, resource to À¯ÀúÀ̸§;
<°èÁ¤»èÁ¦>
sql>drop user test cascade;
drop user À¯ÀúÀ̸§ cascade;
<Å×ÀÌºí½ºÆäÀ̽º »èÁ¦>
sql>drop tablespace tester_sp;
drop tablespace Å×ÀÌºí½ºÆäÀ̽º¸í;
Å×ÀÌºí½ºÆäÀ̽º¿¡ µ¥ÀÌŸ°¡ Á¸ÀçÇÏ´Â °æ¿ì including contentsÀ» Ãß°¡ÇØÁÜ.
ex) drop tablespace tester_sp including contents;
<DB ¹é¾÷Ç®±â>
c:\>imp test/123 file=c:\test.dmp
¶Ç´Â
c:\>imp userid=test/123@orc file=c:\test.dmp fromuser=test touser=test ignore=yes
imp °èÁ¤À̸§/°èÁ¤¾ÏÈ£ file=ÆÄÀÏÀ̸§.dmp
¿É¼Ç
imp userid=°èÁ¤À̸§/°èÁ¤¾ÏÈ£@sid¸í(@sid¸íÀº Á¦°ÅÇصµµÊ)
file=°æ·Î¹×ÆÄÀÏÀ̸§ fromuser=exp½Ã À¯Àú¾ÆÀ̵ð touser=imp¹ÞÀ» À¯Àú¾ÆÀ̵ð ignore=yes
<DB ¹é¾÷(dmp)>
c:\>exp test/123 file=c:\test.dmp
¶Ç´Â
c:\>exp userid=test/123@orc file=c:\test.dmp log=c:\test.log
exp °èÁ¤À̸§/°èÁ¤¾ÏÈ£ file=ÆÄÀÏÀ̸§.dmp
¶Ç´Â
exp userid=°èÁ¤À̸§/°èÁ¤¾ÏÈ£@sid¸í(@sid¸íÀº Á¦°ÅÇصµµÊ) file=°æ·Î¹×ÆÄÀÏÀ̸§ log=·Î±×°¡ÀúÀåµÉ ÆÄÀÏ