Database

Remove Dead Exchange Servers from Active Directory

Working with  my Exchange 2012 Hybrid configuration I into the following error:

ERROR : Subtask NeedsConfiguration execution failed: Configure MRS Proxy Settings

Execution of the Get-WebServicesVirtualDirectory cmdlet has thrown an exception. This may indicate invalid parameters in your hybrid configuration settings.

The task wasn’t able to connect to IIS on the server ‘exchange’. Make sure that the server exists and can be reached from this computer: The RPC server is unavailable.

This is because I did not properly remove the retired exchange servers form Active Directory during past migrations to Exchange 2013.

To remove these objects to continue with your Hybrid configuration task do the following:

  1. Launch the run dialog (Windows Key + R)
  2. Type in the command “adsiedit.msc” and press OK
  3. In the drop down menu select “Configuration”
  4. Expand “CN=Configuration [domain]\CN=Services\CN=Microsoft Exchange\CN=[organization]\CN=Administrative Groups\CN=Servers”
  5. Right click on the dead server and “Delete”
  6. Navigate to ”CN=Configuration [domain]\CN=Services\CN=Microsoft Exchange\CN=[organization]\CN=Administrative Groups\CN=Databases”
  7. Right click on each dead database and “Delete”

Step 1-5 will get you past the Hybrid error, but you might as well cleanup while your here.

Remove database from read only mode, error 5120

I posted about setting a Microsoft SQL Database into ‘read only’ mode as part of an upgrade. Today I need to go back and make some changes on the now legacy system.

To handle this request I needed to change back to its normal state, this is when I encountered the error 5120.

In the additional information of this error it tells me that an exception occurred while executing a Transact-SQL statement or batch.

Later indicating that it was unable to open the physical file to the database in question due to an “Operating system error 5”

Have fun searching for that *hint* you will not find any of the top 3 links taking you to any Microsoft Site; that’s for sure.  {{annoyed}}

Other errors indicated where insufficient memory or disk space; thanks again {{annoyed}} for sending me  down the wrong path.  I have plenty of memory, and disk space.

The last one was that I did not have permissions to the files. Seriously, I do have permissions. In most cases someone who’s doing this work does in the first place

So I found out what the issue was in my case. Here is a screenshot:

Yup! The files were set to read-only. Once this attribute was removed I was able to change my database status from read-only to read-write.

I hope this post helps you if in similar situation.

– Jermal

Exchange 2013: Migrating Mailboxes via PowerShell

Exchange 2013 has new and impressive administration center that allows you to handle tasks such as mailbox moves. I prefer using the Exchange Management Shell for such a task.

Using the following command you can move all mailboxes within a database to your new mailbox database: Get-Mailbox -Database “Source-Database” | New-MoveRequest -TargetDatabase “Destination-Database”

To get info on the migration progress you can use the following command syntax: Get-MoveRequestStatistics -MoveRequestQueue “Destination-Database”

Once this migration has completed you can check if anything exists in the source database with the following: Get-MailboxDatabase -Identity “Source-Database” | Get-Mailbox

restore sql server database from mdf file

  1. First Open SQL Server Management Studio (SSMS). You may need to run as Administrator
  2. Right click the Databases folder and select attach from the menu.
  3. Click Add and select the mdf file. Click Ok, and then Click Ok again. You will get an error at this time because SSMS could not find the corresponding ldf file.
  4. Select the ldf file entry and Click Remove and then Click OK
  5. And that’s all folks

 

SQL Server Database Error: 661

One of my customers had an issue where they failed to open a connection to a particular database they had been testing. The error read: ‘the database e:somepathsomefolderjermsmit.mdf’ cannot be opened because it is version 611. The server supports version 655 and earlier. A downgrade path is not supported.

This issue is caused because you are not permitted to use a database from a later release on an earlier system. i.e they are not backwards compatible

Problem: Databases created under a newer version of SQL Server are not compatible with previous versions of SQL Server

Solution(s) that I am aware of in this case:

  • You need to either upgrade your SQL Server instance to the same version as the database or one newer
  • Or copy out the data in that database into an earlier version (using the data migration wizard perhaps)

If you need to know the version of your source and destination databases use the following query:

SELECT @@VERSION

The destination should be the same level or greater in in version.

Best of luck to ya