jcrgroup_pro

Indexing databases errors

Jan 14th, 2023 (edited)
882
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Monitoring for Crawling status and other operations
  2. https://www.alitajran.com/monitor-exchange-database-index-state-crawling/
  3.  
  4. ### ПЕРВЫЙ ВАРИАНТ
  5. #Stopped the Microsoft Exchange Search service
  6. #Stopped the Microsoft Exchange Search Host Controller service
  7. [PS] C:\Windows\system32>stop-service MSExchangeFastSearch
  8. [PS] C:\Windows\system32>stop-service HostControllerService
  9.  
  10. #status
  11. Get-MailboxDatabaseCopyStatus * | ft -auto
  12.  
  13. #Dismounted the database
  14. Get-MailboxDatabase
  15. Get-MailboxDatabase –Identity GeneralDB2020 -Status | Format-Table Name, BackupInProgress, OnlineMaintenanceInProgress
  16. #all databases get
  17. Get-MailboxDatabase –Server <server name> -Status | Format-Table Name, BackupInProgress, OnlineMaintenanceInProgress
  18. Get-MailboxDatabase -Status | Format-Table Name, BackupInProgress, OnlineMaintenanceInProgress
  19. #dismount db
  20. DisMount-Database –Confirm:$False –Identity GeneralDB2020
  21. DisMount-Database –Confirm:$False –Identity GSP12ExSystemDB
  22. DisMount-Database –Confirm:$False –Identity GSP12UsersDB
  23. DisMount-Database –Confirm:$False –Identity GSP12_DeletedUsersDB
  24.  
  25. #get ebd files path of DB
  26. Get-MailboxDatabase | select EdbFilePath
  27. Get-MailboxDatabase | Format-Table Name, Guid, EdbFilePath
  28. Get-MailboxDatabase | Format-Table Name, Guid, Id, MountAtStartup, EdbFilePath, LogFolderPath
  29. Get-MailboxDatabase | Format-Table Name, Guid, EdbFilePath, LogFolderPath
  30.  
  31. #Deleted the [guid.single] folder in the folder holding the database file. Guid is the Globally Unique Identifier for the #database. You can find this by running Get-MailboxDatabase database-name | Select Guid. For example, the folder you need #would be something like d:\Databases\DB2\79c03cca-9b53-4959-982a-8773591c5f70.single
  32. Get-MailboxDatabase | Format-Table Name, Guid
  33. Get-MailboxDatabase GeneralDB2020 | Select Guid
  34. Get-MailboxDatabase | Select Guid
  35.  
  36. #all DB data
  37. Get-MailboxDatabase -Identity GeneralDB2020 | FL
  38. Get-MailboxDatabase | Format-Table Name, Guid, EdbFilePath, LogFolderPath
  39. Get-MailboxDatabase | Format-Table Name, Guid, Id, MountAtStartup, EdbFilePath, LogFolderPath
  40.  
  41. #Посмотреть данные по размеру баз и оставшемуся дисковому пространству достаточно просто.
  42. Get-MailboxDatabase -Server GSP12EX -Status | select Name, DatabaseSize, AvailableNewMailboxSpace
  43.  
  44. #С количеством ящиков в базе несколько сложнее.
  45. (Get-Mailbox -Database GSP12ExSystemDB -ResultSize:Unlimited).count
  46.  
  47. #перезапустить службу Банк данных Microsoft Exchange store.exe
  48. sc stop MSExchangeIS
  49. sc start MSExchangeIS
  50.  
  51. #Alternatively, you can use ESEUTIL /mh command to determine the state of the database, i.e., the database is in Clean #Shutdown State (consistent) or Dirty Shutdown State (inconsistent). Need "Clean Shutdown" status
  52. eseutil /mh <full path to the edb file>
  53. eseutil /mh 'E:\EXDB\GSP12ExSystemDB\GSP12ExSystemDB.edb'
  54. eseutil /mh 'E:\EXDB\GSP12_DeletedUsersDB\GSP12_DeletedUsersDB.edb'
  55. eseutil /mh 'E:\EXDB\GSP12ExUsersDB\GSP12ExDBUsers.edb'
  56. eseutil /mh 'E:\EXDB\GSP12ExDb\GeneralDB2020.edb'
  57.  
  58.  
  59. #DB defragmetation afeter dismount
  60. #Без указания специальных ключей, временная база создаётся на диске c:\. Свободного места на нём должно быть примерно 110% (требование Microsoft) от размера сжимаемой базы
  61. # или сжимать с путем до временного файла
  62. eseutil /d 'E:\EXDB\GSP12ExSystemDB\GSP12ExSystemDB.edb' /t'E:\EXDB\Temp'
  63.  
  64. DisMount-Database –Confirm:$False –Identity GSP12_DeletedUsersDB
  65. Get-Mailbox -Database GSP12_DeletedUsersDB -Arbitration
  66. eseutil /d 'E:\EXDB\GSP12_DeletedUsersDB\GSP12_DeletedUsersDB.edb' /t'E:\EXDB\Temp'
  67. Mount-Database –Confirm:$False –Identity GSP12_DeletedUsersDB
  68.  
  69. #Restart the Microsoft Exchange Search Host Controller service
  70. #Restart the Microsoft Exchange Search service
  71. start-service MSExchangeFastSearch
  72. start-service HostControllerService
  73. #Remount the database
  74. Mount-Database –Confirm:$False –Identity GeneralDB2020
  75. Mount-Database –Confirm:$False –Identity GSP12ExSystemDB
  76. Mount-Database –Confirm:$False –Identity GSP12UsersDB
  77. Mount-Database –Confirm:$False –Identity GSP12_DeletedUsersDB
  78.  
  79. ### ВТОРОЙ ВАРИАНТ ,ЕЗ РЕМОУНТА ,АЗЫ
  80. # При индексации базы данных почтовых ящиков GSP12ExSystemDB обнаружено непредвиденное исключение.
  81. https://practical365.com/fix-failed-database-content-index-exchange-2013/
  82.  
  83. [PS] C:\Windows\system32>Get-MailboxDatabaseCopyStatus * | ft -auto
  84. Выполняется создание нового сеанса для неявного удаленного взаимодействия команды "Get-MailboxDatabaseCopyStatus"...
  85.  
  86. Name                           Status     CopyQueueLength ReplayQueueLength LastInspectedLogTime ContentIndexState
  87. ----                           ------     --------------- ----------------- -------------------- -----------------
  88. GeneralDB2020\GSP12EX          Mounted    0               0                                      FailedAndSuspended
  89. GSP12ExSystemDB\GSP12EX        Mounted    0               0                                      FailedAndSuspended
  90. GSP12UsersDB\GSP12EX           Mounted    0               0                                      FailedAndSuspended
  91. RecoveryServer1\GSP12EX        Dismounted 0               0                                      Disabled
  92. RecoveryServer1Archive\GSP12EX Dismounted 0               0                                      Disabled
  93. GSP12_DeletedUsersDB\GSP12EX   Mounted    0               0                                      FailedAndSuspended
  94.  
  95. #FailedAndSuspended Быть не долдно - - HEalthy дол;но
  96.  
  97. [PS] C:\Windows\system32>stop-service MSExchangeFastSearch
  98. [PS] C:\Windows\system32>stop-service HostControllerService
  99. ПРЕДУПРЕЖДЕНИЕ: Ожидание остановки службы "Microsoft Exchange Search Host Controller (HostControllerService)"...
  100. [PS] C:\Windows\system32>Get-MailboxDatabase | select EdbFilePath
  101.  
  102. EdbFilePath
  103. -----------
  104. E:\EXDB\GSP12ExDb\GeneralDB2020.edb
  105. E:\EXDB\GSP12ExSystemDB\GSP12ExSystemDB.edb
  106. E:\EXDB\GSP12ExUsersDB\GSP12ExDBUsers.edb
  107. E:\EXDB\RestoredServer1\Mailbox Database 0806324089.edb
  108. E:\EXDB\RestoredServer1\Mailbox archive.edb
  109. E:\EXDB\GSP12_DeletedUsersDB\GSP12_DeletedUsersDB.edb
  110.  
  111. # идти в папку и удалять папку с индексами - она как GUID называется в папке с Базой
  112.  
  113. [PS] C:\Windows\system32>start-service MSExchangeFastSearch
  114. [PS] C:\Windows\system32>start-service HostControllerService
  115. [PS] C:\Windows\system32>
Tags: exchange
Advertisement
Add Comment
Please, Sign In to add comment