New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy-MaintenancePlan command #5028
Comments
We looked into this one back in 2017 and there is no direct support for copying maintenance plans between servers via SMO. The T-SQL method that is used is considered a "hack" method and is cannot be consistent. So we chose not to support maintenance plans in that manner. |
There's no way to use SMO directly, but it is not necessarily a hack as it utilizes dts.runtime namespace which is not part of SMO. is SMO the only supported one for dbatools? |
DTS dll are not packaged up with SMO, so it would require adjustments to support that namespace being added. If you can propose what DLLs files need to be packaged and where we can get them; then work out a repeatable process to migrate maintenance plans then we can look at how we can add the feature in. |
It'll require ManagedDTS.dll which I believe is already loaded for DBAtools install. Correct me if I'm wrong. |
We do not include or load that DLL. |
If we want to support MaintenancePlan export/import, we'll need the ManageDTS.dll loaded as part of dbatools. If yes, I would gladly contribute to the project. If it cannot be loaded with dbatools, let me know. Thanks. |
We do not plan to support managing maintenance plans at this time. |
Although I do not personally like or encourage maintenance plans, they do exist and are being used. Would it be possible to add a new command to migrate Maintenance Plans. I have worked on something similar successfully using Powershell to extract, import, and copy the agent jobs schedule. Would love to contribute, if possible.
The text was updated successfully, but these errors were encountered: