Skip to main content
Solved

Commvault Database to fetch information related to Media Agent properites

  • Dec 12, 2023 9:59 AM UTC
  • 3 replies
  • 81 views

Forum|alt.badge.img+5

HI Team, 

I am putting media agent in maintenance mode through exescript post which i want to run a sql query to fetch media agent name along with showing whether media agent is marked in maintenance mode or not.

 

Can someone help me with sql table wherein i can fetch this information.

Best answer by Abhishek Narulkar

Hi @Rahul Nair , you can use this query to get the media Agents which are in maintenance.

select host.ClientId, APPC.name
from MMHost host with (readuncommitted)
    inner join APP_Client APPC with (readuncommitted) ON host.ClientId = APPC.id
where host.Attribute & 16 /*MMS2_MA_MARKED_FOR_MAINTENANCE*/ > 0 
 

View original

3 replies

Forum|alt.badge.img+9
  • Vaulter
  • Dec 13, 2023 11:21 AM UTC

@Rahul Nair Good day!
please try the view check if it helps
select * from CommCellMediaAgentInfo


Forum|alt.badge.img+5
  • Author
  • Apprentice
  • Dec 15, 2023 12:18 PM UTC

Hi Sujay,

Above query doesnt give expected output. It doesnt have any column to show if a MA is marked in maintenance mode or not.


Forum|alt.badge.img+10

Hi @Rahul Nair , you can use this query to get the media Agents which are in maintenance.

select host.ClientId, APPC.name
from MMHost host with (readuncommitted)
    inner join APP_Client APPC with (readuncommitted) ON host.ClientId = APPC.id
where host.Attribute & 16 /*MMS2_MA_MARKED_FOR_MAINTENANCE*/ > 0