Skip to content
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

Closed
baingar opened this issue Jan 31, 2019 · 7 comments
Closed

Copy-MaintenancePlan command #5028

baingar opened this issue Jan 31, 2019 · 7 comments
Labels

Comments

@baingar
Copy link

baingar commented Jan 31, 2019

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.

@wsmelton wsmelton added the will not support Unable to support this or unwilling to for various reasons label Jan 31, 2019
@wsmelton
Copy link
Member

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.

@baingar
Copy link
Author

baingar commented Jan 31, 2019

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?

@wsmelton wsmelton added feature Need more info and removed will not support Unable to support this or unwilling to for various reasons labels Jan 31, 2019
@wsmelton
Copy link
Member

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.

@wsmelton wsmelton reopened this Jan 31, 2019
@baingar
Copy link
Author

baingar commented Jan 31, 2019

It'll require ManagedDTS.dll which I believe is already loaded for DBAtools install. Correct me if I'm wrong.

@wsmelton
Copy link
Member

We do not include or load that DLL.

@baingar
Copy link
Author

baingar commented Feb 4, 2019

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.

@wsmelton
Copy link
Member

We do not plan to support managing maintenance plans at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants