Enterprise Resource Planning Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
paul_shannon
Associate
Associate
2,538

In this blog post our expert Paul Shannon from the System team in SAP Business One Support, shares a few handy tips on how and why a re-install can be done and why in some cases it might be a good idea.

Many different types of software can face performance issues or data corruption over time. Depending on the specific issue, it can often be more efficient to perform a clean install than spend time attempting to diagnose these problems. This also applies to SAP Business One. Another advantage of a clean SAP Business One install is removing or cleaning up any remnants of possible previous installations which can solve multiple issues.

The blog covers re-installing the SAP Business One Client, we will look at the services, both in MSSQL and HANA environment and finally some documentation tips to help you along.

SAP Business One Client

The first component we will look at is the SAP Business One Client.

There are a couple of ways a corrupted SAP Business One Client may show symptoms:
- A user is working in the client when it shuts down unexpectedly
- Attempting to install the SAP Business One Client fails with an error.

If the client is unstable or shuts down unexpectedly, it may simply be an issue with the SAP Business One user rather than the actual client. The SAP Business One user preferences may be corrupted in some way. This can be resolved by copying preferences from another user and applying them to the corrupted user. This procedure is covered in the below link:
Copying User Preferences to Another User or User Group | SAP Help Portal

However, if the issue lies with the client itself, you can follow the below steps to rectify this:

1. Uninstall each add-on solution from your SAP Business One client.
2. Uninstall DI API using Add/Remove Programs in Control Panel.
3. Uninstall SAP Business One client using Add/Remove Programs in Control Panel.
4. Delete the directory %temp%/SM_OBS_DLL.
5. Reinstall client-side components in the following order:

a. SAP Business One client
b. Add-on solutions, if applicable

Note: DI API is automatically installed during the SAP Business One client installation.

In the event the client installation fails for some reason, we have further options. Firstly, we should ensure we have cleaned the remnants of the previous installation correctly and that the installation package we are using is not corrupt itself:

  • Remove the "SAP" folder from the path - "C:\Users\<user_name>\AppData\Local\"
  • Download the SAP Business One installation or upgrade package directly from the SAP Launchpad to ensure that the original package was not corrupted.
  • Copy the installation package to the machine desktop and run the installation from there instead of installing the package from the shared folder. This step can help to avoid any network or permission issues caused by a remote installation.

The next option we have is to clean any SAP Business One Client components in the Windows registry. Delete SAP registry keys under HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER.

Important: Please keep in mind to perform a registry backup before any modification. Any registry modifications are done at your own risk.

For more information, please see
https://support.microsoft.com/en-in/help/322756/how-to-back-up-and-restore-the-registry-in-windows.

 

SAP Business One Services

Depending on whether you are running a HANA or MSSQL version of SAP Business One, we have different procedures for a clean installation of the services. However, in principle these have the same steps:

  • Remove existing components completely, manually force the uninstall if necessary
  • Delete or rename existing installation folders
  • Attempt a fresh install of all components

Important: Before attempting any of the below steps, ensure you have backed up your whole server if possible (HANA), SLDModel.SLDDatadatabase and Windows registry (MSSQL).

 

For an SAP Business One MSSQL environment we can first attempt an uninstall via Add/Remove programs (Control Panel → search for SAP Business One ServerTools → Uninstall).

If this does not work or for some reason you find that ServerTools is not listed in Control Panel, we have the option to manually force the uninstallation of the component by running cmd.exe as Administrator using the below command:

msiexec.exe /x {"ProductCode"}

You can find the correct product code of the component in the setup.ini file in the upgrade package (Packages → ServerTools → setup.ini file). Then backup SLDModel.SLDDatadatabase via MSSQL Server Management Studio before deleting it. From this point we can delete or rename the old installation folder.

Next, to be sure we have cleared out any remnants of the previous install completely, you can clean the registry. Again, be sure to back up the registry before this next step. Open regedit.exe and then search for "ProductCode" (Packages → Server Tools → setup.ini file). After these steps and before attempting the new install, reboot your machine.

In SAP Business One version 10 FP2111 and later, we have the option of the new “Components Wizard”. This new feature can greatly simplify this process:

  • Go to Add/Remove programs → Control Panel → search for SAP Business One Components Wizard → Uninstall.
  • Delete or rename the folder SAP Business One Servertools from "C:\Program Files\SAP".
  • To unregister or perform a clean uninstall the SAP Business One Servertools, select each component under \\..\\B1100_PL2111\Packages.x64\ComponentsWizard\MSI, right click and select Uninstall.
  • Reboot the machine.

It should now be possible to complete a fresh install using the Server Tools/Components Wizard installer.

 

For an SAP Business One HANA Environment it is possible to perform a forced uninstallation using the PuTTY command window. First back up the whole server if possible and back up the SAP HANA instance.

Execute the following command as root to list all SAP Business One related rpm packages:
rpm -qa | grep B1

If all the packages listed from the above step are SAP Business One related, use the following command to uninstall them all:
rpm -qa | grep B1 | xargs rpm -ev

Otherwise, it is possible to uninstall them one by one with the command:
rpm -ev

Next, we will need to open SAP HANA Studio. For SAP Business One version 10.0, all database administration tasks must be performed at tenant level (usually NDB@NDB) instead of System ID (usually NDB) level.

First, drop the schemas SBOCOMMON and SLDDATA by right-clicking and selecting "Delete". For SAP Business One version 10.0 FP2208 and later, also drop schema B1AS.

Drop the user COMMON by going to "Security"->"Users"->COMMON. Right-click and select "Delete". For SAP Business One version 10.0, also drop the below users:
B1_xxxxxx_RW,
B1_xxxxxx_RO,
SAPB1_DB_USER_xxxxxx,
B1_SBOCOMMON,
B1_SBOCOMMON_RW users with Restricted option.

Note: Do not drop the B1_xxxxxx_RW, B1_xxxxxx_RO users with CASCADE in case of any dependencies.

Delete or rename the folder /usr/sap/SAPBusinessOne and then reboot the server to release any ports occupied by deleted processes. Lastly, remove the SAP service control file, using the command:
rm -rf /etc/init.d/sapb1servertools.

We are now ready to launch the installation wizard to install server components.

To do that using PuTTY, go to the directory /Packages.linux/ServerComponents/ and execute the command:
./install

Documentation

For more detailed information on the above topics, check the SAP Notes in the below links:
2432304 - Troubleshooting Client Installation Issues
1989534 - Troubleshooting Guide for Corrupted SAP Business One Client Installation or Configuration
2706617 - UI Configuration Templates_Function, Definition, Errors and FAQ
2788059 - How to Perform Clean Reinstall of SAP Business One, version for MSSQL Server Tools
2538555 - How to Perform Clean Reinstall of SAP Business One, version for SAP HANA Server Components

Support Spotlight Series
We hope this read has been informative and beneficial. For more blog posts and tips from the SAP Business One Support team, please visit our space on the communities:
https://blogs.sap.com/tag/b1-support-spotlight/

For questions about SAP Business One, please submit your question here.