Data model queries are stored in xdm file at file system.
If it is standalone BI Publisher - file name will be sample.xdm
If it is with OBIEE - _datamodel%2exdm
You can write unix script (like grep command) to search a particular string from xdm file content.
I Can't find the datamodel if I try with
grep data model name root directory
could you provide me the exact location details where I can see In Obiee 11g?
BI Publisher reports can be found in
The above paths are just for your reference because it might be different in your case. But look for the paths that are highlighted here.
In BI Publisher application, you can obtain the exact location from the "Administration" menu:
Administration > System Maintenance > Server Configuration > In "Catalog" Section, see the value of "Path"
Then you can go to the "Report" folder and search your datamodel with extension .xdm In this File you can see the query