If you have been looking for job in Database related field then you might be already familiar with this age old question (which I was asked in almost all interviews) is “What is difference between DELETE and TRUNCATE ?” And usually if you read on internet you will see that people answer it with just one line that,
When you use DELETE to delete records, information is stored in transaction log and hence it can be rolled back. And when you use TRUNCATE, no information is stored in log and so you can’t it rollback.
But technically it is wrong. I mean it is true that when you use TRUNCATE it doesn’t gets logged into transaction log, but it simply wrong to say that truncate will not let you rollback your operation. Code below can explain this operation,
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 . 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,
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.
Last week I was working on something where I was required to write a delete query against few records in table. Now a days I am kind of habituated to use alias for tables whenever I write any query (mostly because of tool
I am we are using for SQL development, which don’t have intellisence if alias is not being used for table name !!) and in other case it was join between two tables was required to delete records. So as with other query, I wrote my simple delete query with alias … and found that when you use alias delete statement is a bit different !!! Below is how I reproduced same issue in my laptop. (Note: Query is using a test table I created using good ol’ AdventureWorks sample database)
-- Delete from table using Alias Delete from TableFoo TF where City='Renton' go
But parsing this query gave me following error
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ‘TF’.
If you are working with Silverlight and don’t have good “designer’s eye”, or planning to begin new project or simply want to play around with Silverlight then you might want to try these Silverlight navigation themes from Microsoft. Currently there are four standard themes are available for download from MSFT Site JetPack, Accent Color, Windows 7 and Cosmopolitan, they are highly customizable and free for any use. Basically they have all styles defined for all standard controls and Silverlight Toolkit (which is a must requirement for these themes to work)
Installing these themes to VS 2010 is way too easy. All you need to do is just execute VSIX files included in the package and you are all set. But if you want to use these themes in Blend 4, then it is a bit tricky process. First you need to extract those themes and then copy them to %ProgramFiles%\Microsoft Expression\Blend 4\ProjectTemplates\en\CSharp\Silverlight folder. But if you are using x64 bit OS then this path will be %ProgramFiles (x86)%\Microsoft Expression\Blend 4\ProjectTemplates\en\CSharp\Silverlight for you !!! And wait there is more (, yes me too watch late night TV commercials … ) apparently all of these files have same structure and same template file names so you can’t just copy all of these themes into one single location, since it will overwrite each other and in the end you will be left with only once theme that you copied last !! And there is no explanation of this in official read me document or any where on the net.
Just now due to my “experiments” OS and other stuff, I had to restore system image of my OS installation drive (it is more easy to restore image then formatting drives and reinstalling everything ). But unfortunately the image I took was a bit newer (or say more older) so it had only essential software installed on it. So I was installing Visual Studio 2010 all again, mean while I also got SP1 for VS 2010 so I updated VS 2010 with SP1 as well.
As my work requires me to work with Silverlight, I was also required to install Silverlight Tools to work with. But with surprise when I tried to download and install Silverlight tools from MSDN, I got really weird error message.
Visual Studio 2010 or Visual Web Developer Express 2010 or Visual Phone Developer Express 2010 that matches the language version of Silverlight Tools 4 must be installed before installation of Silverlight Tools can continue.
If you know what is Peer Guardian, then you are know what I am writing about. Peer Guardian have been used by great number of users in past many years. I think it was the best tool available out there that gives you ability to prevent specific IP or range of IPs from connecting to your machine !! The concept on which this app works is pretty simple, it just prevents any IP that is listed in your blacklist which you can create for your own or you can get it from sites like I-BlockLIst. This tool is specially useful when you are downloading from torrent. For example, many Linux flavors can be downloaded using torrent (for example UBUNTU).
Sharing via torrent is a little risky business. Because common principle on which torrent sharing is based means each downloader share portion of download (called Chunks) from their machine and tracker keeps track of which machine has which chunks. So basically all machines in swarm can actually see each other’s IP. In world where everything is connected with internet, IP is your address. And once someone have it, this can be used for number bad things.