October 11, 2015

MS SQL - Instance level memory limit

Issue: Multiple sqlservr.exe processes use all RAM on server (SQL Server 2008 R2).

If you have more that one SQL Server instance you will see multiple sqlservr.exe processes in task manager.

"tasklist /svc" command can be used to determine SQL Instance name and its process id.

Then you can run "SQL Server Management Studio" and set a fixed amount of memory to instance which you want to limit RAM usage.

Exchange - Internal IP Disclosure - Links

The problem is described here Exchange Multiple Internal IP Disclosures
Solution:
IIS 6.0: https://support.microsoft.com/en-us/kb/218180
IIS 7.0: https://support.microsoft.com/en-us/kb/967342
IIS 7.5: http://blog.rohit-lakhanpal.info/2014/08/internet-information-servicesiis.html
Useful link: http://blog.kurtiskent.com/2014/09/workaround-for-iis-multiple-internal-ip.html
Another one: https://www.iis.net/configreference/system.webserver/serverruntime

w3wp.exe process uses much memory?

And you are struggling with it?

Determine which App Pool grabs resources by running:
C:\Windows\System32\inetsrv>appcmd.exe list wp

You will get list PID's to App Pools. Then go to IIS manager - Application Pools - Select App Pool that you need and click Recycling...

Specify "Private memory usage (in KB)" settings.

Read more here https://technet.microsoft.com/en-us/library/cc725749(v=ws.10).aspx

How to shrink log of mirrored SQL database?

Quick tip for SQL 2008 R2:
1. Full backup your database.

2. Backup transaction logs.

3. Check log file status:
DBCC LOGINFO ("YOUR_DB_NAME")

4. If you found Status 2 in step 3 run:
DBCC SHRINKFILE (YOUR_DB_NAME_log, EMPTYFILE);

5. Repeat step 3 and 4 until you get Status 0.

6. Shrink transaction logs:
DBCC SHRINKFILE("YOUR_DB_NAME_log",1)