Thursday, February 6, 2014

Optimizing SAP Business One Performance

I get a new job as an Administrator SAP Business One. The first time I did was to optimize the performance of the server and make loading time faster. From the test results that I did, the time it takes to open the SAP database directly from the server only 7 seconds. Meanwhile, when I open it from the client computer takes approximately 3 minutes. I'm sure there are things that cause the connection from the client to the server is not running well. After looking at various sites on how to accelerate the SAP Business One client connections. I found the following tips:


  • Refer to the Optimizing the SQL SAP Database.pdf you can find on the SAP Business One partner page and forum. 
  • The communication between the Terminal Services server(s) or Citrix server(s) and the SQL server should be at minimum of 1gig. You can purchase an inexpensive Dell 3-4 port 1gig hub or equivalent for around $200.00 and install it on the Business One server(s) and see a huge increase in performance. 
  • Create a .BAT file and put it in the startup for the Citrix or Terminal Server servers to delete .TMP files in the %userprofile%\local settings\temp folder at startup. 
  • Make sure all SQL queries, as well as any other remote access to the database, use the (NOLOCK) command next to each table accessed, otherwise it accesses the tables with a share lock. You could easily be locking thousands of records and pages of the database without this. 
  • Microsoft Windows does not do a good job of freeing up memory, improper log-out’s, etc. Re-booting Microsoft servers at a minimum of once per week is important. 
  • Antivirus software on the SAP Business One related servers: Don’t check and download the latest updates and virus definition files during the day, do it at night only. Do not do system scans during the day, maybe do the full scans at night. The real time scans need to be scaled back so it doesn’t include the SAP Business One executable files as well as Microsoft SQL programs. Consider stopping the real time scanning for an afternoon and see how your performance is effected. Note: if a MS-SQL database get’s infected with a virus, which I’ve never seen yet, you have to restore the database anyway. 
  • Review your work station antivirus scanning and updates also. If they are running during the day, these scans or updates on the work station give the impression that SAP Business One is slow but in reality it is the work station causing the slowness. 
  • Identify all software that is running on the SAP Business One servers. Only install and run what is really needed. The SQL server shouldn’t have much running on it, besides SQL and MS-Fax. 
  • Review the event logs daily or as often as needed to verify proper setup and installation. 
  • Review the SAP Business One and SQL Service Backup schedules. Typically we recommend these backups occur at 6am, 7pm, and perhaps lunch. These backups will typically slow the system down so trade off’s have to be evaluated. 
  • Backups to tape will also affect performance while running. Typically we recommend that client’s perform backup’s to tape while users are not on the system or if you run 24×7 when the user count as at the lowest. Review all Microsoft Windows performance logs to make sure there are no issues that require correction. 
  • Setup and auto-run SQL database maintenance jobs each night. 
  • Run Raid 1 or Raid 10 on the disks that the databases are on. Raid 5 is one of the slowest configurations for just about any ERP or Business Management database, due to the added disk I/O for additions, updates and deletes. It just isn’t necessary and is not worth the negative hit on performance. 
  • In summary, you need to look at hardware, the network and other software that is running, just as much as you are looking at the database server and the business software. Unfortunately, when the business software is “slow”, the users think that is the problem, when in fact, a lot of the time it is other software and configurations that are the true problem.
Source : SAP-B1

Setting up RAID on Home PC Windows

Most people know that RAID technology is only found on computer servers. But do you know if we can also use it on your home computer. The advantages of RAID technology is reducing the risk of losing existing data on your PC when the damage occurred. If you are a professional who works at home, of course, the data on your disk is a very valuable asset.



What type of RAID do I want?

RAID comes in a number of flavors--or levels--that offer data protection, enhanced performance, or both. In addition to the seven core levels (RAID 0 through RAID 6), you'll encounter a number of variants and combinations. Some controllers (and dedicated external storage and NAS boxes) can layer and even abstract RAID levels, allowing you to mix and match different capacity drives and add capacity without any additional configuration.

Here are a few of the RAID levels you'll find on affordable, consumer-level RAID adapters, motherboard chipsets, and Windows software RAID:

