<?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>WinBlogs.... &#187; windows 2008</title>
	<atom:link href="http://www.winblogs.net/index.php/tag/windows-2008/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.winblogs.net</link>
	<description>Just another Windows geek blog...</description>
	<lastBuildDate>Thu, 27 Oct 2011 21:56:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Remote MSSQL&#8230;oh, you imbecil! :)</title>
		<link>http://www.winblogs.net/index.php/2011/09/09/remote-mssql-oh-you-imbecil/</link>
		<comments>http://www.winblogs.net/index.php/2011/09/09/remote-mssql-oh-you-imbecil/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 08:00:09 +0000</pubDate>
		<dc:creator>Alesandro Slepčević</dc:creator>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[access database]]></category>
		<category><![CDATA[error 916]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[mssql 2005]]></category>
		<category><![CDATA[mssql 2008]]></category>
		<category><![CDATA[mssql 2008r2]]></category>
		<category><![CDATA[mssql error]]></category>
		<category><![CDATA[remote mssql]]></category>
		<category><![CDATA[server principal]]></category>
		<category><![CDATA[The server principal “” is not able to access the database "” under the current security context.]]></category>
		<category><![CDATA[windows 2008]]></category>
		<guid isPermaLink="false">http://www.winblogs.net/?p=500</guid>
		<description><![CDATA[Not very often, you will get the following error: Error: The server principal “” is not able to access the database &#8220;” under the current security context. This is because the MS SQL Server is attempting to execute a SQL query to retrieve a list of databases along with  some other formation about those databases. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p style="text-align: center;"><a href="http://www.winblogs.net/wp-content/uploads/2011/09/mssqlprincipal.png"><img class="aligncenter size-full wp-image-501" title="mssqlprincipal" src="http://www.winblogs.net/wp-content/uploads/2011/09/mssqlprincipal.png" alt="" width="567" height="189" /></a><a href="http://www.winblogs.net/wp-content/uploads/2011/09/mssqlprincipal.png"><br />
</a></p>
<p>Not very often, you will get the following error:</p>
<blockquote><p>Error:<br />
The server principal “” is not able to access the database &#8220;” under the current security context.</p></blockquote>
<p>This is because the MS SQL Server is attempting to execute a SQL query to retrieve a list of databases along with  some other formation about those databases. Some of  that information is “Collation”, which, ofcourse you don&#8217;t have permission to view for all databases, since  you’re in a shared hosting environment and you can only have access to your database..</p>
<p>Solution is pretty straight forward :<br />
1. In Object Explorer, click on Databases<br />
2. Display Object Explorer Details (F7) or View &gt; Object Explorer Details<br />
3. Right click the column headers and de-select “Collation”</p>
<p>4. Refresh Databases or reconnect to ste machine.</p>
<p>Thats it <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p>Bye bye  <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="shr-publisher-500"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.winblogs.net/index.php/2011/09/09/remote-mssql-oh-you-imbecil/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tune up my server, Mr. Admin aka &#8211; improve IIS 7/7.5 performance &#8211; part 1</title>
		<link>http://www.winblogs.net/index.php/2011/04/04/tune-up-my-server-mr-admin-aka-improve-iis-77-5-performance-part-1/</link>
		<comments>http://www.winblogs.net/index.php/2011/04/04/tune-up-my-server-mr-admin-aka-improve-iis-77-5-performance-part-1/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 20:17:54 +0000</pubDate>
		<dc:creator>Alesandro Slepčević</dc:creator>
				<category><![CDATA[IIS server]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[iis 7.5]]></category>
		<category><![CDATA[optimize performance]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[tuning]]></category>
		<category><![CDATA[tweaking]]></category>
		<category><![CDATA[windows 2008]]></category>
		<category><![CDATA[windows 2008 r2]]></category>
		<guid isPermaLink="false">http://www.winblogs.net/?p=431</guid>
		<description><![CDATA[Couple days ago, I had to setup a machine for a customer of ours who will host a web site for some Microsoft conference in Croatia. Since, this is the biggest IT conference in Croatia, I really tried to take everything to the next level and tweak the hell out of that machine For stress [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://www.winblogs.net/wp-content/uploads/2011/04/optimize.jpg"><img class="alignleft size-medium wp-image-445" style="margin: 3px;" title="optimize" src="http://www.winblogs.net/wp-content/uploads/2011/04/optimize-300x225.jpg" alt="" width="252" height="191" /></a>Couple days ago, I had to setup a machine for a customer of ours who will host a web site for some Microsoft conference in Croatia. Since, this is the biggest IT conference in Croatia, I really tried to take everything to the next level and tweak the hell out of that machine <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For stress testing, I used Siege with  url.txt file where I saved about 20 links from the web site I was testing, in order to emulate the real world scenario as much as possible.</p>
<p>So, for starters, lets throw out some numbers, to see how the machines copes when the IIS install is out of the box :</p>
<p><code><br />
The test has been run with 150 concurrent users.<br />
Lifting the server siege...      done.                                         Transactions:                    5215 hits<br />
Availability:                 100.00 %<br />
Elapsed time:                  59.83 secs<br />
Data transferred:             472.64 MB<br />
Response time:                  1.69 secs<br />
Transaction rate:              87.16 trans/sec<br />
Throughput:                     7.90 MB/sec<br />
Concurrency:                  147.32<br />
Successful transactions:        5215<br />
Failed transactions:               0<br />
Longest transaction:            5.99<br />
Shortest transaction:           0.25<br />
</code></p>
<p>So, lets take look on the <strong>Longest and Shortest transaction</strong> value &#8211; pretty jumpy, right?</p>
<p>It took the machine to serve the page, in a range of 0.25 to almost 6 seconds? SLOW!</p>
<p><strong>STOP!  Tweaking time <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
<p>One note &#8211; do not run 32 bit apps in 64 application pool &#8211; waste of resources!</p>
<p>Since this is a website which has around 120 requests to the IIS server for loading one page  I have<strong> TURNED OFF</strong> the compression! <strong> </strong></p>
<p><strong>Why?</strong> Simple tradeoff, more bandwidht for less CPU usage. With compression turned on, site had around 1.2 MB ( a lot, I know ), but with compression turned off, site loading time went down for almost 50%, and the site size went for for only 100 KB <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   -  a good trade off in my opinion!</p>
<p>Next -  lets cache this sucker out, I turned on caching for both dynamic and static content, pretty simple setting for a huge improvement!</p>
<p><span style="text-decoration: underline;">Now, lets dive into some more complex tweaking -  .Net and registry tweak.</span></p>
<p>Does the &#8220;word&#8221;  <strong>MaxConcurrentThreadsPerCPU</strong> sound familiar?</p>
<p>Basically, with standard out-of-the-box setting, number of requests per CPU is limited to 12.</p>
<p>By default, this entry doesnt exist in the registry, so we need to add it.</p>
<p><strong>MaxConcurrentRequestsPerCPU</strong> within HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\2.0.50727.0 determines the number of concurrent <strong>requests</strong> per CPU.</p>
<p>Since that value in .NET 4 is already set to 5000, there&#8217;s no need to change that is you run a .NET 4 application, but in my case, I had applications with .NET 2, .NET 3.5 and .NET 4 running on the machine, so I have set the value  <strong>MaxConcurrentRequestsPerCPU</strong> to 0 &#8211; which means unlimited.</p>
<p><strong>Lets do some load stress with the new IIS and .NET setting. Again, we will run Siege with 150 concurrent users.</strong><br />
<code>Lifting the server siege...      done.                                         Transactions:                    8171 hits<br />
Availability:                 100.00 %<br />
Elapsed time:                  59.58 secs<br />
Data transferred:             643,80 MB<br />
Response time:                  0.96 secs<br />
Transaction rate:             137.14 trans/sec<br />
Throughput:                     10.73 MB/sec<br />
Concurrency:                  131.67<br />
Successful transactions:        8171<br />
Failed transactions:               0<br />
Longest transaction:            1.99<br />
Shortest transaction:           0.15<br />
</code></p>
<p>So, as we can see, we had almost<strong> 3000 more transactions</strong>, better transaction rate and load time improved over 3 times (<strong> 0.15 to 1.99 sec </strong>).</p>
<p>But wait, there&#8217;s more, in the next post, we will do some network level tweaking, and see if we can get even more juice from the machine.</p>
<p>&nbsp;</p>
<p><strong>NOTE:  Since I didnt write the applications  and didnt have access to them to review them, I had to optimize the server as much as possible.</strong></p>
<div class="shr-publisher-431"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.winblogs.net/index.php/2011/04/04/tune-up-my-server-mr-admin-aka-improve-iis-77-5-performance-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SpamBots+bad application+SQL server = PROBLEMS!</title>
		<link>http://www.winblogs.net/index.php/2010/10/25/spambotsbad-applicationsql-server-problems/</link>
		<comments>http://www.winblogs.net/index.php/2010/10/25/spambotsbad-applicationsql-server-problems/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 18:45:19 +0000</pubDate>
		<dc:creator>Alesandro Slepčević</dc:creator>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[Windows and Powershell]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows 2008]]></category>
		<category><![CDATA[windows 2008 r2]]></category>
		<guid isPermaLink="false">http://www.winblogs.net/?p=413</guid>
		<description><![CDATA[So&#8230;today I had a very interesting issue. All of a sudden Nagios went red with the message: CRITICAL : &#8211; total: 232.82 Gb &#8211; used: 212.67 Gb (91%) &#8211; free 20.15 Gb (9%) on one of our SQL server. I was like..&#8221;NO! It cannot be. I clearly remember that this machine had over 150 Gb [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>So&#8230;today I had a very interesting issue. All of a sudden Nagios went red with the message: <strong>CRITICAL : &#8211; total: 232.82 Gb &#8211; used: 212.67 Gb (91%) &#8211; free 20.15 Gb (9%)</strong> on one of our SQL server. I was like..&#8221;NO! It cannot be. I clearly remember that this machine had over 150 Gb of free space yesterday!&#8221;</p>
<p>I log in to the machine, and automatically go to the data folder of SQL server thinking that some customer has a HUGE! log file on his database; so, right click &#8211; Select All -&gt; Properties&#8230; only 50 Gbs of data&#8230;hmm&#8230;not here!</p>
<p>At that moment I notice that the server isnt &#8220;jumpy&#8221; as usual, so I start Performance monitor and see that the Avg. Disk Queue is off the chart! <strong> That definatelly isnt right&#8230;</strong></p>
<p>Since that machine is using Windows 2003, theres no too good way to see what application is using so much disk I/O ( beside FileMon ) , I start the FileMon and se that the SQL service is writing HUGE amount of data to its ERRORLOG file.</p>
<p>By navigating to the folder, I see that the ERRORLOG file is over 120 Gb big so opening it in Notepad, Context or some other file was out of the question, since it would kill the machine completely.</p>
<p>So, lets turn to powershell once more. In order to be sure to not kill the machine, since its in production , I have moved the file to an empty machine to opened it there.</p>
<p>Powershell : cat errorlog +ENTER <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  after that powershell started to list the entire content of the file, and it took about 15 mins until it reached the end. AMAZING</p>
<p>By examining the log, I notice ( it was hard to NOT notice it ) litterally millions of these entries:</p>
<p><strong>Could not allocate space for object &#8216;dbo.tblComments&#8217;.'tblComments&#8217; in database &#8216;DATABASEname&#8217; because the &#8216;PRIMARY&#8217; filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.</strong></p>
<p><strong>What happened here? </strong></p>
<p>The site that was using that database is poorly written and was allowing everyone to post comments on the articles without any security check, so it soon reached the size limit set on the database.  By further digging on the issue, I saw that the bots are posting about 4-5 comments each second which comes to about 18000 comments/hour&#8230;multiply that by 15-16 hours it took to fill the error log to that size, we roughly come to 280000 comments&#8230;that&#8217;s A LOT of comments! <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>After disabling the site and sending the email to the customer, situation on the machine looks like this :</p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2010/10/mssql.jpg"><img class="alignleft size-medium wp-image-414" title="mssql" src="http://www.winblogs.net/wp-content/uploads/2010/10/mssql-300x213.jpg" alt="" width="300" height="213" /></a></p>
<p><strong>The big drop on the green line is the moment where I disabled the problematic web site.</strong></p>
<div class="shr-publisher-413"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.winblogs.net/index.php/2010/10/25/spambotsbad-applicationsql-server-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using compression on IIS servers?  Yes or no?</title>
		<link>http://www.winblogs.net/index.php/2010/10/08/using-compression-on-iis-servers-yes-or-no/</link>
		<comments>http://www.winblogs.net/index.php/2010/10/08/using-compression-on-iis-servers-yes-or-no/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 13:29:56 +0000</pubDate>
		<dc:creator>Alesandro Slepčević</dc:creator>
				<category><![CDATA[IIS server]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Windows and Powershell]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[iis 6 compression]]></category>
		<category><![CDATA[iis 7 compression]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[server setup]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows 2008]]></category>
		<category><![CDATA[windows 2008 r2]]></category>
		<guid isPermaLink="false">http://www.winblogs.net/?p=349</guid>
		<description><![CDATA[Well&#8230;in the very beginning, my answer is pretty much simple : yes AND no!  Why you ask?  Just keep reading&#8230; Compression, regardless if its the compression of static or dynamic content is using CPU &#8211; that is a fact we can all agree upon. Lets say compression is a tradeoff &#8211; CPU for bandwidth..use more [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://www.winblogs.net/wp-content/uploads/2010/10/compression.jpg"><img class="alignleft size-thumbnail wp-image-356" style="margin: 3px; border: 0pt none;" title="compression" src="http://www.winblogs.net/wp-content/uploads/2010/10/compression-150x150.jpg" alt="" width="100" height="100" /></a><strong></strong></p>
<p><strong>Well&#8230;in the very beginning, my answer is pretty much simple : yes AND no!  Why you ask?  Just keep reading&#8230;</strong></p>
<p>Compression, regardless if its the compression of static or dynamic content is using CPU &#8211; that is a fact we can all agree upon. <strong></strong></p>
<p><strong>Lets say compression is a tradeoff &#8211; CPU for bandwidth..use more cpu to &#8220;burn&#8221; less bandwidth.</strong></p>
<p><strong>The big question here is how to decide if you will benefit from turning on compression or not.</strong></p>
<p>Most of us have &#8220;multi-purpose&#8221; servers which run various roles at the same time ( database server ( MYSQL , MSSQL, etc&#8230;) , mail server, web server, etc.. and all of those services are spending a certain amount of CPU time.</p>
<p>By turning on the compression, you will automatically &#8220;lose&#8221; some CPU time which could have been used for faster execution of some database queries i.e&#8230;<span id="more-349"></span></p>
<p>This is the key problem in our case. Is your machine powerfull enough to handle all the services it is already running + compression? Because in the end, you could end up with an even slower server!!!</p>
<p>If you have a small server ( 1 x quad core cpu, 4-8 gb ram ) which is under heavy or moderate load and you want your applications to be &#8220;jumpy&#8221; ( i.e : fast editing of some articles in your favourite CMS system ),  or you have lots of queries on your database service: DONT use compression, save your CPU time.  If you have some CPU time to spare,  turn on compression of static content which doesn&#8217;t change a lot or only needs to be downloaded every once in a while ( browser cache expires )</p>
<p>In case you have a big machine ( 2x quad core nehalems, 24 gb ram, 4x enterprise level hdd&#8217;s with hw raid controller, etc&#8230;)  and you have CPU time to spare, by all means, turn on the compression of both static and dynamic content. You will notice great improvements on your bandwidth costs <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In my experience, the biggest bottleneck on 99% of the server is the disk system. Ofcourse, in my case we are talking about some small RAIDs with 4-8 disks.</p>
<p><strong>Great example of that case are these two pictures:</strong></p>
<p>CPU usage on a 2xQUAD core server with 16 gb of RAM.</p>
<p style="text-align: center;"><a href="http://www.winblogs.net/wp-content/uploads/2010/10/cpu-day.png"><img class="size-medium wp-image-350 aligncenter" title="cpu-day" src="http://www.winblogs.net/wp-content/uploads/2010/10/cpu-day-300x81.png" alt="" width="300" height="81" /></a></p>
<p>As we can see, the server peaks out at 28% of cpu usage, which means it has lots of CPU time to spare for compression.</p>
<p>However, lets have a look at its disk system:</p>
<p style="text-align: center;"><a href="http://www.winblogs.net/wp-content/uploads/2010/10/hdd.png"><img class="size-medium wp-image-351 aligncenter" title="hdd" src="http://www.winblogs.net/wp-content/uploads/2010/10/hdd-300x124.png" alt="" width="300" height="124" /></a></p>
<p>As we can see on the graph, average DISK FREE TIME is 64%, which is a bit low for my personal taste. I would be much more comfortable that this number is around 70 -75% .</p>
<p>This machine would definatelly benefit from turning on compression, since it has lots of CPU time to spare.</p>
<p><strong>But I own a small server&#8230;is there any hope for me???</strong></p>
<p><strong>NEVER FEAR IIS 7 IS HERE!!!</strong></p>
<p>One great feature in IIS 7 and IIS 7.5 is that it  offers CPU roll-off function.  When CPU usage goes   above certain level you set,  IIS server will stop compression and when usage  drops below the level you have set up, it will start compressing content again.  This function is  controlled by the staticCompressionEnableCpuUsage and  dynamicCompressionDisableCpuUsage attributes.</p>
<p>For the owners of smaller machines, this function is just AWESOME! It will save you from unpleasant suprises like getting a call at 2-3 AM with a complaint that the SQL server is very sloooow.</p>
<p>In the end; you be the judge. Will you turn on compression on your server or not? Let me know&#8230;</p>
<div class="shr-publisher-349"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.winblogs.net/index.php/2010/10/08/using-compression-on-iis-servers-yes-or-no/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setuping a server for web hosting – part 4: Installing PHP</title>
		<link>http://www.winblogs.net/index.php/2010/04/14/setuping-a-server-for-web-hosting-part-4-installing-php/</link>
		<comments>http://www.winblogs.net/index.php/2010/04/14/setuping-a-server-for-web-hosting-part-4-installing-php/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 03:17:05 +0000</pubDate>
		<dc:creator>Alesandro Slepčević</dc:creator>
				<category><![CDATA[IIS server]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Windows and Powershell]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[fopen]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[installing php]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[register globals]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[server setup]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[video tutorial]]></category>
		<category><![CDATA[web platform installer]]></category>
		<category><![CDATA[windows 2008]]></category>
		<guid isPermaLink="false">http://www.winblogs.net/?p=280</guid>
		<description><![CDATA[Hello after a very long pause . Continuing the &#8220;Setuping a server for web hosting&#8221; series with the new smashing video of how to install PHP on your machine! AWESOME right? In the very begining of the post, lets learn what PHP is exactly. So, Wikipedia says ( and I add that I agree with [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Hello after a very long pause <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . Continuing the &#8220;Setuping a server for web hosting&#8221; series with the new smashing video of how to install PHP on your machine! AWESOME right? <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In the very begining of the post, lets learn what PHP is exactly.</p>
<p>So, Wikipedia says ( and I add that I agree with her <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  :</p>
<p><strong>PHP: Hypertext Preprocessor</strong> is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into  the HTML source document and interpreted by a web  server with a PHP processor module, which generates the web page document. As a general-purpose programming language, PHP code is  processed by an interpreter application in command-line mode performing desired operating  system operations and producing program output on its standard output  channel. It may also function as a graphical application. PHP is  available as a processor for most modern web servers and as standalone  interpreter on most operating systems and computing platforms.<br />
<span id="more-280"></span><br />
PHP was originally created by Rasmus Lerdorf in 1995 and has been in continuous development ever since. The main  implementation of PHP is now produced by The PHP Group and serves as the  <em>de facto</em><a title="De  facto standard" href="http://en.wikipedia.org/wiki/De_facto_standard"> standard</a> for PHP as there is no formal specification.PHP is free software released under the PHP  License.</p>
<p>So, now when we know what PHP is, lets check the basic PHP syntax:</p>
<ul><code> </code></p>
<pre>&lt;?php
    echo "Hello World";
   /* echo("Hello World"); works as well, although echo isn't a
    function (it's a language construct). In some cases, such
    as when multiple parameters are passed to echo, parameters
    cannot be enclosed in parentheses */
?&gt;</pre>
</ul>
<p>You can find out more about the PHP project on <a href="http://www.http://php.net/">www.php.net</a>.</p>
<p>In this case, I will use Windows Web Platform Installer to install PHP on my machine. By going on <a href="http://www.microsoft.com/WEB/platform/phponwindows.aspx">this link</a> you can use the installer to install PHP on your machine (same link is also used in the video).</p>
<p>Check out the video ( dont forget to put it in full screen mode <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  :</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="505" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/WT0ymPhxWOU&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;hd=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="505" src="http://www.youtube.com/v/WT0ymPhxWOU&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>So, now when you&#8217;re all full of excitement and thinking &#8220;LOL, installing PHP is extra easy, everyone could do it&#8221; &#8230;.NAH!!! and the host says: You lost <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>First, lets check it the PHP is working at all on our server. Yes, we could use the above stated syntax, but that just isnt fun <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . To get some detailed info on our PHP lets use this command:</p>
<ul>
<pre>&lt;?php phpinfo(); ?&gt;</pre>
</ul>
<p>Lets navigate to c:\inetpub\wwwroot\ and create a file called &#8220;phptest.php&#8221; . We will do that by clicking with the right mouse click , New &#8211; Text Document.  We will call it phptest.php.</p>
<p>Inside the document we will paste the above piece of code, save it and hold your fingers <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>Point your browser to your server address, and to the phptest.php file.</p>
<p>If everything went smoothly you should see a page like this:</p>
<p style="text-align: center;"><a href="http://www.winblogs.net/wp-content/uploads/2010/04/php.jpg"><img class="size-medium wp-image-307 aligncenter" style="margin-top: 2px; margin-bottom: 2px; border: 0pt none;" title="php" src="http://www.winblogs.net/wp-content/uploads/2010/04/php-214x300.jpg" alt="" width="214" height="300" /></a></p>
<p style="text-align: center;">
<p>If you see the page that means that the PHP on our server is working properly.</p>
<p>Now, lets have some fun with security issues in PHP.</p>
<p>First of all, we have to check the php.ini file which is located in C:\Program Files (x86)\PHP\php.ini  . Lets open it with Notepad.</p>
<p>Most of the option are explained in the file itself, so we will skip  them. Focus will be only on the most important ones.</p>
<p>One of the interesting lines is this :</p>
<ul> <strong>; &#8211; magic_quotes_gpc = Off         [Performance]<br />
</strong></ul>
<p>As we can see, that option is commented out and DISABLED, and its best to leave it like that since its been deprecated in PHP 5.3.X .</p>
<p>Second option is:</p>
<ul><strong>register_globals</strong> = Off -</ul>
<p><strong>LEAVE THAT TURNED OFF</strong>. If you have clients who have ancient applications, tell them to rewrite them <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .  More about the discussion on using register globals can be found on this <a href="http://www.php.net/manual/en/security.globals.php">link</a></p>
<p>Third one that should be disabled is :</p>
<ul>allow_url_fopen = On</ul>
<p>Standard setting in the instllation is &#8220;On&#8221;, which is bad and wrong for many reasons <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . This setting should be turned of because of cross site scripting and security holes in lots of CMS/Forum scripts. When fopen is turned on, a potential attacker has an oportunity to use some security hole in your application to include his own file and gain access over your entire account. I really think you dont want that <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>But, never fear , alternative is here <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .Tell your customers or yourself to use <strong>curl </strong>for fetching remote content.</p>
<p>Standard<strong> fopen</strong> function should be replaced with a curl function :</p>
<p><strong>Fopen function</strong></p>
<ul>
<pre><code>    &lt;?
    $result = fopen($url,r);
    ?&gt;
</code></pre>
</ul>
<p><strong>Curl function</strong></p>
<ul>
<pre><code>&lt;?
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
$result = curl_exec($ch);
curl_close($ch);
?&gt;
</code></pre>
</ul>
<p>Next very important setting is :</p>
<ul>disable_functions =</ul>
<p>By standard, its empty&#8230;</p>
<p>Here are some of the most common functions to be disabled : <strong>system, exec, shell_exec, passthru, set_time_limit, error_log,  ini_alter, dl, pfsockopen, openlog, syslog, readlink, symlink, link,  leak, fsockopen, popen, escapeshellcmd, apache_child_terminate  apache_get_modules, apache_get_version, apache_getenv,  apache_note,apache_setenv,virtual </strong></p>
<p><strong>Google a bit to find what these functions do, but for an example, I would disable the &#8220;exec&#8221; command ( among others) , but you find out why <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </strong><br />
<span style="font-size: x-small;"><em>( hint : net user /add useraccountname mypassword )<br />
</em></span></p>
<p>When you&#8217;re done setting the <strong>php.ini</strong> file, all you need to do is restart IIS server and thats it.</p>
<p>Next step is to install some PHP based application and admire your work.</p>
<p>Ofcourse, this is a very fast tutorial on installing PHP . <strong>Configuration of it is the trickiest part and you should use the official php site and google to help you with it!</strong></p>
<p>Cheers, Alesandro<strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 2453px; width: 1px; height: 1px; overflow: hidden;"><strong>system, exec, shell_exec, passthru, set_time_limit, error_log,  ini_alter, dl, pfsockopen, openlog, syslog, readlink, symlink, link,  leak, fsockopen, popen, escapeshellcmd, apache_child_terminate  apache_get_modules, apache_get_version, apache_getenv,  apache_note,apache_setenv,virtual </strong></div>
<div class="shr-publisher-280"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.winblogs.net/index.php/2010/04/14/setuping-a-server-for-web-hosting-part-4-installing-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Don’t run production ASP.NET Applications with debug=true</title>
		<link>http://www.winblogs.net/index.php/2009/11/29/dont-run-production-asp-net-applications-with-debug-true/</link>
		<comments>http://www.winblogs.net/index.php/2009/11/29/dont-run-production-asp-net-applications-with-debug-true/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 01:02:42 +0000</pubDate>
		<dc:creator>Alesandro Slepčević</dc:creator>
				<category><![CDATA[IIS server]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Windows and Powershell]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[debug on or off]]></category>
		<category><![CDATA[debug=true]]></category>
		<category><![CDATA[DotNetPanel]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows 2008]]></category>
		<category><![CDATA[windows 2008 r2]]></category>
		<guid isPermaLink="false">http://www.winblogs.net/?p=260</guid>
		<description><![CDATA[Found an awesome post on DotNetPanel blog so I had to repost it One of the things you want to avoid when deploying an ASP.NET application into production is to accidentally (or deliberately) leave the &#60;compilation debug=”true”/&#62; switch on within the application’s web.config file. Doing so causes a number of non-optimal things to happen including: [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Found an awesome post on DotNetPanel blog so I had to repost it <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>One of the things you want to avoid when deploying an ASP.NET application into production is to accidentally (or deliberately) leave the<strong> &lt;compilation debug=”true”/&gt;</strong> switch on within the application’s web.config file.</p>
<p>Doing so causes a number of non-optimal things to happen including:</p>
<p>1) The compilation of ASP.NET pages takes longer (since some batch optimizations are disabled)</p>
<p>2) Code can execute slower (since some additional debug paths are enabled)</p>
<p>3) Much more memory is used within the application at runtime</p>
<p>4) Scripts and images downloaded from the WebResources.axd handler are not cached</p>
<p>This last point is particularly important, since it means that all client-javascript libraries and static images that are deployed via <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/webresource.asp">WebResources.axd</a> will be continually downloaded by clients on each page view request and not cached locally within the browser.  This can slow down the user experience quite a bit for things like Atlas, controls like TreeView/Menu/Validators, and any other third-party control or custom code that deploys client resources.  Note that the reason why these resources are not cached when debug is set to true is so that developers don’t have to continually flush their browser cache and restart it every-time they make a change to a resource handler (our assumption is that when you have debug=true set you are in active development on your site).</p>
<p>When <strong>&lt;compilation debug=”false”/&gt;</strong> is set, the WebResource.axd handler will automatically set a long cache policy on resources retrieved via it – so that the resource is only downloaded once to the client and cached there forever (it will also be cached on any intermediate proxy servers).  If you have Atlas installed for your application, it will also automatically compress the content from the WebResources.axd handler for you when &lt;compilation debug=”false”/&gt; is set – reducing the size of any client-script javascript library or static resource for you (and not requiring you to write any custom code or configure anything within IIS to get it).</p>
<p><strong>What about binaries compiled with debug symbols?</strong></p>
<p>One scenario that several people find very useful is to compile/pre-compile an application or associated class libraries with debug symbols so that more detailed stack trace and line error messages can be retrieved from it when errors occur.</p>
<p>The good news is that you can do this without having the have the &lt;compilation debug=”true”/&gt; switch enabled in production.  Specifically, you can use either a web deployment project or a web application project to pre-compile the code for your site with debug symbols, and then change the &lt;compilation debug=”true”/&gt; switch to false right before you deploy the application on the server.</p>
<p>The debug symbols and metadata in the compiled assemblies will increase the memory footprint of the application, but this can sometimes be an ok trade-off for more detailed error messages.</p>
<p><strong>The &lt;deployment retail=”true”/&gt; Switch in Maching.config</strong></p>
<p>If you are a server administrator and want to ensure that no one accidentally deploys an ASP.NET application in production with the &lt;compilation debug=”true”/&gt; switch enabled within the application’s web.config file, one trick you can use with ASP.NET V2.0 is to take advantage of the &lt;deployment&gt; section within your machine.config file.</p>
<p>Specifically, by setting this within your machine.config file:</p>
<p>&lt;configuration&gt;</p>
<p>&lt;system.web&gt;</p>
<p>&lt;deployment retail=”true”/&gt;</p>
<p>&lt;/system.web&gt;</p>
<p>&lt;/configuration&gt;</p>
<p>You will disable the<strong> &lt;compilation debug=”true”/</strong>&gt; switch, disable the ability to output trace output in a page, and turn off the ability to show detailed error messages remotely.  Note that these last two items are security best practices you really want to follow (otherwise hackers can learn a lot more about the internals of your application than you should show them).</p>
<p>Setting this switch to true is probably a best practice that any company with formal production servers should follow to ensure that an application always runs with the best possible performance and no security information leakages.  There isn’t a ton of documentation on this switch – but you can learn a little more about it <a href="http://msdn2.microsoft.com/en-US/library/ms228298%28VS.80%29.aspx">here</a>.</p>
<p>So, dear developers, keep on eye on debug state&#8230;it will make you and the server happier <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>ALL CREDITS OF THIS TEXT GO TO DOTNETPANEL BLOG!</strong></p>
<p><strong>Source : <a href="http://forum.dotnetpanel.com/blogs/dan/archive/2008/09/10/don-t-run-production-asp-net-applications-with-debug-true-enabled.aspx" target="_blank">DotNetPanel Blog</a></strong></p>
<div class="shr-publisher-260"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.winblogs.net/index.php/2009/11/29/dont-run-production-asp-net-applications-with-debug-true/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automating backup of databases in SQL Express.</title>
		<link>http://www.winblogs.net/index.php/2009/11/22/automating-backup-of-databases-in-sql-20052008-express/</link>
		<comments>http://www.winblogs.net/index.php/2009/11/22/automating-backup-of-databases-in-sql-20052008-express/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 15:45:29 +0000</pubDate>
		<dc:creator>Alesandro Slepčević</dc:creator>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[Windows and Powershell]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[backup sql database]]></category>
		<category><![CDATA[backup sql express database]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[sql express]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows 2008]]></category>
		<category><![CDATA[windows 2008 r2]]></category>
		<guid isPermaLink="false">http://www.winblogs.net/?p=224</guid>
		<description><![CDATA[Microsoft SQL Server 2005/2008 Express is a free edition of SQL Server that is ideal for learning, developing and powering desktop, web and small server applications, and for redistribution by ISVs. Top Features Supports stored procedures, triggers, functions, and views Store all kinds of business data with native support for relational data, XML, FILESTREAM and spatial [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://www.winblogs.net/wp-content/uploads/2009/11/mssql-logo.jpg"><img class="alignleft size-full wp-image-253" style="margin: 5px;" title="mssql-logo" src="http://www.winblogs.net/wp-content/uploads/2009/11/mssql-logo.jpg" alt="mssql-logo" width="122" height="73" /></a>Microsoft SQL Server 2005/2008 Express is a free edition of SQL Server that is ideal for learning, developing and powering desktop, web and small server applications, and for redistribution by ISVs.</p>
<h3>Top Features</h3>
<div>
<ul>
<li>Supports stored procedures, triggers, functions, and views</li>
<li>Store all kinds of business data with native support for relational data, XML, FILESTREAM and spatial data</li>
<li>Improved performance, usability, visualization, in addition to integration with the Microsoft 2007 Office System in SQL Server Reporting Services</li>
<li>Simplify development efforts by leveraging existing T-SQL skills, ADO.NET Entity Framework and LINQ</li>
<li>Closely integrated with Visual Studio and Visual Web Developer</li>
</ul>
<p>Because there&#8217;s no &#8220;SQL Agent&#8221; in SQL Express Editions, in order to create scheduled backups on SQL server Express edition, we need to user couple of tricks  <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
<div><span id="more-224"></span></div>
<div>First, we need to have a query that will backup all databases to one folder&#8230; Well, here it is <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
<p><code><br />
DECLARE @name VARCHAR(50) -- database name<br />
DECLARE @path VARCHAR(256) -- path for backup files<br />
DECLARE @fileName VARCHAR(256) -- filename for backup<br />
DECLARE @fileDate VARCHAR(20) -- used for file name<br />
SET @path = 'E:\sqlbackups\' --path to the backup folder<br />
SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)<br />
DECLARE db_cursor CURSOR FOR<br />
SELECT name<br />
FROM master.dbo.sysdatabases<br />
WHERE name NOT IN ('tempdb')<br />
OPEN db_cursor<br />
FETCH NEXT FROM db_cursor INTO @name<br />
WHILE @@FETCH_STATUS = 0<br />
BEGIN<br />
SET @fileName = @path + @name + '_' + @fileDate + '.BAK'<br />
BACKUP DATABASE @name TO DISK = @fileName<br />
FETCH NEXT FROM db_cursor INTO @name<br />
END<br />
CLOSE db_cursor<br />
DEALLOCATE db_cursor</code></p>
<p>This will backup everything except the &#8220;Temdb&#8221; database. So, lets take a look at the current state of our backup folder.</p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/11/sqlbackup1.PNG"><img class="aligncenter size-medium wp-image-230" title="sqlbackup1" src="http://www.winblogs.net/wp-content/uploads/2009/11/sqlbackup1-300x99.PNG" alt="sqlbackup1" width="300" height="99" /></a></p>
<p>As we can see, only the backups from 21.11.2009 exist. So, what happens when we run the query using SQL Management Studio.</p>
<p>Here&#8217;s the query pasted in &#8220;New query window&#8221;.</p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/11/sqlquery.PNG"><img class="aligncenter size-medium wp-image-232" title="sqlquery" src="http://www.winblogs.net/wp-content/uploads/2009/11/sqlquery-300x288.PNG" alt="sqlquery" width="300" height="288" /></a>Sooo&#8230;if everything went smoothly, we should get a message similar to this one :</p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/11/sqlquery2.PNG"><img class="aligncenter size-medium wp-image-233" title="sqlquery2" src="http://www.winblogs.net/wp-content/uploads/2009/11/sqlquery2-300x141.PNG" alt="sqlquery2" width="300" height="141" /></a>Awesome! <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Now, lets take a look at our backup folder, are there any changes? Sure hope there is, because this post will totally suck if the backup didn&#8217;t complete <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/11/sqlbackup2.PNG"><img class="aligncenter size-medium wp-image-234" title="sqlbackup2" src="http://www.winblogs.net/wp-content/uploads/2009/11/sqlbackup2-300x132.PNG" alt="sqlbackup2" width="300" height="132" /></a></p>
<p>As we can see, this post will not suck after all <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Notice the new files, created on the 22.11.2009 . IT WORKS! <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  All we have to do now is to automate the backup, so we don&#8217;t have to run the query everyday by hand.</p>
<p>We will do that using Task Scheduler (or Scheduled tasks in Windows 2003). We have to add a task to execute everyday in 3 AM.</p>
<p>The command we have to run is:</p>
<p>&#8220;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\SQLCMD.EXE&#8221; -i &#8220;c:\pathtosqlquery\sqlbackup.sql&#8221;</p>
<p>Where &#8220;sqlbackup.sql&#8221; is the name of the file you have pasted the code mentioned before.</p>
<p>Here are a couple of pictures so you can see how to do it:</p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/11/schedule.PNG"><img class="aligncenter size-medium wp-image-235" title="schedule" src="http://www.winblogs.net/wp-content/uploads/2009/11/schedule-300x177.PNG" alt="schedule" width="300" height="177" /></a></p>
<p>Now, click on &#8220;Create task&#8221;. That will click will start the task wizard. Enter the name of the task ( i.e &#8220;SQL Backups&#8221;.</p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/11/task1.PNG"><img class="aligncenter size-medium wp-image-237" title="task1" src="http://www.winblogs.net/wp-content/uploads/2009/11/task1-300x223.PNG" alt="task1" width="300" height="223" /></a>After entering the name and choosing the option &#8220;Run wheneter user is logged on or not&#8221;, click on &#8220;Triggers&#8221;.</p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/11/TASK2.PNG"><img class="aligncenter size-medium wp-image-238" title="TASK2" src="http://www.winblogs.net/wp-content/uploads/2009/11/TASK2-300x224.PNG" alt="TASK2" width="300" height="224" /></a></p>
<p>Click on &#8220;New&#8221;. It will bring up a new window</p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/11/TASK3.PNG"><img class="aligncenter size-medium wp-image-240" title="TASK3" src="http://www.winblogs.net/wp-content/uploads/2009/11/TASK3-300x256.PNG" alt="TASK3" width="300" height="256" /></a>Choose the &#8220;Daily&#8221; option, and set the time when you want the task to run. I have set it to 3 AM .</p>
<p><strong>ONE IMPORTANT THING!!! Dont forget to check the &#8220;Enable&#8221; checkbox <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  , otherwise, you will end up scratching your head and cursing Microsoft and uncle Bill <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  hehe.</strong></p>
<p>After that, click on &#8220;Actions&#8221;, where we will define the program that should be runned&#8230; Click on &#8220;New&#8221;&#8230;</p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/11/TASK4.PNG"><img class="aligncenter size-medium wp-image-241" title="TASK4" src="http://www.winblogs.net/wp-content/uploads/2009/11/TASK4-300x234.PNG" alt="TASK4" width="300" height="234" /></a></p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/11/TASK5.PNG"><img class="aligncenter size-medium wp-image-242" title="TASK5" src="http://www.winblogs.net/wp-content/uploads/2009/11/TASK5-276x300.PNG" alt="TASK5" width="276" height="300" /></a>Paste this into the &#8220;Program/Script&#8221; box.</p>
<p><code>“C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\SQLCMD.EXE”</code></p>
<p><strong>NOTE! &#8211; path to the &#8220;SQLCMD.exe&#8221; may be different on your system!!!</strong></p>
<p>All that is left to do is to &#8220;Add arguments&#8221;</p>
<p><code>-i “c:\pathtosqlqueryfile\sqlbackup.sql” </code></p>
<p>Click on &#8220;OK&#8221;, enter the system password and thats it. Enjoy your daily backup.</p>
<p><strong>HINT!!!! If you&#8217;re lazy like I am, you can use a powershell script to delete backup files older than X days. I have also covered that with a blog post. More info about that on this <a href="http://www.winblogs.net/index.php/2009/10/01/delete-files-older-from-in-powershell/">link</a>.</strong></p>
<p>Bye bye! <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="shr-publisher-224"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.winblogs.net/index.php/2009/11/22/automating-backup-of-databases-in-sql-20052008-express/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setuping a server for web hosting &#8211; part 2: Installing SQL 2008 Express</title>
		<link>http://www.winblogs.net/index.php/2009/10/24/setuping-a-server-for-web-hosting-part-2-installing-sql-2008-express/</link>
		<comments>http://www.winblogs.net/index.php/2009/10/24/setuping-a-server-for-web-hosting-part-2-installing-sql-2008-express/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 03:19:23 +0000</pubDate>
		<dc:creator>Alesandro Slepčević</dc:creator>
				<category><![CDATA[Windows and Powershell]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[installing mssql]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[server setup]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[video tutorial]]></category>
		<category><![CDATA[web platform installer]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows 2008]]></category>
		<category><![CDATA[windows 2008 r2]]></category>
		<guid isPermaLink="false">http://www.winblogs.net/?p=185</guid>
		<description><![CDATA[Hello there&#8230; In order to  install SQL 2008 Express, we have to download it first . Fire up your favorite browser and point it to http://www.microsoft.com/express/download/ . After that, find the box with the SQL 2008 Express, and click download. On the next step you have the option to register with Microsoft or download the [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Hello there&#8230;</p>
<p>In order to  install SQL 2008 Express, we have to download it first . Fire up your favorite browser and point it to<a href="http://www.microsoft.com/express/download/"> http://www.microsoft.com/express/download/</a> . After that, find the box with the SQL 2008 Express, and click download.</p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/10/sqlexpress.PNG"><img class="aligncenter size-full wp-image-186" title="sqlexpress" src="http://www.winblogs.net/wp-content/uploads/2009/10/sqlexpress.PNG" alt="sqlexpress" width="369" height="232" /></a></p>
<p>On the next step you have the option to register with Microsoft or download the software without registration.  I will choose the &#8220;no registration part&#8221;.</p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/10/sqlexpressdownloadpage.PNG"><img class="aligncenter size-full wp-image-188" title="sqlexpressdownloadpage" src="http://www.winblogs.net/wp-content/uploads/2009/10/sqlexpressdownloadpage.PNG" alt="sqlexpressdownloadpage" width="471" height="160" /></a></p>
<p>In the new window, choose the version you would like to install. Personally, I will choose &#8220;<strong>Runtime with advanced services</strong>&#8220;. By clicking on install, Microsoft will ask to install the <strong>Microsoft Web Platform installer</strong>. If you dont have it installed, click on the picture to install it.</p>
<p><a href="http://www.winblogs.net/wp-content/uploads/2009/10/webplatforminstaller.PNG"><img class="aligncenter size-full wp-image-187" title="webplatforminstaller" src="http://www.winblogs.net/wp-content/uploads/2009/10/webplatforminstaller.PNG" alt="webplatforminstaller" width="199" height="54" /></a></p>
<p>Choose<strong> &#8220;Run&#8221;</strong>, and after the download, again, choose<strong> &#8220;Run</strong>&#8220;. Wait for the installtion to finish and look at the top of the browser, a little bar will pop up and ask us if we want to run Active X control.  <strong>Make sure the publisher is &#8220;Microsoft Corporation&#8221;</strong>. Click on &#8220;<strong>Run</strong>&#8220;, and then on<strong> Allow</strong>.</p>
<p>Now, look at the video of the installation I have made for you. The video will show you the process of installing<strong> SQL Server 2008 Express.</strong></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/lWUjAG8Ab7I&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/lWUjAG8Ab7I&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>After that, all you need to do is run the <strong>&#8220;SQL Server Configuration Manager</strong>&#8221; under<strong> &#8220;Configuration Tools&#8221;</strong> and configure it the way you want it.</p>
<p>BTW, the track used is <span id="now-playing-info"><strong>La Noche</strong> by Coca &amp; Villa .IT&#8217;s AWESOME!!!</span></p>
<p><span>Have fun&#8230;bye!<br />
</span></p>
<div class="shr-publisher-185"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.winblogs.net/index.php/2009/10/24/setuping-a-server-for-web-hosting-part-2-installing-sql-2008-express/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powershell cheat sheet :)</title>
		<link>http://www.winblogs.net/index.php/2009/10/20/powershell-cheat-sheet/</link>
		<comments>http://www.winblogs.net/index.php/2009/10/20/powershell-cheat-sheet/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 00:55:56 +0000</pubDate>
		<dc:creator>Alesandro Slepčević</dc:creator>
				<category><![CDATA[Windows and Powershell]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[cheat sheet]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[Poweshell]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows 2008]]></category>
		<category><![CDATA[windows 2008 r2]]></category>
		<guid isPermaLink="false">http://www.winblogs.net/?p=147</guid>
		<description><![CDATA[Surfing all over the net, I found a very handy powershell cheat sheet that was put together by Ben Pearce. Anyways, here&#8217;s the download link (just click on the picture). Big hello to the guys from www.bug.hr]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Surfing all over the net, I found a very handy powershell cheat sheet that was put together by Ben Pearce. Anyways, here&#8217;s the download link (just click on the picture).</p>
<p style="text-align: center;"><a href="http://www.winblogs.net/Powershell_Cheat_Sheet.pdf"><img class="size-medium wp-image-150 aligncenter" title="cheatsheet" src="http://www.winblogs.net/wp-content/uploads/2009/10/cheatsheet-211x300.PNG" alt="cheatsheet" width="211" height="300" /></a></p>
<p>Big hello to the guys from <a href="http://www.bug.hr">www.bug.hr</a> <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="shr-publisher-147"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.winblogs.net/index.php/2009/10/20/powershell-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Add new ip or ip range to firewall rule using Powershell</title>
		<link>http://www.winblogs.net/index.php/2009/10/14/add-new-ip-or-ip-range-to-firewall-rule-using-powershell/</link>
		<comments>http://www.winblogs.net/index.php/2009/10/14/add-new-ip-or-ip-range-to-firewall-rule-using-powershell/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 19:34:10 +0000</pubDate>
		<dc:creator>Alesandro Slepčević</dc:creator>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[Windows and Powershell]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[Poweshell]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows 2008]]></category>
		<category><![CDATA[windows 2008 r2]]></category>
		<guid isPermaLink="false">http://www.winblogs.net/?p=91</guid>
		<description><![CDATA[Tired of old point and click interface? Powershell is the new purple in computer world haha&#8230;Seriously! So, here&#8217;s a little script that will add the Ip address you want to the existing firewall rule. As you can see, it fairly simple, and there&#8217;s no need to explain it too much&#8230;. Function IP { param ($ipadress [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://www.winblogs.net/wp-content/uploads/2009/10/firewalljpg.jpg"><img class="alignleft size-full wp-image-210" title="firewalljpg" src="http://www.winblogs.net/wp-content/uploads/2009/10/firewalljpg.jpg" alt="firewalljpg" width="126" height="126" /></a></p>
<p>Tired of old point and click interface? <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Powershell is the new purple in computer world <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  haha&#8230;Seriously! <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So, here&#8217;s a little script that will add the Ip address you want to the existing firewall rule.</p>
<p>As you can see, it fairly simple, and there&#8217;s no need to explain it too much&#8230;.</p>
<p><code><br />
Function IP<br />
{<br />
param ($ipadress = $(Read-host "Enter IP address"))<br />
$rule = "YOUR PREVIOUSLY CREATED RULE NAME"<br />
Write-host "Adding address :" $ipadress -foregroundcolor "Red"<br />
Start-sleep -s 5<br />
netsh advfirewall firewall set rule name="$rule" new remoteip="$ipadress" action="allow"<br />
}<br />
IP<br />
</code></p>
<p>Only thing you have to do in the script is to enter your fireall rule name.</p>
<p>When you start the script, it  will ask you to enter desired ip address, and press enter. After that, wait 5 seconds and thats it <img src='http://www.winblogs.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Cheers!</p>
<div class="shr-publisher-91"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.winblogs.net/index.php/2009/10/14/add-new-ip-or-ip-range-to-firewall-rule-using-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

