Format C: *.*
The ravings of an computer tech with a propensity for chocolate milk and pizza.
Wednesday, September 26, 2012
Veeam Error - File is locked by running session
I'm not sure what caused this but there is a Veeam KB on it here http://www.veeam.com/KB1487. It was however a bit brief and I wasn't sure how to run the commands when using SQL Express. After a bit of googling at multiple sites here is how its done...
(Note before starting make sure you dont have any backup or replication jobs running!)
1) Find the instance name of your Veeam installation (by default I believe this is just veeam but you can check it by going into services and look for the SQL Server (InstanceNameHere) service. In my case this was SQL Server (Veeam).
2) Open a command line and type sqlcmd -S localhost\veeam (replace the veeam here if your instance name is different). This will connect us to the database instance.
3) If successful you will now see a line with 1>
We still have to connect to the database so type select name from sys.database to list all the databases in this instance. My one was called VeeamBackup which I think is the default name.
4) Select the Veeam backup database by typing "select VeeamBackup" and then on line 2 type go. You should get a message saying "Changed database context to VeeamBackup
5) Type the command from the KB article (copied below)
delete [Backup.TrackedActions.Leases]
delete [Backup.TrackedActions.LockItems]
delete [Backup.TrackedActions.Locks]
then type "go"
You should see something like 1 rows affected.
Now try and run your replication job again. It should now work and you can go and have another coffee :)
Wednesday, June 27, 2012
Windows Server 2012, VMWare Workstation and that flashing blue screen
The initial installation went fine but when I installed VMWare Tools I ended up with a flashing blue screen for some reason. Booting into safe mode worked but removing and re-installing the tools did nothing. After dicking around in the settings of the VM for a while I discovered that if you turn on 3d graphics everything worked again.
Random, but there you go.
Friday, January 27, 2012
Internet Explorer 8 and Windows 7 with SAP NetWeaver
Tuesday, January 17, 2012
Expanding a VirtualBox hard disk for Vista or Windows 7
1) Open a command prompt and browse to the VirtualBox directory, in my case it is C:\Program Files\Oracle\VirtualBox> but it may be different if you installed VirtualBox somewhere else.
2) Type VBoxManage.exe then add the path and file name to the hard disk file that you want to expand and then add -- (note that there are 2 dashes there) resize and then the size that you want the disk to expand to. If you dont know the path to the hard disk file open virtualbox and click on file / virtual media manager then click on the disk you wish to grow and the path will be in the details windows at the bottom.
A properly formatted command might look like this:
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd "C:\Users\MyUser\VirutalBox Machines\Vista.vdi" --resize 20000
This would expand the hard disk of the virtual machine named Vista.vdi to 20 gigs. NB: Note the speech marks around the path to the .vdi file...you need these if there is a space in the name of the path to the file location.
3) Now boot your Vista or Windows 7 machine. Press Windows button and R to open the run command and type diskmgmt.msc This will open the disk management console. Right click on the disk you wish to grow and choose extend volume. Follow the prompts through and hey presto your disk has grown.
NB: You can extend the system volume (typically C: drive) of a Windows Vista, 7 or server 2008 machine natively but if you are trying it with XP you have to use third party tools. Hope this helps someone.
Tuesday, September 6, 2011
Zero Day - A Novel by Mark Russinovich
Friday, January 14, 2011
Powershell script to ping multiple machines
Here is a script that I wrote for work that allows me to ping all of my servers with one command from Powershell. Note that you need Powershell Version 2 installed and the script is designed to take its list of servers to ping from 3 text files that are saved in a folder called PingServers which is located on the desktop (PDCServers.txt, BDCServers.txt and RemoteSites.txt). Just put the server netbios name in the text file and the script will do the rest.
Its all pretty basic and you will probably need to alter it a bit to suit your environment but it is very useful and saves me a bit of time in doing my morning checks.
It will write in green text if a server appears to be up. It will write in red text if the server appears to be down. At the end it will give you a count of how many servers did not respond.
Simply copy the below and save it in a file called PingServers.ps1. Then to run it open up powershell, browse to the directory where you saved the script and then type ./PingServers.ps1.
Clear
$errorcount = 0
Write-Host "`n" "Pinging PDC Servers..." "`n" -Fore "White"
$PingMachines = Gc "h:\desktop\PingServers\PDCServers.txt"
ForEach($MachineName In $PingMachines)
{
$PingStatus = Gwmi Win32_PingStatus -Filter "Address = '$MachineName'" |
Select-Object StatusCode
If ($PingStatus.StatusCode -eq 0)
{Write-Host $MachineName "appears to be up " -Fore "Green"}
Else
{Write-Host $MachineName "is not responding to ping requests" -Fore "Red"
$errorcount = $errorcount + 1
}
}
Write-Host "`n" "Pinging BDC Servers..." "`n" -Fore "White"
$PingMachines = Gc "h:\desktop\PingServers\BDCServers.txt"
ForEach($MachineName In $PingMachines)
{$PingStatus = Gwmi Win32_PingStatus -Filter "Address = '$MachineName'" |
Select-Object StatusCode
If ($PingStatus.StatusCode -eq 0)
{Write-Host $MachineName "appears to be up " -Fore "Green"}
Else
{Write-Host $MachineName "is not responding to ping requests" -Fore "Red"
$errorcount = $errorcount + 1
}
}
Write-Host "`n" "Pinging Remote Sites Wlgtn and ChCh Servers..." "`n" -Fore "White"
$PingMachines = Gc "h:\desktop\PingServers\RemoteSites.txt"
ForEach($MachineName In $PingMachines)
{$PingStatus = Gwmi Win32_PingStatus -Filter "Address = '$MachineName'" |
Select-Object StatusCode
If ($PingStatus.StatusCode -eq 0)
{Write-Host $MachineName "appears to be up " -Fore "Green"}
Else
{Write-Host $MachineName "is not responding to ping requests" -Fore "Red"
$errorcount = $errorcount + 1
}
}
if ($errorcount -gt 0)
{
Write-Host ("`n Number of errors detected is $errorcount") -Fore "Red" "`n"
}
Wednesday, December 22, 2010
Battlefield Bad Company 2: Hints, tricks and tips
So this post is a bit off topic but I thought I would write down so tips for those who play Battlefield: Bad Company 2. I’ve been playing this game for most of the year and have multiple characters including a level 50, level 40 and a few level 20’s that I muck round with.
I will try and avoid the real basics here as there are plenty of FAQ’s round the internet and, as such, I will try and be a bit more specific.
Point 1: Lone rangers get owned. If you charge straight into the enemies base then you will get shot fast, particularly on full servers. Stick with your teammates or squaddies and your life expectancy will go up big time
Point 2: Fire and move, fire and move. If you camp in the same spot you will get spotted and killed, either by existing enemies or the one who just killed you will come back and kill you knowing exactly where you are. Kill 1 or 2 people from a spot and then move somewhere else. Sometimes I move somewhere to cover the spot that I was just in and then the person you just killed will inevitably come back for revenge and you can own them again from your new spot.
Point 3: Find a gun then stick with it: All weapons have different characteristics and will handle differently. Using one weapon till you know how often to click the mouse button and how much you can move when firing while still being accurate is an advantage. You also get a feel for how often a weapon needs to be reloaded. For example the F2000 runs out of bullets really fast so you need to be mindful of your ammunition whereas the AN94 fires much slower and doesnt need such frequent reloading.
Point 4: You gotta know the maps to be real good: People in the higher ranks will know most maps like the back of their hands. All maps have good points for advancing and defending. Hills that don’t look like they can be climbed, can infact be climbed. Using a heli to parachute onto the top of a boat can pay big dividends, especially if you can cover and mcom from there. A good tip while defending is too climb into the roof of a house, blow a hole in the wall and then jump out onto the roof facing away from the enemy. This way you can poke your head over the top of the roofline to own a few, or get them when they come past you as they have their backs to you. Be prepared to move after a few kills though as they will come looking for you.
Point 5: My own strategy: Attacking - When I feel like getting in the thick of the action I will usually play assault or recon class when attacking. For assault I use the M416 with red dot and smoke and for recon I use the VSS with Red dot and C4. The assault class is great for smoking mcoms just before you arm them or just advancing in general. If Im approaching a base and I see a few enemies close together I will quickly spot them and then let down some smoke on them. I then shoot at the arrows and even though I cant see them I can usually kill them. They of course cant see me and so usually get owned. If the mcom is in a small multiroom hut I will usually arm the mcom while smoking the room, then smoke the other room as well and go hide in that room. People usually expect you to be in the room where the mcom is and will charge blindly into the first room at which point…ownage.
With the recon class try and use your motion sensors a lot. If I can arm an mcom I will drop a bit of c4 on it at the same time and then drop a sensor at the same time as I run off to hide. Once people come to disarm you use the c4 and boom goes the enemy.
B: Defending – When defending I usually play a medic class or assault. Pushing forward to defend with your team is the best defence strategy as long as there are still a few people covering the base and any flanking attack. Having a lot of medics who can revive each other is a defence that is hard to beat unless there is a tank you can use. Furthermore if you come across a situation where you encounter multiple enemies at one time and one of them is a medic then that is the one you want to kill first if you have the option. There’s few things more demoralising then owning 1 or 2 people then getting shot by the medic and then watching him revive the 2 people you just killed.
My final tip is this….don’t use the Carl Gustav rocket launcher on infantry. All it means is that you really don’t know how to use a gun and so must gustav people so they have know chance of shooting you back. Some servers even ban people who practice this so don’t be a moron and keep your rockets for vehicles.