- Este tópico contém 5 respostas, 2 vozes e foi atualizado pela última vez 14 anos, 7 meses atrás por
Doug.
-
AutorPosts
-
1 de julho de 2010 às 5:03 pm #94903
Doug
ParticipantePessoal, bom dia.
Tenho uma tablespace chamada MSAFD. A essa tablespace foi add uma nova, a MSAFD_01. Hj na tablespace adicionada MSAFD_01.DBF não existe nenhum registro. Gostaria de dropar a mesma, mas não consigo.
Estou realizando o comando abaixo:
DROP TABLESPACE MSAFD_01 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
Qual seria o comando correto, para dropar o datafile adicionado ?
PS – base de testes…
abs a todos
1 de julho de 2010 às 5:14 pm #94904burga
ParticipanteQual mensagem que aparece quando você executa o comando?
Restrictions on Dropping Tablespaces
*
You cannot drop a tablespace that contains a domain index or any objects created by a domain index.
*You cannot drop an undo tablespace if it is being used by any instance or if it contains any undo data needed to roll back uncommitted transactions.
*You cannot drop a tablespace that has been designated as the default tablespace for the database. You must first reassign another tablespace as the default tablespace and then drop the old default tablespace.
*You cannot drop a temporary tablespace if it is part of the database default temporary tablespace group. You must first remove the tablespace from the database default temporary tablespace group and then drop it.
*You cannot drop a tablespace, even with the INCLUDING CONTENTS and CASCADE CONSTRAINTS clauses, if doing so would disable a primary key or unique constraint in another tablespace. For example, if the tablespace being dropped contains a primary key index, but the primary key column itself is in a different tablespace, then you cannot drop the tablespace until you have manually disabled the primary key constraint in the other tablespace.
http://download.oracle.com/docs/cd/B120 … s_9004.htm
1 de julho de 2010 às 5:23 pm #94905Doug
ParticipanteERRO na linha 1:
ORA-00959: tablespace ‘MSAFD_01’ não existe1 de julho de 2010 às 5:27 pm #94906Doug
ParticipanteSQL> ALTER TABLESPACE MSAFD
2 ADD DATAFILE ‘C:oracleproduct10.2.0oradataORCLMSAFD_01.DBF’
3 SIZE 100M
4 AUTOEXTEND ON
5 NEXT 512M
6 MAXSIZE 8192M;Tablespace alterado.
SQL> DROP TABLESPACE MSAFD_01 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
DROP TABLESPACE MSAFD_01 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS
*
ERRO na linha 1:
ORA-00959: tablespace ‘MSAFD_01’ não existeSQL>
abs e brigaduuuu….
1 de julho de 2010 às 5:39 pm #94907burga
Participanteah, tablespace e datafile são duas coisas diferentes, o que você quer é apagar um datafile…
No 10gR2 ou mais recente:
alter tablespace MSAFD drop datafile ‘C:oracleproduct10.2.0oradataORCLMSAFD_01.DBF’Versões anteriores:
http://download.oracle.com/docs/cd/B105 … .htm#162351 de julho de 2010 às 5:49 pm #94908Doug
ParticipanteVerdade Burga, me desculpe, me confundi com os nomes, mas muito obrigado, deu certo.
abs
-
AutorPosts
- Você deve fazer login para responder a este tópico.