2012-07-08 06:04 AM
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?
2012-07-08 06:22 AM
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>
2012-07-08 06:28 AM
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"?
2012-07-08 06:42 AM
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.
2012-07-10 03:44 AM
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.
Database schema for DataFabric Manager non-historic data
Database schema for DataFabric Manager historic data
Relationship among fields of various database views
2012-07-10 04:10 AM
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.
2012-07-10 05:41 AM
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.
2012-07-10 05:56 AM
Here is where I disagree -
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.