Found a problem with Windows Server Backup in server 2008 where it would start then give an access denied error.
This was an exchange server and I had changed the data disk for a new one. Somehow this had mucked up the security rights on the second data disk (used for backup).
I got WSB to create a brand new backup, which formatted the second disk, and it was happy. Take care! Don't format your exchange data disk for backup!!!
Saturday, 26 December 2009
Sunday, 20 December 2009
IBM DS4700 - Channel B Fault
Our fibre-channel SAN (IBM DS4700) is not working on channel B, despite the diagnostics showing OK. The VMware servers can't see anything on the B path - they are showing it as dead.
This may be the cause of some of the server corruption we've had lately - presumably the B channel has been going up and down and has now finally given up the ghost.
All servers are now running happily on A on that SAN and a call to IBM will be logged when we restart after Christmas.
This may be the cause of some of the server corruption we've had lately - presumably the B channel has been going up and down and has now finally given up the ghost.
All servers are now running happily on A on that SAN and a call to IBM will be logged when we restart after Christmas.
Tuesday, 15 December 2009
ESXpress Backup - Target Groups
I created a extra de-duplication target for ESxpress yesterday thinking that the system would balance the load between the two. In fact, it doesn't do this at all. It simply uses it as an overflow when the first target is full, or if it becomes unavailable.
Instead I have now targetted the first two ESX servers to one de-dup unit and the second two to the other, thus spreading the load manually.
If you're thinking of getting a backup solution for ESX, this seems as good as any, by the way. The restore is quick, easy and reliable and in normal service you can just leave it to get on with the backups every night, without interference. It doesn't have some of the advanced config options of a more fancy solution, but it's great if you just want something to backup reliably, and always restore OK.
Incidentally, don't shut the DeDup appliance down with a power off command from ESX - always do a proper linux shutdown or the appliance will want to scan the backup disk at next bootup - this took SIX HOURS this weekend for a full 2TB disk.
Instead I have now targetted the first two ESX servers to one de-dup unit and the second two to the other, thus spreading the load manually.
If you're thinking of getting a backup solution for ESX, this seems as good as any, by the way. The restore is quick, easy and reliable and in normal service you can just leave it to get on with the backups every night, without interference. It doesn't have some of the advanced config options of a more fancy solution, but it's great if you just want something to backup reliably, and always restore OK.
Incidentally, don't shut the DeDup appliance down with a power off command from ESX - always do a proper linux shutdown or the appliance will want to scan the backup disk at next bootup - this took SIX HOURS this weekend for a full 2TB disk.
Sunday, 13 December 2009
Exchange 2007 - SA fails to start
The SA would not start on an exchange 2007 server, leaving no mail delivery and no web access.
This particular server had been removed from AD and readded. You need to go into ADUC and add the computer to both exchange groups in USERS and both exchange groups in the system create EXCHANGE OU.
Then after a reboot it comes up fine.
Useful if you have an AD replica on exchange and you have to restore from a snapshot, rendering the AD replica useless and needing a dcpromo /forceremoval followed by a rejoin of the domain and a dcpromo.
This particular server had been removed from AD and readded. You need to go into ADUC and add the computer to both exchange groups in USERS and both exchange groups in the system create EXCHANGE OU.
Then after a reboot it comes up fine.
Useful if you have an AD replica on exchange and you have to restore from a snapshot, rendering the AD replica useless and needing a dcpromo /forceremoval followed by a rejoin of the domain and a dcpromo.
The RPC Server is Unavailable
This error stopped a server becoming a domain controller tonight. The problem was with the network card - I tried to ping the domain name and got a weird address. The DNS order was screwed up. In the end I had to delete and re-create the network card.
Wednesday, 9 December 2009
Using DotNet to Copy / Sync SQL databases
I'm creating a new system for the till in the refectory and as part of this there's going to be a locally stored database as well as one on the main database server. The idea is that the till can run disconnected from the network, but when it sees the network again it will resync the database.
It works like this:
The master database for kitchen product, users and product groups is on the network so that a back end application can edit them.
The master database for transactions is on the till.
Every x minutes the till synchronises the databases if possible. In order to do this I could either use SQL to connect the two (which proved difficult given that there could be more than one till) or use DotNet. I chose the latter.
In order to ensure that rows are copied including their key, you need the Set Identity_Insert command alongside an Insert Into command. To build these commands up automatically on rows that have to be synched, first the old row is deleted (if it exists) and then I use the following code to build the insert into command: (the strings "cols" and "vals" are the return from ColumnList and ColumnValues and it's nice and generic so will work with any dataset.
Shared Function BuildInsertQuery(ByVal TableName As String, ByVal Vals as string, ByVal Cols As String) As String
Dim Query As String = IION(TableName)
Query += "Insert into " + TableName + " (" + Cols + ") values (" + Vals + ")"
Return Query
End Function
Shared Function IION(ByVal TableName As String) As String
Return "Set Identity_Insert " + TableName + " ON" + Chr(13) + Chr(10)
End Function
Shared Function IIOFF(ByVal TableName As String) As String
Return Chr(13) + Chr(10) + "Set Identity_Insert " + TableName + " OFF"
End Function
Shared Function ColumnList(ByVal DT As DataTable) As String
' returns a list of columns in the datatable
Dim List As String = ""
For Each Col As DataColumn In DT.Columns
If List <> "" Then
List += ","
End If
List += Col.ColumnName
Next
Return List
End Function
Shared Function ColumnValues(ByVal Row As DataRow) As String
Dim Val As String = ""
For foo As Integer = 0 To Row.ItemArray.Length - 1
If foo > 0 Then
Val += ","
End If
If Row.Item(foo).GetType.ToString = "System.DateTime" Then
Dim Dt As Date = Row.Item(foo).ToString
Val += "'" + ims.UtilitiesNonSQL.ConvertDateForSQL(Dt) + "'"
Else
Val += "'" + Row.Item(foo).ToString.Replace("'", "") + "'"
End If
Next
Return Val
End Function
Seems to work!
It works like this:
The master database for kitchen product, users and product groups is on the network so that a back end application can edit them.
The master database for transactions is on the till.
Every x minutes the till synchronises the databases if possible. In order to do this I could either use SQL to connect the two (which proved difficult given that there could be more than one till) or use DotNet. I chose the latter.
In order to ensure that rows are copied including their key, you need the Set Identity_Insert command alongside an Insert Into command. To build these commands up automatically on rows that have to be synched, first the old row is deleted (if it exists) and then I use the following code to build the insert into command: (the strings "cols" and "vals" are the return from ColumnList and ColumnValues and it's nice and generic so will work with any dataset.
Shared Function BuildInsertQuery(ByVal TableName As String, ByVal Vals as string, ByVal Cols As String) As String
Dim Query As String = IION(TableName)
Query += "Insert into " + TableName + " (" + Cols + ") values (" + Vals + ")"
Return Query
End Function
Shared Function IION(ByVal TableName As String) As String
Return "Set Identity_Insert " + TableName + " ON" + Chr(13) + Chr(10)
End Function
Shared Function IIOFF(ByVal TableName As String) As String
Return Chr(13) + Chr(10) + "Set Identity_Insert " + TableName + " OFF"
End Function
Shared Function ColumnList(ByVal DT As DataTable) As String
' returns a list of columns in the datatable
Dim List As String = ""
For Each Col As DataColumn In DT.Columns
If List <> "" Then
List += ","
End If
List += Col.ColumnName
Next
Return List
End Function
Shared Function ColumnValues(ByVal Row As DataRow) As String
Dim Val As String = ""
For foo As Integer = 0 To Row.ItemArray.Length - 1
If foo > 0 Then
Val += ","
End If
If Row.Item(foo).GetType.ToString = "System.DateTime" Then
Dim Dt As Date = Row.Item(foo).ToString
Val += "'" + ims.UtilitiesNonSQL.ConvertDateForSQL(Dt) + "'"
Else
Val += "'" + Row.Item(foo).ToString.Replace("'", "") + "'"
End If
Next
Return Val
End Function
Seems to work!
Friday, 4 December 2009
SQL 2008 - Error Saving Schema Changes
When saving changes to the design of tables in SQL 2008, if it's anything more than an extra column at the end, we get the error:
Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created
To fix this, one needs to go to Tools, Options, Designer, Table and Database Designer and untick the following:

This would appear to be a changed default from SQL 2005 (MS - please stop doing this - it drives up nuts!)
Nick.
Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created
To fix this, one needs to go to Tools, Options, Designer, Table and Database Designer and untick the following:

This would appear to be a changed default from SQL 2005 (MS - please stop doing this - it drives up nuts!)
Nick.
Thursday, 3 December 2009
VB DotNet - Please Wait window
We have need of a "Please Wait" type window in our code that comes up and displays only for as long as a particular chunk of code is running. Then it terminates.
I've done this by creating a form with the required "please wait" text and a nice animated logo which I load up in a new thread when I want it to show. It will thus display even though the code is busy doing something else.
Don't forget to thread.abort when it's finished to clear the form, or keep a global variable somewhere that the thread looks at to know when to stop itself. Alternatively, if you're feeling really brave you could use inter-thread communications, although it seems OTT for something as simple as this. Also, you'll probably want to set the form to "Topmost" so it's always on top.
Interestingly, threads seem to be a good way of opening up new forms when old forms are still open and you want them both to be functional even if the other one is busy. For example:
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim EBT As New Threading.Thread(AddressOf ExistingBookingsThread)
EBT.Start()
End Sub
Private Sub ExistingBookingsThread()
Dim EB As New ExistingBookings
EB.ShowDialog()
End Sub
This code snippet handles a button press for a new form by starting a new thread which calls "ExistingBookingsThread" which is a holding subroutine that displays the form then terminates when the form is closed.
Nick
I've done this by creating a form with the required "please wait" text and a nice animated logo which I load up in a new thread when I want it to show. It will thus display even though the code is busy doing something else.
Don't forget to thread.abort when it's finished to clear the form, or keep a global variable somewhere that the thread looks at to know when to stop itself. Alternatively, if you're feeling really brave you could use inter-thread communications, although it seems OTT for something as simple as this. Also, you'll probably want to set the form to "Topmost" so it's always on top.
Interestingly, threads seem to be a good way of opening up new forms when old forms are still open and you want them both to be functional even if the other one is busy. For example:
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim EBT As New Threading.Thread(AddressOf ExistingBookingsThread)
EBT.Start()
End Sub
Private Sub ExistingBookingsThread()
Dim EB As New ExistingBookings
EB.ShowDialog()
End Sub
This code snippet handles a button press for a new form by starting a new thread which calls "ExistingBookingsThread" which is a holding subroutine that displays the form then terminates when the form is closed.
Nick
Thursday, 26 November 2009
VMware View 3.1 / Kaspersky Problem
There appears to be an incompatibilty between Kaspersky's latest version and VMware View 3.1
For the time being Geoff's removed Kaspersky from the VDI machines and disabled the USB sticks so that people can't introduce viruses.
Obviously we're looking for a long-term solution - I will post an update when I know more
Update 18/4/2010 - This problem has now gone away. My guess is that either Kaspersky or Microsoft have sorted it, but we can't find any reference to it.
For the time being Geoff's removed Kaspersky from the VDI machines and disabled the USB sticks so that people can't introduce viruses.
Obviously we're looking for a long-term solution - I will post an update when I know more
Update 18/4/2010 - This problem has now gone away. My guess is that either Kaspersky or Microsoft have sorted it, but we can't find any reference to it.
Wednesday, 25 November 2009
Cannot Uninstall VMWare View Agent
This is the second time I've come across this poor uninstaller that seems to want the original MSI file before it will uninstall itself.
I just go into the registry and delete all references to VMware View.
I just go into the registry and delete all references to VMware View.
VMware View 3.1 - Provisoning Error - Can't Find Folder
Got this error this morning. It's because we recently completely reinstalled VirtualCenter when upgrading ESX because it wouldn't take the upgrade.
The problem was that this got rid of the "folders" which the old sets of virtual desktops were in - existing desktops were OK but new ones wouldn't provision.
I found a VMware KB article on this - apparently it's a known bug and "might" be fixed at some point in the future. For this time being, the only option left is to create a new pool of desktops from the same template and move the users over from the old to the new. Then you can delete the old.
The problem was that this got rid of the "folders" which the old sets of virtual desktops were in - existing desktops were OK but new ones wouldn't provision.
I found a VMware KB article on this - apparently it's a known bug and "might" be fixed at some point in the future. For this time being, the only option left is to create a new pool of desktops from the same template and move the users over from the old to the new. Then you can delete the old.
Fileserver Kept Crashing
One of our servers kept crashing yesterday - well not crashing actually but stopping serving files and then (perhaps) starting again a random number of minutes yesterday.
A reboot would solve the problem temporarily.
Pulled the server down last night and scanned the data volume thinking it might be corruption (have seen it before). The scan started and then stalled - utilisation figures were good for a few hours then went to zero.
I created a new server and mapped the disk (it's on a SAN) to the new one and it seems to be OK - so it might have been the server, not the disk, but I still suspect the disk and will transfer the data to a new drive over the Christmas shutdown.
A reboot would solve the problem temporarily.
Pulled the server down last night and scanned the data volume thinking it might be corruption (have seen it before). The scan started and then stalled - utilisation figures were good for a few hours then went to zero.
I created a new server and mapped the disk (it's on a SAN) to the new one and it seems to be OK - so it might have been the server, not the disk, but I still suspect the disk and will transfer the data to a new drive over the Christmas shutdown.
Monday, 23 November 2009
Dotnet Runtime Compiler Error
Had a problem with the dotnet compiler at runtime today (VS2005 / VB). The compiler would build OK but then give a runtime error before the startup form opening telling me the index was out of bounds. No more help and it wasn't anything in our code.
Fixed by making a modification to the startup form and rebuilding. This seems to make the compiler rebuild the underlying code and get rid of whatever error it had managed to introduce.
The problem seems to have been caused by a compiler crash earlier in the day.
Fixed by making a modification to the startup form and rebuilding. This seems to make the compiler rebuild the underlying code and get rid of whatever error it had managed to introduce.
The problem seems to have been caused by a compiler crash earlier in the day.
Wednesday, 18 November 2009
DotNet io.directory.delete fails with permissions error
Interesting one today - dotnet io.directory.delete failed with a permissions error. It turns out that the folder you're deleting and the files contained within must NOT be read-only.
Fixed by iterating through all the folders/files and setting permissions to normal.
Fixed by iterating through all the folders/files and setting permissions to normal.
Wednesday, 11 November 2009
MIS System Crashing - Date Error
Interesting error today - have seen this one before.
The MIS system would crash on startup, but only for a specific user and when I tried it myself it was fine.
It transpired that the computer was set to English (US) and so the dates were presenting in MM/DD rather than DD/MM. Since some dates are (historically) saved as text not as date format, it couldn't interpret them and crashed. We should, of course, change the system to save all dates properly, but the quick solution is to reset the user to English (UK).
The MIS system would crash on startup, but only for a specific user and when I tried it myself it was fine.
It transpired that the computer was set to English (US) and so the dates were presenting in MM/DD rather than DD/MM. Since some dates are (historically) saved as text not as date format, it couldn't interpret them and crashed. We should, of course, change the system to save all dates properly, but the quick solution is to reset the user to English (UK).
Saturday, 7 November 2009
IBM Blades Not Booting from Internal HDD
We had a problem tonight with some blades not booting from their internal HHDs. It turns out that in order to boot from internal HDD you need to disable the planar daughter card slot one to free up the IRQ for the HDD to boot.
When configuring ESX (or whatever OS) you need to enable the card for the HBA utility to be accessed (but disable it again after the config)
Isn't life fun :-)
UPDATE: Doing this allows it to boot but then it can't see the SAN LUNs!! Ooops.
UPDATE: To fix this just reset the HBA BIOS to factory settings, even though they look identical to working ones.
When configuring ESX (or whatever OS) you need to enable the card for the HBA utility to be accessed (but disable it again after the config)
Isn't life fun :-)
UPDATE: Doing this allows it to boot but then it can't see the SAN LUNs!! Ooops.
UPDATE: To fix this just reset the HBA BIOS to factory settings, even though they look identical to working ones.
Exchange 2007 log files
Exchange 2007 doesn't seem to clear old log files automatically. I have had to use a third party package to manually remove the old ones.
There's probably some option somewhere, but I can't imagine where.
Nick
There's probably some option somewhere, but I can't imagine where.
Nick
DS4700 / ESX Woes
We're still having the problem where VMFS volumes mysteriously corrupt or files lock rendering the virutal machine useless. We're going to try three things:
1) restarting all ESX servers to see if the locks clear
2) remove the IBM DS4700 live mirroring to see if that's the cause
3) re-zone the SAN to halve the infrastructure available to each ESX server
Nick
1) restarting all ESX servers to see if the locks clear
2) remove the IBM DS4700 live mirroring to see if that's the cause
3) re-zone the SAN to halve the infrastructure available to each ESX server
Nick
First Post
Welcome to my blog. In here I'll be storing "wisdom" discovered in my day to day IT job
Nick
Nick
Subscribe to:
Posts (Atom)