{"id":47,"date":"2008-12-18T11:59:31","date_gmt":"2008-12-18T15:59:31","guid":{"rendered":"http:\/\/dbtricks.com\/?p=47"},"modified":"2008-12-18T11:59:31","modified_gmt":"2008-12-18T15:59:31","slug":"how-to-move-tablespace-to-a-new-location","status":"publish","type":"post","link":"https:\/\/dbtricks.com\/?p=47","title":{"rendered":"How to move tablespace to a new location"},"content":{"rendered":"<p>1)\u00a0\u00a0\u00a0 Take the tablespace offline<br \/>\n<strong>ALTER TABLESPACE tablespace-name OFFLINE;<\/strong><br \/>\n2)\u00a0\u00a0\u00a0 Use the OS to Move the tablespace to the new location<br \/>\n3)\u00a0\u00a0\u00a0 Run the following command:<br \/>\n<strong>ALTER TABLESPACE tablespace-name RENAME DATAFILE \u2018OS path to old tablespace\\tablespace-datafile- name.dbf\u2019 TO \u2018OS path to new location\\tablespace-datafile-name.dbf\u2019;<\/strong><br \/>\n4)\u00a0\u00a0\u00a0 Take the tablespace back online<br \/>\n<strong>ALTER TABLESPACE tablespace-name ONLINE;<\/strong><br \/>\nIf the following error is displayed<br \/>\n<strong> ORA-01113: file n needs media recovery<br \/>\nORA-01110: data file n: &#8216;new location file name&#8217;<\/strong><br \/>\nIssue the the following command:<br \/>\n<strong> recover datafile &#8216;new location file name &#8216;; <\/strong><br \/>\nand take the tablespace back online<br \/>\n<strong> ALTER TABLESPACE tablespace-name ONLINE;<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1)\u00a0\u00a0\u00a0 Take the tablespace offline ALTER TABLESPACE tablespace-name OFFLINE; 2)\u00a0\u00a0\u00a0 Use the OS to Move the tablespace to the new location 3)\u00a0\u00a0\u00a0 Run the following command: ALTER TABLESPACE tablespace-name RENAME DATAFILE \u2018OS path to old tablespace\\tablespace-datafile- name.dbf\u2019 TO \u2018OS path to new location\\tablespace-datafile-name.dbf\u2019; 4)\u00a0\u00a0\u00a0 Take the tablespace back online ALTER TABLESPACE tablespace-name ONLINE; If the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[30,27,26,107,29,28],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-alter-tablespace","tag-ora-01110","tag-ora-01113","tag-oracle","tag-recover","tag-tablespace"],"_links":{"self":[{"href":"https:\/\/dbtricks.com\/index.php?rest_route=\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtricks.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtricks.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtricks.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtricks.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=47"}],"version-history":[{"count":3,"href":"https:\/\/dbtricks.com\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":50,"href":"https:\/\/dbtricks.com\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions\/50"}],"wp:attachment":[{"href":"https:\/\/dbtricks.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtricks.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtricks.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}