<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A R U N &#187; Technical Stuffs</title>
	<atom:link href="http://a-r-u-n.com/b/index.php/category/technical-stuffs/feed/" rel="self" type="application/rss+xml" />
	<link>http://a-r-u-n.com/b</link>
	<description>....God&#039;s own website....</description>
	<lastBuildDate>Sun, 05 Sep 2010 11:23:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>AWStats for Network Load Balanced websites</title>
		<link>http://a-r-u-n.com/b/index.php/2010/09/awstats-for-network-load-balanced-websites/</link>
		<comments>http://a-r-u-n.com/b/index.php/2010/09/awstats-for-network-load-balanced-websites/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 11:19:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows 2003]]></category>
		<category><![CDATA[AWStats in NLB]]></category>
		<category><![CDATA[Statistics for nlb]]></category>
		<category><![CDATA[windows nlb awstats]]></category>

		<guid isPermaLink="false">http://a-r-u-n.com/b/?p=465</guid>
		<description><![CDATA[INSTALL AND CONFIGURE STATISTICS FOR LOAD BALANCED IIS SITES- Ingredients- * In this scenario I’m going to use the following things- # 3 NLB nodes – 2K31 (IP- 192.168.1.129), 2K32 (IP- 192.168.1.130), 2K33 (IP- 192.168.1.131) # A server for stats installation – 2K34 (IP- 192.168.1.132) # Statistics – AWStats (download from http://awstats.sourceforge.net). I used AWStats [...]]]></description>
			<content:encoded><![CDATA[<p><strong>INSTALL AND CONFIGURE STATISTICS FOR LOAD BALANCED IIS SITES-</strong></p>
<p><strong>Ingredients-</strong></p>
<p>* In this scenario I’m going to use the following things-</p>
<p># 3 NLB nodes – 2K31 (IP- 192.168.1.129), 2K32 (IP- 192.168.1.130), 2K33 (IP- 192.168.1.131)</p>
<p># A server for stats installation – 2K34 (IP- 192.168.1.132)</p>
<p># Statistics – AWStats (download from http://awstats.sourceforge.net). I used AWStats 6.8 version.</p>
<p># Website for testing – www.a-r-u-n.com (must be setup in all the above 3 NLB nodes)</p>
<p># Stats website in 2K34. I’m going to use server’s IP itself for testing.</p>
<p><strong>Preparation-</strong></p>
<p>1.	Install AWStats 6.8 in the server 2K34 in the following location – C:\AWStats.</p>
<p>2.	During installation it prompts you to specify the location of apache installation. Specify ‘none’ since this one is for IIS-</p>
<p><em>&#8212;&#8211;&gt; Running OS detected: Windows</em></p>
<p><em>&#8212;&#8211;&gt; Check for web server install</em></p>
<p><em>awstats_configure did not find your Apache web main runtime.</em></p>
<p><em>Please, enter full directory path of your Apache web server or &#8216;none&#8217; to skip this step if you don&#8217;t have local web server or don&#8217;t have permission to change its setup.</em></p>
<p><em>Example: c:\Program files\apache group\apache</em></p>
<p><em>Apache Web server path (&#8216;none&#8217; to skip):</em></p>
<p><em>&gt; none</em></p>
<p>3.	Next step is it will ask to create a new config file for website, specify ‘y’-</p>
<p><em>&#8212;&#8211;&gt; Need to create a new config file ?</em></p>
<p><em>Do you want me to build a new AWStats config/profile</em></p>
<p><em>file (required if first install) [y/N] ? y</em></p>
<p>4.	It then asks you to specify the name of the website for config file. Specify the website name-</p>
<p><em>&#8212;&#8211;&gt; Define config file name to create</em></p>
<p><em>What is the name of your web site or profile analysis ?</em></p>
<p><em>Example: www.mysite.com</em></p>
<p><em>Example: demo</em></p>
<p><em>Your web site, virtual server or profile name:</em></p>
<p><em>&gt; a-r-u-n.com</em></p>
<p>5.	Press Enter to complete the installation of AWStats.</p>
<p>6.	Create the data directory called ‘Data’ under the following location C:\AWStats\ and assign modify permission to the following objects – Network Service, web user(IUSR).</p>
<p>7.	Now open the config file ‘awstats.a-r-u-n.com.conf’ located under ‘cgi-bin’ folder (in my case &#8211; C:\AWStats\wwwroot\cgi-bin).</p>
<p>8.	Search for ‘LogFile’ section. You need to specify the path where log files are created for the website.</p>
<p>Note – Since this configuration is for websites hosted in Load Balanced servers the format for ‘LogFile’ differs from the usual log format. There are two options available to generate logs for websites-</p>
<p>a.	Copy all the log files from log folders of a-r-u-n.com from all the 3 nodes to the location in local server. In this case, I copied from \\2K31\C$\Domains\a-r-u-n.com\logs\W3SVC100\*.log to C:\Logs\a-r-u-n.com\2K31\*.log for 1st node. \\2K32\C$\Domains\a-r-u-n.com\logs\W3SVC190\*.log to C:\Logs\a-r-u-n.com\2K32\*.log for 2nd node. And \\2K33\C$\Domains\a-r-u-n.com\logs\W3SVC150\*.log to C:\Logs\a-r-u-n.com\2K33\*.log for 3rd node. Now all the 3 nodes’ log files for a-r-u-n.com have been copied to the location in local server – C:\Logs\a-r-u-n.com\ in 2K34. Now we need to merge all the above 3 nodes’ log files into one file using a perl tool called logresolvemerge.pl which ships with AWStats installation. This can be found in C:\AWStats\tools\logresolvemerge.pl. To merge all the log files to a single file, perform these steps-</p>
<p>1.	Goto command prompt and to C:\AWStats\tools\ and type the following command –</p>
<p>perl logresolvemerge.pl C:\Logs\a-r-u-n.com\2K31\ex*.log C:\Logs\a-r-u-n.com\2K32\ex*.log C:\Logs\a-r-u-n.com\2K33\ex*.log &gt; C:\Logs\a-r-u-n.com\all.log</p>
<p>2.	Now you will see all the nodes’ log files have been merged to a single log file at C:\Logs\a-r-u-n.com\all.log</p>
<p>3.	Now specify this log file path ‘C:\Logs\a-r-u-n.com\all.log’ under the ‘LogFile’ section in ‘awstats.a-r-u-n.com.conf’. This will looks like-</p>
<p>LogFile=&#8221;C:/Logs/a-r-u-n.com/all.log&#8221;</p>
<p>b.	Second option is to specify UNC share path in config file. Note down the UNC share path of all the nodes for a-r-u-n.com (\\2k31\C$\Domains, \\2k32\C$\Domains and \\2k33\C$\Domains). Create a map networked drive for the above UNC shares. Say ‘G’ drive mapped to \\2k31\C$\Domains and ‘H’ drive mapped to \\2k32\C$\Domains and ‘I’ drive mapped to \\2k33\C$\Domains respectively. Now you can access those log files directly by G:\a-r-u-n.com\logs\W3SVC100\*.log for 2K31 server and H:\a-r-u-n.com\.. for 2K32 server and so on. Now open the config file ‘awstats.a-r-u-n.com.conf’ and look for ‘LogFile’ section. Specify the following-</p>
<p>LogFile=&#8221;perl C:/AWStats/tools/logresolvemerge.pl G:/a-r-u-n.com/logs/W3SVC100/ex*.log H:/a-r-u-n.com/logs/W3SVC190/ex*.log I:/arun1.com/log/W3SVC150/ex*.log |&#8221;</p>
<p>By specifying the above format in config file of a-r-u-n.com AWStats generates stats automatically during update the process. This is most suited in the environment where the log files are too large and you need to save space. Also this is time saver.</p>
<p>o	Note – First option is time consuming and requires human intervention for exporting each and every logs. Where as second option is easier and can be specified only in config file and stats generation is automated during rebuild process.</p>
<p>9.	Now you need to specify the log format for your website. Simply copy the format to config file from the top of the web log file(exmmddyy.log) if you not sure about the exact LogFormat of your web sites. (Note – Websites in each nodes must have same ‘Logging options’ enabled in IIS, this can be confirmed by right clicking web site properties &gt; Logging Properties &gt; in General and Advanced tab make sure that particular website in all the nodes have same settings)-</p>
<p><em>#Software: Microsoft Internet Information Services 6.0</em></p>
<p><em>#Version: 1.0</em></p>
<p><em>#Date: 2010-08-31 14:39:06</em></p>
<p><em>#Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken</em></p>
<p>Copy the fields so that it looks like this-</p>
<p><em>LogFormat= &#8220;date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken&#8221;</em></p>
<p>10.	Please specify DirData path in ‘DirData’ section as C:\AWStats\Data which you created in step 6 so that AWStats will store the result of stats analysis in AWStats files.</p>
<p>11.	Now you need to update the stats in order to view it as GUI from web browser. To do this goto command prompt to the location – C:\AWStats\wwwroot\cgi-bin and key in the following command-</p>
<p><em>perl awstats.pl -config=www.a-r-u-n.com –update</em></p>
<p>You will see the result like this-</p>
<p><em>C:\AWStats\wwwroot\cgi-bin&gt;perl awstats.pl -config=www.a-r-u-n.com -update</em></p>
<p><em>Create/Update database for config &#8220;./awstats.www.a-r-u-n.com.conf&#8221; by AWStats version 6.8 (build 1.910)</em></p>
<p><em>From data in log file &#8220;perl C:/AWStats/tools/logresolvemerge.pl G:/a-r-u-n.com/logs/W3SVC100/ex*.log H:/a-r-u-n.com/logs/W3SVC190/ex*.log I:/arun1.com/log/W3SVC150/ex*.log |&#8221;&#8230;</em></p>
<p><em>Phase 1 : First bypass old records, searching new record&#8230;</em></p>
<p><em>Searching new records from beginning of log file&#8230;</em></p>
<p><em>Phase 2 : Now process new records (Flush history on disk after 20000 hosts)&#8230;</em></p>
<p><em>Jumped lines in file: 0</em></p>
<p><em>Parsed lines in file: 1560</em></p>
<p><em>Found 43 dropped records,</em></p>
<p><em>Found 0 corrupted records,</em></p>
<p><em>Found 197 old records,</em></p>
<p><em>Found 1320 new qualified records.</em></p>
<p>Make sure you see new qualified records at the end. If there’s any problem or error please verify you have followed previous steps correctly.</p>
<p>12.	 Stats have been generated for your website. Now we need URL to view the generated stats. Please create a website in IIS mapped to AWStats ‘cgi-bin’ directory (ie, C:\AWStats\wwwroot\cgi-bin).</p>
<p>13.	 Call the website from browser – http://192.168.1.132/awstats.pl?config=a-r-u-n.com</p>
<p>14.	 You are almost done. To generate stats automatically on daily or hourly basis you need to automate it by using Windows Scheduled Tasks. Create a batch file under cgi-bin folder of AWStats and specify the following command &#8211; <em>perl awstats.pl -config=www.a-r-u-n.com –update</em></p>
<p>And finally create a scheduled task to schedule the batch file every 6 hrs or 12 hours.</p>
<p>15.	 Add sugar to taste&#8230; sorry add websites. <img src='http://a-r-u-n.com/b/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div><span style="font-family: Verdana; color: #ff0000;"><span style="font-size: small;"><span style="color: #007f40;">&#8220;`</span><span style="color: #ff0000;">*</span><span style="color: #007f40;"><strong>&#8220;`</strong></span><span style="font-family: verdana; color: #ff0000;"><strong>a</strong>run</span></span></span><img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/40.gif" alt="" /> <strong><span style="font-family: comic sans ms; color: #ff0000; font-size: medium;">&#8230;</span></strong></div>
]]></content:encoded>
			<wfw:commentRss>http://a-r-u-n.com/b/index.php/2010/09/awstats-for-network-load-balanced-websites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure Network Load Balancing for websites with dedicated ip</title>
		<link>http://a-r-u-n.com/b/index.php/2010/08/configure-network-load-balancing-for-websites-with-dedicated-ip/</link>
		<comments>http://a-r-u-n.com/b/index.php/2010/08/configure-network-load-balancing-for-websites-with-dedicated-ip/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 12:17:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows 2003]]></category>
		<category><![CDATA[NLB for static ip websites]]></category>
		<category><![CDATA[static ip NLB websites]]></category>
		<category><![CDATA[windows NLB]]></category>

		<guid isPermaLink="false">http://a-r-u-n.com/b/?p=449</guid>
		<description><![CDATA[Configuring NLB for websites with dedicated ip addresses # Assuming NLB is already setup and the nodes are converged fine. Ingredients- Following are the things I planned for my NLB (Network Load Balancing) setup in Windows Server 2003- # 3 machines for web server(IIS installed) – Windows Server 2003 Machine names and its IP addresses- [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Configuring NLB for websites with dedicated ip addresses</strong></p>
<p># Assuming NLB is already setup and the nodes are converged fine.</p>
<p><strong>Ingredients-</strong></p>
<p>Following are the things I planned for my NLB (Network Load Balancing) setup in Windows Server 2003-</p>
<p># 3 machines for web server(IIS installed) – Windows Server 2003</p>
<p>Machine names and its IP addresses-<br />
<em>2K31   -        192.168.1.129<br />
</em><em>2K32   -        192.168.1.130<br />
</em><em>2K33   -        192.168.1.131</em></p>
<p># 1 machine for DNS server – Windows Server 2003</p>
<p><em>2K34   &#8211; 192.168.1.132</em></p>
<p># Cluster IP addresses (for dedicated IP) – 192.168.1.150(for arun1.com), 192.168.1.151(for arun2.com)</p>
<p>#  Website name that is going to use in dedicated IP configuration – arun1.com, arun2.com</p>
<p># On each web servers create the folder structures as below-</p>
<p>C:\Domains<br />
C:\Domains\arun1.com<br />
C:\Domains\arun1.com\wwwroot</p>
<p>C:\Domains<br />
C:\Domains\arun2.com<br />
C:\Domains\arun2.com\wwwroot</p>
<p>Create a test page “index.html” under wwwroot and copy paste the below code-</p>
<p><em>&lt;html&gt;<br />
</em><em>&lt;h1&gt;&lt;center&gt;WELCOME TO ARUN WORLD&lt;/center&gt;&lt;/h1&gt;<br />
</em><em>&lt;b/&gt;<br />
</em><em>2K31 &#8211; arun1.com &#8211; dedicated<br />
</em><em>&lt;/html&gt;</em></p>
<p>Change the domain name <em>arun1.com </em>and server name ‘<em>Hosted in 2K31’</em><em> </em>to appropriate domain name and server’s name on each sever as this will help a bit in the later stage during testing of each nodes as which node is servicing the request.</p>
<p><em>Note – It is not intention to have separate physical machines to configure NLB. You can either configure it in Virtual servers like – Microsoft Virtual PC, VMWare Workstation or VMWare Server. This saves cost. In this scenario I’ve setup servers in my friend’s laptop with this configs-</em></p>
<p><em>VMWare Workstation ACE Edition 6.02<br />
1.73 Ghz Intel Dual Core<br />
1 GB RAM<br />
120 GB HD</em></p>
<p><strong>Preparation-</strong></p>
<p>In Network Load Balancing Manager-</p>
<p>1.  Open ‘Cluster Properties’  of the cluster nlb.arun.com.</p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/Add_Dedicated_IP_Cluster_Properties1.gif"><img class="alignnone size-medium wp-image-454" title="Add_Dedicated_IP_Cluster_Properties" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/Add_Dedicated_IP_Cluster_Properties1-300x225.gif" alt="" width="300" height="225" /></a></p>
<p>2.  In ‘Cluster IP Address’  click ‘Add’ to add new dedicated IP.  In this case I’ve added 192.168.1.150 and 192.168.1.151</p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/DEDI_Cluster_Properties.gif"><img class="alignnone size-medium wp-image-456" title="DEDI_Cluster_Properties" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/DEDI_Cluster_Properties-300x225.gif" alt="" width="300" height="225" /></a></p>
<p>3.  You will be presented with a dialog box “Confirm Change of Cluster-wide</p>
<p>Properties”. Click ‘Yes’ to proceed further.</p>
<p>In IIS Manager-</p>
<p>Setup 2 sites arun1.com host header pointing to the ip 192.168.1.150 and arun2.com host header pointing to the ip 192.168.1.151.</p>
<p>In DNS Management console-</p>
<p>Create forward lookup zone for 2 domains – arun1.com(192.168.1.150) and arun2.com(192.168.1.151)-</p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/DEDI-arun1.com_DNS.gif"><img class="alignnone size-medium wp-image-457" title="DEDI-arun1.com_DNS" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/DEDI-arun1.com_DNS-300x225.gif" alt="" width="300" height="225" /></a></p>
<p><strong>Testing-</strong></p>
<p>Now open the browser and type <a href="http://arun1.com/">http://arun1.com</a> and you will see something like this-</p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/DEDI-arun1.com_access.gif"><img class="alignnone size-medium wp-image-458" title="DEDI-arun1.com_access" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/DEDI-arun1.com_access-300x225.gif" alt="" width="300" height="225" /></a></p>
<p>In the above pic, it is serviced by node 1 – 2K31.</p>
<p>To test whether this site is servicing through other nodes please suspend or stop the 2K31 node in Cluster Manager(Please refer this URL <a title="Setup Network Load Balancing in Windows Server 2003" href="http://a-r-u-n.com/b/index.php/2010/08/setup-network-load-balancing-in-windows-server-2003/" target="_blank"><strong>Setup Network Load Balancing in Windows Server 2003</strong></a><strong> </strong>see under &#8216;Testing&#8217; section)</p>
<p>Happy Load Balancing! <img src='http://a-r-u-n.com/b/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span style="color: #ff0000; font-family: Verdana;"><span style="font-size: small;"><span style="color: #007f40;">&#8220;`</span><span style="color: #ff0000;">*</span><span style="color: #007f40;"><strong>&#8220;`</strong></span><span style="color: #ff0000; font-family: verdana;"><strong>a</strong>run</span></span></span><img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/40.gif" alt="" /> <strong><span style="font-size: medium; color: #ff0000; font-family: comic sans ms;">&#8230;</span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://a-r-u-n.com/b/index.php/2010/08/configure-network-load-balancing-for-websites-with-dedicated-ip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup Network Load Balancing in Windows Server 2003</title>
		<link>http://a-r-u-n.com/b/index.php/2010/08/setup-network-load-balancing-in-windows-server-2003/</link>
		<comments>http://a-r-u-n.com/b/index.php/2010/08/setup-network-load-balancing-in-windows-server-2003/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 19:28:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows 2003]]></category>
		<category><![CDATA[Network Load Balancing in Windows 2003]]></category>
		<category><![CDATA[NLB in windows 2003]]></category>
		<category><![CDATA[Windows load balancer]]></category>

		<guid isPermaLink="false">http://a-r-u-n.com/b/?p=412</guid>
		<description><![CDATA[Setup Network Load Balancing in Windows Server 2003  Generally you will need atleast 2 machines installed with Windows Server 2003 and each machine should have atleast 1 NIC and 1 static IP address. Additionally, you will need one more machine (either Windows Server 2003 or Windows XP) needed in order to test the setup. Assuming [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Setup Network Load Balancing in Windows Server 2003</strong></p>
<p> Generally you will need atleast 2 machines installed with Windows Server 2003 and each machine should have atleast 1 NIC and 1 static IP address. Additionally, you will need one more machine (either Windows Server 2003 or Windows XP) needed in order to test the setup. Assuming DNS server is included to add DNS records for websites.</p>
<p><strong>Ingredients</strong>-</p>
<p> Following are the things I planned for my NLB (Network Load Balancing) setup in Windows Server 2003-</p>
<p> # 3 machines for web server(IIS installed) – Windows Server 2003<br />
     Machine names and its IP addresses-<br />
    <em>2K31   -        192.168.1.129<br />
    </em><em>2K32   -        192.168.1.130<br />
    </em><em>2K33   -        192.168.1.131</em></p>
<p> # 1 machine for DNS server – Windows Server 2003<br />
     <em>2K34   &#8211; 192.168.1.132</em></p>
<p># Cluster IP address – <em>192.168.1.100</em></p>
<p><em># </em>Cluster Name  &#8211; nlb.arun.com</p>
<p># On each web servers create the folder structures as below-¦lt;br /&gt;     C:\Domains<br />
    C:\Domains\nlb.arun.com<br />
    C:\Domains\nlb.arun.com\wwwroot<br />
¦lt;br /&gt; Create a test page “index.html” under wwwroot and copy paste the below code-<br />
 <em>&lt;html&gt;<br />
</em><em>&lt;h1&gt;&lt;center&gt;WELCOME TO ARUN WORLD&lt;/center&gt;&lt;/h1&gt;<br />
</em><em>&lt;b/&gt;<br />
</em><em>Hosted in 2K31<br />
</em><em>&lt;/html&gt;</em></p>
<p><em> </em>Change the server name ‘<em>Hosted in 2K31’</em><em> </em>to appropriate server’s name on each sever as this will help a bit in the later stage during testing of each nodes as which node is servicing the request.</p>
<p> <em>Note – It is not intention to have separate physical machines to configure NLB. You can either configure it in Virtual servers like – Microsoft Virtual PC, VMWare Workstation or VMWare Server. This saves cost. In this scenario I’ve setup servers in my friend&#8217;s laptop with this configs-</em></p>
<p><em>VMWare Workstation ACE Edition 6.02<br />
1.73 Ghz Intel Dual Core<br />
1 GB RAM<br />
120 GB HD</em></p>
<p> <strong>Preparation-</strong></p>
<p> <strong>Setting up Network Load Balancer-</strong></p>
<p> 1. Open Network Load balancing Manager-<br />
Start &gt; Administrative Tools &gt; Network Load balancing Manager<br />
(or)<br />
Start &gt; Run &gt; type ‘nlbmgr’ </p>
<p>2.  Right click Network Load Balancing Manager &gt; New Cluster<br />
<a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/2_New_Cluster.gif"><img class="size-medium wp-image-418 alignnone" title="2_New_Cluster" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/2_New_Cluster-300x225.gif" alt="New Cluster" width="300" height="225" /></a></p>
<p>3.  In ‘Cluster Parameters’ wizard, in ‘Cluster IP Configuration’ specify the cluster IP address – <em>192.168.1.100</em>, subnet mask and Full Internet Name as <em>‘nlb.arun.com’</em>.  Ensure <em>‘Multicast’ </em>option is selected along with <em>‘IGMP Multicast’.<br />
</em>Leave the ‘Allow Remote Control’ unchecked.</p>
<p>Note – IP address is the virtual IP address for the cluster that will be used to address the cluster. If you have single adapter then you should select <em>‘Multicast’ </em>in ‘Cluster Operation Mode’. By selecting <em>‘Unicast’ </em>allows NLB to take over the network card it is bound to and doesn’t allow any additional network traffic through it. You can configure single adapter in <em>‘Unicast’ </em>mode but after configuration the cluster manager will not be able to communicate with the server. Generally, <em>‘Multicast’ </em>is slower than <em>‘Unicast’ </em>mode.</p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/3_Cluster_Parameters.gif"><img class="alignnone size-medium wp-image-419" title="3_Cluster_Parameters" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/3_Cluster_Parameters-300x225.gif" alt="3_Cluster_Parameters" width="300" height="225" /></a></p>
<p>4.  On the next wizard ‘Cluster IP addresses’, leave the settings as it is and click next. (We will visit this in next topic).</p>
<p> <a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/4_Cluster_IP_Addresses.gif"><img class="alignnone size-medium wp-image-420" title="4_Cluster_IP_Addresses" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/4_Cluster_IP_Addresses-300x225.gif" alt="4_Cluster_IP_Addresses" width="300" height="225" /></a></p>
<p>5.  In ‘Port Rules’ wizard, ensure the necessary ports are added. By default NLB configures to handle all ports. In this scenario I’m going to add these ports – 80 (http traffic) and 443 (https traffic). Add the ports by hitting ‘Add’ button and input 80 as From and To in Port range. Ensure ‘Both’ (ie, both TCP and UDP) protocol is selected.</p>
<p>One of the important thing here is ‘Filtering Mode’ which determines affinity of requests. Affinity describes how requests are routed to a specific server. <em>‘None’ </em>refers any servers can service the incoming requests. <em>‘Single’ </em>refers to a specific server has to handle each and every requests from a given IP. <em>‘None’ </em>is recommended as it is better in stateless applications and this results in less overhead in NLB. <em>‘Single’ </em>mode should be used when there’s a state server connection, for example – SSL.</p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/5_Add-Edit_Port-Rule.gif"><img class="alignnone size-medium wp-image-421" title="5_Add-Edit_Port-Rule" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/5_Add-Edit_Port-Rule-300x225.gif" alt="5_Add-Edit_Port-Rule" width="300" height="225" /></a></p>
<p>     Do the same thing for adding port 443.</p>
<p>6.  Next step is to add nodes to the cluster. In the <em>‘Connect’ </em>wizard specify the host name which needs to be included in NLB. In this case I specified 2K31 in <em>‘Host’ </em>(or you can specify IP address of the host, for this server – 192.168.1.129) and click <em>‘Connect’ </em>button and ensure interface name and IP info of that node are listed. If there’s more than one NIC card select the one that is going to be configured for NLB.</p>
<p> <a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/6_Connect.gif"><img class="alignnone size-medium wp-image-422" title="6_Connect" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/6_Connect-300x225.gif" alt="6_Connect" width="300" height="225" /></a></p>
<p> 7.  In <em>‘Host Parameters’ </em>wizard specify the Priority. This should be unique number and it identifies each node in the cluster. Lower the number the higher the priority. Priority 1 is the master node which receives requests and routes the traffic to other nodes only when the load in this node is high. Hit <em>‘Finish’.</em></p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/7_Host_parameters.gif"><img class="alignnone size-medium wp-image-423" title="7_Host_parameters" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/7_Host_parameters-300x225.gif" alt="7_Host_parameters" width="300" height="225" /></a></p>
<p>8.  This will take 25 – 35 secs for a node to get converged. Following is the status of NLB cluster-</p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/8_result.gif"><img class="alignnone size-medium wp-image-424" title="8_result" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/8_result-300x225.gif" alt="8_result" width="300" height="225" /></a></p>
<p>9.  Follow the above steps (6<sup>th</sup> and 7<sup>th</sup>) to add remaining nodes-<br />
<em>2K32   -        192.168.1.130<br />
</em><em>2K33   -        192.168.1.131</em> Review the error log in the bottom pane if there is  rror during additional node setup. Wait for few seconds and hit refresh until you see all the nodes becomes ‘Converged’ state.        </p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/2K32_error_log.gif"><img class="alignnone size-medium wp-image-425" title="2K32_error_log" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/2K32_error_log-300x225.gif" alt="2K32_error_log" width="300" height="225" /></a></p>
<p> One of the other ways to determine the status of each node in the cluster is – Goto command prompt in one of the nodes &gt; type <em>wlbs query</em></p>
<p>You will see something like this if all nodes are converged-</p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/2K33_NLB_Status.gif"><img class="alignnone size-medium wp-image-426" title="2K33_NLB_Status" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/2K33_NLB_Status-300x225.gif" alt="2K33_NLB_Status" width="300" height="225" /></a></p>
<p> In this picture I tried in 2K33 (3<sup>rd</sup> node).</p>
<p><strong>Setting up website to test NLB-</strong></p>
<p>Setup website in node 1 – 2K31 &#8211; Setting up a website is easy process – Open IIS Manager from Administrative Tools and create a new website called <em>nlb.arun.com </em>as host header mapped to the ip address 192.168.1.100 (Cluster IP). Please setup the same site with same settings in all other nodes (2K32, 2K33).</p>
<p> <strong>Setting up DNS records-</strong></p>
<p>This should be carried out in DNS server 2K34 which is not a part of cluster and just acts as DNS server. In order to get a website working you need DNS record configured for that website. To do this you need to create DNS record for arun.com as shown in this picture. Create host record (A) for nlb.arun.com pointing to the cluster IP – 192.168.1.100-</p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/2K34_DNS_Setup.gif"><img class="alignnone size-medium wp-image-427" title="2K34_DNS_Setup" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/2K34_DNS_Setup-300x225.gif" alt="2K34_DNS_Setup" width="300" height="225" /></a></p>
<p> <strong>Testing-</strong></p>
<p> Now open the browser and type <a href="http://nlb.arun.com/">http://nlb.arun.com</a> and you will see something like this-</p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/nlb.arun.com_access.gif"><img class="alignnone size-medium wp-image-428" title="nlb.arun.com_access" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/nlb.arun.com_access-300x225.gif" alt="nlb.arun.com_access" width="300" height="225" /></a></p>
<p>In the above pic, it is serviced by node 1 – 2K31To test whether this site is servicing through other nodes please suspend or stop the 2K31 node in Cluster Manager.</p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/2K31_Node_Suspended.gif"><img class="alignnone size-medium wp-image-429" title="2K31_Node_Suspended" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/2K31_Node_Suspended-300x225.gif" alt="2K31_Node_Suspended" width="300" height="225" /></a></p>
<p>Access the site <a href="http://nlb.arun.com/">http://nlb.arun.com</a> again after suspending node 1.</p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2010/08/nlb.arun.com_access2_node2.gif"><img class="alignnone size-medium wp-image-430" title="nlb.arun.com_access2_node2" src="http://a-r-u-n.com/b/wp-content/uploads/2010/08/nlb.arun.com_access2_node2-300x225.gif" alt="nlb.arun.com_access2_node2" width="300" height="225" /></a></p>
<p>Now you will see the request is serviced by 2K32 (node 2). This confirms request is routed to another node when the first node is unreachable. Now resume/start the node which you stopped in previous stage.</p>
<p>Happy Load Balancing! <img src='http://a-r-u-n.com/b/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span style="color: #ff0000; font-family: Verdana;"><span style="font-size: small;"><span style="color: #007f40;">&#8220;`</span><span style="color: #ff0000;">*</span><span style="color: #007f40;"><strong>&#8220;`</strong></span><span style="color: #ff0000; font-family: verdana;"><strong>a</strong>run</span></span></span><img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/40.gif" alt="" /> <strong><span style="font-size: medium; color: #ff0000; font-family: comic sans ms;">&#8230;</span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://a-r-u-n.com/b/index.php/2010/08/setup-network-load-balancing-in-windows-server-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to repair suspected mssql database</title>
		<link>http://a-r-u-n.com/b/index.php/2010/01/how-to-repair-suspected-mssql-database/</link>
		<comments>http://a-r-u-n.com/b/index.php/2010/01/how-to-repair-suspected-mssql-database/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 09:52:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MSSQL 2000, 2005, 2008]]></category>
		<category><![CDATA[How to repair suspected mssql database]]></category>
		<category><![CDATA[repair mssql database]]></category>

		<guid isPermaLink="false">http://a-r-u-n.com/b/?p=367</guid>
		<description><![CDATA[How to repair suspected mssql database- When  you connect your MSSQL server you may notice some database(s) in &#8216;suspected&#8217; mode and it doesn&#8217;t let you do anything. This is happening because of database corruption, server not properly shut down, etc..  To repair the &#8216;suspected&#8217; database you may need to run the following query in your [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to repair suspected mssql database-</strong></p>
<p>When  you connect your MSSQL server you may notice some database(s) in &#8216;suspected&#8217; mode and it doesn&#8217;t let you do anything. This is happening because of database corruption, server not properly shut down, etc..  To repair the &#8216;suspected&#8217; database you may need to run the following query in your Query Analyzer(for SQL 2000) or Management Studio (for SQL 2005 and 2008)-</p>
<blockquote><p>EXEC sp_resetstatus <em>databasenamehere</em>;<br />
ALTER DATABASE <em>databasenamehere</em> SET EMERGENCY<br />
DBCC checkdb(<em>databasenamehere</em>)<br />
ALTER DATABASE <em>databasenamehere</em> SET SINGLE_USER WITH ROLLBACK IMMEDIATE<br />
DBCC CheckDB (<em>databasenamehere</em>, REPAIR_ALLOW_DATA_LOSS)<br />
ALTER DATABASE <em>databasenamehere</em> SET MULTI_USER</p></blockquote>
<p><em>Note: Before running the query please make sure you have taken the copy of data and transaction log files to another location.</em></p>
<p>Your database is repaired now</p>
<div><span style="font-family: Verdana; color: #ff0000;"><span style="font-size: small;"><span style="color: #007f40;">&#8220;`</span><span style="color: #ff0000;">*</span><span style="color: #007f40;"><strong>&#8220;`</strong></span><span style="font-family: verdana; color: #ff0000;"><strong>a</strong>run</span></span></span><img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/40.gif" alt="" /> <strong><span style="font-family: comic sans ms; color: #ff0000; font-size: medium;">&#8230;</span></strong></div>
]]></content:encoded>
			<wfw:commentRss>http://a-r-u-n.com/b/index.php/2010/01/how-to-repair-suspected-mssql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kayako SupportSuite error</title>
		<link>http://a-r-u-n.com/b/index.php/2009/11/kayako-supportsuite-error/</link>
		<comments>http://a-r-u-n.com/b/index.php/2009/11/kayako-supportsuite-error/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 02:39:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows 2003]]></category>
		<category><![CDATA[Kayako SupportSuite error]]></category>

		<guid isPermaLink="false">http://a-r-u-n.com/b/?p=344</guid>
		<description><![CDATA[If you receive this error when accessing Kayako SupportSuite- Parse error: syntax error, unexpected &#8216;{&#8216; in support\includes\SmartyLight\class.template.php on line 351 Please make sure &#8216;short_open_tag&#8216; is set to &#8216;On&#8216; in php.ini this will fix the problem. &#8220;`*&#8220;`arun &#8230;]]></description>
			<content:encoded><![CDATA[<p>If you receive this error when accessing Kayako SupportSuite-</p>
<p>Parse error: syntax error, unexpected &#8216;{&#8216; in support\includes\SmartyLight\class.template.php on line 351</p>
<p>Please make sure &#8216;<em>short_open_tag</em>&#8216; is set to &#8216;<em>On</em>&#8216; in php.ini this will fix the problem.</p>
<div><span style="font-family: Verdana; color: #ff0000;"><span style="font-size: small;"><span style="color: #007f40;">&#8220;`</span><span style="color: #ff0000;">*</span><span style="color: #007f40;"><strong>&#8220;`</strong></span><span style="font-family: verdana; color: #ff0000;"><strong>a</strong>run</span></span></span><img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/40.gif" alt="" /> <strong><span style="font-family: comic sans ms; color: #ff0000; font-size: medium;">&#8230;</span></strong></div>
]]></content:encoded>
			<wfw:commentRss>http://a-r-u-n.com/b/index.php/2009/11/kayako-supportsuite-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Helm error &#8211; A name contained an invalid character</title>
		<link>http://a-r-u-n.com/b/index.php/2009/10/helm-error-a-name-contained-an-invalid-character/</link>
		<comments>http://a-r-u-n.com/b/index.php/2009/10/helm-error-a-name-contained-an-invalid-character/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 10:32:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Helm]]></category>
		<category><![CDATA[Unknown error while adding host header: A name contained an invalid character]]></category>
		<category><![CDATA[Website.IWeb_RemoveHostHeader 0-2147467259]]></category>

		<guid isPermaLink="false">http://a-r-u-n.com/b/?p=337</guid>
		<description><![CDATA[If you receive the following error after you try to delete or create a domain from helm or Restore from HelmRestoreTool- 2009-09-10 10:24:33 Website.IWeb_RemoveHostHeader 0-2147467259: Unknown error while adding host header: A name contained an invalid character. {0} 2009-09-10 10:24:33 CDomainAlias.DeleteEx 0-2147467259: Unknown error while adding host header: A name contained an invalid character. {0} [...]]]></description>
			<content:encoded><![CDATA[<p>If you receive the following error after you try to delete or create a domain from helm or Restore from HelmRestoreTool-</p>
<blockquote><p><em>2009-09-10 10:24:33 Website.IWeb_RemoveHostHeader 0-2147467259: Unknown error while adding host header: A name contained an invalid character.<br />
{0}<br />
2009-09-10 10:24:33 CDomainAlias.DeleteEx 0-2147467259: Unknown error while adding host header: A name contained an invalid character.<br />
{0}<br />
2009-09-10 10:24:33 CDomain.DeleteDomainEx 0-2147467259: Unknown error while adding host header: A name contained an invalid character.<br />
{0}</em></p>
<p><em>2009-09-10 10:40:14 Website.IWeb_RemoveHostHeader 0-2147467259: Unknown error while adding host header: A name contained an invalid character.<br />
{0}<br />
2009-09-10 10:40:14 CDomainAlias.DeleteEx 0-2147467259: Unknown error while adding host header: A name contained an invalid character.</em></p>
<p><em>{0}<br />
2009-09-10 10:59:22 Website.IWeb_AddWebsite 0-2147467259: Unknown error while creating site: A name contained an invalid character.<br />
{0}<br />
2009-09-10 10:59:22 CWebsite.RepairWebsiteEx 0-2147467259: Unknown error while creating site: A name contained an invalid character.<br />
{0}</em></p></blockquote>
<p><strong>Solution</strong> &#8211; In the remote server where the site is hosted please goto C:\Helm.config\ and delete IIS.xml file. Now try to delete the domain from helm you will be able to delete successfully.</p>
<div><span style="font-family: Verdana; color: #ff0000;"><span style="font-size: small;"><span style="color: #007f40;">&#8220;`</span><span style="color: #ff0000;">*</span><span style="color: #007f40;"><strong>&#8220;`</strong></span><span style="font-family: verdana; color: #ff0000;"><strong>a</strong>run</span></span></span><img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/40.gif" alt="" /> <strong><span style="font-family: comic sans ms; color: #ff0000; font-size: medium;">&#8230;</span></strong></div>
]]></content:encoded>
			<wfw:commentRss>http://a-r-u-n.com/b/index.php/2009/10/helm-error-a-name-contained-an-invalid-character/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql command line administration</title>
		<link>http://a-r-u-n.com/b/index.php/2009/10/mysql-command-line-administration/</link>
		<comments>http://a-r-u-n.com/b/index.php/2009/10/mysql-command-line-administration/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 13:05:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[commands for mysql]]></category>
		<category><![CDATA[mysql command line administration]]></category>

		<guid isPermaLink="false">http://a-r-u-n.com/b/?p=325</guid>
		<description><![CDATA[MySQL command line administration- 1. Login to server- Goto MySQL installed location through command prompt- C:\MySQL\bin or C:\Program files\MySQL\bin Specify MySQL user and password - C:\MySQl\bin&#62; mysql -u root -p Above command is used to login to local MySQL server. If you want to login to remote MySQL server use this command C:\MySQl\bin&#62; mysql -h [...]]]></description>
			<content:encoded><![CDATA[<p><strong>MySQL command line administration-</strong></p>
<p><em><strong>1. Login to server-</strong></em></p>
<p>Goto MySQL installed location through command prompt-</p>
<p><em>C:\MySQL\bin</em></p>
<p>or</p>
<p><em>C:\Program files\MySQL\bin</em></p>
<p>Specify MySQL user and password -</p>
<p><em>C:\MySQl\bin&gt; mysql -u root -p</em></p>
<p>Above command is used to login to local MySQL server. If you want to login to remote MySQL server use this command</p>
<p><em>C:\MySQl\bin&gt; mysql -h &lt;specify-remote-mysql-server-name-or-ip&gt; -u root -p</em></p>
<p><em><strong>2. List all the databases in MySQL server-</strong></em></p>
<p><em>mysql&gt; show databases;</em></p>
<p><em><strong>3. Create new database in MySQL server-</strong></em></p>
<p><em>mysql&gt; create database &lt;specify-db-name-here&gt;;</em></p>
<p><em><strong>4. Create a table in a database-</strong></em></p>
<p><em>create table `&lt;specify-table-name-here&gt;` (`field1` type , `field2` type);</em></p>
<p>For example- To create a table &#8216;fortest&#8217; with 3 fields &#8211; testid, testname, testemail-</p>
<p><em>mysql&gt; create table `fortest` (`testid` int( 11 ) not null auto_increment , `testname` varchar( 50 ) not null , `testemail` varchar( 100 ) not null , primary key ( `testid` ));<br />
</em><br />
<em><strong>5. To access a particular database in MySQL server-</strong></em></p>
<p><em>mysql&gt; use &lt;specify-db-name-here&gt;;</em></p>
<p>for example-</p>
<p><em>mysql&gt; use test;</em></p>
<p><em><strong>6. To view all the tables in that particular database-</strong></em></p>
<p><em>mysql&gt; show tables;</em></p>
<p><em><strong>7. To view that particular database&#8217;s table field format-</strong></em></p>
<p><em>mysql&gt; desc &lt;specify-table-name-here&gt;;<br />
</em><br />
for example-</p>
<p><em>mysql&gt; desc fortest;</em></p>
<p><em><strong>8. To access all the contents in a table-</strong></em></p>
<p><em>mysql&gt; select * from &lt;specify-table-name-here&gt;;</em></p>
<p>for example-</p>
<p><em>mysql&gt; select * from fortest;</em></p>
<p><em><strong>9. To retrieve specific info from particular table-<br />
</strong></em><br />
<em>mysql&gt; select * from &lt;specify-table-name-here&gt; where &lt;specify-field-name-here&gt; = &#8216;any-info&#8217;;</em></p>
<p>for example &#8211; if you want to find the details of a person named &#8216;arun&#8217; from the table &#8216;fortest&#8217; -</p>
<p><em>mysql&gt; select * from fortest where testname = &#8216;arun&#8217;;</em></p>
<p><strong><em>10. To create user in MySQL server-</em></strong></p>
<p><em>mysql&gt; create user &lt;specify-user-name-here&gt; identified by &#8216;&lt;specify-password-here&gt;&#8217;;</em></p>
<p>for example-</p>
<p><em>mysql&gt; create user &#8216;testinguser&#8217;@'%&#8217; identified by &#8216;testingpassword&#8217;;</em></p>
<p>alternate method-</p>
<p>You can create through mysql database-</p>
<p><em>mysql&gt; use mysql;<br />
Database changed<br />
mysql&gt; insert into user (host,user,password) values (&#8216;%&#8217;,'testinguser&#8217;,password(&#8216;testingpassword&#8217;));<br />
Query OK, 1 row affected (0.19 sec)</p>
<p>mysql&gt; flush privileges;</em></p>
<p><strong><em>11. Change password for a user-</em></strong></p>
<p><em>mysql&gt; set password for &#8216;user-name&#8217;@'hostname&#8217; = password(&#8216;specify-password-here&#8217;);<br />
</em><br />
<strong><em>12. To assign database specific privileges-</em></strong></p>
<p>All privileges to a particular database-</p>
<p><em>mysql&gt; grant all privileges on `test` . * to &#8216;testinguser1&#8242;@&#8217;%&#8217; with grant option ;</em></p>
<p>Specific privileges to a particular database-</p>
<p><em>mysql&gt; grant select , insert , update , delete , create , drop , index , alter , on `fortest` . * to &#8216;testinguser&#8217;@'%&#8217;;<br />
</em><br />
Alternate method-</p>
<p><em>mysql&gt; insert into user (host,db,user,select_priv,insert_priv,update_priv,delete_priv,create_priv,drop_priv) values (&#8216;%&#8217;,'specify-db-name-here&#8217;,'specify-user-name-here&#8217;,'y&#8217;,'y&#8217;,'y&#8217;,'y&#8217;,'y&#8217;,'y&#8217;);</p>
<p>mysql&gt; use mysql;<br />
Database changed<br />
mysql&gt; insert into user (host,db,user,select_priv,insert_priv,update_priv,delete_priv,create_priv,drop_priv) values (&#8216;%&#8217;,'test&#8217;,'testinguser&#8217;,'y&#8217;,'y&#8217;,'y&#8217;,'y&#8217;,'y&#8217;,'n&#8217;);</em></p>
<p><strong><em>13. To remove privileges for a particular user from a database-</em></strong></p>
<p><em>mysql&gt; revoke all privileges on `test` . * from &#8216;testinguser&#8217;@'%&#8217;;</em></p>
<p><strong><em>14. To delete a particular table-</em></strong></p>
<p><em>mysql&gt; drop table `fortest` ;</em></p>
<p><em><strong>15. To delete a particular database-</strong></em></p>
<p><em>mysql&gt; drop database `test` ;</em></p>
<p><strong><em>16. Backup the database-</em></strong></p>
<p><em>C:\MySQL\bin&gt; mysqldump -u root -p &lt;database-name&gt; &gt; C:\backup\test.sql</em></p>
<p><strong><em>17. Backup particular table from the database-</em></strong></p>
<p><em>C:\MySQL\bin&gt; mysqldump -u root -p &lt;database-name&gt; &lt;table-name&gt; &gt; C:\backup\fortest.sql</em></p>
<p><strong><em>18. Restore a database from the backup-</em></strong></p>
<p><em>C:\MySQL\bin&gt; mysql -u root -p &lt;database-name&gt; &lt; C:\backup\test.sql</em></p>
<div><span style="font-family: Verdana; color: #ff0000;"><span style="font-size: small;"><span style="color: #007f40;">&#8220;`</span><span style="color: #ff0000;">*</span><span style="color: #007f40;"><strong>&#8220;`</strong></span><span style="font-family: verdana; color: #ff0000;"><strong>a</strong>run</span></span></span><img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/40.gif" alt="" /> <strong><span style="font-family: comic sans ms; color: #ff0000; font-size: medium;">&#8230;</span></strong></div>
]]></content:encoded>
			<wfw:commentRss>http://a-r-u-n.com/b/index.php/2009/10/mysql-command-line-administration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reset MySQL root password</title>
		<link>http://a-r-u-n.com/b/index.php/2009/10/reset-mysql-root-password/</link>
		<comments>http://a-r-u-n.com/b/index.php/2009/10/reset-mysql-root-password/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 15:58:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Reset MySQL root password]]></category>

		<guid isPermaLink="false">http://a-r-u-n.com/b/?p=321</guid>
		<description><![CDATA[How to reset MySQL root password- Lost your MySQL root password? Resetting MySQL root password is simple. Please follow these steps- # Login to your MySQL server. # Locate the mysql.ini file. -This should be something like C:\MySQL\my.ini or &#8220;C:\Program files\MySQL\bin\mysqld-nt.exe&#8221; &#8211;defaults-file=&#8221;C:\Program files\MySQL\Data\my.ini&#8221; MySQL -You can also check this by viewing the Properties of the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to reset MySQL root password-</strong></p>
<p>Lost your MySQL root password? Resetting MySQL root password is simple. Please follow these steps-</p>
<p># Login to your MySQL server.<br />
# Locate the mysql.ini file.<br />
-This should be something like C:\MySQL\my.ini or &#8220;C:\Program files\MySQL\bin\mysqld-nt.exe&#8221; &#8211;defaults-file=&#8221;C:\Program files\MySQL\Data\my.ini&#8221; MySQL<br />
-You can also check this by viewing the Properties of the MySQL service command line under the Services MMC.<br />
# Edit the appropriate *.ini file and add the following line immediately after [mysqld] ;<br />
skip_grant_tables = 1<br />
# Restart the MySQL service. Please note that MySQL is now running unsecured.<br />
# From a command prompt, change to the /bin directory (Ususally C:\MySQL\bin or whereever under MySQL installed location) and enter the following command to login as root:<br />
mysql -u root<br />
# Then input the following command:<br />
update mysql.user SET Password = Password(&#8216;newpassword&#8217;) WHERE User=&#8217;root&#8217;;<br />
# Now remove the line you added to my.ini in previous step and restart MySQL.<br />
# Make sure you can login to MySQL using the updated password.</p>
<div><span style="font-family: Verdana; color: #ff0000;"><span style="font-size: small;"><span style="color: #007f40;">&#8220;`</span><span style="color: #ff0000;">*</span><span style="color: #007f40;"><strong>&#8220;`</strong></span><span style="font-family: verdana; color: #ff0000;"><strong>a</strong>run</span></span></span><img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/40.gif" alt="" /> <strong><span style="font-family: comic sans ms; color: #ff0000; font-size: medium;">&#8230;</span></strong></div>
]]></content:encoded>
			<wfw:commentRss>http://a-r-u-n.com/b/index.php/2009/10/reset-mysql-root-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Steps to secure Active Directory</title>
		<link>http://a-r-u-n.com/b/index.php/2009/09/steps-to-secure-active-directory/</link>
		<comments>http://a-r-u-n.com/b/index.php/2009/09/steps-to-secure-active-directory/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 07:56:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ADS]]></category>
		<category><![CDATA[Steps to secure Active Directory]]></category>

		<guid isPermaLink="false">http://a-r-u-n.com/b/?p=317</guid>
		<description><![CDATA[Important steps to secure Active Directory- # Rename or disable the Administrator account (and guest account) in each domain to prevent attacks on your domains. # Physically secure all domain controllers in a locked room. # Manage the security relationship between two forests and simplify security administration and authentication across forests. # To provide additional [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Important steps to secure Active Directory-</strong></p>
<p># Rename or disable the Administrator account (and guest account) in each domain to prevent attacks on your domains.</p>
<p># Physically secure all domain controllers in a locked room.</p>
<p># Manage the security relationship between two forests and simplify security administration and authentication across forests.</p>
<p># To provide additional protection for the Active Directory schema, remove all users from the Schema Admins group, and add a user to the group only when schema changes need to be made. Once the change has been made remove the user from the group.</p>
<p># Restrict user, group, and computer access to shared resources and to filter Group Policy settings.</p>
<p># Avoid disabling the use of signed or encrypted LDAP traffic for Active Directory administrative tools.</p>
<p># Some default user rights assigned to specific default groups may allow members of those groups to gain additional rights in the domain, including administrative rights. Therefore, your organization must equally trust all personnel that are members of the Enterprise Admins, Domain Admins, Account Operators, Server Operators, Print Operators and Backup Operators groups.</p>
<p># Use global groups or universal groups instead of domain local groups when specifying permissions on domain directory objects replicated to the global catalog. For more information, see Global catalog replication.</p>
<div><span style="font-family: Verdana; color: #ff0000;"><span style="font-size: small;"><span style="color: #007f40;">&#8220;`</span><span style="color: #ff0000;">*</span><span style="color: #007f40;"><strong>&#8220;`</strong></span><span style="font-family: verdana; color: #ff0000;"><strong>a</strong>run</span></span></span><img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/40.gif" alt="" /> <strong><span style="font-family: comic sans ms; color: #ff0000; font-size: medium;">&#8230;</span></strong></div>
]]></content:encoded>
			<wfw:commentRss>http://a-r-u-n.com/b/index.php/2009/09/steps-to-secure-active-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Active directory concepts in pictorial format</title>
		<link>http://a-r-u-n.com/b/index.php/2009/09/active-directory-concepts-in-pictorial-format/</link>
		<comments>http://a-r-u-n.com/b/index.php/2009/09/active-directory-concepts-in-pictorial-format/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 07:46:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ADS]]></category>
		<category><![CDATA[Active directory concepts in pictorial format]]></category>
		<category><![CDATA[ADS concepts]]></category>

		<guid isPermaLink="false">http://a-r-u-n.com/b/?p=312</guid>
		<description><![CDATA[Active directory concepts in pictorial format- click to enlarge the image &#8220;`*&#8220;`arun &#8230;]]></description>
			<content:encoded><![CDATA[<p><strong>Active directory concepts in pictorial format-</strong></p>
<p><em>click to enlarge the image</em><strong><br />
</strong></p>
<p><a href="http://a-r-u-n.com/b/wp-content/uploads/2009/09/active-directory.JPG"><img class="alignnone size-medium wp-image-313" title="active directory" src="http://a-r-u-n.com/b/wp-content/uploads/2009/09/active-directory-300x293.jpg" alt="active directory" width="300" height="293" /></a></p>
<div><span style="font-family: Verdana; color: #ff0000;"><span style="font-size: small;"><span style="color: #007f40;">&#8220;`</span><span style="color: #ff0000;">*</span><span style="color: #007f40;"><strong>&#8220;`</strong></span><span style="font-family: verdana; color: #ff0000;"><strong>a</strong>run</span></span></span><img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/40.gif" alt="" /> <strong><span style="font-family: comic sans ms; color: #ff0000; font-size: medium;">&#8230;</span></strong></div>
]]></content:encoded>
			<wfw:commentRss>http://a-r-u-n.com/b/index.php/2009/09/active-directory-concepts-in-pictorial-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
