Pular para o conteúdo

Fóruns Banco de dados Oracle Alterar Caminho do DataFile Alterar Caminho do DataFile

#88356
ramasine
Participante

    Mas se não te atender, segue um outro roteiro.
    http://pscoliveira.blogspot.com/2007/11 … oving.html

    • Nunca altere o nome das tablespaces SYSTEM e SYSAUX

    Movendo uma tablespace (Datafile)

    1. If the database is up, shut it down.
    2. Copy the datafile to the new name/location at operating system level.

    3. Mount the database.

    STARTUP MOUNT

    ( This command will read the control file but will not mount the datafiles. )

    1. Rename the file inside Oracle.

    ALTER DATABASE RENAME FILE

    ‘/FULL_PATH_OF_OLD_LOCATION/AND_DATAFILE_NAME.DBF’

    TO

    ‘/FULL_PATH_OF_NEW_LOCATION/AND_DATAFILE_NAME.DBF’;

    Do this for all the datafiles that were renamed or moved at the operating system level.

    1. Open the database.

    ALTER DATABASE OPEN;

    1. Query v$dbfile to confirm that the changes made were correct.

    SELECT * FROM V$DBFILE;

    1. Remove the datafile(s) from the old location at the operating system level.

    Ps.: Antes de remover o datafile verifique se a data de alteração do arquivo foi alterada, caso esteja com a mesma data dos outros datafiles, houve algum erro e o datafile ainda esta sendo acessado. A exclusão pode causar problemas sérios no banco.

    Abs
    Marcelo