{"id":810,"date":"2015-12-27T04:18:22","date_gmt":"2015-12-27T04:18:22","guid":{"rendered":"http:\/\/haisins.epac.to\/wordpress\/?p=810"},"modified":"2015-12-27T04:18:22","modified_gmt":"2015-12-27T04:18:22","slug":"rman-copy-%eb%aa%85%eb%a0%b9%ec%96%b4%eb%a5%bc-%ec%9d%b4%ec%9a%a9%ed%95%9c-filesystem-to-asm-%ec%9d%b4%eb%8f%99%ed%95%98%ea%b8%b0%ed%98%b9%ec%9d%80-asm-to-filesystem","status":"publish","type":"post","link":"http:\/\/haisins.synology.me\/wordpress\/?p=810","title":{"rendered":"RMAN COPY \uba85\ub839\uc5b4\ub97c \uc774\uc6a9\ud55c Filesystem to ASM \uc774\ub3d9\ud558\uae30(\ud639\uc740 ASM to Filesystem)"},"content":{"rendered":"<p><P># \uace0\uac1d\uaed8\uc11c ASM\uc73c\ub85c \uc5c5\uadf8\ub808\uc774\ub4dc\uac00 \ud544\uc694\ud558\uac70\ub098, ASM\uae30\ubc18 RAC\ub85c \uc5c5\uadf8\ub808\uc774\ub4dc \ud558\uae30 \uc704\ud574, \uae30\uc874 ASM\uc744 \uc4f0\uace0\uc788\ub294\ub370 Tablespace\ub97c \uc798\ubabb<\/P><br \/>\n<P>\ub9cc\ub4e4\uc5c8\uac70\ub098 \ud588\uc744\ub54c\uc5d0 \uc720\uc6a9\ud558\uac8c \uc4f8 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/P><br \/>\n<P>&nbsp;<\/P><br \/>\n<P>1. \ud604\uc7ac Datafile\uc740 DATA Diskgroup\uc5d0 \uc788\uace0 ASM\uc73c\ub85c \uc62e\uaca8\uc57c\ud560 dbf\ub294 \/u01 \uc544\ub798\uc5d0 \uc788\uc2b5\ub2c8\ub2e4.<\/P><br \/>\n<P>SQL&gt; create tablespace test<br \/>&nbsp; 2&nbsp; datafile &#8216;\/u01\/test.dbf&#8217; size 10m;<\/P><br \/>\n<P>Tablespace created.<br \/><\/P><br \/>\n<P>SQL&gt; select name from v$datafile;<\/P><br \/>\n<P>NAME<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>+DATA\/orcl\/datafile\/system.256.823945567<br \/>+DATA\/orcl\/datafile\/sysaux.257.823945567<br \/>+DATA\/orcl\/datafile\/undotbs1.258.823945567<br \/>+DATA\/orcl\/datafile\/users.259.823945567<br \/>+DATA\/orcl\/datafile\/example.265.823945657<br \/>\/u01\/test.dbf<\/P><br \/>\n<P>6 rows selected.<\/P><br \/>\n<P><br \/>&nbsp;<\/P><br \/>\n<P>2. \uc774\ub3d9\ub300\uc0c1 Datafile\uc744 offline \uc2dc\ud0b5\ub2c8\ub2e4.<\/P><br \/>\n<P>SQL&gt; alter tablespace test offline;<\/P><br \/>\n<P>Tablespace altere<\/P><br \/>\n<P>&nbsp;<\/P><br \/>\n<P>3. RMAN\uc744 \uc2e4\ud589\uc2dc\ucf1c COPY\ub97c \uc2dc\ud0b5\ub2c8\ub2e4.<\/P><br \/>\n<P>[oracle@msyu u01]$ rman target \/<\/P><br \/>\n<P>Recovery Manager: Release 11.2.0.3.0 &#8211; Production on Sun Dec 27 13:01:04 2015<\/P><br \/>\n<P>Copyright (c) 1982, 2011, Oracle and\/or its affiliates.&nbsp; All rights reserved.<\/P><br \/>\n<P>connected to target database: ORCL (DBID=1351726376)<\/P><br \/>\n<P>RMAN&gt; copy datafile &#8216;\/u01\/test.dbf&#8217; to &#8216;+DATA&#8217;; <SPAN style=\"COLOR: #ff0000\">&lt;&#8211; A to B, B to A\ub97c \ub2ec\ub9ac \ud574\uc8fc\uba74 ASM to Filesystem\uc73c\ub85c\ub3c4 \uc62e\uae38 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/SPAN><\/P><br \/>\n<P>Starting backup at 27-DEC-15<br \/>using target database control file instead of recovery catalog<br \/>allocated channel: ORA_DISK_1<br \/>channel ORA_DISK_1: SID=27 device type=DISK<br \/>channel ORA_DISK_1: starting datafile copy<br \/>input datafile file number=00006 name=\/u01\/test.dbf<br \/>output file name=<SPAN style=\"COLOR: #ff0000\">+<\/SPAN><SPAN style=\"COLOR: #ff0000\">DATA\/orcl\/datafile\/test.267.899557303<\/SPAN> tag=TAG20151227T130142 RECID=2 STAMP=899557302<br \/>channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01<br \/>Finished backup at 27-DEC-15<\/P><br \/>\n<P>&nbsp;<\/P><br \/>\n<P>4. ASM\uc73c\ub85c \uc62e\uaca8\uc654\uc73c\ub2c8 \uc774\uc81c Rename\uc744 \ud574\uc90d\ub2c8\ub2e4. \uadf8\ub9ac\uace0 Tablespace\ub97c online \ud558\uc5ec \uc90d\ub2c8\ub2e4.<\/P><br \/>\n<P>SQL&gt; alter database rename file &#8216;\/u01\/test.dbf&#8217; to &#8216;+DATA\/orcl\/datafile\/test.267.899557303&#8217;;<\/P><br \/>\n<P>Database altered.<\/P><br \/>\n<P>SQL&gt; alter tablespace test online;<\/P><br \/>\n<P>Tablespace altered.<\/P><br \/>\n<P>SQL&gt; select name from v$datafile;<\/P><br \/>\n<P>NAME<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>+DATA\/orcl\/datafile\/system.256.823945567<br \/>+DATA\/orcl\/datafile\/sysaux.257.823945567<br \/>+DATA\/orcl\/datafile\/undotbs1.258.823945567<br \/>+DATA\/orcl\/datafile\/users.259.823945567<br \/>+DATA\/orcl\/datafile\/example.265.823945657<br \/>+DATA\/orcl\/datafile\/test.267.899557303<\/P><br \/>\n<P>6 rows selected.<\/P><br \/>\n<P><br \/>&nbsp;<\/P><br \/>\n<P>5. Object\ub97c \uc0dd\uc131\ud574\ubd05\ub2c8\ub2e4.<\/P><br \/>\n<P>SQL&gt; create table tt tablespace test as select * from v$version;<\/P><br \/>\n<P>Table created.<\/P><br \/>\n<P>SQL&gt; select * from tt;<\/P><br \/>\n<P>BANNER<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 &#8211; 64bit Production<br \/>PL\/SQL Release 11.2.0.3.0 &#8211; Production<br \/>CORE&nbsp;&nbsp;&nbsp; 11.2.0.3.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Production<br \/>TNS for Linux: Version 11.2.0.3.0 &#8211; Production<br \/>NLSRTL Version 11.2.0.3.0 &#8211; Production<\/P><br \/>\n<P>&nbsp;<\/P><br \/>\n<P>6. \uae30\uc874 Filesystem\uc5d0 \uc788\ub294 dbf \ud30c\uc77c\uc740 \uc9c0\uc6b0\uace0 \uc791\uc5c5\uc744 \ub9c8\ubb34\ub9ac \ud569\ub2c8\ub2e4.<\/P><br \/>\n<P>[oracle@msyu u01]$ ls -al<br \/>\ud569\uacc4 10280<br \/>drwxr-xr-x&nbsp; 3 oracle oinstall&nbsp;&nbsp;&nbsp;&nbsp; 4096 12\uc6d4 27 12:57 .<br \/>drwxr-xr-x 26 root&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096 12\uc6d4 27 12:51 ..<br \/>drwxr-xr-x&nbsp; 5 oracle oinstall&nbsp;&nbsp;&nbsp;&nbsp; 4096&nbsp; 8\uc6d4 20&nbsp; 2013 app<br \/>-rw-r&#8212;&#8211;&nbsp; 1 oracle oinstall 10493952 12\uc6d4 27 12:59 test.dbf<br \/>[oracle@soonhyog u01]$ rm -rf test.dbf<br \/><\/P><br \/>\n<P>&nbsp;<\/P><br \/>\n<P>&nbsp;<\/P><br \/>\n<P><br \/>&nbsp;<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p># \uace0\uac1d\uaed8\uc11c ASM\uc73c\ub85c \uc5c5\uadf8\ub808\uc774\ub4dc\uac00 \ud544\uc694\ud558\uac70\ub098, ASM\uae30\ubc18 RAC\ub85c \uc5c5\uadf8\ub808\uc774\ub4dc \ud558\uae30 \uc704\ud574, \uae30\uc874 ASM\uc744 \uc4f0\uace0\uc788\ub294\ub370 Tablespace\ub97c \uc798\ubabb \ub9cc\ub4e4\uc5c8\uac70\ub098 \ud588\uc744\ub54c\uc5d0 \uc720\uc6a9\ud558\uac8c \uc4f8 \uc218 \uc788\uc2b5\ub2c8\ub2e4. &nbsp; 1. \ud604\uc7ac Datafile\uc740 DATA Diskgroup\uc5d0 \uc788\uace0 ASM\uc73c\ub85c \uc62e\uaca8\uc57c\ud560 dbf\ub294 \/u01 \uc544\ub798\uc5d0 \uc788\uc2b5\ub2c8\ub2e4. SQL&gt; create tablespace test&nbsp; 2&nbsp; datafile &#8216;\/u01\/test.dbf&#8217; size 10m; Tablespace created. SQL&gt; select name from v$datafile; NAME&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+DATA\/orcl\/datafile\/system.256.823945567+DATA\/orcl\/datafile\/sysaux.257.823945567+DATA\/orcl\/datafile\/undotbs1.258.823945567+DATA\/orcl\/datafile\/users.259.823945567+DATA\/orcl\/datafile\/example.265.823945657\/u01\/test.dbf 6 rows selected. &nbsp; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"spay_email":""},"categories":[10],"tags":[72,479,77,480],"jetpack_featured_media_url":"","amp_enabled":true,"_links":{"self":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/810"}],"collection":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=810"}],"version-history":[{"count":0,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/810\/revisions"}],"wp:attachment":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=810"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}