User 7b0ee04e66
01-06-2012 09:34:31
Good morning
I have 2 Oracle users A & B
A owns a JChem cartridge table and a view based on this table
A & B can both run a sql chemical query against the table and the view using jc_compare
I have promoted the table and the view to entities in Instant JChem 5.9.3
The table is recognized as a chemistry entity and I can run a chemical search against it.
However the view is not recognized as a chemistry entity, I can fix the display by changing the renderer to be a structure, but I can't run a chemical query against it.
As user B, I have run
select* from all_views where owner = 'A'
select
i.index_name, i.table_owner, i.table_name, c.column_name from all_indexes i, all_ind_columns cwhere i.ityp_owner = 'JCHEM'
and i.owner = 'A'
and i.ityp_name='JC_IDXTYPE'
and i.index_name = c.index_name
and this returns the view that I am trying to query
and the index of the table smiles column.
Does user B need extra permission(s) to be able to recognize the view as a chemistry entity from IJC ?
Let me know if you need more information
Thanks
Catherine
ChemAxon fa971619eb
01-06-2012 16:59:04
User 7b0ee04e66
01-06-2012 19:41:19
Hi Tim
Please see below the view definition
The view is created with selected fields from one table only
Thanks
Catherine
CREATE
OR REPLACE FORCE VIEW EVOSRC.CT_LAB_CHEMICAL_VIEW (
LAB_CHEMICAL_ID
, SMILES
, IUPAC_NAME
, BUILDING
, LAB
, CATALOGUE_NUMBER
, SUPPLIER_NAME
, CURRENT_QUANTITY
, CURRENT_QUANTITY_UNIT
, INITIAL_QUANTITY
, INITIAL_QUANTITY_UNIT
, IFS_PROJECT_ID
, DESCRIPTION
,
CLASS, LAST_UPDATED
)
AS
SELECT LAB_CHEMICAL_ID, SMILES
, IUPAC_NAME
, BUILDING
, LAB
, CATALOGUE_NUMBER
, SUPPLIER_NAME
, CURRENT_QUANTITY
, CURRENT_QUANTITY_UNIT
, INITIAL_QUANTITY
, INITIAL_QUANTITY_UNIT
, IFS_PROJECT_ID
, DESCRIPTION
,
CLASS, LAST_UPDATED
FROM CT_LAB_CHEMICAL;
GRANT
SELECT ON EVOSRC.CT_LAB_CHEMICAL_VIEW TO LAB_CHEM;
ChemAxon 37bb34e128
04-06-2012 08:39:20
Hi Catherine,
I'm looking at the definition of your view. What version of IJC are you using? There have been some fixes in this areas for IJC 5.10.
Thanks,
-vita
ChemAxon 37bb34e128
04-06-2012 13:50:27
Hi Catherine,
the SQL parser in IJC 5.9.x is a bit dumb and understand only a limited SQL syntax. Please define your view strictly as this:
create view XYZ as select ...
The select part can contain usual stuff, but there must be nothing else after that part. In your case there was the 'grant ...' part that causes the problem.
I fixed the problem in trunk and should be able to squeeze the fix in IJC 5.10 as well. With the fix your SQL parses ok.
Thanks,
-vita
User 7b0ee04e66
06-06-2012 05:52:17
Good morning
Thanks for your reply
I needed the 'grant' option as I am trying to connect to IJC as the user defined in the grant
I have now been able to get it to work and recognize the view as a structure entity but I had to give extra privilege to the user connecting to IJC (create view) and create the view in the oracle schema connecting to IJC
I will look forward to try this out in the next version.
Thanks for your help
Catherine