Minion allows you to setup applications and tie them to servers. This SP shows you the servers associated with a specific application.
Name | Type | Description |
---|---|---|
@AppName | varchar | The name of the app as defined in dbo.Application. |
@Enviro | varchar | The name of the environment as defined in dbo.ApplicationEnvironment. |
@Role | varchar | The name of the role as defined in dbo.ApplicationRole. |
@DistinctOnly | bit | Returns a distinct list of servers for the given application. |
@ReturnSchema | bit | Returns the schema and SP call to help with your own dev. See SchemaReturn. |
@Help | bit | Returns the link to online help. |
Distinct Results
If a server belongs to more than one environment and/or role for an application, it's easy to get dupes in the result set.
Under ordinary circumstances, when you're querying to audit an application's footprint, this is useful. But when you're using this SP as a way to get a list of servers to run a collection or a query, then you'll likely need a distinct list so you don't query the servers more than once.
For example, you write your own collection to get info about all the servers in the HR app. Rather than writing your own logic, you decide to use this SP to get the list of servers you want. In this case you don't want dupes in the list.
Sample calls:
--Gets all servers that belong to the Info-G app in the prod enviro that are app servers. EXEC Servers.byApp @AppName = 'Info-G', @Enviro = 'Prod', @Role = 'App Server'; --Gets all servers that belong to the Info-G app. EXEC Servers.byApp @AppName = 'Info-G'; --Gets all servers that belong to the Info-G app in the prod enviro. EXEC Servers.byApp @AppName = 'Info-G', @Enviro = 'Prod';
Related Articles