Sunday, August 12, 2012

Get your own SAP HANA DB Server using Amazon Web Services

Someone who is interested to explore SAP HANA and do not have access to HANA DB server can use the Amazon Web Services by creating their own instance on the cloud. Please keep in mind that this is not a free service and after completing the free trial limit you will be charged by Amazon based on the usage and volume of data.


The steps are very simple in order to create our own HANA instance using Amazon cloud services. We need to follow the below mentioned steps in order get the access to the SAP Hana instance running on the cloud.

1.   Account creation in Amazon Web Services. We need to have an account on the Amazon Web Service as a first step, please note while creating the account, you will be asked to enter the credit card information which is mandatory in order to complete the registration.

2.     Now once we have the account setp up, we need to generate the “Key Pair”. In order to create the Key pair we need to go to the “Amazon Management Console” àEC2 à Left hand side we should see the option called “Key Pairs”, give a Key pair name. You will be asked to save the Key Pair file which we should keep in a safe place as this will be used further.

3.      Once we have the Key Pair ready, we are ready to go to the SAP site to register for the Hana. You need to Login and need to accept the License agreement. In case if you go not have the account in the SAP SCN then we need to create first in order to move further.

4.   After accepting the licensing agreement, you will be asked to enter the Amazon account number which you can find from the Amazon Web Services.





5.     Enter the Amazon account number and in the next page you will be asked to enter the Key Pair name which you already created in the Amazon Management console. Enter the Key pair name and click Continue. Regarding the HanaInstaceSize, use the default option “m2.xlarge” until you have need of some extra memory.

    



      

6.  In the final step, you will be asked to enter the Stack name and new stack will be  created in few minutes.





7.     Now we should again login in the Amazon Web Services and go to the Management Console, click on the EC2 and you should see the option called “Launch Instance”. After clicking on the “Launch Instance”, the SAP Hana instance will be initiated and ready to use. We will have to give the IP Address of this instance from the HANA client in order to connect my HANA DB hosted on Amazon Web Services.



8.      In order to install the SAP Hana Client, please click on the link and download the Windows (32 and 64 bit) or Linux version of client.  

9.   As mentioned in starting this is not a free service and you should be careful about the usage. Also in order to reduce the usage cost you should start the instance only when we are going to use. The rest of the time we can easily stop the instance, it takes less than a minute to restart the instance. In order to Stop the instance, go to the Amazon Management Console,   go to the EC2 and in the home page in the left hand side under instances we should the option called “Stop” used to stop the instance. 

For more details on Amazon Web Services and SAP HANA DB Server, you can visit the SAP Community Network  

Sunday, August 5, 2012

SQL Server Analysis Services Server Memory Issue



Sometimes we might have noticed that SSAS is consuming too much memory in the server and creating a deadlock kind of situation where the only solution is to restart the SSAS service or restarting the server.

This situation arises when bulky MDX queries are running and trying the fetch the large volume of data. Since in the SSAS the MDX queries are constructed with in the memory, the MDX query requesting for the large amount of data can be very much memory intensive. We can avoid these kinds of situations by changing some default memory settings in the server. Before we talk about the solution I think it is very important to understand some of the memory setting properties within the SSAS. I have captured their details below as per described in MSDN.

LowMemoryLimit

Specifies the amount of memory allocated by Analysis Services at start up. When this limit is reached, the instance will start to slowly clear memory out of caches by closing expired sessions and unloading unused calculations. The server will not release memory below this limit. The default value is 65; which indicates the low memory limit is 65% of physical memory or the virtual address space, whichever is less.

TotalMemoryLimit

Defines a threshold that when reached, causes the server to deallocate memory more aggressively. The default value 80% of physical memory or the virtual address space, whichever is less.

Note that TotalMemoryLimit must always be less than HardMemoryLimit

HardMemoryLimit

Specifies a memory threshold after which the instance aggressively terminates active user sessions to reduce memory usage. All terminated sessions will receive an error about being cancelled by memory pressure. The default value, zero (0), means the HardMemoryLimit will be set to a midway value between TotalMemoryLimit and the total physical memory of the system; if the physical memory of the system is larger than the virtual address space of the process, then virtual address space will be used instead to calculate HardMemoryLimit.







In order to fix the memory freezing problem, we should change the default Memory\HardMemoryLimit setting.  We should keep this value between the Memory\TotalMemoryLimit and 100. Since the TotalMemoryLimit is 80 by default, then in this case we can set the HardMemoryLimit to 90. What will happen is anytime when the memory exceeds 90%, the SSAS will start cancelling the queries.  The users might see the error message saying “The operation has been cancelled due to memory pressure”.

In order to set the Memory\HardMemoryLimit property to 90, please follow the steps below

1.       Login in the SSAS using the SQL Management Studio.

2.       Right Click on the Server Name and Go to Properties.

3.       Look for the “Memory\HardMemoryLimit” property and set the value to 90. By default it is 0.