Enable replication failed : Hyper-V is not in a state to accept replication on the replica server

After replication was broken, Hyper-V failed  to setup Virtual Machine Replication

Error : Enable replication failed Hyper-V is not in a state to accept replication on the replica server

Enable replication failed Hyper-V is not in a state to acept replication on the replica server

Fix – Option

1) Delete the Virtual Machine from the replica server and setup replication from the primary

or

2) During the setup of replication, specify the export of the Virtual Machine to replicate on the replica server

Enable Virtual Machine replication in Hyper-V (Microsoft Server 2012)

Guide to Virtual Machine replication in Hyper-V (Microsoft Server 2012)

Open Hyper-V manager and select the virtual machine to replicate

enable vm replication 1

Select – Enable Replication

enable vm replication 2

Click Next to continue

 

enable vm replication 3

Select the replica server (Also running Hyper-V)

enable vm replication 4

Specify the connection type (Kerberos or Certificate)

enable vm replication 5

Select the VHDX file to replicate

enable vm replication 6

select replication options

enable vm replication 7

Send replication over the network or select replica export file

enable vm replication 8

Click Finish

enable vm replication 9

Virtual Machine replication will start
enable vm replication 10

 

Please note. This is a rough example and your should research your own methods and setup

How to remove a file lock manually in Microsoft Server 2008

How to remove a file lock manually in MS Server 2008

Open Administrative Tools -> Share and Storage Management.

From the Actions pane, click Manage Open Files.

All locked files and folders should be visible on this server.

To clear a lock, select the relevant file and click “Close Selected”.

Note only use this method if other option to close / unlock a file have been tried and a user definitely not using the the file, otherwise data loss may occur.

SQL Server 2005 database has grown too big and filled the hard disk

Microsoft SQL Server 2005 database has grown too big and filled the hard disk

How much available free disk space ?
How much available free database space ?
How to free up some disk space by shrinking the database?

A quick run through

My Computer shows
C:\ OS with free space
E:\ The DB drive FULL
L:\ The logs drive with free space

——————————————
On E:\ identify which database has grown and filled the disk

Open MS SQL Management Studio
Login with domain account or a SQL database admin credentials – (SA will have these rights)

Right click the offending database

Select tasks -> shrink – > files

It will then show you how much is available to shrink

ie. E:\ Large DB is 39999.00MB
DB allocated space is 19999.00MB
Available space with in the DB is 20000.00MB (50%)

——————————————

The DB will have stopped working as there was no space to extend the file on the main disk

——————————————

In this example we can now click ok to shrink the Large DB, due to having 20,000MB free space with in the DB.
Note : If there was no free space, then you should consider looking at the application for purge options or adding additional storage

—————————————————————————
A database can shrink while running. The shrink will work in the background, IF there is space. However it might slow things down because its actually moving data off pages onto others and then deleting the empty pages when it moves the data it has to reset catalog so that the db knows where that data is in the indexes etc. (reset  means update)
Disclaimer.
This is just and example, in my own words and you should understand the tasks this article talks about and make your own decisions. The author holds NO responsibility for anything which is done based on the topic described above.

Sysprep Windows Server 2008

I wanted to sysprep an image of Windows Server 2008 after cloning a Windows Server 2008 VM in VMware Workstation.

Followed by a quick google to jog the memory, I found http://jameskovacs.com/2008/10/15/how-to-sysprep-windows-server-2008/

Sysprep is installed by default on Windows Server 2008.

Default location : c:\Windows\System32\sysprep\sysprep.exe

Simply run sysprep.exe

The tool pops up.

Check the “Generalize” checkbox (regenerates system SID), change the Shutdown Options to “Shutdown” or “Restart”, and click OK.

The system will go through the sysprep process and shut itself down or restart.
I was only running sysprep after a clone. So restart was ok

Use shutdown if you wan to create cloned servers afterwards by simply by creating linked servers and booting the clone.

Note the SIDs weren’t being regenerated with out the “check” in the Generalize checkbox to make that happen.