Monday, April 6, 2009

vmdk to vhd conversion

Google makes finding a solution too easy, well, sometimes...

http://www.aaronpalermo.com/wordpress/archives/32
http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/ef8c12f7-c45d-442e-9a30-c43cd87df3b3
http://stateless.geek.nz/category/virtualisation/xen/

Sunday, April 5, 2009

Editorial - The Disappearing DBA

Editorial - The Disappearing DBA

During a "difficult period", a developer tends to sink from view. When delivery dates have slipped, and testers are hammering them with bugs they've found in their 'perfect' code, the developer will sit quietly in the corner, unnoticed by most, doggedly bashing away at their keyboard.
However, when things are going well, when an awesome new feature has been completed or particularly knotty programming problem solved, everyone knows about it. Suddenly they are the gunslinger, the hotshot; rightly proud of their achievement they swagger around the office telling all to anyone who will listen.
The DBA often looks on wistfully. For him, the "fame trajectory" seems to work in reverse. When a server is down or performance is suffering, customers are quick to complain, and managers are eager to point the finger of blame. During difficult periods, the DBA is the centre of attention. The harder the DBA works, and the smoother everything is running, the more invisible the DBA becomes.
In short, it is the unfortunate lot of the DBA to work their way towards absence. In a recent blog, Andy Leonard notes that DBAs think differently to developers, and it's true. The DBA role requires a completely different mindset, and a very different perception of what "success" means.
Some DBAs, perhaps envious of the high profile developers, make a point of highlighting their achievements, sending regular emails that report uptime on the company servers, improvements made to database processes and so on. This isn't such a bad idea, but most seem content with a working life spent keeping deliberately out of the limelight. Plaudits and esteem are all well and good, but they don't trade for much at the bank. What DBAs lack in public profile they tend to make up in personal remuneration. They accept the occasional public lambasting with good grace, perhaps consoling themselves using Phil Factor's old trick of calculating, on the hourly rate, how much they are being paid to receive it.
One cannot change human nature, and so it may be better to aim for an image of quiet efficiency rather than gun-slinging hero. Whereas the developer can bring a spring to his step from thought of the recognition of the quality of his work and skills, the DBA can cheer himself from the thought that it has been a nice, quiet month; and now it's payday.
Cheers,
Tony.
Tony Davis from SQLServerCentral.com

Saturday, April 4, 2009

Recover sysadmin account for SQL 2005/2008

I accidently removed the the sysadmin account from the development machine and was stuck for a while, however the solution is quite simple (someone else took the credit):
start sql in single user mode by appending ';-m' to start-up paramaters throught configuration manager;
stop all other sql related service other than db engine;
run sqlcmd -E
run 'create login [contoso\administrator] from windows;
run 'EXEC sp_addsrvrolemember 'CONTOSO\administrator', 'sysadmin';
remove ;-m
restart sql db engine
done!!!

Tuesday, March 31, 2009

HP ML110 G4 with Xeon X3220/Q6600?

Ever since I installed VMWare ESX server on my HP ML110 G4, I haven't got much chance playing it and it has been lying on the floor for a while...what a waste!
Recently I decided to convert it to my workstation pc and installed WIN2008 on it, so far I managed to add a USB sound card, install TV Tuner (Leadtek DTV 2000H) and managed to get it working after install the missing BDA component.
Now I am not quite satisfied with the CPU speed (Pentium D 810 2.8G) and the worst thing is, since it doesn't have HT I can't add Hyper-V to the server.
After doing some research, I found out that the server's documentation states that it supports xeon duo core 3000 , Pentium D CPUs but no quard core listed, I also found out similar Motherboards with same chipsets (Intel 3000/ICH7R) actually support Xeon Quad core 3200 CPUs.
After reading a post somewhere (in Japanese!) saying that Q6600 works with this server, together with the fact that Q6600 is identical to XEON X3200, I guess I will try to get one and see how it goes anyway. you gonna know that the benchmark score I got from a website shows Pentium D 2.8G gets 710 while for X3220 it is 2844!

Tuesday, March 10, 2009

Moving Database Files to different LUN under a SQL cluster environment

After managed to move quorum and DTC storage to different LUN, there is also the need to move database files around coz we need to do a SAN reconfiguration.
The highly summarized steps are as following:

> create new LUNs, present them to cluster nodes;
> initialize new disk, don't partition them yet, use diskpart to create partiton with an offset to make sure the partition is aligned.
> format new drives, assign drive letter, take SQL instance offline (leave the disk resource online), use xcopy to copy database files to the new drive.
>remove drive letter from the old drive, assign it to the new drive;
>using cluster administration tool, re-create the disk resource, modify resource dependency...
>failover and test etc.

Thursday, March 5, 2009

HOWTO: Migrating Quorum and DTC drive to different LUNs for SQL Cluster

HOWTO: Migrating Quorum and DTC drive to different LUNs for SQL Cluster

1. Create two new LUNs for Quorum and DTC drives and present them to ESX Host;
2. Adding the new LUNs as raw disk mapping to cluster nodes using the same SCSI ID on all nodes;
3. Go to computer management and initialize the disks, create new partition and format them;
4. Move Quorum Drive to DTC temporally via cluster administration:
5. Go to disk management and remove the drive letter ‘Q:’, assign drive letter ‘Q:’ to the new disk that mapped to the new LUN, do this on all nodes;
6. Go back to cluster administration, add the new disk into ‘Cluster Group’ then assign the new drive as Quorum Resource;
7. The old quorum disk is now ready to be removed;
8. To move DTC storage, remove the DTC resource first, then delete the old DTC drive from DTC Group;
9. Remove the drive letter from old DTC Drive and assign it to the new DTC Drive;
10. Add the new DTC drive to DTC group;
11. Create DTC Resource and bind it to the new drive;
12. The old DTC Drive is now ready to be removed.

Notes: this is the actual steps I took to move quorum/DTC drive inside our environment, please be reminded that quorum and DTC sit on different drives here.

Disable Microsoft Defender for Cloud for Visual Studio Subscription (MSDN)

I use a visual studio pro subscription which comes with $150 azure cloud credit, for some reason Microsoft Defender for Cloud was turned on ...