JBOD (extend, spill over): JBOD, or Just a Bunch Of Disks simply allows you to extend a volume (drive letter, e.g. C:\) onto other disks. Data is written to the first disk until it's full, then to the second disk, then the third, etc. It offers no boost in performance or redundancy and is a holdover from the days when smaller disks had to be chained to handle large amounts of data. It's largely irrelevant given today's more capacious hard drives.

RAID 0 (Striping): This setup increases hard-drive performance by splitting, or striping, data across two drives. By leveraging two data busses, data can be read and written more quickly. Unfortunately, RAID 0 provides no data protection--in fact, it actually increases the chances of data loss since the failure of either drive in the array results in the loss of the data stored on both drives. RAID 0 setups are standard on high-end gaming PCs and graphic design workstations, and provide a measurable, albeit modest performance boost for hard-disk-intensive programs.

RAID 1 (Mirroring): A RAID 1 setup protects data from drive failure by simultaneously writing the same data to two hard drives. Since each drive is an exact duplicate of the other, you can continue working if one fails. RAID 1 offers no gain in performance and effectively reduces available capacity by half -- two 2TB drives provide only 2TB of storage.

RAID 5 (Distributed Parity): Though you get both faster disk performance and data protection from this setup, it requires a minimum of three hard drives. Instead of using an entire hard drive as a backup, RAID 5 spreads redundancy information--called parity bits--across all of the array's drives. Where RAID 1 requires 50% of available storage for redundancy, RAID 5 requires only 33%.

When one of the drives in a RAID 5 array fails, the data content of that failed drive is reconstructed using the parity bits on the surviving drives and written to a new, replacement drive. The array is still usable in the meantime.

RAID 1+0, 0+1, 10: Some adapters combine (referred to as nesting) RAID 0 and RAID 1 to provide both data redundancy and increased disk performance. This works by either striping data across a pair of drives then mirroring (0+1) them with another pair, or striping data across two mirrored pairs (1+0, aka 10). RAID 0+1, 1+0, and 10 require a minimum of four hard drives.

What do I need to set up RAID?

A Fresh Backup (existing data only): If you're installing and configuring hardware RAID on a fresh system with no OS (your best option), or are adding disks for a separate array, skip this. Otherwise, back up your important data. Best practice is to have three copies of your data: the original, a backup, and a backup of the backup, preferably offsite.

If you have existing data that you want on the array, you'll need to back it up, then restore it from a backup you make before creating your array--a process that writes new data to your hard drives regardless of what's there. This is not necessary with Windows software RAID 0, however, it's far faster than letting Windows re-sync (copy the data to) the mirror in the background.

Transferring an existing operating system is tricky, and with older versions of Windows, sometimes impossible. See "Transferring Existing Windows Installations to RAID" on the next page for instructions.

Windows Software RAID: Starting with Windows XP, Microsoft integrated RAID functionality into its operating systems. What type depends on the flavor of Windows:


  • Windows XP allows spanned volumes (one volume over two or more disks), aka JBOD.
  • Windows Vista Ultimate allows JBOD and RAID 1 striping.
  • Windows 7 Home allows JBOD and RAID 1 while Professional and Ultimate add RAID 0 mirroring. Windows 2000 Professional also has JBOD, 0, and 1.
  • Windows Server operating systems from 2000 on have JBOD, 0, 1, plus support for RAID 5 distributed parity.

Windows RAID offers several advantages. You can create arrays from within Window Drive manager so there's no BIOS to configure. It's also more flexible with mirrors, allowing you to create them from existing volumes containing data, as well as delete either half of a mirror with the other remaining intact. You can mirror individual partitions, including partitions from different drives onto a single drive.

The disadvantages are that other operating systems, such as the Linux used on repair discs, can't see Windows software RAID partitions which use Microsoft's dynamic disk technology. Also, maintenance performed by Windows when it feels it's needed, which can occur any time there's a configuration change, hurts performance while in progress. Restoring mirrors isn't as dead simple as it is with a hardware solution either.

Though you'll see a lot of talk about hardware RAID being faster, this discussion predates modern CPUs which can easily handle the overhead. Windows RAID is actually quite fast.

