20100529

How to Plan SQL Server Database Files

One of the most important tasks you can do in SQL Server is to setup your data and log files.  Not getting these files setup correctly can be one of the biggest causes for production problems whether it’s disk contention, space usage, or something else.  And honestly this level of planning is often overlooked and by the time the problem is discovered the application and its users have already suffered.  So let’s get into some good discussion about how to setup your database files.

Log files

We’re going to start with logs first because they’re the easiest and probably the ones you’ll touch most frequently.  And we need to talk about placing your log files on disk first.  In general, you’ll want to place your log files on a different physical partition than your data files.  This is for 2 reasons.  The first is disk contention.  Every transaction has to write something to the log file before it can write it to the data file and if both files are on the same disk, then the disk arm has to work twice has hard because it has to jump over here to write the log and then jump over there to write to the table.  Putting a log file on its own disk is also better for the performance of the log because logs write sequentially so if the log file is on its own disk the disk arm has very little moving to do to get to the next place it needs to write so it’s much faster.  The second reason you want data and log files on separate disks is for recovery.  If the data partition fails you’ll want the log on a separate set of disks so you can still recover the logs and roll the last transactions forward so you don’t lose any data.

Several log files

It’s a common misconception that you will get a performance gain by using several log files.  This is something we see quite often and it simply isn’t true.  Log files are written sequentially which means that each log file is filled up before the next one is written to.  So if you have 4 log files (Log1, Log2, Log3, Log4), SQL Server 2008 will fill up Log1, then fill up Log2, etc.  This is different from the way data files behave and we’ll discuss that in a minute.  The only reason to have multiple log files on multiple partitions is for space.  You may need more disk than a single partition can provide.  Oh, and putting multiple log files on a single partition is just dumb.  It gains you nothing.

Data files

Now let’s talk about where you’ll place your data files.  As we’ve already said it’s a good idea to place them on a different physical partition from your log files. And we know we already said that, but experience has shown us that we could fill an entire page with that exact advice and a good portion of you still won’t grasp the importance of it.  So we’re really going to hammer that point home in this article.
So while your data files are separated from your log files you may feel free to have multiple data files on multiple physical partitions to take advantage of performance gains.  Now, we have to say again that these have to be physical partitions because logical partitions are still on the same physical disk and it’s the disk arm contention you’re trying to avoid.  Data files, unlike log files, use what’s known as an equal fill algorithm.  This means that all of the files are filled equally as much as possible.  So let’s say you have 4 data files (Data1, Data2, Data3, Data4).  When you write to the database, SQL Server 2008 will write to these files in a round robin fashion and they should grow at more or less the same rate.  You can also place tables inside specific files so you have a good level of control over how you split up the I/O workload in your database.  And while the number of files you need to optimize your workload is a subject that’s up for debate in the community, for most systems it won’t make that much difference.  However, it is a good idea that no matter how many data files you decide to have, to make them all the same size.  This goes back to that equal fill algorithm we were talking about before.

File growth

Another good topic is file growth.  This is a mistake that many beginners make.  They accept the defaults for file growth and that’s just asking for trouble.  We’re going to give you some advice on how to set your file growth and you can adjust it to suit your needs, but at least you’ll know the arguments.
  1. The best thing to do is to set both your data and your log files as large as you ever want them to be.  Depending on your version of SQL Server, it can be very expensive to grow files so setting their size ahead of time can alleviate performance problems before they even start.  So if you’ve got a single partition dedicated to your log file, then go ahead and make your log the same size as your partition.  If it’s dedicated then you’ve got nothing to lose.  And the same goes for your data files.  If they’re on dedicated partitions (and they should be), then you’ve got nothing to lose.
  2. The next best thing is to set your files to autogrow by fairly large predictable increments.  The default autogrowth is 1MB for data files and 10% for log files.  I always grow data files by at least 1GB and often times even more.  If you’re going to suffer the expense of growing a file you don’t want to do it 5 times a day, so make it worth your while.  And 10% is too unpredictable.  As the log grows the 10% marker is going to get bigger too so you’ll actually be growing your log more and more each time.
  3. Set all your data files to grow at the same rate, and all of your log files to grow at the same rate.  Your data files don’t have to grow at the same rate as your log files, but they should grow at the same rate as each other.

20100524

Changes to the Security Center in Windows 7


