powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Oracle [игнор отключен] [закрыт для гостей] / ПОСОВЕТУЙТЕ КАК УДАЛИТЬ DATAFILE !!!!
9 сообщений из 9, страница 1 из 1
ПОСОВЕТУЙТЕ КАК УДАЛИТЬ DATAFILE !!!!
    #32130398
ALGOR
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Запортился один Datafile в табличном пространстве, хочу его удалить или все табличное пространство.

Alter database drop datafile.. или
alter database datafile.. offline
выдает ora-01900:LOGFILE keyword expected;
Что это может быть?
...
Рейтинг: 0 / 0
ПОСОВЕТУЙТЕ КАК УДАЛИТЬ DATAFILE !!!!
    #32130447
Bardis
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
datafile offline prohodit tolko v tom sluchje jesli DB v ARCHIVELOG Mode.
no datafile otdelno v oRACLE ubit nelyzya. Ty dolzhen vse segmenty iz Tablespacov permestit v drugoj tablespace a zatem ubit ishodnyj tablespace.
...
Рейтинг: 0 / 0
ПОСОВЕТУЙТЕ КАК УДАЛИТЬ DATAFILE !!!!
    #32130593
Mergen
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Код: plaintext
1.
DROP TABLESPACE <tablespace name> INCLUDING CONTENTS;

Удаление табличного пространства с содержащимеся объектами, а сам физический файл ручками в ОС.
Можно посмотреть подробней здесь
http://www.idevelopment.info/
...
Рейтинг: 0 / 0
ПОСОВЕТУЙТЕ КАК УДАЛИТЬ DATAFILE !!!!
    #32130640
AI
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
В 9 можно сказать drop tablespace ... includding contents and datafiles;
...
Рейтинг: 0 / 0
ПОСОВЕТУЙТЕ КАК УДАЛИТЬ DATAFILE !!!!
    #32130654
noname_
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
В alter database надо указывать имя базы. Кроме того, необходимо смонтировать базу, но не открывать и выполнить оператор ALTER DATABASE database_name DATAFILE filename OFFLINE DROP. И так для всех файлов табличного пространства. Затем открыть базу и выполнить DROP TABLESPACE. Затем удалить файлы с диска вручную.
...
Рейтинг: 0 / 0
ПОСОВЕТУЙТЕ КАК УДАЛИТЬ DATAFILE !!!!
    #32130679
Bardis
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
How to 'DROP' a Datafile from a Tablespace:
===========================================

Before we start with detailed explanations of the process involved, please note
that Oracle does not provide an interface for dropping datafiles in the same
way that you could drop a schema object such as a table, a view, a user, etc.
Once you make a datafile part of a tablespace, the datafile CANNOT be removed,
although we can use some workarounds.

Before performing certain operations such as taking tablespaces/datafiles
offline, and trying to drop them, ensure you have a full backup.

If the datafile you wish to remove is the only datafile in that tablespace,
simply drop the entire tablespace using:

DROP TABLESPACE <tablespace name> INCLUDING CONTENTS;

You can confirm how many datafiles make up a tablespace by running the
following query:

select file_name, tablespace_name
from dba_data_files
where tablespace_name ='<name of tablespace>';

The DROP TABLESPACE command removes the tablespace, the datafile, and the
tablespace's contents from the data dictionary. Oracle will no longer have
access to ANY object that was contained in this tablespace. The physical
datafile must then be removed using an operating system command (Oracle NEVER
physically removes any datafiles). Depending on which platform you try this
on, you may not be able to physically delete the datafile until Oracle is
completely shut down. (For example, on Windows NT, you may have to shutdown
Oracle AND stop the associated service before the operating system will allow
you to delete the file - in some cases, file locks are still held by Oracle.)

If you have more than one datafile in the tablespace, and you do NOT need the
information contained in that tablespace, or if you can easily recreate the
information in this tablespace, then use the same command as above:

DROP TABLESPACE <tablespace name> INCLUDING CONTENTS;

Again, this will remove the tablespace, the datafiles, and the tablespace's
contents from the data dictionary. Oracle will no longer have access to ANY
object that was contained in this tablespace. You can then use CREATE
TABLESPACE and re-import the appropriate objects back into the tablespace.

