Subscribe

Domain User View in OnCommand

Hi Adai,

I had a question I wondered maybe you knew the answer to. I read through TR-3690, as you posted above. I ran a Sybase DB command to query the server for all tables, and received a list. As you may notice in the Crystal Reports screen shot in that document above, there are two DB owners on tables - some are owned by 'DFM' and some by 'DFMGROUP'. I would like to query the tables owned by 'DFM' by running the command :"dfm database query run" but I get an error message:

dfm database query run "select * from domains"

Error preparing select * from domains: (-141) [Sybase][ODBC Driver][SQL Anywhere]Table 'domains' not found

Error: Error preparing select * from domains: -141: [Sybase][ODBC Driver][SQL Anywhere]Table 'domains' not found

How can I query the 'DFM' owned tables?

Thanks,

Reuvy

Re: OnCommand(DFM) and its related Technical Reports

Hi Reuvy,

Could you please check for the user with which you are trying to run the query has DB access enabled?

If not please run this command to enable the DB access for this user from DFM CLI:

dfm database access enable -u <user-name-or-id>

Regards,

-Amir

Re: OnCommand(DFM) and its related Technical Reports

Hi Amir,

I figured I was using a user who add access since the other tables work just fine for me. When you run the command "dfm database user list", you have a user listed there called "Administrator"?

Reuvy

Re: OnCommand(DFM) and its related Technical Reports

Hi Reuvy,

Yes I am logged in as user "Administrator" and running the query. However I found that this user need not be listed under "dfm database user list".

In your case you might have to create a DB user using "dfm database user create" and give access to this user using "dfm database access enable" cli.

Regards,

-Amir

Re: OnCommand(DFM) and its related Technical Reports

Genius Watson!

So I tried it with our Domain 'Administrator' account and it worked. Just my own username isn't loved. How do I tackle that?

-R

Re: OnCommand(DFM) and its related Technical Reports

Cool! To be able to use the non-admin account, as I said in last post, create a DB user and enable DB access for that user using DFM CLIs.

Regards,

-Amir

Re: Domain User View in OnCommand

Hi Reuvy,

     We dont have a view for domains. The list of database view that are exposed are documented along with their schema under the following location.

http://<dfm server name/id>:8080/help/dfm.htm#%3E%3Ecmd=1%3E%3Epan=2

Database schema

Database schema for DataFabric Manager non-historic data

Database schema for DataFabric Manager historic data

Relationship among fields of various database views

Regards

adai

Re: Domain User View in OnCommand

Hi Adai,

Amir was right. Although you don't have a view, I just needed to create a new user (didn't matter the name or whatever) and I was able to query the database directly, regardless of whether it was a view or not. What I still did not understand was what good did the user creation do, if my username and the username I created were totally different. It was not like in between running the same command I entered in a username or something. And also, why when I used the Administrator account that worked even without creating a new username.

Reuvy

Re: Domain User View in OnCommand

Hi Reuvy,

     You used a unsupported cli to query the db directly which is not supposed to be used. The user creation was to access the readonly views exposed, where as you accessed the db directly which can be done by any user who belong to the local administrator group of that windows box as by virtue of being an user of admin group they get DFM global full control capability.

Pls refrain from using the cli as customers are not supposed to query the db directly except when asked by netapp support.

Hope this helps.

Regards

adai

Re: Domain User View in OnCommand

Hey Adai,


Here is where I disagree -

  • Both accounts that I am using are members of the Local Administrators group on the DFM server
  • Even without running the command "dfm database user create" command I can access all of the views listed
  • The only difference that the above command made was that it allowed me to access the monitors table (amongst others)
  • I opened up a support case about this, and both I and the engineer realized that when we create any account it gives us access, although neither of us really understood why.

Ultimately, I want to access OSSV Backup Job data which none of your views (sadly) provide. The reporting for OSSV is horrific (or really non-existant) so I am looking to export the data and generate reports myself on the data. Essentially, all I want is to just export the data, a seemingly harmless task. I already previously turned to PS for help with this and they provided me with the above document to connect to the Sybase DB and query the data directly. The problem is that unless you have Sybase in house, none of the query tools I tested were able to connect to the DB. So creating an ODBC connection as the document referenced above shows doesn't help. Besides, if the native "dfm..." commands give me the same info just fine, why bother with ODBC.

If you are up to taking feature requests, maybe you can add a request to add views for OSSV tables as well.

Cheers,

Reuvy