Uninstall Oracle Database 10 GB

Source: Internet
Author: User
Tags sqlplus
The uninstallation and installation of the Oracle Database 10 Gb database system are equally important. Many users are concerned about how to completely uninstall the Oracle system without affecting the use of the operating system. Different Versions of Oracle have the same uninstall method. There are three ways to uninstall ORACLE: manual uninstallation of Incomplete installation, uninstallation of independent components, and full uninstallation of database after installation. 1.5.1 manual uninstallation due to the following reasons ". · The computer power is disabled during installation. · Installation is not completed because necessary configuration tools are not running after installation. In this case, Oracle universal installer does not fully register the installation information in the registry, but the files may have been copied to the Oracle directory. Therefore, you can manually uninstall these files and restart the installation. If the installation is not complete, it is generally not recommended to manually uninstall oracle. 1.5.2 detach an independent component. The method is as follows: Program In Oracle Installation products in the group, start the universal installer and select the "Uninstall product" button in the startup screen, select the product component to be uninstalled, and delete it. 1.5.3 after installation, the uninstallation of the 10 Gb Oracle database server is divided into three parts: Oracle cluster synchronization services, Oracle html db, Oracle database and all its components. 1. uninstall the Oracle cluster synchronization service. If Oracle database is installed for 10 Gb for the first time and Automatic Storage Management (ASM) is selected as the storage and recovery option, Oracle universal installer will configure and create and start the Oracle cluster Synchronization Service oraclecsservice; if you do not select Automatic Storage Management, you can delete the oraclecsservice. The procedure is as follows: 1) Open the Command Prompt window. 2) set the environment variable ORACLE_HOME: Set ORACLE_HOME = D:/Oracle/product/10.2.0/db_1. 3) run the batch file localconfig. bat with the delete option to delete the oraclecsservice, for example, D:/Oracle/product/10.2.0/db_1/bin/localconfig Delete. Note: You cannot use the oradim command to delete the oraclecsservice. 2. Uninstall Oracle html db from the database. The following steps only delete the Oracle html db mode, synonym, and user from the database. This step is not required if you want to uninstall the database. 1) start SQL * Plus and connect to the database with sys or system users: · sqlplus sys/<syspassword> As sysdba2) execute the following command: · SQL> alter session set current_schema = flows_010500; · SQL> exec privileges; · SQL> alter session set current_schema = system; · SQL> drop user flows_010500 cascade; · SQL> drop user flows_files cascade; · SQL> drop user htmldb_public_user cascade; 3. to uninstall all database components, you must manually delete the remaining content after you use the Oracle universal installer tool to uninstall the Oracle components. Do not directly Delete the Oracle Home Directory and files before uninstalling using Oracle universal installer, unless the installation is terminated and exited during the installation. If you want to manually delete the Oracle Home directory file and reinstall oracle on the same home directory, the selected component may not be correctly installed. Therefore, follow these steps, as shown in step 1-7. Figure 1-7 process of detaching all database Components Step 1: Before you detach an Oracle component, you must stop the Oracle service. Specific Method: Open "Administrative Tools", select "services", stop each Oracle service starting with Oracle or ora in the "started" status, and then exit the "service ". Step 2: You can use this method to detach a database by using Database Configuration assistant or dbca to delete the database together with its physical files and directories (optional ). If the database is not successfully detached due to unexpected or other reasons, the database file and its corresponding oracleservice <Sid> are not deleted. You can manually delete the oracleservice <Sid>, you can delete the oracleservice <Sid> directory in the resource manager by using the Oracle Database Configuration assistant or dbca to uninstall the database, use the oradim tool to delete database instance services. Note: You cannot delete the instance service before deleting the database. Otherwise, you cannot find the database to be detached when you use Oracle Database Configuration assistant or dbca to delete or detach the database. The specific command format for using the oradim command to delete an instance service is as follows: oradim-delete-Sid <servicename> If the oracleservice <Sid> is accidentally deleted and the database file is not uninstalled, then, the oracleservice <Sid> can be rebuilt. To recreate oracleservice <Sid>, specify the following parameters to create a routine: oradim-New-Sid |-srvc service [-intpwd Password] [-maxusers number] [-startmode A | M] [-pfile file] [-Timeout secs] parameter description as follows: · New: Create a new instance service. · Sid: defines the instance id. · Intpwd: Specifies the password of the privileged user SYS. Privileged users are privileged users who have the permissions to start, shut down ORACLE Server, and set up data. · Startmode: Specifies the instance service startup mode. The default value is a (automatic start). Otherwise, the value is m (Manual start ). · Pfile: Specifies the parameter file corresponding to the instance. Generally, this parameter file should be created in advance. It can be created through replication and modification. For example, if oracleservicetest is deleted, enter the D:/Oracle/product/10.2.0/db_1/bin directory in the DOS prompt and enter the following command: oradim-New-Sid test-intpwd China-startmode auto-pfiled:/Oracle/product/10.2.0/admin/test/pfile/init. ora.6192006134030 and so on, the instance service oracleservicetest is re-established. Once a service is created, the system automatically adds the service parameters to the Registry. Store Oracle service information in the HKEY_LOCAL_MACHINE/system/CurrentControlSet/Services Directory of the Registry. Step 3: Use Oracle universal installer to uninstall Oracle components after all Oracle services are stopped, start Oracle universal installer, select the uninstall product button, select the component to be uninstalled, and click Delete. Step 4: Manually uninstall the remaining Oracle Database Component Oracle universal installer Cannot uninstall all components. You must also manually delete the remaining registration information, environment variables, "Start" menu options, and file directories. (1) Delete An Automatic Storage Management instance + ASM if an Automatic Storage Management instance is created, delete it. The deletion of instance + ASM is completed after the database is detached. Therefore, you must complete the following steps: 1) in the Windows Command window prompt, set the oracle_sid environment variable to + ASM instance: set oracle_sid = + asm2) start SQL * Plus and connect the Sys user to the Automatic Storage Management + ASM instance: sqlplus sys/<sys_password> As sysdba3) use the following command to determine whether a database instance is using an automatic storage management instance + ASM: SQL> select instance_name from V $ asm_client; the command result lists all database instances that are running and using the + ASM instance. The + ASM instance cannot be deleted as long as it contains a database instance that is currently supported. 4) if there is no database instance associated with + ASM, delete the disk group associated with the instance. First, identify the disk group associated with + ASM: SQL> select name from V $ asm_diskgroup; second, use the following command to delete each disk group to be deleted: SQL> drop diskgroup <disk_group_name> including contents; 5) Close + ASM instance and exit SQL * Plus: SQL> shutdownsql> exit6) enter the following command in the command prompt, delete + ASM service: oradim-delete-asmsid + ASM (2) Delete Oracle registration information from Microsoft Registry Oracle universal installer creates Windows Services for Oracle components during installation, however, during the uninstall process, you cannot delete all services created by Oracle Net configuration assistant and Oracle Database Configuration assistant. Oracle universal installer cannot delete other registration information separately. You can only manually delete the registration information. The procedure is as follows: Step 1: Log on as a member of the Administrator group and confirm that all Oracle services have been stopped. Step 2: Enter the command: Regedit in the MS-DOS command prompt. Step 3: Go to HKEY_LOCAL_MACHINE/system/CurrentControlSet/services and delete the Oracle Step 4: Locate hkey_classes_root. Step 5: Delete ora, Oracle, orcl, or enumora. key values include all the items starting with the following column: · enumorahomes · oracleconfig · oracledatabase · oraclehome · oracleinprocserver · oracleprocess · ORADC · orammc000010 · orammcpmon10 · oraoledb · oraperfmon · orclmmc · orclsso Step 6: Go to HKEY_CURRENT_USER to delete the Oracle key. Step 7: Locate HKEY_CURRENT_USER/software. Step 8: Delete all Oracle keys, including Oracle- Step 9: Locate HKEY_LOCAL_MACHINE/software and find the Oracle group key. Note: The inst_loc key value in the Oracle group key, which is the default location of the Oracle universal Installer. The default location is C:/ProgramFiles/Oracle/inventory. If it is not the default value, the value should be deleted later. Delete the Oracle group key. Step 10: Go to HKEY_LOCAL_MACHINE/software/ODBC. Expand the sub-keys under ODBC and delete all ODBC driver key values related to Oracle. Step 11: Go to HKEY_LOCAL_MACHINE/system/CurrentControlSet/services. Delete all key values starting with Oracle or oraweb under this branch. Step 12: Go to HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/EventLog/application. Delete all key values starting with Oracle under this branch. Step 13: Close the registry and restart the machine. If you forget the location, you can use the "Search" function in the registry menu. For example, select "edit"> "Search", enter "ora" in the "search target" column, and click "OK, you can find all Oracle-related key values. (3) modify the environment variable path to check the environment variable path and delete any Oracle items: Step 1: Open System from control panel ". Step 2: In the system Properties dialog box, click "advanced"> "environment variable. Step 3: Delete any Oracle-related paths in the path of the system environment variable. Delete the installed JRE path. Step 4: If the classpath environment variable is set for Oracle, delete it. Step 5: Any other Oracle environment variable settings, such as ORACLE_HOME, oracle_sid, tns_admin, jserv, or wv_gateway_cfg, are also deleted. Step 6: Save and exit the control panel, as shown in figure 1-8 and Figure 1-9. Figure 1-8 System Properties Figure 1-9 environment variables (4) delete oracle from the "Start" menu (5) Delete the Oracle directory after all Oracle registration information is deleted and the computer is restarted, you can delete any existing Oracle directories and files. Use Windows Resource Manager to delete the following directories: C:/program files/Oracle directory. Delete the Oracle directory installed on the host, such as D:/Oracle/product/10.2.0. Delete any temporary Oracle directories from C:/Documents and Settings/<user_name>/Local Settings/temp.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.