How to fix ORA-33262: Analytic workspace MY_AW does not exist ?
731012Jun 28 2010 — edited Jun 30 2010Here is my version of : http://download.oracle.com/docs/cd/E11882_01/olap.112/e10795/select.htm#CBBGEGFA
I don't understand why I get this ORA-33262, it just does not make sense ...
The API should be doing AW ATTACH MYSCHEMA.MY_AW RO
Solution 1 : The DBA in my team thinks there is no way for her to create a synonym (or something like that) for the MYSCHEMA.MY_AW so I (the API) can use only MY_AW, anyone knows a way to do it ?
Maybe the second call to _displayResult() needs to ATTACH the AW while the first does not ...
Solution 2 : How could I specify to the API to use MYSCHEMA.MY_AW instead of MY_AW ?
Thanks in advance !
JP
------
DataProvider dp = new DataProvider();
OracleConnection connection = (OracleConnection)connectionFactory.getConnection(); // LOGGED USING PROXY AUTH WITH THE USER (COULD BE ANY USER) AUTHENTICATED TO THE WEB APP AND ACTUALLY REQUESTING THIS TEST
UserSession session = dp.createSession(connection);
…
MdmRootSchema mdmRootSchema = (MdmRootSchema)dp.getMdmMetadataProvider().getRootSchema();
MdmDatabaseSchema mdmGlobalSchema = mdmRootSchema.getDatabaseSchema("*MYSCHEMA*");
…
MdmPrimaryDimension mdmDim = (MdmPrimaryDimension)mdmGlobalSchema.getTopLevelObject(dimension.getName());
…
test.testExample(mdmDim);
…
public void testExample(MdmPrimaryDimension mdmProdDim) {
// Get the Source for the short label attribute of the dimension.
MdmAttribute labelAttribute = mdmProdDim.getShortValueDescriptionAttribute();
// prodShortLabel, which is the Source for the short value description attribute of the PRODUCT_AWJ dim
Source prodShortLabel = labelAttribute.getSource();
// prodHier, which is the Source for the Product Primary hierarchy.
MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy) mdmProdDim.getDefaultHierarchy();
StringSource prodHier = (StringSource) mdmProdHier.getSource();
// levelSrc, which is the Source for the Family level of the Product Primary hierarchy of the PRODUCT_AWJ dimension.
MdmHierarchyLevel mdmHierarchyLevel = mdmProdHier.getHierarchyLevels().iterator().next();
Source levelSrc = mdmHierarchyLevel.getSource();
MdmAttribute mdmAncestorAttribute = mdmProdHier.getAncestorsAttribute();
// prodHierAncsAttr, which is the Source for the ancestors attribute of the hierarchy.
Source prodHierAncsAttr = mdmAncestorAttribute.getSource();
MdmAttribute mdmParentAttribute = mdmProdHier.getParentAttribute();
// prodHierParentAttr, which is the Source for the parent attribute of the hierarchy.
Source prodHierParentAttr = mdmParentAttribute.getSource();
int pos = 1;
// Get the element at the specified position of the level Source.
Source levelElement = levelSrc.at(pos);
// Select the element of the hierarchy with the specified value.
Source levelSel = prodHier.join(prodHier.value(), levelElement);
// Get ancestors of the level element.
Source levelElementAncs = prodHierAncsAttr.join(prodHier, levelElement);
// Get the parent of the level element.
Source levelElementParent = prodHierParentAttr.join(prodHier, levelElement);
// Get the children of a parent.
Source prodHierChildren = prodHier.join(prodHierParentAttr, prodHier.value());
// Select the children of the level element.
Source levelElementChildren = prodHierChildren.join(prodHier, levelElement);
// Get the short value descriptions for the elements of the level.
Source levelSrcWithShortDescr = prodShortLabel.join(levelSrc);
// Get the short value descriptions for the children.
Source levelElementChildrenWithShortDescr =
prodShortLabel.join(levelElementChildren);
// Get the short value descriptions for the parents.
Source levelElementParentWithShortDescr =
prodShortLabel.join(prodHier, levelElementParent, true);
// Get the short value descriptions for the ancestors.
Source levelElementAncsWithShortDescr =
prodShortLabel.join(prodHier, levelElementAncs, true);
// Commit the current Transaction.
commit();
// Create Cursor objects and display their values.
System.out.println("Level element values:");
_displayResult(levelSrcWithShortDescr, false); // WORKS WITH NO PROB, I SEE THE NORMAL OUTPUT AS IN THE EXAMPLE
System.out.println("\nLevel element at position " + pos + ":");
_displayResult(levelElement,false); // I GET ORA-33262, SEE BELOW
System.out.println("\nParent of the level element:");
_displayResult(levelElementParent,false);
System.out.println("\nChildren of the level element:");
_displayResult(levelElementChildrenWithShortDescr,false);
System.out.println("\nAncestors of the level element:");
_displayResult(levelElementAncs,false);
}
private void _displayResult(Source source, boolean displayLocVal)
{
CursorManager cursorManager =
dp.createCursorManager(source); // Exception for ORA-33262 is thrown here
Cursor cursor = cursorManager.createCursor();
cpw.printCursor(cursor, displayLocVal);
// Close the CursorManager.
cursorManager.close();
}
------
Error class: Express Failure
Server error descriptions:
DPR: cannot create server cursor, Generic at TxsOqDefinitionManager::crtCurMgrs4
SEL: Unable to generate an execution plan for the query, Generic at TxsOqExecutionPlanGenerator::generate(TxsOqSourceSnapshot*)
INI: XOQ-00703: error executing OLAP DML command "(AW ATTACH MY_AW RO : ORA-33262: Analytic workspace MY_ AW does not exist.
)", Generic at TxsOqAWManager::executeCommand
Edited by: J-P on Jun 29, 2010 9:58 AM