Categories
Windows 2008

Windows 2008 R2 : Failover Cluster Manager – Move Cluster Group

Windows 2008 R2 : Failover Cluster Manager – Move Cluster Group

You’ve probably noticed that in Failover Cluster Manager you don’t have the option to move the cluster group resources like you did in Windows 2000/2003. It is possible to move this group, however you’ll have to use either Windows Powershell or Command Prompt to achieve this.

Using Windows Powershell:
  Move-ClusterGroup “Cluster Group”
  Move-ClusterGroup “Available Storage”

Using the CLI and cluster.exe:
  cluster group “Cluster Group” /move
  cluster group “Available Storage” /move

Categories
Lansweeper

LANSweeper : Query SQL Server Version

LANSweeper : Query SQL Server Version

SQL version information is stored in the registry, its location varies depending on server architecture (x86/x64) and SQL Instance name.

This is how I achieved this….

Added the following Registry paths to be scanned by LANSweeper (you may not need all of these, could well need to add some of your own):

RegKey ValueName
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Setup Edition
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\Setup Edition
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.2005\Setup Edition
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\Setup Edition
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.SHAREPOINT\Setup Edition
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\Setup Edition
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10_50.SOPHOS\Setup Edition
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\Setup Edition
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\SHAREPOINT\Setup Edition
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Setup Edition

Next, scan all of your machines.

Finally use the following code to return the information for your domain, by version:

{code lang:sql title:”LANSweeper Query SQL Version” lines:false hidden:false}Select Top 1000000 tblComputers.ComputerName, tblComputers.ComputerUnique As Machine , tblSoftware.softwareName As Product, tblRegistry.Value As ‘Version’,
tblComputers.Domain

From tblSoftware
Inner Join tblComputers On tblSoftware.ComputerName = tblComputers.Computername
Inner Join web40ActiveComputers On tblComputers.Computername = web40ActiveComputers.Computername
Inner Join tblRegistry On tblComputers.Computername = tblRegistry.Computername

Where tblSoftware.softwareName Like ‘Microsoft SQL Server%’ And tblRegistry.Valuename = ‘Edition’
And tblSoftware.softwareName Not Like ‘%Native Client%’ And tblSoftware.softwareName Not Like ‘%Policies%’
And tblSoftware.softwareName Not Like ‘%Setup%’ And tblSoftware.softwareName Not Like ‘%Browser%’
And tblSoftware.softwareName Not Like ‘%VSS%’ And tblSoftware.softwareName Not Like ‘%Books%’
And tblSoftware.softwareName Not Like ‘%Compatibility%’ And tblSoftware.softwareName Not Like ‘%Analysis%’
And tblSoftware.softwareName Not Like ‘%Management Objects%’ And tblSoftware.softwareName Not Like ‘%Design Tools%’
And tblSoftware.softwareName Not Like ‘%Studio%’ And tblSoftware.softwareName Not Like ‘%Query Tools%’
And tblSoftware.softwareName Not Like ‘%Best Practice%’ And tblSoftware.softwareName Not Like ‘%CLR%’
And tblSoftware.softwareName Not Like ‘%Advisor%’ And tblSoftware.softwareName Not Like ‘%Reporting%’
And tblSoftware.softwareName Not Like ‘%Data Mining%’ And tblSoftware.softwareName Not Like ‘%Wizard%’
And tblSoftware.softwareName Not Like ‘%AdventureWorks%’ And tblSoftware.softwareName Not Like ‘%Transact-SQL%’
And tblSoftware.softwareName Not Like ‘%Refresh 3 Samples%’ And tblSoftware.softwareName Not Like ‘%Developer Tools%’

Group By tblComputers.ComputerUnique, tblComputers.ComputerName, tblSoftware.softwareName, tblRegistry.Value, tblComputers.Domain
Order By tblSoftware.softwareName{/code}

Modify the code if you want to return the version per computer or anything else for that matter… 🙂

Categories
Lansweeper

LANSweeper : Unaligned Disk Report

LANSweeper : Unaligned Disk Report

The SQL below will display all disks, that are over 1GB in size and not a system boot disk, in an ‘un-aligned’ state.