Introduction
The Windows Security Center made its debut in Windows XP SP2.  As you may recall, SP2 was designed to correct some of Windows XP’s chronic security problems. Although SP2 did its job at least to some extent, many IT professionals saw the Security Center largely as a public relations stunt. After all, Microsoft proudly proclaimed that the Security Center contained code that was originally intended for Windows Vista, but yet the Security Center didn’t really do much other than confirming that certain security settings (such as the Windows Firewall) were enabled
When Vista was released, the Security Center looked a lot like the Windows XP version, but there was at least some stuff going on behind the scenes. The Security Center not only monitors the state of various security mechanisms, but it can use that information to assess the machine’s health when Network Access Protection is being used.
With that in mind, you might be surprised to learn that the Security Center does not exist in Windows 7. Instead, Microsoft has replaced the Security Center with the Action Center, which you can see in Figure A.
Figure A
changes_to_the_windows_7_security_center-1
The Security Center has been replaced by the Action Center.

The Action Center
The first time that I heard about this change, I just assumed that Microsoft’s marketing department had been at it again. After all, Microsoft has a long history of renaming features to make them sound more enticing or more useful. The change actually involves more than a simple name change though.
One of the big complaints that Microsoft received in regard to Windows Vista was that there were far too many nag screens and pop up balloons. These messages were often important, but they could be really annoying if the problem was not urgent, and the user did not want to deal with it at the moment.
Nag screens and popup balloons aren’t completely going way in Windows 7, but it does seem that Microsoft has reduced their frequency. This is where the Action Center comes into play. The Action Center is a console where you can see any security or maintenance issues that need to be addressed, all in one place. The idea is that by consolidating the various alerts on a system wide basis, users can fix the various issues in one place, and on their own schedule.
If you look at the figure above, you can see that security issues are color coded. Red indicates that an issue is urgent, while orange indicates that the issue is important, but not yet critical.

At the bottom of the Action Center are Troubleshooting and Recovery links that you can use to locate and fix a problem or to revert your system to a previous state respectively.
The Action Center can actually display more information than what you see in the figure though. According to Microsoft, the Action Center consolidates alerts from ten different Windows 7 features including things like Windows Defender, Backup and Restore, and even User Account Control. Any time that one of these features produces a non critical alert, an icon will be displayed in the taskbar. Users can click on this icon at their leisure to go to the Action Center and address the issue.
The Action Center’s Future
I don’t have a crystal ball, nor do I have any inside information from Microsoft regarding the future of the Action Center. Even so, I have a feeling that Microsoft created the Action Center to do more than just appease users who were tired of nag screens.
Being that so much alerting information is being consolidated into one place, I think that it seems only logical that Microsoft will create some sort of monitoring tool that works specifically by looking at the Action Center of every PC in the organization.
Network Access Protection already allows Windows Server 2008 to detect Security Center issues, and perform remediation if necessary. How hard could it possibly be for Microsoft to extend Network Access Protection so that it can perform corrective action on other types of maintenance items that may be reported?
Conclusion
It remains to be seen just how effective the Action Center will be, and what it will actually look like when Windows 7 is released. I think that it is a safe bet though that users will appreciate having fewer alerts.

20100522

Almost Everything You Need to Know About DHCP as a Systems Administrator

This article will help you to learn everything that you need to know as a systems administrator (or SysAdmin) about this protocol and what can you do with it.

What's DHCP? And why it's recommended to use it? Imagine that you're working as a SysAdmin for a large company with 500 desktop computers; you need to set to each desktop computer IP address, subnet mask, default gateway, DNS servers, and other network settings. How could you do that?
If you'll try to perform this task manually you're probably going to waste a lot of time on sitting on each computer 5-10 minutes, beside time, you can for example accidentally enter wrong IP address to few clients, or to type the same IP address to few clients too.
In order to solve these "problems" you can use Dynamic Host Configuration Protocol (or DHCP) in your network.
DHCP allows you  to manage the networks' IP addresses scopes and other TCP/IP settings like DNS, Default Gateway, etc. from central place, this central place called DHCP server. Beside the management, if there's any problem you don't need to run between your clients, you just need to connect to your server and to check the DHCP settings, as I mentioned – the DHCP works from central place, so if there's a problem, it's probably from the server, so you know where to go in case of problem and your saving time.
The DHCP server can provide easily IP addresses to clients automatically so you don't even need to configure and set options in the client side, all you need is to setup DHCP server, configure scope options and some other TCP/IP settings in the server side and that's it. You can provide to your clients IP addresses from the selected range that you've configured and some other TCP/IP options.
Note: DHCP in my opinion can be called "The next generation of BOOTP", because the BOOTP came first before the DHCP, and today we're using BOOTP in order to deploy operating systems by booting from the network. Beside this, DHCP was developed in order to support in large networks – something that BOOTP can't provide.

