Deleting a WebSphere Commerce instance

You can delete an instance when you no longer need any of the resources and services that are associated with the instance. You can also choose to delete the WebSphere Application Server profile and server that is associated with the instance. Deleting an instance that is not needed can free up a significant amount of system resources and can make the resources available for other purposes.

If your instance contains resources or customizations you might need to reuse in another instance, back up the content before you delete the instance.
Important: Deleting an instance cannot be undone.

Before you begin

Delete WebSphere Commerce search for the WebSphere Commerce instance that you plan to delete. For more information, see Deleting WebSphere Commerce search.

Procedure

  1. To delete a WebSphere Commerce instance:
    1. Ensure that the Web server that is associated with the WebSphere Commerce instance is stopped.
    2. Optional: Export the WebSphere Commerce Enterprise Application from the WebSphere Application Server Administrative Console to save any WebSphere Commerce instance customizations.
      For example, if you published any stores. Your Enterprise Application name is WC_instance_name.
    3. Delete the WebSphere Commerce instance:
      1. If you have a federated or cloned environment, if needed, you can remove the cluster members from your cluster and remove the cluster by using the WebSphere Application Server Deployment Manager administrative console. See Removing a cluster member.
      2. If you are deleting a WebSphere Commerce instance from a deployment manager cell, if needed, you can remove the WebSphere Commerce node from the deployment manager cell. For more information, see Taking your first steps after a WebSphere Commerce installation.
      3. LinuxAIXEnsure that you are logged on as the WebSphere Commerce non-root user.
      4. Start the default WebSphere Application Server application server (server1) that is associated with your WebSphere Commerce instance, if it is not already started.

        For information about starting an application server, see Starting or stopping WebSphere Application Server.

        In a federated or cloned environment, ensure that the WebSphere Application Server deployment manager is started. For information about starting the deployment manager, see Starting or stopping WebSphere Application Server.

      5. Start a command prompt session or command line session.
      6. In the command prompt session or command line session, change directories to WC_installdir/bin/.
      7. Issue the following command:
        • LinuxAIXFor IBM i OS operating system
          ./config_ant.sh -DinstanceName=instance_name RemoveInstance 
        • Windows
          config_ant.bat -DinstanceName=instance_name RemoveInstance 
        Important:

        LinuxAIXEnsure that you run the command as the non-root user that was created for WebSphere Commerce.

        Ensure that you enter the name of the WebSphere Commerce instance and not the name of the WebSphere Commerce application server.

        The command does the following actions:
        • Removes the WebSphere Commerce data source from WebSphere Application Server.
        • Removes the WebSphere Commerce virtual hosts from WebSphere Application Server.
        • Removes JAAS authentication data alias for the WebSphere Commerce database.
        • Removes the WebSphere Commerce JDBC Provider.
        • Uninstalls the WebSphere Commerce EAR from WebSphere Application Server.
        • Removes WebSphere Commerce Web server configuration file.
        • WindowsRemoves the Windows service.
        • Deletes the WebSphere Commerce instance directory.
        • Regenerates the WebSphere Application Server Web server plug-in configuration file.
        • Removes the WebSphere Commerce instance from Configuration Manager.
      8. Ensure that the Configuration Manager instance directory was removed. If some files could not be deleted, the directory is not deleted. The Configuration Manager instance directory must be deleted, moved, or renamed if you plan to create a new Configuration Manager instance with the same name. The directory to remove or rename is WC_installdir\instances\instance_name.
      9. Drop your WebSphere Commerce database. The Ant command RemoveInstance in the previous step does not drop the database automatically. Refer to your database software documentation for instructions on how to drop a database.
    4. AIXWindowsFor IBM i OS operating system Remove the web server:
      Web server Actions
      IBM HTTP Server

      No additional steps need to be performed if you are using a local IBM HTTP Server.

      For IBM i OS operating systemDelete the HTTP entry from the QATMHINSTC file that is in the QUSRSYS library. The HTTP entry is the name of the WebSphere Commerce instance being deleted.

      If you are using a remote IBM HTTP Server,
      1. Delete the following directory on the remote IBM HTTP Web Server node:
        • WAS_installdir/installedApps/cell_name/WC_instance_name.ear
      2. For a remote IBM HTTP Server, copy the WebSphere Application Server Web server plug-in configuration file from the WebSphere Commerce node to the remote Web server node. For instructions, refer to Copying the plugin-cfg.xml file to Web server.
      3. Restart the Web server.
      Microsoft Internet Information Services (IIS) version 7.5 or 8.0
      1. Remove the following WebSphere Commerce aliases from the IIS configuration:
        • accelerator
        • adminconsole
        • orgadminconsole
        • wcadmin
        • wcorgadmin
        • wcs
        • wcsstore
      2. If the Microsoft Internet Information Services (IIS) version 7.5 or 8.0 node is remote from the WebSphere Commerce node, delete the following directory on the Microsoft Internet Information Services (IIS) version 7.5 or 8.0 node:
        • WAS_installdir/installedApps/hostname/WC_instance_name.ear
      3. If the Microsoft Internet Information Services (IIS) version 7.5 or 8.0 node is remote from the WebSphere Commerce node, copy the WebSphere Application Server Web server plug-in configuration file from the WebSphere Commerce node to the remote Web server node. For instructions, refer to Copying the plugin-cfg.xml file to Web server.
      4. Restart the Web server.
      Refer to your Microsoft Internet Information Services (IIS) version 7.5 or 8.0 documentation for instructions.
  2. If you are deleting an authoring server instance, complete the following steps:
    • LinuxAIXOracleDelete the Oracle user IDs that start with the workspaces read schema prefix (WCR) and the workspace write schema prefix (WCW).
    • LinuxAIXOracleWhen you remove an authoring instance, ensure that all Oracle users that are associated with that authoring instance are removed. If the users are not removed, future attempts to create an instance might fail.
    • For IBM i OS operating systemTo delete the user profile that is associated with your WebSphere Commerce instance, run the following command.
      Note: All jobs that are associated with the user profile must be ended before the user profile can be deleted. The database for your instance is also deleted. If you want to save the information that is contained in your database, ensure that you back up the database before you run the command.
      DLTUSRPRF USRPRF(instance_name) OWNOBJOPT(*DLT)
      instance_name
      The name of the WebSphere Commerce instance you want to delete.
    • If you want the authoring server database to remain, drop all database schemas that start with the workspaces read schema prefix (WCR) and the workspace write schema (WCW).
    • If you do not want the authoring server database to remain, drop the database according to the instructions included with your database software.
  3. Optional: You can clean up and remove the WebSphere Application Server profile and WebSphere Application Server server that WebSphere Commerce created. Do not complete this step if other applications are using the profile.
    If you choose to remove the profile, the following steps remove the following components:
    • The server (server1)
    • Any other servers that might exist in the profile
    • Related WebSphere Application Server configuration information
    • All of the applications that are installed on the mentioned servers
    1. Ensure that all of the WebSphere Application Server servers that belong to the profile are stopped. By default you have one application server named server1. For more information, see Starting and stopping quick reference.
    2. Use the tools that are provided by WebSphere Application Server to delete the WebSphere Application Server profile that WebSphere Commerce created. The profile name is the same as your WebSphere Commerce instance name.
      To remove your WebSphere Application Server profile, see step 7 in Creating a profile on a local WebSphere Application Server V8.5, V8.0, or V7.0
    3. Windows Remove the WebSphere Application Server profile service from the Services panel. Run the following commands from a command prompt:
      cd WAS_installdir/bin
      WASService.exe -remove WC_instance_name
    4. Optional: Delete or rename the WebSphere Application Server profile directory from your file system. You must perform this step if you plan to create a new WebSphere Application Server profile or a new WebSphere Commerce instance of the same name.

      The directory to remove or rename is WAS_installdir\profiles\instance_name.