Active IQ Unified Manager Discussions

Syntax for dfm database query statement

bhirscho
4,656 Views

We need a way to get the objCreationTime out of DFM for volumes.   Would someone please be able to provide the correct “dfm database query run “select”” statement?

4 REPLIES 4

adaikkap
4,656 Views

Hi Bryan,

           The field you are looking for ""objCreationTime" is not availabe via database views so you can access them using dfm database query run.

dfm detail <obj-name-or-id> | findstr /i obj will give your objCreation time.

C:\>dfm detail 17989 | findstr /i obj

objComment

objCreationTimestamp               2010-09-09 20:55:06.000000

objDeleted

objDeletedBy

objDisappearedSince

objFlags                           5

objFullName                        xxx-drp01-cf1:/xxxx_project01

objId                              17989

objName                            xxx_project01

objPerfStatus                      Unknown

objPerfStatusCode                  5

objStaleSince

objStatus                          Error

objStatusChangeTimestamp           2012-01-15 09:43:34.000000

objStatusCode                      7

objStatusMessage

objStatusTimestamp                 2012-01-15 09:43:34.000000

objType                            Volume

sysObjectID                        .1.3.6.1.4.1.789.2.3

C:\>

Regards

adai

bhirscho
4,656 Views

Thank you Adai,

My customer has thousands of volumes and was really hoping to query the database against this attribute, filtering on values older than some date "X".    I believe your solutions will require exporting a list of all obj-name-or-id's then running the dfm detail command against each of them.

Can you think of any more efficient ways to accomplish this?  Your help is appreciated.

jakob_scheidler
4,656 Views

Hello,

don't know if you have solved this already. By querying against the DFM database and not the views, you are able to get this information.

eg: dfm query run "SELECT * FROM DFM.volumes v LEFT JOIN DFM.objects o ON v.volId = o.objId WHERE o.objDeleted IS NULL AND v.snapshotSourceId=0"

You just have to chose which fields you need for the output. SELECT * comes up with quite a lot fields which you probably don't need. If you need filernames and other you'd have to make more joins.

Hope this helps.

Regards

adaikkap
4,656 Views

Hi Jakob,

     dfm query run is not a supported cli and shouldn't not be used. Customer can only use view by dfm database query run cli.

Regards

adai

Public