2 способа удаления базы данных Oracle
Второй способ заключается в переводе БД в ограниченный эксклюзивный режим и запуске команды drop database:
orasft@DB:/home/orasft$ export ORACLE_SID=TST orasft@DB:/home/orasft$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.2.0 Production on Thu Oct 3 19:01:49 2013 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning option SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount exclusive restrict; ORACLE instance started. Total System Global Area 1369579520 bytes Fixed Size 2181088 bytes Variable Size 805308448 bytes Database Buffers 553648128 bytes Redo Buffers 8441856 bytes Database mounted. SQL> select instance_name from v$instance; INSTANCE_NAME ---------------- TST SQL> drop database; Database dropped. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning option SQL>exit
IT-задачи
Иногда возникают трудности с деинсталляцией клиента Oracle. Почему-то в установке и удалении программ клиент Oracle отсутствует.
Предлагаю следующий способ удаления клиента Oracle:
- запускаем инсталлятор — Deinstall Products . Деинсталлятор загасит службы, удалит большинство файлов;
- подчищаем в Program Files и в Program Files (x86) ;
- удаляем папку Oracle с корня диска C: (или с того места, куда Oracle был установлен);
- в реестре удаляем ветку: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE (если Windows 7) и HKEY_LOCAL_MACHINE\SOFTWARE\Oracle (если Xp).
Удаление Oracle Database под Windows
Beginning with 11.2, the Oracle Universal Installer will no longer be used to remove Oracle software from an environment. A new Deinstall tool is shipped with the Oracle Products and is also available for download on OTN
Это из нотки “How to Manually Remove Oracle Server Software on Microsoft Windows Platforms (Doc ID 1069034.1)”
Итак, имеем Oracle Database 11g, которую хотим “снести”.
Существуют 2 + 1 вариант. Рассмотрим их подробнее.
Вариант 1 – Deinstallation Tool
Как сказано в документе, используем Deinstall tool, для этого обращаемся к документации.
“Database Installation Guide for Microsoft Windows”, переходим к разделу “Removing Oracle Database Software”.
Все достаточно описано, выполняем по шагам.
Вариант 2 – ручное удаление (согласно ноте)
В документе описан “гуманный способ”, удаления. Используются консоли Database Configuration Assistant (DBCA) и Net Configuration Assistant (NetCA) для удаления продуктов. Далее ручная зачистка реестра, сервисов, переменных окружения и прочее.
Также описано удаление для кластерной модели.
Вариант 3 – ручное удаление
В результате был выбран этот вариант, т.к. удалялся весь софт Oracle с машины то консоли не использовались.
- Останавливаем все сервисы Oracle
- Удаляем файлы вместе с папкой из ORACLE_HOME
- Удаляем файлы вместе с папкой из C:\Program Files\Oracle
- Удаляем ветку в реестре HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
- Удаляем в ветке реестра HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services все сервисы, имеющие в наименовании или ссылке слово Oracle
- Корректируем значения переменных окружения CLASSPATH, ORACLE_HOME, PATH, PERL5LIB.
- Удаляем ссылки в меню, относящиеся к продуктам Oracle
- Перегружаем машину, смотрим, чтобы все что мы делали – действительно привело к нужным нам результатам.
Остальное – не критично, т.к. нам ведь для переустановки.
Если хочется просто зачистить машину, чтобы следов не осталось, то тогда надо использовать документ (ноту), и по шагам выполнять указанные там действия.
2 thoughts on “ Удаление Oracle Database под Windows ”
Saimon
6. Корректируем значения переменных окружения CLASSPATH, ORACLE_HOME, PATH, PERL5LIB.
Можно этот пункт по подробней, где искать эти переменные, как корректировать?
Заранее спасибо.
Ну, как сказать. Есть 2 способа.
1 – вызываете командную строку (cmd.exe, или в far manager). Ну а там команды set, path и остальное.
2 – используете изменение настроек среды через оконный интерфейс
Правой кнопкой мыши на системной иконке открываете окно System Properties. Закладка Advanced. Внизу кнопка System Variables.
Далее в окне System Variables выбираете в нижнем блоке свою переменную, нажимаете кнопочку Edit п2 описан для windows XP
5 Removing Oracle Database Client Software
This chapter describes how to remove the Oracle Database Client software:
- Stopping Oracle Services on Windows
- Removing Oracle Database Client with Oracle Universal Installer
- Manually Removing the Remaining Oracle Database Client Components
Always use Oracle Universal Installer to initially remove Oracle components. To avoid installation and configuration problems with new Oracle installations, follow the instructions in this chapter.
Component-specific documentation for individual requirements and restrictions
5.1 Stopping Oracle Services on Windows
You must first stop the Oracle Windows services before removing Oracle components or removing any registry entries.
Your Microsoft online help for more information about stopping services
To stop Windows services:
- Open the Windows Services utility: From the Start menu, choose Programs , then Administrative Tools , then Services .
- If any Oracle services (names begin with Oracle or Ora ) exist and have the status Started , then select each of the services, and click Stop .
- Exit Services .
5.2 Removing Oracle Database Client with Oracle Universal Installer
You first use Oracle Universal Installer to remove Oracle Database Client from the inventory on the computer. Afterwards, you must manually remove the remaining components. This section covers the following topics:
- Guidelines for Removing Oracle Database Client with Oracle Universal Installer
- Procedure for Removing Oracle Database Client with Oracle Universal Installer
5.2.1 Guidelines for Removing Oracle Database Client with Oracle Universal Installer
Follow these guidelines:
- Do not manually remove Oracle Database Client components without first deinstalling with Oracle Universal Installer. An exception is if, during an installation, you exit Oracle Universal Installer using any of the following methods:
- Clicking Cancel
- Turning off the computer
- If the installation does not complete (that is, all required configuration tools do not run at the end)
In these cases, Oracle Universal Installer does not register the installation in its inventory. However, it may have copied files to your Oracle home. Remove these files manually and restart the installation.
5.2.2 Procedure for Removing Oracle Database Client with Oracle Universal Installer
Oracle Universal Installer creates Windows services for Oracle components during installation. However, Oracle Universal Installer does not delete all the services created by Oracle Net Configuration Assistant.
To remove components on a Windows computer with Oracle Universal Installer:
- Ensure that you first follow the instructions in «Stopping Oracle Services on Windows».
- Start Oracle Universal Installer. The start procedure depends on which version of Oracle Database Client you installed.
- If you installed the Administrator, Runtime, or Custom versions of Oracle Database Client, then Oracle Universal Installer was also installed. From the Start menu, choose Programs , then Oracle — HOME_NAME , then Oracle Installation Products , then Universal Installer . The Welcome window for Oracle Universal Installer appears.
- If you installed the Instant Client version of Oracle Database Client, Oracle Universal Installer was not installed. Instead, run it from your installation media or the installation directory you created for downloaded or copied installation files. To do so, insert Oracle Database installation media and navigate to the client directory. Alternatively, navigate to the directory where you downloaded or copied the installation files. Then double-click setup.exe to start Oracle Universal Installer. In the Welcome window, choose Install/Deinstall Products .
Note: A message may appear indicating that removing some components may cause other components to not function properly.
5.3 Manually Removing the Remaining Oracle Database Client Components
Oracle Universal Installer does not remove all Oracle components. After using Oracle Universal Installer to remove Oracle components, you need to manually remove remaining registry keys, environment variables, Start menu options, and directories.
This section contains these topics:
- Removing Oracle Keys from the Registry Editor on Windows
- Updating the PATH Environment Variable Path
- Removing Oracle Database Client from the Start Menu
- Removing Oracle Database Client Directories
In rare situations, you might want to correct serious system problems by completely removing Oracle components manually from the computer without first deinstalling with Oracle Universal Installer. Do this only as a last resort, and only if you want to remove all Oracle components from your system.
5.3.1 Removing Oracle Keys from the Registry Editor on Windows
Oracle Universal Installer does not delete all services created by Oracle Net Configuration Assistant. In addition, it does not delete several other registry keys. You must remove any existing registry keys manually by following the instructions in one of the following sections:
- Removing Only the Oracle Net Service Registry Key
- Removing All Oracle Registry Keys
Use Microsoft Registry Editor at your own risk. Incorrectly using the Registry Editor can cause serious problems and might require you to reinstall your operating system.
5.3.1.1 Removing Only the Oracle Net Service Registry Key
To remove only the Oracle Net Service registry entry (if it exists):
- Log in as a member of the Administrators group.
- Ensure that you first follow the instructions in «Stopping Oracle Services on Windows».
- From the Start menu, choose Run , and then enter the following command:
regedit
5.3.1.2 Removing All Oracle Registry Keys
To remove all Oracle registry keys from a computer (if any exist):
These instructions remove all Oracle components, services, and registry entries from your computer. Exercise extreme care when removing registry entries. Removing incorrect entries can break your system. Any database files under ORACLE_BASE \ ORACLE_HOME \ DB_NAME should be deleted only after completing these instructions.
- Log in as a member of the Administrators group.
- Ensure that you first follow the instructions in «Stopping Oracle Services on Windows».
- From the Start menu, choose Run , and enter the following command:
regedit
- ORAMMCPMON10
- ORCLSSO
- OraOLEDB.ErrorLookup
- OraOLEDB.Oracle
- OracleInProcServer.XOraServer
These registry keys do not appear if you installed Instant Client.
5.3.2 Updating the PATH Environment Variable Path
Check the PATH environment variable and remove any Oracle entries.
- Display System in the Control Panel.
- Select the Advanced tab and then click Environment Variables .
- Select the system variable PATH and edit it to remove any Oracle entries. For example, remove Oracle entries that contain ORACLE_BASE \ ORACLE_HOME in the Path variable. You may see a Path variable that contains entries similar to the following:
ORACLE_BASE\ORACLE_HOME\bin;ORACLE_BASE\ORACLE_HOME\jre\1.4.2\bin\client; ORACLE_BASE\ORACLE_HOME\jre\1.4.2\bin
5.3.3 Removing Oracle Database Client from the Start Menu
Check the Start menu for any Oracle Database Client entries and remove them.
Follow these steps:
- Select Start , then Programs , then Oracle — HOME_NAME .
- Right-click Oracle — HOME_NAME , and from the menu, select Delete .
You can also remove Oracle Database Client menu entries by using the following method:
- Right click the Start button to display the pop-up menu.
- Select the Explore All Users option.
- Under Documents and Settings, expand the \Start Menu\Programs folder.
- Right-click and delete the Oracle — HOME_NAME folder.
5.3.4 Removing Oracle Database Client Directories
After removing all Oracle Database Client registry keys and restarting the computer, delete any existing Oracle Database Client directories and files.
- Using My Computer or Windows Explorer, delete the SYSTEM _ DRIVE :\program files\oracle directory.
- Using My Computer or Windows Explorer, delete all ORACLE _ BASE directories on your hard drive.
