4 Uninstalling Oracle Big Data SQL

If you want to completely uninstall Oracle Big Data SQL, the software must be removed from the Hadoop cluster management server and the Oracle Database nodes where it is currently installed.

If the Hadoop DataNode service is removed from a subset of the nodes, then Oracle Big Data SQL must be removed from those nodes only.

4.1 General Guidelines for Removing the Software

Oracle Big Data SQL can be uninstalled from the Hadoop cluster management server or from any Oracle Database servers connected to the cluster management server. The procedure is the same for all Hadoop platforms.

Guidelines for uninstalling Oracle Big Data SQL are as follows:

  • To perform a complete uninstall of Oracle Big Data SQL, remove the software from the cluster management server and from each Oracle Database server connected to the BDS service.

    This is a single script execution on each server. Not other manual steps are needed.

  • You can uninstall from the cluster management server first or from the database servers first.

    Tip:

    If you are removing the software from both sides of the installation, uninstall it from the database side first. If you uninstall from the cluster management server first, queries in process will fail.
  • On the database side, uninstall from any secondary nodes before uninstalling from the primary node.

    This is not critical to the uninstall process, but active queries from secondary nodes will fail if the primary node is disconnected from the service.

  • You can uninstall from one or more secondary database nodes without impacting the operation of the Big Data SQL service on the Hadoop cluster management server.

Note:

In a Oracle RAC database, be sure to run the uninstall script on all nodes of the database.

4.2 Uninstalling From an Oracle Database Server

On any database server where you want to uninstall Oracle Big Data SQL, run the appropriate command below as the database owner (usually the oracle user). In the case of a RAC database, be sure to perform the uninstall on each instance of the RAC.

  • # ./bds-database-install.sh --uninstall-as-primary

    
    

    or

  • # ./bds-database-install.sh --uninstall-as-secondary

If you use the --uninstall-as-secondary switch to uninstall the software from the primary Hadoop cluster configuration, cleanup of database objects will be incomplete. This can be remedied by running the uninstall again. Error messages may appear if your run a second uninstall for cleanup purposes, but the cleanup should complete successfully.

See Using bds-database-install.sh to Uninstall Oracle Big Data SQL for an example.

The bds-database-install.sh script is for installing/uninstalling the database side for Oracle Big Data SQL 3.1 or greater. Note that if you are uninstalling Release 3.0.1 or earlier on Oracle Big Data Appliance, use the bds-exa-install.sh script from your existing Oracle Big Data SQL installation instead.

4.3 Removing Oracle Big Data SQL From Hadoop Cluster Nodes

Oracle Big Data SQL works with the Hadoop DataNode service. When you run the Oracle Big Data SQL installer on the configuration management server, it automatically propagates the Oracle Big Data SQL components to all Hadoop cluster nodes where the DataNode service is running. If the DataNode service is removed from one or more nodes, then you must also remove the Oracle Big Data SQL components from those same nodes.

Note:

This task does not apply to Oracle Big Data Appliance.
On the cluster management server (where CM or Ambari is running), log on as root, cd to the Oracle Big Data SQL installer directory (where the download bundle BigDataSQL-<Hadoop distribution><version>.zip was extracted), and enter the following command:
# ./setup-bds remove bds-config.json

The setup-bds script with the remove option analyzes the cluster to discover any nodes where Oracle Big Data SQL was installed, but where the DataNode service had been subsequently removed. setup-bds remove removes the Oracle Big Data SQL components from those nodes. It also updates the bigdata.hosts file on each remaining Oracle Big Data SQL-enabled node in order to provide an up-to-date inventory of which nodes within the cluster are running Oracle Big Data SQL.

setup-bds uninstall has a different purpose. The uninstall option is for a complete de-installation of Oracle Big Data SQL.

4.4 Uninstalling From the Hadoop Cluster Management Server

Log on to the Hadoop cluster management server as root and use setup-bds uninstall to uninstall the software.

Before You Start:

If the Hadoop system is Oracle Big Data Appliance and you uninstalling Oracle Big Data SQL 3.0.1 in order to upgrade to Release 3.1, do not use the setup-bds uninstall command show below. Instead, use bdacli disable big_data_sql as described in the Oracle Big Data Appliance Owner’s Guide.

To uninstall Oracle Big Data SQL 3.1 or later, from the bds-database-install directory run the following command as root.

# ./setup-bds uninstall bds-config.json

The script will return the following to standard output. This example shows the output of the uninstall on an HDP cluster management server. The output is similar for CDH. Italicized annotations in brackets are included for the purposes of the example.

[root@mycluster22bda16-adm BDSSetup]# ./setup-bds uninstall bds-config.json 
BigDataSQL: FQDN: mycluster22bda16-adm.us.oracle.com.
BigDataSQL: Hostname: mycluster22bda16-adm.us.oracle.com.
BigDataSQL: Local directories at /root/bds/BDSSetup/deployment_manager/bigdata_platforms/hortonworks.
BigDataSQL: Verifying configuration parameters...
BigDataSQL: Starting server...
BigDataSQL: API protocol: http.
BigDataSQL: API port: 8080.
BigDataSQL: Waiting for server to respond...

Admin User: admin
Password:

BigDataSQL: Authentication succeeded.
BigDataSQL: API version: 1.
BigDataSQL: Cluster type: HDP.
BigDataSQL: Retrieving cluster...
BigDataSQL: Cluster name: HDP24.
BigDataSQL: Cluster version: HDP-2.4.
BigDataSQL: Setting target cluster...
BigDataSQL: Service: ORACLESERVICE.
BigDataSQL: Looking for configured port on the JSON config file...
BigDataSQL: Testing port...
BigDataSQL: Using port: 81.
BigDataSQL: Local directories at /root/bds/BDSSetup/deployment_manager/bigdata_platforms/hortonworks/services/bigdatasql.
BigDataSQL: Verifying service configuration...
BigDataSQL: Service TCP connection: False.
BigDataSQL: Uninstalling service...
BigDataSQL: Restoring cluster...
BigDataSQL: Removing service distribution...
BigDataSQL: Cleaning up service...
BigDataSQL: UNINSTALL workflow completed.