Select Top 1000000 tblComputers.ComputerUnique, tblComputers.Computername, tblComputers.Domain, 
Web40OSName.OSname, tblOperatingsystem.Description, CAST(ROUND(((tblDiskPartition.size/1024)/1024)/1024,2,0) As Decimal(20,2)) As 'Size (GB)' , tblDiskPartition.StartingOffset, 
tblDiskPartition.DeviceID, 
CASE WHEN (tblDiskPartition.StartingOffset/4096 != ROUND(tblDiskPartition.StartingOffset/4096,0)) THEN 'FALSE' ELSE 'TRUE' END As 'Is Aligned?'

From tblDiskPartition 
Inner Join tblComputers On tblDiskPartition.Computername = tblComputers.Computername 
Inner Join tblComputersystem On tblComputers.Computername = tblComputersystem.Computername 
Inner Join tblOperatingsystem On tblComputers.Computername = tblOperatingsystem.Computername 
Inner Join web40ActiveComputers On tblComputers.Computername = web40ActiveComputers.Computername 
Inner Join Web40OSName On Web40OSName.Computername = tblComputers.Computername

Where tblDiskPartition.StartingOffset/4096 != ROUND(tblDiskPartition.StartingOffset/4096,0) 
and (tblDiskPartition.bootpartition = 0 or tblDiskPartition.BootPartition = NULL) 
and ROUND(((tblDiskPartition.size/1024)/1024)/1024,2) > 1

Group By tblComputers.ComputerUnique, tblComputers.Computername, tblComputers.Domain, Web40OSName.OSname, 
tblOperatingsystem.Description, Web40OSName.Compimage, tblComputers.Computer, tblDiskPartition.StartingOffset, 
tblDiskPartition.StartingOffset/4096, tblDiskPartition.size , tblDiskPartition.DeviceID

Order By dbo.tblComputers.Computer, Count(dbo.tblDiskPartition.Computername) Desc 

Categories
Exchange Server 2010

Outlook : Waiting to update this Folder…

Outlook : Waiting to update this Folder…

I encountered an issues recently with an outlook 2007 client that, when in cached mode only, would not automatically update maibox folder such as Inbox. In the bottom right of the window the user simply had “Waiting to update this folder…” The user was alo receiving “Out of Memory” error when trying to browse public folders.

On further investigation we noted that the users RPC requst count (shown in the Outlook Connection Status window – Ctrl-click the Outlook Icon) was very high and quickly increasing to the Public Folder server.

It became aparent that the user had many Public Folder Favourites defined, hundreds of folders with thousands of emails. In online mode we deleted the Public Folder Favourites, then deleted the users OST. Finally we set the user back to Cached Mode. This resolved their Outlook issues, and dramaically improved Outlook performance.

Categories
Windows 2008

Server Core : Query the Event Log from the Command Line

Server Core : Query the Event Log from the Command Line

Use the following command to list events in the SYSTEM event log between 9th March 00:00 to 15:00:

{code lang:css showtitle:false lines:false hidden:false}wevtutil qe system “/q:*[System[TimeCreated[@SystemTime>=’2012-03-09T00:00:00′ and @SystemTime<‘2012-03-09T15:00:00’]]]” /f:text{/code}

Use the following command to query the SYSTEM event log for any event at or after midnight on 12th March:

{code lang:css showtitle:false lines:false hidden:false}wevtutil qe system “/q:*[System[TimeCreated[@SystemTime>=’2012-03-12T00:00:00′]]]” /f:text{/code}

 

Categories
General

Vyatta : Interfaces Become Unresponsive

Note When Vyatta Core got discontinued, a group of its users who wanted to keep using it forked the last available source code to start VyOS. See more here: https://vyos.io/

I recently deployed a Vyatta router into a Hyper-V test environment to connect multiple host-only networks and provide Internet access. The deployment was a success and is detailed here.

I found that after a large file transfer (download) or 3 or 4 days of use one or more of the interfaces on the Vyatta device would stop responding. Using tcpdump I found that the traffic siomply was not reaching the interface(s) that had stopped working: sudo tcpdump -nvi eth1

Intially I wondered if the VM was running low on memory; I had assigned only 128MB of RAM, so increased this to 256MB only to expereicne the same issues a few days later. I then came across trhe following forum post http://www.vyatta.org/forum/viewtopic.php?t=6221&sid=a15464ed60549a515c43bca4c26909b7 which described my issue perectly. The solution? Configure the VM to have 2 vCPU’s – ever since the Vyatta virtual router has been stable.

Categories
Exchange Server 2010

Exchange 2010 : DAG – Move Primary Active Manager

Exchange 2010 : DAG – Move Primary Active Manager

