Sqlserver Database schema's not discovered in uCMDB.
Recently i discovered some of the sqlservers in uCMDB I see only sql instances got discovered and I am unable to see schema names when i check with communication logs i found it was getting discover but it was not updating in uCMDB attributes i.e, Sql schema names.
I did below changes DatabaseProps.py to make it appear in uCMDB
Original script below: -Remove cotted lines from original script
def getDatabases(self,databases,hostId,discoverConfigs=1):
dbList = Util.mapToInString(databases,Queries.DATA_NAME)
configFiles=self.getDatabaseProperties(databases,dbList,discoverConfigs)
backups = self.getBackup(databases,dbList,hostId)
oshv = ObjectStateHolderVector()
itr = databases.values().iterator()
while itr.hasNext():
oshv.add(itr.next())
oshv.addAll(configFiles)
oshv.addAll(backups)
return oshv
Change to below script-Add underlined lines to above script
def getDatabases(self,databases,hostId,discoverConfigs=1):
dbList = Util.mapToInString(databases,Queries.DATA_NAME)
configFiles=self.getDatabaseProperties(databases,dbList,discoverConfigs)
backups = self.getBackup(databases,dbList,hostId)
oshv = ObjectStateHolderVector()
itr = databases.values()
map(oshv.add, itr)
oshv.addAll(configFiles)
oshv.addAll(backups)
return oshv
Once script get modified rerun the job, now we can able to see all the sql schema names.
IT Analyst at Tata Consultancy Services Limited
2 年Thank you chethan. For me the script is same as you mentioned but the sql schema is still not getting populated.
ServiceNow Senior Business Consultant ? CSA ? CMDB ? CIS-HAM ? Project Management
8 年thank you Chethan ??