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

New-DcnClone: use dbatools for db enumeration #217

Merged
merged 3 commits into from
Oct 15, 2022

Conversation

lowlydba
Copy link
Contributor

Fixes #216

@lowlydba lowlydba changed the title New-DbaClone: use dbatools for db enumeration New-DcnClone: use dbatools for db enumeration Jul 29, 2022
@sanderstad sanderstad self-requested a review October 14, 2022 06:29
Copy link
Collaborator

@sanderstad sanderstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if that is something we want to do. We already have the server object which already contains all the database objects.
Using Get-DbaDatabase opens another connection to the database server which in theory isn't needed

@lowlydba
Copy link
Contributor Author

I wonder if that is something we want to do. We already have the server object which already contains all the database objects. Using Get-DbaDatabase opens another connection to the database server which in theory isn't needed

Could definitely to it custom, but the DBA tools function does a lot of heavy lifting to ensure it doesn't error out, so re-doing that work might not be worth it.

@sanderstad
Copy link
Collaborator

I wonder if that is something we want to do. We already have the server object which already contains all the database objects. Using Get-DbaDatabase opens another connection to the database server which in theory isn't needed

Could definitely to it custom, but the DBA tools function does a lot of heavy lifting to ensure it doesn't error out, so re-doing that work might not be worth it.

Good call. If I write my script and already have a connections I try to refrain from having multiple connections because when you're iterating lots and lots of objects, then those connections can really add up.

In this case I think it could be benefitial.

@sanderstad sanderstad merged commit 0671ada into dataplat:development Oct 15, 2022
@sanderstad
Copy link
Collaborator

Thank you for putting in the effort

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

Successfully merging this pull request may close these issues.

New-DcnClone: Enumerating databases triggers error
2 participants