I've got a bunch of SQL databases on my machine. Both from SQL 2000, SQL 2005 and also SQL 2008.
The databases are mainly used for testing customers databases or for development, and the actual data isn't really important.
Over time the .mdf and .ldf files have a tendency to grow to 1-3GB files, and keeps hogging more and more of my C:\-drive. Often the files actually just contain free space as well.
A quick way to shrink the files is to run this - the demo base is called Demo1 in this example:
Use Demo1
CHECKPOINT
DBCC SHRINKFILE (Demo1, 1)
DBCC SHRINKFILE (Demo1_log, 1)
This shrinks the files as much as possible by removing "free space" from the files.
The CHECKPOINT is included since my databases are using the Simple Recovery Model, and that command purges the .ldf file. This is the same as is done when you tell SQL Server to do a backup. Only in this case I just truncate the .ldf file, without performing the actual backup.
The DBCC SHRINKFILE commands try to shrink the two files down to 1MB. The .ldf file will end up being 1MB, but the .mdf actually contains data, so it will become as small as it can without deleting data.
Sunday, December 16, 2007
Saturday, December 1, 2007
Getting to know my network - Jumbo Frames
I was reading one of Scott Hanselman's blogposts about improving network performance , and got referred over to a very good article which explains how Jumbo Frames can speed up the network throughput.
I started doing some testing of my home network, to see which devices are Jumbo Frame compatible, and eventually if I could gain anything from enabling it.
As the figure shows most of the devices in my network are using WLAN. Only the router, firewall and wireless access point are actually connected with CAT 5 cables. Even the Windows 2003 server is communicating with an external USB Linksys WLAN adapter.
One very significant fact when discussing Jumbo Frames is that it is ONLY available on 1Gb network devices. 100Mb/10Mb devices do not have Jumbo Frame capability. And since my network is mostly WLAN this is a shop-stopper. However, I still wanted to figure out what it would take to JF-enable LAN, and also to gather some information about the network.
The most obvious thing was to check the network drivers on the various machines. On my IBM T42 the Intel PRO/Wireless 2200BG card unfortunately doesn't support Jumbo Frames (JF), but the Intel PRO/1000 MT Mobile infact does. The gigabit NIC seems to support 4KB, 9KB and 16KB packets.
By pinging the access point I was able to determine that my T42 WLAN card has packetsizes of 1272 bytes. The size was determined by pinging with the command 'ping -f -l 1272 172.28.5.3', and adjusting the packetsize until the NIC returned error "Packet needs to be fragmented but DF set.". Both on Julies Dell Inspiron 6400 laptop's WLAN card and on the USB Linksys Wireless-G adapter the packetsize is 1474bytes.
The Dell laptop's LAN NIC is only 10/100Mb, so it doesn't have JF support.
On the Dell server the LAN NIC is an Intel PRO/1000 MT card (not unlike on the T42), but Jumbo Frames is not available in the driver settings. Perhaps it only requires a driver update.
My switch, a D-Link DES-1008D, is a mere 10/100 Fast Ethernet switch - so it does not support JF either.
So it seems like my network is far from Jumbo-Frames-ready. Ok, so now at least I know. No point in enabling JF on my laptop yet then.
I started doing some testing of my home network, to see which devices are Jumbo Frame compatible, and eventually if I could gain anything from enabling it.
As the figure shows most of the devices in my network are using WLAN. Only the router, firewall and wireless access point are actually connected with CAT 5 cables. Even the Windows 2003 server is communicating with an external USB Linksys WLAN adapter.
One very significant fact when discussing Jumbo Frames is that it is ONLY available on 1Gb network devices. 100Mb/10Mb devices do not have Jumbo Frame capability. And since my network is mostly WLAN this is a shop-stopper. However, I still wanted to figure out what it would take to JF-enable LAN, and also to gather some information about the network.
The most obvious thing was to check the network drivers on the various machines. On my IBM T42 the Intel PRO/Wireless 2200BG card unfortunately doesn't support Jumbo Frames (JF), but the Intel PRO/1000 MT Mobile infact does. The gigabit NIC seems to support 4KB, 9KB and 16KB packets.
By pinging the access point I was able to determine that my T42 WLAN card has packetsizes of 1272 bytes. The size was determined by pinging with the command 'ping -f -l 1272 172.28.5.3', and adjusting the packetsize until the NIC returned error "Packet needs to be fragmented but DF set.". Both on Julies Dell Inspiron 6400 laptop's WLAN card and on the USB Linksys Wireless-G adapter the packetsize is 1474bytes.
The Dell laptop's LAN NIC is only 10/100Mb, so it doesn't have JF support.
On the Dell server the LAN NIC is an Intel PRO/1000 MT card (not unlike on the T42), but Jumbo Frames is not available in the driver settings. Perhaps it only requires a driver update.
My switch, a D-Link DES-1008D, is a mere 10/100 Fast Ethernet switch - so it does not support JF either.
So it seems like my network is far from Jumbo-Frames-ready. Ok, so now at least I know. No point in enabling JF on my laptop yet then.
Monday, August 20, 2007
Cleaning up after the W32.Myzor.FK virus
One of my colleagues was unfortunate enough to attract the W32.Myzor.FK virus over the weekend and I've been trying to squash it today.
We've installed SpyBot, Ad-Aware and ran Microsoft's scanner from safety.live.com, but no luck. I came across a tool on Technibble, and that did the trick :)
We've installed SpyBot, Ad-Aware and ran Microsoft's scanner from safety.live.com, but no luck. I came across a tool on Technibble, and that did the trick :)
Monday, August 6, 2007
Wee to the Wii
Julie (the better part of this relationship) came home with a surprise the other day! Guess what!?
That's right, a Nintendo Wii. Cool!
We've been playing it for a few evenings now, and its quite a laugh. The hand held gyro-based shake-twist-point-click-twirl-control system is just amazing. Really gets you sweating.
The game Rayman Raving Rabbids, which is the other game besides the obligatory Wii Sports, is a nonsense-game where you hurl cows, shoot toilet plungers at rabbits, ride in warthog races or even pull out worms from teeth. The objective is usually to do as much damage to the stark raving mad rabbits as possible.
That's right, a Nintendo Wii. Cool!
We've been playing it for a few evenings now, and its quite a laugh. The hand held gyro-based shake-twist-point-click-twirl-control system is just amazing. Really gets you sweating.
The game Rayman Raving Rabbids, which is the other game besides the obligatory Wii Sports, is a nonsense-game where you hurl cows, shoot toilet plungers at rabbits, ride in warthog races or even pull out worms from teeth. The objective is usually to do as much damage to the stark raving mad rabbits as possible.
Don't make me think
I'm just about finishing up my copy of "Don't make me think" by Steve Krug. He does an excellent job of making usability a fun topic. The book is a very light read. Not only because of Krugs amusing style of writing, but also the actual layout of the book. Its short with lot's of example illustrations. I read through the whole thing in less than 10 hours.
Krug focuses on webdesign, but I believe anyone who works with computer programming, be it web or applications, will benefit from reading this book. I wish some of the programmers from certain applications I'm using had taken the time to read it.
I can highly recommend this book to anyone who is designing ANYTHING who is going to be used by mere mortals.
Subscribe to:
Posts (Atom)