33.8 C
Dubai
Friday, April 26, 2024

Moving Databases and logs in Exchange Server

Moving Mailbox Databases – (Needs DownTime)

Preferred to do only for small databases as if the database is large the down time is huge you may need to move those files manually using adsiedit.msc which are not covered on this post.

Move-DatabasePath Database01 -EdbFilePath "D:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Database01\Database01.edb" -LogFolderPath "D:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Database01"

1.png

Moving Transport Databases – (Needs DownTime – Mailflow)

Lets utilized a inbuilt script .\Move-TransportDatabase.ps1, Move the Exchange management shell to use this location

cd "C:\Program Files\Microsoft\Exchange Server\V15\Scripts"
.\Move-TransportDatabase.ps1 -QueueDatabaseLoggingPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue" -IPFilterDatabasePath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\IpFilter" -IPFilterDatabaseLoggingPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\IpFilter" -TemporaryStoragePath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Temp"

2.png

3.png

Now you can see its moved successfully.

Lets see how to move these logs locations as well.

To Check Existing locations


ReceiveProtocolLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpReceive
SendProtocolLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpSend
MessageTrackingLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\MessageTracking
RoutingTableLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\Routing
PipelineTracingPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\PipelineTracing
ConnectivityLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\Connectivity

5.png

Now lets set them to new location

Set-TransportService DUCV-EXCH01 -ReceiveProtocolLogPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpReceive" -SendProtocolLogPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpSend" -MessageTrackingLogPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\MessageTracking" -RoutingTableLogPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\Routing" -PipelineTracingPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\PipelineTracing" -ConnectivityLogPath "D:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\Connectivity"

7.png

Good to know –

Quick C drive cleanup of exchange servers log location


\\EXCH1.azure365pro.com\c$\Program Files\Microsoft\Exchange Server\V15\Logging\HttpProxy\Mapi
\\EXCH1.azure365pro.com\c$\inetpub\logs\LogFiles\W3SVC1
\\EXCH1.azure365pro.com\c$\inetpub\logs\LogFiles\W3SVC2
\\EXCH1.azure365pro.com\c$\Program Files\Microsoft\Exchange Server\V15\Logging\NotificationBroker\Client
\\EXCH1.azure365pro.com\c$\Program Files\Microsoft\Exchange Server\V15\Logging\MapiHttp\Mailbox
\\EXCH1.azure365pro.com\c$\Program Files\Microsoft\Exchange Server\V15\Logging\HttpProxy\Eas

 

Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Award-winning Technology Leader with a wealth of experience running large teams and diversified industry exposure in cloud computing. From shipping lines to rolling stocks.In-depth expertise in driving cloud adoption strategies and modernizing systems to cloud native. Specialized in Microsoft Cloud, DevOps, and Microsoft 365 Stack and conducted numerous successful projects worldwide. Also, Acting as a Technical Advisor for various start-ups.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?