How DHCP works?

Without entering to the related technical information (DORA process) the DHCP client request from the DHCP server IP address for a while, the length of time that the DHCP client can use the dynamic IP address that the DHCP server provided can be called lease, just like the name: lease means that the client "rent" an IP address for a specific time from the DHCP server, if the client wants to continue using the specific IP address the client needs to re-assign the address by renew the lease, this will happen before the expiration time of the lease if the client is still in the network.
More in depth, the DHCP service works by using the DORA (Discover, Offer, Request and Acknowledgment) process (you can trace on the whole process using a network monitor utility):
  1. DHCPDISCOVER – The client broadcast a DHCPDISCOVER packet in order to locate a DHCP server in the network, in some cases that the DHCP server isn't in the same subnet of the client, you'll need to configure in your network devices (usually routers) a DHCP Relay Agent, in order to transfer the DHCPDISCOVER packet to the DHCP server.
  2. DHCPOFFER – The DHCP server broadcast a DHCPOFFER packet to the client which includes an offer to use a unique IP address for the client.
  3. DHCPREQUEST – The client broadcast a DHCPREQUEST packet to the DHCP server with an answer, and "asks" from the server to "rent" the unique address that the server offer to her.
  4. DHCPACK – The DHCP server broadcast a DHCPACK packet to the client, in this packet the server acknowledge the request from the client to use the IP address, and provide to the client the IP address lease and other details such as DNS servers, default gateway, etc. if the server cannot provide the requested IP address or from some reasons the address is not valid the server sends DHCPNACK packet in stand of DHCPACK, more information about DHCPNACK is under the specific subject – DHCPNACK.

Note: DHCP service uses port 67/UDP in the DHCP server, and 68/UDP at the DHCP clients.
It's recommended to check that your firewall doesn't block these ports in order to able the DHCP server and clients to communicate, and also check that your network devices supports DHCP Relay Agent in case that some of your clients are in different physical subnet.
In some cases you'll notice another DHCP messages like these:
  1. DHCPDECLINE – If the client recognizes that the IP address that the DHCP server offer to her in use, the client will generate a new request to another IP address (in the DHCPREQUEST step).
  2. DHCPRELEASE – This message is commonly in use when the client "give up" and release IP address.
  3. DHCPRENEW – This is the request packet to renew and continue "renting" the IP address lease.
  4. DHCPINFORM – The DHCPINFORM is packet that the client send to the DHCP server in order to get more details from the server, for example DHCPINFORM can be send in order to locate another DHCP servers in the network.

DHCPNACK

The DHCPNACK or Negative Acknowledgment is a packet that the server sends if the IP address is not available in stand of DHCPACK (in use on other client for example) or the address is no longer valid.
In case of DHCPNACK the client must restart the lease process in order to get an IP address.

DHCP Scopes, Exclude and Reservation

DHCP Scope is a range of IP addresses that you configure in your DHCP server as range of addresses that designed for distribution to the clients.
For example, if you set a scope with a range from 10.0.0.100-10.0.0.200, you can easily provide only from this range IP addresses to your clients.
You can also create more than one scope, but it's recommended to check that your scopes aren't duplicating one with each other's. At the scope creation process you can add some more TCP/IP parameters such as subnet mask, IP addresses lease time, router (default gateway), DNS servers, etc. so when the clients gets the IP addresses they'll get also the other parameters from the scope.
In some cases, you'll need to prevent the client using some addresses, for example if your scope is from 10.0.0.1 up to 10.0.0.100, and your servers using 10.0.0.1-10.0.0.10, you can exclude these IP addresses from the scope and exclude the DHCP to distribute them to the clients, in most of the DHCP servers this option called exclude.
Reservation is a great option if you're planning to provide specific dynamic IP address from the DHCP server to unique DHCP client. If for example in the 10.0.0.1-10.0.0.100 scope you want to provide for specific client a unique address that will be always of the client, you can easily set reservation for the client using a unique identifier – the MAC address, the MAC of Media Access Control is a unique hexadecimal physical address for network adapters.

