Thor Logo dbatools

LogShipping

Get-DbaDbLogShipError

Sander Stad (@sqlstad), sqlstad.nl

Get-DbaDbLogShipError View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Retrieves log shipping error details from msdb to troubleshoot failed backup, copy, and restore operations Description Queries the log shipping monitor error detail table in msdb to return comprehensive error information when log shipping operations fail. Identifies which specific action failed (backup on primary, copy, or restore on secondary) along with session details and error messages. Saves time by consolidating error details from both primary and secondary instances into a single view, so you don’t have to manually query multiple system tables.

Read more

Invoke-DbaDbLogShipping

Sander Stad (@sqlstad), sqlstad.nl

Invoke-DbaDbLogShipping View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Invoke-DbaDbLogShipping sets up log shipping for one or more databases Description Invoke-DbaDbLogShipping helps to easily set up log shipping for one or more databases. This function will make a lot of decisions for you assuming you want default values like a daily interval for the schedules with a 15 minute interval on the day. There are some settings that cannot be made by the function and they need to be prepared before the function is executed.

Read more

Invoke-DbaDbLogShipRecovery

Sander Stad (@sqlstad), sqlstad.nl

Invoke-DbaDbLogShipRecovery View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Brings log shipped secondary databases online for disaster recovery or planned migration scenarios Description Recovers log shipped secondary databases from standby or restoring state to normal operational state. This function is essential for disaster recovery scenarios when you need to bring secondary databases online after a primary server failure, or for planned migrations where you want to switch roles between primary and secondary servers.

Read more

Remove-DbaDbLogShipping

Sander Stad (@sqlstad), sqlstad.nl

Remove-DbaDbLogShipping View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Dismantles SQL Server log shipping configurations and removes associated jobs and monitoring Description Completely removes log shipping setup from both primary and secondary instances by cleaning up all associated SQL Agent jobs, monitor configurations, and database relationships stored in msdb. This function calls the proper SQL Server system stored procedures (sp_delete_log_shipping_primary_secondary, sp_delete_log_shipping_primary_database, and sp_delete_log_shipping_secondary_database) to ensure clean removal without orphaned objects.

Read more

Test-DbaDbLogShipStatus

Sander Stad (@sqlstad), sqlstad.nl

Test-DbaDbLogShipStatus View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Retrieves log shipping status and health information from the monitoring instance Description Queries the log shipping monitoring system to check the health of your log shipping configuration across primary and secondary instances. This function connects to your log shipping monitoring instance and examines backup, copy, and restore operations to identify any issues or delays. Make sure you’re connecting to the monitoring instance of your log shipping infrastructure, as this is where SQL Server stores the consolidated monitoring data.

Read more