RAID controller: If you don't use software RAID, there's hardware. You probably already have a RAID controller in your PC; many older midrange and high-end motherboards come with secondary RAID controller, and newer motherboard chipsets offer integrated RAID obviating the need for an additional controller. Check your PC or motherboard documentation to find out if your motherboard supports RAID (and if so, which levels), and for specific installation instructions.

If your PC doesn't have integrated RAID, you may use an adapter card. Basic PCI and PCIe adapters supporting RAID levels 0, 1, 10, and sometimes 5 can be found online for $100 or less. Adaptec, Promise and other vendors offer a wide selection of pricier, but more capable RAID adapters with onboard cache and advanced features. If possible, buy a card that supports greater-than-2.2TB disks and 6Gbps SATA III.

Two or more hard drives: If you decide on Windows software RAID, you may use any drives you choose. They need not be the same size if you're mirroring individual volumes, though it's generally a good idea.

Back in the days of parallel ATA, it was a no-no to mix drives from different vendors on a RAID controller. Sometimes it would work--more often it wouldn't. With the advent of SATA, mixing vendors is no longer as problematic.

Also, though there are controllers that allow mixing and matching capacities without losing storage space (using advanced parity techniques), these are still relatively rare. Using drives of different sizes usually results in total storage capacity that's only a multiple of the smallest drive. For example, combining 500GB and 320GB drives in RAID 1 would be 320GB * 2, or 640GB instead of 820GB.

In practice, you'll save yourself a lot of time and sidestep possible issues by building your array with identical hard drives--meaning drives of the same make, model, and size. You need at least two drives for RAID 0 and 1, three drives for RAID 5, and four for RAID 0+1, 1+0, and 10.

Floppy drive (Windows XP-only): If you plan to install Windows XP on your new array, you will need a floppy disk with your RAID adapter's Windows drivers, and a floppy drive to read it--Windows' installation won't install the drivers from an optical drive. Thankfully, this incredibly annoying limitation of Windows XP doesn't apply in Windows Vista and Windows 7 which can read drivers from hard drives, flash drives, or optical media.

Tools: You'll need a small, non-magnetic Phillips screwdriver to remove and replace the fastener screw that secures the adapter card to the PC chassis, as well as to install any new hard drives. You might also want a simple grounding strap that attaches to your wrist; look for one at your local computer store for less than $15. Alternatively, never touch exposed contacts or electronics.

How do I install a RAID adapter?

Here's how to physically install a RAID adapter card in your PC. If your motherboard already supports RAID, skip to "Configuring the Adapter” below.


  1. Unplug your PC and position the case so that you can comfortably reach into the interior. If you have a tower case, you'll find installing an expansion card easier if you lay the case on its side.
  2. Protect your PC's delicate circuits from static electricity by properly grounding yourself. If you don't have the patience or time to buy a grounding strap, at least make an effort to ground your body by touching your PC's case before touching the inside of your PC or any component.
  3. Locate an open PCI or PCI Express expansion slot and remove the cover bracket that blocks the slot's access port on the back of the case. Typically, a single screw secures the bracket.
  4. Remove the adapter card from its packaging, handling the card by its edges (not the edge connector on the bottom); avoid touching the chips and circuitry on either face of the card.
  5. Align the adapter card's connector with the expansion slot and gently but firmly push down on the top edge until the card is securely seated in the slot. Secure the card to the chassis with the existing screw or other clamping mechanism.
  6. Once the card is installed, install and connect the hard drives to be used in the array. See "How to Install a New Hard Drive" for instructions.
  7. Reassemble the PC and power it up.


Configuring the Adapter

Each RAID adapter has a firmware configuration program, unique to that make or model, that lets the user select the type of RAID array to install and choose which hard drives to include in the array. Sometimes the RAID functionality is embedded in the motherboard's BIOS. Refer to your adapter or motherboard documentation to guide you through the specific installation steps for your adapter.

Typically, you launch the setup program for a RAID adapter by pressing Ctrl-R, Ctrl-A, or some other key combination during the PC boot process. Watch the screen for a prompt, or check your adapter's documentation. On some PCs you may have to press the Tab key to see the boot messages and the prompt.
If RAID is embedded in the BIOS, as with many Intel motherboards, you will need to launch the BIOS setup. This is typically done by pressing F2, Ctrl+S, Del or some other key combination.
Choose the drives and create the array.
If asked to select a stripe size or chunk size for a RAID 0 or RAID 5 array, select the default size. Playing with these settings may increase performance for users with plenty of time and energy to experiment.
Installing Windows and the Adapter Drivers
If you are installing Windows XP or 2000 onto your array:


  1. Carefully watch the bottom of the screen at the beginning of the setup process for the prompt, and press F6 if you need to install a third-party SCSI or RAID driver. Be quick: You have only a few seconds to press F6 and launch the installation process.
  2. Wait for the screen that says 'S=Specify Additional Devices' in the lower-left corner. Press S.
  3. When prompted, insert the floppy disk with the adapter's drivers into the floppy drive and complete the driver installation. Once that's done, Windows should continue the Windows installation routine.


If you are installing Windows Vista or Windows 7 onto your array:


  1. Choose Custom (Advanced) Installation.
  2. When asked where to install Windows, if your RAID volume does not appear (Windows Vista and 7 do have some RAID drivers) click the Load Driver button at the bottom of the dialog.
  3. When prompted, insert the floppy disk, CD, or flash drive with the adapter's drivers and complete the driver installation. Once done, you should be able to see the drives attached to the RAID controller. If not, you may have pointed to the wrong driver or the array hasn't been created yet.


Transferring Existing Windows Installations to RAID
It can be difficult, and sometimes impossible to transfer an existing operating system installation to a RAID array. It all depends on the hardware and Windows operating system involved. Follow the steps below for the best chance of success.

Transferring Windows XP


  1. Install or enable the RAID controller in your PC. Do NOT create any arrays.
  2. Boot to Windows and install the RAID drivers. If your boot drive is attached to the RAID controller (some storage controllers such as Intel's Storage Matrix pull double-duty) you may not be able to boot. If that's the case, you'll either have to attach the boot drive to a non-RAID port or use a secondary RAID controller for the new array. Start over.
  3. Create a backup image in a safe, accessible location (external hard drive, flash drive, hard drive not to be included in the array, etc.) of the entire hard drive containing the existing OS installation using Norton Ghost, Acronis True Image or another program. Preferably one with bare metal restore capabilities, i.e. driver support for hardware that wasn't in use when the image was made.
  4. Reboot and create your array. Preferably, with new disks while keeping your old disk as a backup.
  5. Restore the image using the program you created it with. If your system won't boot, try again using the bare metal restore functions.


Transferring Windows Vista or Windows 7


  1. Create an image of the hard drive containing the existing OS installation in a safe, accessible location (external hard drive, flash drive, hard drive not to be included in the array, etc.) using Windows backup.
  2. Reboot and enable/install the RAID adapter.
  3. Create your array. Preferably, with new disks while keeping your old disk as a backup.
  4. Boot using your Windows Vista/7 installation disc, and select Repair your computer.
  5. Click on Load drivers and following the prompts, load the RAID drivers and any drivers required for the device you backed up to.
  6. Restore your system using the backup image you previously created.


Using Windows software RAID
Windows XP, Vista, and 7 all offer software RAID which is a more than viable alternative to hardware, and easy to implement. Which levels are available with depend on your flavor of Windows

The basic procedure for implementing Windows RAID is as follows:


  1. Open the Start Menu, right-click on Computer and select Manage.
  2. Scroll down the tree on the right to Disk Management (under Storage) and click on it.
  3. Right-click over the large drive icon to the left for operations that will affect the entire disk (extend, stripe, mirror, or RAID 5). Only what's available on your version and possible with your disk setup will be enabled. For some levels, a wizard will pop up. Follow the prompts. If the disk is not dynamic, this will automatically convert it.
  4. On dynamic disks, right-click over a volume on the drive and you'll see an option to mirror that individual volume (Windows 7 Professional/Ultimate, Windows 2000 Professional, and Windows server OS's only).


Note: Depending on the amount of existing data, it can take an extremely long time for new Windows RAID mirrors to sync up, and disk performance will suffer till the process is completed. It's far faster to back up your files, create new mirrored volumes, then restore the data. If you do opt for letting Windows sync all the data, keeping Drive Manager open and on top will speed up the process.

Source : PCWorld