DHCP & DNS

When you're installing DHCP server you can configure the DHCP server to set DNS updates to any DNS server that support dynamic updates. More information about the combination between DHCP and DNS you can find right here.

Active Directory & DHCP Servers

In Microsoft Windows Server with Active Directory you need to authorize your server in order to work with the DHCP service.
In the past you could install few DHCP servers – as you wish, this action occurs problems like server crashing, etc.
In the new Windows 2000 Server/Server 2003/2008 you must authorize your server in order to start the DHCP server, if there's an authorized DHCP server in the Active Directory environment and a non-authorized server trying to start the DHCP service in order to distribute IP address, the server will failed in this task and the DHCP service in the local computer will stop.

DHCP Relay Agent

DHCP Relay Agent is any kind of host (usually a router or server) that listen to DHCP/BOOTP broadcast from clients on subnets without local DHCP servers.
The DHCP Relay Agent forwards the packets from the clients and the DHCP server that sitting on different physical subnets to each other in order to supply 'connection' between the DHCP Server to the clients, and opposite (from the clients to the server).

In conclusion

DHCP is a critical "must have" network service because using DHCP helps you, as a System/Network Administrator, to manage you clients by assigning, tracking and re-assigning IP addresses.

20100513

Rearm Count Reset tools for Unlimited Rearming and use Windows 7 forever



Windows 7 has a Rearm feature which allows you to use it for next 30 days in evaluation mode but this can be done 3 times at max. So, you can only run it for 120 days maximum without activating using legitimate key or crack it. But, Hackers have developed tools which can automate Windows 7 Rearm indefinitely without crack and use it forever.
We have already discussed on How to  Reset Windows 7 Ream  but that included  manual steps which may look geeky to some guys who are not so tech-savvy and ended up making their Windows 7 non-genuine. The Rearm Count Reset Tools makes this procedure somehow easy as it includes minimal manual steps and everything is automated. If the steps are followed carefully, you can use Windows 7 forever without cracking. By default, each Rearm count is reduced by1 when you perform a Rearming operation but what does these tools do is to reset rearm count to 4 always. They Rearm Windows 7 automatically on 29th or 30th Day of every month.
There are three tools namely InfiniteRearm4, Windows7Rearm Forever and Windows 7 Rearm Task developed by some clever users hackers at MDL Forum. All these tools come with an instruction file which may be thoroughly followed in order to reset Windows 7 Rearm count.

InfiniteRearm4 v1.9

Reset Windows 7 Rearm Count

Windows 7 Rearm Forever 2.0

Rearm Count Reset tools

Windows 7 RearmTask4 v2.1

Rearm Count Reset tools
All of them share a common procedure, Install the Rearm Task Hack and then follow the steps:
1. Press F8 after POST to display the Advanced Boot Options
2. Select Repair your Computer
3. Select the keyboard input method
4. Enter the Windows Login details
5. Note on which drive the OS is installed below Choose Recovery Option
6. Click on Command Prompt
7. Type driveletter:reset (example C:reset or D:reset) and press Enter
8. Click on Restart button
9. After logon, ignore the watermark & wait for a while till a Message Box is displayed.
Download Reset Rearm Count Tools

20100504

Bypass Megavideo Time Limit and watch videos as Premium user for free


Megavideo is similar to Youtube where you can find and watch streaming videos. It has restrictions for Free users that they can watch videos for 72 minutes only. To get uninterrupted unlimited viewing, you need to be Premium user and and after reading this article you will be able to bypass Megavideo Time limit and watch videos on the go as if you are are premium user.
Megavideo is a online video portal managed by Megaupload and it is one of top 100 websites viewed around the world. Here, you can find numerous movies and music videos uploaded by users. You will have to pay for premium membership which removes limitation of 72 minutes of video viewing. Remove 72 minutes video watching limits just by copy-pasting video URL on FreeMegavideo.
FreeMegavideo is a online service which lets you watch uninterrupted unlimited videos from Megavideo. It works as it’s tagline says- “Streaming is better when it’s free”. What all you have to do is copy and paste the video URL like “http://www.megavideo.com/?v=xxxxxxx” and press View button. It will immediately start streaming video and you also get an option to download that video.