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

Databases with same name on multiple instances #3916

Closed
pmsousa opened this issue Aug 22, 2018 · 8 comments
Closed

Databases with same name on multiple instances #3916

pmsousa opened this issue Aug 22, 2018 · 8 comments
Assignees

Comments

@pmsousa
Copy link

pmsousa commented Aug 22, 2018

Steps to Reproduce

  • 2 SQL Server instances (non related, different systems/servers) – inst1 e inst2;
  • Both instances have SharePoint BD’s, thus you have BD’s with common names (i.e.: SharePoint_Config, WSS_Logging, WSS_Content, etc.)

powershell

#Backup history timeline:
Get-DbaBackupHistory -SqlInstance 'SQL01','SQL02' -Since '2018-08-18 00:00' | ConvertTo-DbaTimeline | Out-File C:\temp\Get-DbaBackupHistory.html -Encoding ascii 

Expected Behavior

The expected behavior should be a timeline for each database, with no aggregation by database name or an added column to the results with the servername/instancename to separate the databases.

Actual Behavior

Has you can see, looking at the chart it seems that WSS_Logging database had 2 Full Backup on the same day at different hours. The reality is that both SQL Server instances have a WSS_Logging database and different schedules for the Full Backup on the same weekday.

image

Final Notes

GREAT WORK!!!!! Kudos for this... 🥇

@potatoqualitee
Copy link
Member

Thank you for the bug report @pmsousa !

@marcingminski can you please take a look? also, i'll be sending you an invite to the sqlcollab so that you can be assigned 😅

@marcingminski
Copy link
Contributor

Hi, yes, for some reason this had skipped my radar. It was only brought to my attention couple of days ago on slack. Technically not a bug as it wasn’t designed to handle multi server and it only groups by database name. Since dbatools however have multisever at heart, I will make this work but looking for some input how you guys want it to work:

  • I can make server name and database name into a composite key and everything will be shown on same chart. The name will be SEREVERNAME - DATABASENAME

  • I can make chart per server. Then the format will not change but there will be repeated charts for each server.

Or maybe I’ll do both cos I don’t like compromises.

@potatoqualitee
Copy link
Member

LOL, either way you choose works for me. all options seem reasonable. Thanks so much!

@pmsousa
Copy link
Author

pmsousa commented Nov 13, 2018

Hi @marcingminski,
I can relate to that, it also skipped my first tests on Dev Environments but when I started using dbatools on more and more envs, this issue popped-up. SharePoint developers tend to leave the defaults for database names and when you have more that one server of these... :)

From both proposed solution, I think the best approach is the first. If we wanted separate charts, then we just add to run the cmdlet one instance at a time and get separate graphs. If I run the cmdlet for multiple SQL instances, one should assume that I want an overview of all those instances in just one graph. So the composite key and one chart seems the best solution.

What do you think? Makes sense?

@marcingminski
Copy link
Contributor

Yep. I was thinking multiple charts but on the same page. It may be easier to read that’s all but happy to experiment and see what works. Don’t think it’s a big change anyway.

@stale
Copy link

stale bot commented Jan 12, 2019

This issue has been automatically marked as stale because it has not had recent activity. If you would like this issue to remain open:

  • Verify that you can still reproduce the issue in the latest version of dbatools
  • Comment that the issue is still reproducible and include:
    • What version of dbatools you reproduced the issue on
    • What OS and version you reproduced the issue on
    • What steps you followed to reproduce the issue

@stale stale bot added the wontfix label Jan 12, 2019
@stale
Copy link

stale bot commented Feb 11, 2019

This issue has been automatically closed because it has not had activity in the last three months. If this issue is still valid, please add a comment

@stale stale bot closed this as completed Feb 11, 2019
@marcingminski
Copy link
Contributor

Bad bot.
Apologies I completely forgot about it. I’ll add it to my task list.

@marcingminski marcingminski reopened this Mar 19, 2019
marcingminski added a commit to marcingminski/dbatools that referenced this issue Mar 19, 2019
@marcingminski marcingminski mentioned this issue Mar 19, 2019
9 tasks
potatoqualitee added a commit that referenced this issue Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants