Categories
Babbling How To Windows

Becoming administrator of my own machine !!

I know, it sounds strange. But it is fact that when we install Windows 7 or Vista (say any non-server post XP OS ?), and even if select ourselves as local administrator we actually don’t become administrator !! And due to that even if you disable that notorious UAC notifications you will still sometimes need to run apps as admin by right click and say “Run as Administrator”.

Enable_Admin_2Now, it is really annoying and I feel helpless that even though MSFT says I own my system, I still not own it ?? When I says I want to be an administrator that means I want to be an administrator, and I don’t have to run any stupid program with elevated privileges by right clicking on it.

Ofcourse being a Linux user I am sort of habituated with these annoyance of Administrator and Power user. And I truly believe that sometimes they are very useful to have specially for users who don’t know much about computers and have administrator rights to screw system up (well, even if they don’t have admin rights they still screw system up, but that is another subject of conversation Open-mouthed smile)

One of my favorite “How To” site, has posted a way to enable real Administrator account in Windows 7 and I am sure it is not recommended for general user, but for power users it is really useful.

Categories
How To Windows

Removing Favorite, HomeGroup and Libraries from Explorer in Windows 7

I like Windows 7. No doubt that it is better than Windows Vista at few aspects (but still XP was the best Smile, I really miss search of XP). With new UI, Windows 7 has add new options in Windows Explorer like Favorites, HomeGroup and Libraries. But I personally believe that they are just a noise, I prefer more simpler view.

So after Googling, I found that I am not the first to dislike this UI. And there are literally number of posts about how to remove those options from Explorer. I am just consolidating methods that worked for me.

Note: Editing registry can make system unstable, so do take backup before modifying registry entries. Easiest way will be to backup select File –> Export from menu. Alternatively, you can choose to export only entry which you will modify.

Categories
Babbling Me SQL Server Virtualization Windows

Side effects of User Account Control (UAC) of Windows 7

When I used it for first time I thought that UAC was really annoying feature of Windows Vista. I mean for each and every app it was required me to confirm, if I wanted to perform some task which required access to core system. It was more like low level mimic of Linux. But after using Vista for about 2 years (yesssssss … I did used Vista that long, poor me Don't tell anyone smile) I was sort of used to of this feature. So when I upgraded to Windows 7 (tell me who didn’t upgraded from Vista to 7, except old XP users ??) I enabled UAC in it as well.

But I think I am going to fed up of this really dumb feature. Well, the feature itself is not bad its just it is not just at par with its counter part of Linux. And biggest annoyance is if you run some application and it failed to run due to UAC, Windows just don’t say it. Instead of this you will get all sort weird errors.

Categories
Apache How To Tips Windows

Change default port in Apache

This quick post is about changing default port in Apache. Say if you wanted to work with IIS and Apache both. Now, both web server uses port 80 and so you can’t have both of them at the same time. So one has to sacrifice it’s favorite port Open-mouthed smile. In my case it was Apache not because I am MSFT technology user but just because I am working with Apache just as sort of self improvement project and most of the time I will want have to work with IIS. So I need to change default port of Apache listen to some other number then 80, which is very simple process.

All you need to do is to locate “httpd.conf” file and look for section where it mentions about listening port. Something similar below,

Categories
Tips Windows

Disable Shutdown Event Tracker

I’ve been using Windows Servers provided by MSFT for free from past few years (not by downloading from Torrent sites by via DreamSpark program) ranging from 2003r2 to the latest one 2008r2. And almost all of them have one feature that really annoys me and that is “Shutdown Event Tracker”. I simply don’t understand that who would like to fill up why they want to restart. At first (when I was in school) I thought that may be sys admins do really enter details but when I begun working I found that it is rather annoying to them as well !! It is just beyond me that why would someone really want to use this feature !!

So this quick post is about how to disable this feature in Windows Server 2008 r2. But I think it applies same to other older versions (2008, 2003 r2) as well.

All you need is to run “gpedit.msc” using RUN. It will open up group policy editor window.

cmd

Categories
How To Tips Windows

PAE … is it enabled ??

Last week I was asked by my boss that how do we know that if production server has PAE enabled ?? Since we are using Windows Server 2003 x86 with about 16Gb Ram, we’ve always assumed that we have it enabled because in task manager we can find that OS actually “see” all 16Gb ram. But what is the proof of it ??

Before I tell you how did we find the answer, few things about PAE and 32-bit OS. As we know that 32-bit OSes are bound to max  limit of 4Gb RAM. Which means that even if we have more than 4Gb ram, OS will not actually use it since it can’t map that memory with registers (2^32 = 4294967296). The answer to this limitation is use of PAE switch which actually makes OS to behave as a 36-bit system so now it has additional 4 bit which can be used to map more ram (2^36 = 68719476736). But these “extra” mapping requires to use a portion of ram as well, hence for some applications the performance is not as good as compared to 64-bit OS which has practically no limit (2^64 = 18446744073709551616) as of today, SQL Server is one of that applications (but that discussion is for some other time). So, in short using PAE we can actually enable our OS to use more that 4Gb ram.

Ok, so back to discussion… how do we know for sure that PAE is enabled in our OS ? There are few ways to answer this question. First method is to just check for Boot.ini file and see if it has /PAE. Your boot.ini file will look something like this (beware of that it may have different entries.)

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows Server 2003, Enterprise" /fastdetect /PAE

Categories
SQL Server Tips Windows

Simple Backup Solution for SQL Server Express

So last week I was asked by one of our developers, if I can help them in setting up some sort of automated backup system which actually takes backup of database to a shared network drive at given time and also we need to retain past X day’s (or 3 day’s) backup copy just in case if we want to rollback. And the database instance was SQL Server 2008 Express !! yes, we are developing our product which is using SQL Server as a database but for client to not to have license of server, we are using express edition of SQL Server. Even though they have SQL Agent, they can’t actually be used unless you have one of PAID version of SQL Server is installed !!!

Actually having SQL Agent is not crucial as it is by function just a scheduled task in Windows with batch functionality that is useful for SQL Server (atleast I think like that)… So, to compensate for lack of SQL Agent we can combine SQLCMD, Windows Batch File and Task Scheduler to get the job done. Though it sounds way too complex, it is actually dead simple.

First I googled for instruction on how can I create VB script which will actually delete files from specific location and with specific timestamp. And I found this VB script from SQL Server Central (but not sure). I honestly can’t recall the original source of the script. But the script is something like following, it is very simple and concise. User just need to set path of file (in my case backup location) and # of days  (in my case 3). So this script will simply delete EVERYTHING in that defined folder that is older than # of days we have defined !!