If you have more than one datafile in the tablespace and you wish to keep the
objects that reside in the other datafile(s) which are part of this tablespace,
then you must export all the objects inside the affected tablespace. Gather
information on the current datafiles within the tablespace by running this
query:

select file_name, tablespace_name
from dba_data_files
where tablespace_name ='<name of tablespace>';

Make sure you specify the tablespace name in capital letters.

In order to allow you to identify which objects are inside the affected
tablespace for the purposes of running your export, use the following query:

select owner,segment_name,segment_type
from dba_segments
where tablespace_name='<name of tablespace>'

Now, export all the objects that you wish to keep.

Once the export is done, issue the DROP TABLESPACE tablespace INCLUDING
CONTENTS.

Note that this PERMANENTLY removes all objects in this tablespace. Delete the
datafiles belonging to this tablespace using the operating system. (See the
comment above about possible problems in doing this.) Recreate the tablespace
with the datafile(s) desired, then import the objects into that tablespace.
(This may have to be done at the table level, depending on how the tablespace
was organized.)

NOTE:
The ALTER DATABASE DATAFILE <datafile name> OFFLINE DROP command, is not meant
to allow you to remove a datafile. What the command really means is that you
are offlining the datafile with the intention of dropping the tablespace.

If you are running in archivelog mode, you can also use:

ALTER DATABASE DATAFILE <datafile name> OFFLINE;

instead of OFFLINE DROP. Once the datafile is offline, Oracle no longer
attempts to access it, but it is still considered part of that tablespace. This
datafile is marked only as offline in the controlfile and there is no SCN
comparison done between the controlfile and the datafile during startup (This
also allows you to startup a database with a non-critical datafile missing).
The entry for that datafile is not deleted from the controlfile to give us the
opportunity to recover that datafile.


If you do not wish to follow any of these procedures, there are other things
that can be done besides dropping the tablespace.

- If the reason you wanted to drop the file is because you mistakenly created
the file of the wrong size, then consider using the RESIZE command.
See 'Related Documents' below.

- If you really added the datafile by mistake, and Oracle has not yet allocated
any space within this datafile, then you can use ALTER DATABASE DATAFILE
<filename> RESIZE; command to make the file smaller than 5 Oracle blocks. If
the datafile is resized to smaller than 5 oracle blocks, then it will never
be considered for extent allocation. At some later date, the tablespace can
be rebuilt to exclude the incorrect datafile.
...
Рейтинг: 0 / 0
ПОСОВЕТУЙТЕ КАК УДАЛИТЬ DATAFILE !!!!
    #32131111
algor
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Большое спасибо всем кто откликнулся ,ЗАВАЛИЛ НЕГОДНИКА!
...
Рейтинг: 0 / 0
ПОСОВЕТУЙТЕ КАК УДАЛИТЬ DATAFILE !!!!
    #32131129
algor
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Подскажите как наиболее правильно сконфигурировать табличное пространство, если необходтмо влить большой дамп.
Размер блока db_block_size = 4096, я создаю таким образом
CREATE TABLESPACE USR
DATAFILE 'D:\ORANT\DATABASE\USR1REES.ORA' SIZE 2048M
DEFAULT STORAGE (INITIAL 1024K NEXT 1024K PCTINCREASE 0)
PERMANENT ONLINE;
(обязательно ли указывать параметр MINIMUM EXTENTS)

в процессе заливки ошибка на то что оракл не может создать следующий экстент
...
Рейтинг: 0 / 0
ПОСОВЕТУЙТЕ КАК УДАЛИТЬ DATAFILE !!!!
    #32131206
_no_name_
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Значит при заливке некоторого сегмента при попытке расшириться за счет создания нового экстента оракул уперся в размер datafile. В таких случаях перед вставкой большого куска данных надо выставить autoextend on для datafile, а также определить объем вставляемых данных для каждого сегмента для того, чтобы создать в tablespace объекты с initial extent = этому объему. Последнее делать необязательно, но может повысить производительнось.
...
Рейтинг: 0 / 0
9 сообщений из 9, страница 1 из 1
Форумы / Oracle [игнор отключен] [закрыт для гостей] / ПОСОВЕТУЙТЕ КАК УДАЛИТЬ DATAFILE !!!!
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]