How do you use cloud databases? Take the survey.

Export SQL Server List?

Hello All,
I need to know if there's a way I can export my list of sql servers from SQL Monitor 9 so I can import it into SQL Monitor 11; any suggestions? TIA
Tagged:

Answers

  • Hi, 

    Thanks for reaching out through the Redgate forums.

    If you are upgrading from SQL Monitor 9 to 11 on the same machine it should retain the same repository database so your configuration & monitored servers persist between versions
    Here are a couple of handy links for upgrading to SQL Monitor 11 from older versions
    Upgrading SQL Monitor
    Locating the SQL Monitor Database
    Always recommended to take backups of files before upgrades so you can roll back if it doesn't go as planned. 


    It may be possible to create some PowerShell scripts that will extract lists of servers in Monitor and then be used to create another import script to re-create them in a new instance.
    Using API / Powershell Module

    Example scripts can be found in your SQL Monitor dashboard by navigating to Configuration > API > View example Powershell scripts
    The 'List all monitored entities' & 'Add server' scripts may provide a good starting point to modify for your specific requirements



    Jon Kirkwood | Technical Support Engineer | Redgate Software
  • RiffMongerRiffMonger Posts: 2 New member
    edited October 13, 2021 10:19PM
    Anyone else? I'm hoping there's something that doesn't require a lot of circus acts (jumping through hoops) to get this list, but it doesn't seem to be available.
  • Thanks for your patience with this request. 

    I had a catch-up with some of the senior team members around this request and unfortunately, they have confirmed that there is not a nice & easy export/import process to handle this. there are likely to be some hoops if you're not conducting a straight upgrade from Monitor 9 to 11 on the same machine utilising existing repository databases


    I will provide some of their recommendations to this request;

    Using PowerShell to create the list of types and such of each entity for use to import from CSV (see example PowerShell script) would probably be the best.

    Otherwise, you can use <i><b>SELECT Name FROM settings.Clusters</b></i> on the repository which will give the top-level names of all the entities - the clusters (not the nodes) and standalone machines (and also from the settings tables for azureSqlServer, azureManagedInstance and AmazonRds).

    This list of entities, added again, would have it discover all the entities they are currently monitoring, but they would need to use PowerShell to import the list (they could then save this as a CSV and import it using a PowerShell script; but in this case, they would need to add more detail for what is expected by the <i><b>Add-SqlMonitorMonitoredObject</b></i>​ cmdlet

    Jon Kirkwood | Technical Support Engineer | Redgate Software
Sign In or Register to comment.