Using below code to unlock global Administrator from Database:
UPDATE CMS_User set UserEnabled=1 WHERE UserID=<userid>
Method 2: You can also use the CMSAdminEmergencyReset key in your web.config file. Reseting the password via a web.config key can be done by inserting the following key to the appSettings section of your web.config:
<add key="CMSAdminEmergencyReset" value="<your username>;<your new password>;[true/false]"/>
The first and second parameter specify your user name and your new password, delimited by a semicolon. The third parameter is optional and indicates whether or not you wish to make a new user with global administrator rights.
The appsetting key are going to be automatically removed from web.config once you got access to the CMSDesk or CMSSiteManager.