Skip to content
multicastbits.com

multicastbits.com

Rants from the field

multicastbits.com

close
  • Home
  • Show me everything
    • Virtualization
      • VMware
      • hyper v
    • Scripting
      • Powershell
    • Paas and SaaS
      • Azure
      • Office365
      • Amazon Web Services
      • Oracle-Cloud
    • Networking
      • Switching and Routing
      • Firewalls
  • About
  • Contact
  • Privacy Policy
  • Show Search Form

Category: account

Recover Exchange Mail store Using Database portability feature in Exchange 2010

Posted on May 28, 2012November 26, 2018 by Malinda RathnayakeLeave a Comment on Recover Exchange Mail store Using Database portability feature in Exchange 2010

“Mail server crashed” worst nightmare for a System admin. Followed by tight Dead lines, incident reports, load of complains you have to listen to, Its a full fledged disaster.
In this scenario its a medium size business with with just one single Server running AD and Exchange 2010(not ideal i know) which was upgraded from SBS 2003

AD and DNS failed after de-commissioning the old SBS server.

Recovering from full server backup was not an option and we had the Databases on a separate drive.

Important things to keep in mind when recovering DB’s on a different AD domain

  • Organization name and the Exchange Administrative Group should be the same in order for the Portability feature to work
  • Database must be in a clean shutdown state
  • After mounting the old DB’s always move the mail boxes to new database’s
  • Exchange 2010 Slandered only supports up to 5 Databases.

there are few method’s to recover DB’s on exchange 2010, This is the method we used.

Check List before proceeding further

Once you have

  • Restored the Old Databases from backup to a different location on the server
  • installed the AD (with the same domain name) and the Exchange with the same Administrative Group as the earlier


Preparing the Databases

Checking the statues of the database file

in order for the Database portability feature to work. we need the DB’s in clean shutdown state. To check the Database State we are gonna be using the  Exchange Server Database Utility’s file dump mode

Note : if you are restoring from a windows Backup the Database should already be in a Clean shut down state as the exchange VSS backup re-plays the log files before backing up the DB

More Detail on eseutil /MH – link

Launch command prompt and type

eseutil /MH “D:RestoreoldDB.edb” (the text in blue is the location of the restored old database file)

 Check the output you get and check if the DB is in a Dirty shutdown or a clean shutdown state

If the DB file is in Dirty shutdown state

In this case we did not have any recent backups and we were not able to soft recover the DB since this is a new DC. so we had to do a hard recovery using this command.

eseutil /P “D:RestoreoldDB.edb” (the text in blue is the location of the restored old database file)

Click ok on the prompt to continue

Note : using the Hard recovery will result in loss of information depending on the amount of log files you have for that Database

After the Hard recovery to fully rebuild indexes and defragment the database

eseutil /D “D:RestoreoldDB.edb” (the text in blue is the location of the restored old database file)

 

Mounting the Database using the Portability feature.

 

Create a new Database

Create a new Database for example we will create one named –  recoveryDB1

Go to properties of the new DB > Maintenance Tab > Select  the option “This Database can be overwritten by a restore”

Apply the Changes and dismount the Database

Replace the new Database file with the Repaired Database


Firstly go to the folder where the new DB file(recoveryDB1.edb) is located and Rename or delete it


Delete the log files / Catalog files

———————————————————————————————————————–

Rename the Recovered Database

Go to the Folder where the Database we repaired before is located and Rename it to “recoveryDB1”

————————————————————————————————————————–

Replace the newly created Database

Copy the Repaired DB file and replace the new Database file recoveryDB1.edb

Remember the Log files should be deleted or moved before you mount this DB.

Mount the “recoveryDB1” Database From EMC

now the mailStore should be mounted with out an issue

Errors you might run in to
In case you do get errors when mounting the DB such as

Operation terminated with error -1216 (JET_errAttachedDatabaseMismatch, An outstanding database attachment has been detected at the start or end of recovery, but database is missing or does not match attachment info) after 11.625 seconds.

you are getting this error because The DB is in dirty shutdown state, refer to the Preparing the Database Section above to fix the issue by performing a Hard Recovery



unable to mount error ‘s

The new Database Log files are still present, Delete them or move them.

Now you can go ahead and Attach the Mailboxes to the corresponding user accounts.



Word of advice 

It will be wise to not to keep this recovered Mail Store in production for long. you will run in to various issues as the Mails start to flow in and out

Create new Mail stores’s  and Move the mail boxes to avoid future problems.

Some mailboxes might be corrupted. in that case

Easiest way is to use the

“New-MailboxRepairRequest” cmdlet

Refer to this tech-net article for more info – link

Or

  • Export it to a PST
  • Attach the user to a fresh mailbox
  • Sync back the Data you need through outlook

Posted in: 2008, 2010, account, active, admin, Database, domain, Exchange, feature, guides, log, mail, mount, portability, recover, restore, SBS, server, shutdown, store

Create local administrator account using Group pol…

Posted on November 18, 2011November 26, 2018 by Malinda RathnayakeLeave a Comment on Create local administrator account using Group pol…

Domain Trust relationship failures, it may be a virus making it impossible to login using domain credentials..you are bound to run in to scenario’s like this while managing a AD environment.you will have to login to a local administrator account on the client pc and re join the domain or do what ever the necessary troubleshooting procedures. in some cases you don’t have local admin passwords on some pc’s. so this will be a life saver cause i my self had the unfortunate incident where i had to guide a user to reset the local admin password of a pc over the phone using hiren bootcd.

its very simple actually. use this VB script file, modify it accordingly and add it as a computer start up script via Group policy.

this script first queary for the user name you have specified in the script on the local pc, if it doesn’t exist it will create it as an member of the local administrator group. if the user name already exist it will change the password to the one specified.

‘—————————————————————————————————————
‘this section creates the new user called localsupport if it doesn’t existDim AdminPassword
AdminPassword = “password“

QueryForUser(“user_name“)
               
                Set objNetwork = CreateObject(“Wscript.Network”)
                strComputer = objNetwork.ComputerName
                Set objComputer = GetObject(“WinNT://” &strComputer)

                Set colAccounts = GetObject(“WinNT://” & strComputer & “”)
                Set objUser = colAccounts.Create(“user”, “localsupport”)
                objUser.SetPassword AdminPassword
                objUser.Put “UserFlags”, 65600 ‘
                objUser.SetInfo

‘add to administrators group
                Set objGroup = GetObject(“WinNT://” & strComputer & “/Administrators,group”)
                Set objUser = GetObject(“WinNT://” & strComputer & “/localsupport,user”)
                objGroup.Add(objUser.ADsPath)

           ‘msgbox “user was created”

‘this section just changes the password if the user exists

 Sub QueryForUser(strlocalsupport)
    Set objlocal = GetObject(“WinNT://.”)
    objlocal.Filter = Array(“user”)
    For Each User In objlocal
        If lcase(User.Name) = lcase(strlocalsupport) Then

                strComputer = “.”
                Set objUser = GetObject(“WinNT://” & strComputer & “/localsupport, user”)
                objUser.SetPassword AdminPassword
                objUser.SetInfo

            ‘msgbox User.Name & ” already exists.” & vbCrLf & “The password was re-set.”
            WScript.Quit
        End If   
    Next
 End Sub

————————————————————————————————————–

to change the password modify the password within the quotes (marked in red), in the following code section. this also allows you to easily change the password in case you have to give the password to a end user.

Dim AdminPassword
AdminPassword = “password“

QueryForUser(“user_name“)

hope this helps someone, cause this saved my ass so many time. 😛

Posted in: 2003, 2008, account, address, admin, administrator, cache, change, command, create, domain, Group, guides, local, menuserver, script, server, user, vb, vbs
Copyright © 2023 multicastbits.com. All rights reserved - Malinda Rathnayake - 2021

multicastbits.com

close
  • Home
  • Show me everything
    • Virtualization
      • VMware
      • hyper v
    • Scripting
      • Powershell
    • Paas and SaaS
      • Azure
      • Office365
      • Amazon Web Services
      • Oracle-Cloud
    • Networking
      • Switching and Routing
      • Firewalls
  • About
  • Contact
  • Privacy Policy
  • Scroll to Top
  • Home
  • Contact