Closed pollusb closed 2 months ago
if the instance is down, or there are several instances, how can we figure out what errorlog to target ?
That's a good question. Since Get-DbaErrorLog receive SqlInstance as a parameter we can get from remote registry, the information needed to find the ERRORLOG file in the server's registry.
Get-DbaErrorLog should return the file itself instead of returning the result of the SMO, Server.ReadErrorLog method when the instanec is down.
I would consider this out of scope as it adds ton of complexity to a simple command, but also requires a much more permission (e.g., admin rights to the servers, admin shares being enabled) compared to pulling the log via the database engine.
If this is really desired it would be better suited for a stand-alone command like Get-DbaErrorLogFile
or something of that nature.
@wsmelton I understand your point. Since they would not return the same objet format, they should be 2 distinct functions. Do I need to close this ticket and open a new one or can this one can be switched to a new feature?
I create a new feature request #9333
Summarize Functionality
Investigating problems with and SQL Server instance that has stopped running or won't start.
Is there a command that is similiar or close to what you are looking for?
Yes
Technical Details
Get-DbaErrorLog should return the file itself instead of returning the result of the SMO, Server.ReadErrorLog method when the instanec is down.