Olá Pessoal,

Seguem os comandos:

create undo tablespace new_tbs DATAFILE size 2048m autoextend on next 500M
maxsize 2048m;

alter system set undo_tablespace=new_tbs;

drop tablespace old_tbs including contents and datafiles;

Contudo, conforme eu já tinha comentado com o Mufalani, o problema já foi
resolvido, tinha uns processos travados (talvez algum rollback sendo
executado), que demorou pelo menos 3 horas para que eu conseguisse excluir
a antiga tbs.

Att,

Wanderson


Em 17 de abril de 2014 21:22, Fabricio Pedroso Jorge
<fpjb...@gmail.com>escreveu:

>
>
> Ola,
>
> Executa essa query, vê quem ainda tem undo ativo e mata a sessão:
>
> select s.sql_text
>   from v$sql s, v$undostat u
>    where u.maxqueryid = s.sql_id;
>
> Após matar a sessão, creio que seja possível remover a tablespace de undo.
>
>
> Em 17 de abril de 2014 16:49, Wanderson Barrence 
> <wbarre...@gmail.com>escreveu:
>
>>
>>
>> Olá Pessoal,
>>
>> Estou com problema aqui que aparentemente parece fácil de resolver, mas
>> depois muitas tentativas resolvi apelar para os "Especialistas". kkkkk...
>>
>> Preciso excluir uma tablespace de undo em um banco de dados 24x7 (que não
>> posso baixar de maneira alguma), geralmente eu utilizo o fluxo abaixo:
>>
>> 1. Crio uma nova tablespace de UNDO.
>>
>> 2. Ativo essa tablespace com: "alter system set undo_tablespace=nova_tbs;"
>>
>> 3. Excluo a antiga TBS com o comando: "drop tablespace antiga_tbs
>> including contents and datafiles;"
>>
>> Como nem tudo são flores, está ocorrendo o erro:
>>
>> Ao setar a nova tbs:
>>
>> SQL> alter system set undo_tablespace=nova_tbs;
>> alter system set undo_tablespace=nova_tbs
>> *
>> ERROR at line 1:
>> ORA-02097: parameter cannot be modified because specified value is invalid
>> ORA-30012: undo tablespace 'nova_tbs' does not exist or of wrong type
>>
>> E ao excluir a antiga tbs:
>> SQL> drop tablespace antiga_tbs including contents and datafiles;
>> drop tablespace antiga_tbs including contents and datafiles
>> *
>> ERROR at line 1:
>> ORA-30013: undo tablespace 'antiga_tbs' is currently in use
>>
>> Inclusive já reduzi o undo_retention, já matei todas as sessões, mas até
>> agora nada!!!
>>
>> Alguém tem alguma nova dica?
>>
>> Ambiente:
>> Oracle Database 10g Release 10.2.0.3.0 - 64bit Production
>> With the Real Application Clusters option
>> Red Hat Enterprise Linux AS release 4 (Nahant Update 6)
>>
>> Att,
>>
>> Wanderson
>>
>>
>
>
> --
> *Fabrício Pedroso Jorge.*
>
> Administrador de Banco de Dados
> Oracle 11g Certified SQL Expert
> Oracle 11g Certified Associate
> Oracle 11g Certified Professional
> Linux Professional Institute Certified Level I (LPIC-I)
> ITIL V3 Foudations
> certificacaodb.com.br
>
> *Resumo Profissional:*
> http://br.linkedin.com/in/fabriciojorge
>
> *Contatos:*
> + 55 91 88991116
> skype: fabricio.pedroso.jorge
> fpjb...@gmail.com
>
>
>

Responder a