SQL Server 2012 - Can't detach database on mirror server
To remove database mirroring


Connect to the Database Engine of either mirroring partner.
From the Standard bar, click New Query.
Issue the following Transact-SQL statement:


ALTER DATABASE database_name SET PARTNER OFF

where database_name is the mirrored database whose session you want to remove.

The following example removes database mirroring from the AdventureWorks2012 sample database.

ALTER DATABASE AdventureWorks2012 SET PARTNER OFF;