Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezhov-da/4717a4d1906f9d60bc12be91ed9a6a8c to your computer and use it in GitHub Desktop.
Save ezhov-da/4717a4d1906f9d60bc12be91ed9a6a8c to your computer and use it in GitHub Desktop.
Восстановление дропнутых таблиц в Oracle

В случае, если в БД были удалены таблицы, это удаление можно отменить. Для этого:

  1. Получить список дропнутых таблиц, которые нужно восстановить:
SELECT 
  ORIGINAL_NAME, 
  DROPTIME 
FROM 
  user_recyclebin 
WHERE 
  OPERATION = 'DROP' 
  and TYPE = 'TABLE' 
order by 
  DROPTIME desc;
  1. Восстановить таблицу запросом:
FLASHBACK TABLE НАЗВАНИЕ_ТАБЛИЦЫ TO BEFORE DROP;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment