Friday, June 4, 2010

Setting up SAP Netweaver 7.01 TestDrive for BW

To set up the stock SAP Netweaver 7.01 Windows TestDrive for BW, first I need to create a new SAP client.  A client is kind of like a sandbox, a work environment isolated from other clients.  This is not necessary but I rather work in my own client than to use clients delivered by SAP.  This way, I can do what I want, scratch it, and to re-create it.

Firstly, change the profile such that it allows for a standard SAP* login.  SAP* is a user that is automatically created whenever a client is created.  The system is defaulted to disallow this user, for security reasons.

To do this, login to client 000, run transaction RZ10.  For the profile, select NSP_DVEBMSGS00_xxx, where xxx is the name of your server.

If there is no profile available, then from the menu Utilities | Import profiles of active server

Select Extended Maintenance and click on Change.  Create the following parameters
login/no_automatic_user_sapstar=0
login/min_password_lng=3
Save and activate the profile.  The profile now takes a new version.
Now, restart the Application Server.

This time login to the newly created client using sap* with the default password pass.
Do a Client Copy by running transaction SCCL, and copy profile SAP_ALL, from Client 000 and User Masters 000.
Click Start Immediately followed by Continue.
This process took me 14 minutes.

Set this new client as the BW client.  There can only be one BW client per SAP instance.  Do this through the transaction SE16, table RSADMINA, set the field BWMANDT to 100.




Restart the SAP service and this time login to the BW client 100 using the userid BCUSER.
If you want to, change the default login client in the profile with the parameter  login/system_client=100.  While you are at it, you can remove the two parameters set up earlier, ie login/no_automatic_user_sapstar and login/min_password_lng.


Define a logical system for the client using SCC4.  Select client 100 and in the Logical System, define a new Logical System and assign it to this client.  Click on the button to the right of Logical System, Maintain Entries, continue without Specifying Project, select Business Information Warehouse.



Create a Logical System by giving it a name.  Create a new transport request, if required.
Now, assign the newly created Logical System to our client in the SCC4 screen.

Run transaction RSA1, and Activate and Replicate As Well when prompted.


Wednesday, June 2, 2010

Tweaking SAP Netweaver 7.01 ABAP on VM

The SAP system now needs to be tweaked.  This is to allow it to run comfortably in a VM with limited resources.  My setup is limited by the host machine which runs 32-bit Windows 7.  32-bit Windows have access to only 3GB of RAM or slightly more, and that is if the hardware allows it.  This is so, even if the machine has 4GB of RAM.

I have initially assigned 1.5GB of RAM to the VM, but there seems to be quite a bit of disk thrashing.

Tweaking the OS
This is when I started googling to see if anything can help my poor harddisk.
1. Stop NTFS from updating the access timestamp on the filesystem.  This is done by adding an entry to the registry.  Using regedit, add to HKLM\SYSTEM\CurrentControlSet\FileSystem an entry NtfsDisableLastAccessUpdate (DWORD value of 1).

2. Turn off System Restore through Control Panel , System, System Restore

According the SAP Help, in the section on SAP Memory Management (BC-CST-MM), it states that 'Windows file cache directly competes with SAP programs for physical memory by pushing them out of the memory.'  Hence, following the instructions there, set System Properties  → Advanced  → Performance → Settings → choose Advanced → Processor Scheduling → Background services.  For Memory Usage → Programs


I decided to then install Process Explorer, a really fantastic system tool.  Guess what, the memory usage is at 2.5GB, way above the 1.5GB I have given to my VM, and above the 1GB minimum stated in SAP's minimum requirements.  I suppose that is for a physical machine where swapping is acceptable.


Next up, we'll see if SAP's parameters can be tweaked to reduce its memory consumption.

Tweaking the Database
Move database files to a fixed preallocated virtual disk.
Create a new preallocated vmdk file.  Then add to the OS using Administrative Tools; Computer Management; Disk Management.

Then using the Database Manager, move the volumes and log to the new drive using the instructions here.  Essentially, bring database offline, do a OS file copy to the new drive, point the volumes there, and finally bring database back online.  I am missing the dbmrelocate executable which would have made it easier.  This allows me to move the C:\sapdb\NSP\sapdata and C:\sapdb\NSP\saplog, but cannot find how to move C:\sapdb\NSP\db.  Well, that may suffice for now. 

All these work is not sufficient to stop the thrashing.  Watch this space for updates.