What are the challenges you face when working across database platforms? Take the survey
Options

Pushing Tab Coloring to Lots of Servers

DonFergusonDonFerguson Posts: 202 Silver 5
edited September 30, 2013 12:22PM in SQL Prompt
I like the tab coloring feature; however, it will be a chore to push it out individually to every instance for all DBAs. Is there an easier way to do this via script or other means?

Comments

  • Options
    Anu DAnu D Posts: 876 Silver 3
    Looks like the information is stored in servers.xml file so if you copy that around that would work.

    The XML file resides here: %localappdata%\Red Gate\SQL Prompt 6

    Hope this helps.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Options
    Yes, that helps.

    In my case I was able to further take this information and query my Central Management server to generate the XML data needed.

    Since I have a naming convention on the different environments, it was simply a matter of parsing the environment value from the name. I am providing it for the benefit of anyone else interested.

    Obviously this query needs to be modified to meet the convention of a given organization's naming conventions, but here's a start. Modify as needed the output from this query below and paste results into the XML file following the <?xml version="1.0"?> line.

    SELECT name
    ,category = CASE LEFT(name, 1)
    WHEN 'D' THEN 'DEVELOPMENT'
    WHEN 'S' THEN 'STAGING'
    WHEN 'T' THEN 'TESTING'
    WHEN 'P' THEN 'PRODUCTION'
    ELSE 'PRODUCTION'
    END
    FROM msdb.dbo.sysmanagement_shared_registered_servers_internal
    FOR XML PATH('server')
    ,ROOT('settings')
Sign In or Register to comment.