To view the current Primary Active Manager use the following command:
{code lang:css showtitle:false lines:false hidden:false}get-databaseavailabilitygroup <name> -status | select name,primaryactivemanager{/code}

From one of the DAG members run the command: cluster group
This will show the “Cluster Group” owner is the Primary Active Manager.

To move the PAM, use the command below from one of the DAG members – note when tested this did not affect Exchange resources – your mileage may vary;
{code lang:css showtitle:false lines:false hidden:false}cluster group “Cluster Group” /MoveTo:<DAG Server Name>{/code}

Categories
Exchange Server 2010

Exchange 2010 : Moving Passive Database Copies to a different DAG Server

Exchange 2010 : Moving Passive Database Copies to a different DAG Server

I recently encountered a requirement to move several passive database copies, each of approx 200GB in size to differnet servers. Ideally I wanted to acheieve this withought having to re-seed the databases. I wanted to try and leverage database portability in some respects, keeping the existing data and simply presenting the disks containing that data to the new DAG server. Here’s how this was acheived:

Prepare your target server;

  • The server should be a member of the same DAG as the source
  • The server should be able to connect to the same disks (although do not do this yet)

Moving the Database Copies

Step 1: Suspend the Mailbox Database Copy
Step 2: Remove the Mailbox Database Copy (the database and log files will be left on the drives)
Step 3: Disconnect the LUN’s from the original server (DO NOT FORMAT/DELETE the disks)
Step 4: Present the same disks to the new server, again do not format or repartition.
Step 5: Add the mailbox database copy;

{code lang:css showtitle:false lines:false hidden:false}add-mailboxdatabasecopy -id “database name” -mailboxserver “DAG server name” -seedingpostponed:$true{/code}

Step 6: Resume the mailbox database copy:

{code lang:css showtitle:false lines:false hidden:false}resume-mailboxdatabasecopy “database name”\”DAG server name”{/code}

Step 7: Confirm the copy status:

{code lang:css showtitle:false lines:false hidden:false}Get-MailboxDatabaseCopyStatus “database name”{/code}

If the new copy is stuck in ‘Resynchronizing’ then suspend the copy and resume it.

Equally speaking you could restore a backup or use a VSS snapshot of the databases as outlined in the following article:
http://blogs.technet.com/b/timmcmic/archive/2011/07/12/exchange-2010-using-vss-to-perform-an-online-offline-database-seed.aspx

Once you have moved the passive database copy, you can activate it and perform the same steps to move the now passive copy on the other server(s).

Categories
General

Vyatta : Configuring a Virtual Router

Note When Vyatta Core got discontinued, a group of its users who wanted to keep using it forked the last available source code to start VyOS. See more here: https://vyos.io/

Vyatta is a router that can be used in a Hyper-V or ESX Virtual machine and is available for download Vyatta Download. I’ve used this to connect host-only networks in order to create valid test environments, an example configuration is illustarted and detailed below.

In order to implement the above configuration on the Vyatta virtual router follow the configuarion steps outlined below. For reference the default username / password is vyatta / vyatta.

Ensure that VM has 2 vCPU’s – with a single vCPU the interfaces can become unresponsive as per; http://www.vyatta.org/forum/viewtopic.php?t=6221&sid=a15464ed60549a515c43bca4c26909b7.

Under Hyper-V I can confirm this stable with 2 vCPU, 256MB RAM – your mileage may vary.

Deploy image to local drive:
install system

Once rebooted, login and enter configuration mode:
configure

Configure ethernet interfaces:
set interfaces ethernet eth0 address 192.168.168.254/24
set interfaces ethernet eth0 description “Network1”
set interfaces ethernet eth1 address 192.168.169.254/24
set interfaces ethernet eth1 description “Network2”
set interfaces ethernet eth2 address 10.0.0.10/8
set interfaces ethernet eth2 description “Internet”

Configure default gateway:
set system gateway-address 10.0.0.1

Configure DNS server:
set system name-server 8.8.8.8

Configure NAT Rule to masquaerade all traffic as the Vyatta device on the ‘external’ interface:
set nat source rule 20 source address 192.168.0.0/16
set nat source rule 20 outbound‐interface eth1
set nat source rule 20 translation address masquerade

Save/Commit:
commit
save

Exit Configuration mode:
exit

show interfaces ethernet
show system default-gateway
show nat rules
show nat statistics

Now run some basic connectivity tests to ensure:

  1. You can connect to the different subnets
  2. You can connect to the internet