{"id":6584,"date":"2019-03-15T11:48:13","date_gmt":"2019-03-15T17:48:13","guid":{"rendered":"https:\/\/www.bhinfo.com.mx\/cursos\/?p=6584"},"modified":"2019-03-15T11:48:13","modified_gmt":"2019-03-15T17:48:13","slug":"oracle-crear-tablespace-temp","status":"publish","type":"post","link":"https:\/\/www.bhinfo.com.mx\/cursos\/2019\/03\/15\/oracle-crear-tablespace-temp\/","title":{"rendered":"Oracle, Crear Tablespace TEMP"},"content":{"rendered":"<p>Crear el nuevo tablespace temporal de la base de datos, al que llamaremos TEMP2.<\/p>\n<p>1.- CREATE TEMPORARY TABLESPACE TEMP2 TEMPFILE SIZE 512M AUTOEXTEND ON NEXT 64M MAXSIZE 4096M;<\/p>\n<p>+DATA1\/ALLOCDEV\/69C28FCCE5D462C0E053390110AC7BF8\/TEMPFILE<\/p>\n<p>CREATE SMALLFILE TEMPORARY TABLESPACE TEMP2<br \/>\n    TEMPFILE<br \/>\n        &#8216;+DATA1\/ALLOCDEV\/69C28FCCE5D462C0E053390110AC7BF8\/TEMPFILE\/TEMPORAL2&#8217; SIZE 536870912 AUTOEXTEND ON NEXT 134217728 MAXSIZE 4294967296;<\/p>\n<p>2.-ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP2;<\/p>\n<p>Poner en estado OFFLINE el antiguo tablespace temporal. En este punto se observa que no se puede hacer:<br \/>\nALTER TABLESPACE TEMP OFFLINE;<\/p>\n<p>La bd devuelve el error ORA-03217. Este error indica que los datafiles asociados a este tablespace est\u00e1n ONLINE. Para solucionarlo, hay que poner los datafiles del tablespace en OFFLINE. Para hacer esto hacemos:<br \/>\nALTER DATABASE TEMPFILE &#8216;+DATA1\/ALLOCDEV\/69C28FCCE5D462C0E053390110AC7BF8\/TEMPFILE\/temp.276.973355349&#8217; OFFLINE;<\/p>\n<p>Borrar el antiguo tablespace temporal.<br \/>\nDROP TABLESPACE TEMP INCLUDING CONTENTS AND DATAFILES;<\/p>\n<p>Volvemos a intentar asignar el nuevo tablespace TEMP2 como tablespace por defecto de la base de datos.<br \/>\nALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP2;<\/p>\n<p>Comprobaremos ahora como los esquemas existentes en la base de datos tienen como tablespace temporal por defecto TEMP2 con la siguiente consulta:<br \/>\nselect username,temporary_tablespace from dba_users;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Crear el nuevo tablespace temporal de la base de datos, al que llamaremos TEMP2. 1.- CREATE TEMPORARY TABLESPACE TEMP2 TEMPFILE SIZE 512M AUTOEXTEND ON NEXT 64M MAXSIZE 4096M; +DATA1\/ALLOCDEV\/69C28FCCE5D462C0E053390110AC7BF8\/TEMPFILE CREATE SMALLFILE TEMPORARY TABLESPACE TEMP2 TEMPFILE &#8216;+DATA1\/ALLOCDEV\/69C28FCCE5D462C0E053390110AC7BF8\/TEMPFILE\/TEMPORAL2&#8217; SIZE 536870912 AUTOEXTEND ON NEXT 134217728 MAXSIZE 4294967296; 2.-ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP2; Poner en estado OFFLINE el [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6584","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.bhinfo.com.mx\/cursos\/wp-json\/wp\/v2\/posts\/6584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bhinfo.com.mx\/cursos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bhinfo.com.mx\/cursos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bhinfo.com.mx\/cursos\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bhinfo.com.mx\/cursos\/wp-json\/wp\/v2\/comments?post=6584"}],"version-history":[{"count":1,"href":"https:\/\/www.bhinfo.com.mx\/cursos\/wp-json\/wp\/v2\/posts\/6584\/revisions"}],"predecessor-version":[{"id":6585,"href":"https:\/\/www.bhinfo.com.mx\/cursos\/wp-json\/wp\/v2\/posts\/6584\/revisions\/6585"}],"wp:attachment":[{"href":"https:\/\/www.bhinfo.com.mx\/cursos\/wp-json\/wp\/v2\/media?parent=6584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bhinfo.com.mx\/cursos\/wp-json\/wp\/v2\/categories?post=6584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bhinfo.com.mx\/cursos\/wp-json\/wp\/v2\/tags?post=6584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}