Sdo_filter fail when query against a spatial view in different schema

We have a table with X,Y coordinates and would like to run spatial query against it. We do not want to change the table structure, so we opt to use a function based index. USER_SDO_GEOM_METADATA is updated and index is built. Then we created a view with spatial column from the table. Everything works fine with the user who owns the table and view.
When we try to run a spatial query against the view from a different user, it failed with error. However, if we substitute the select from my_view* with the actual SQL statement that created the view, it works. So it looks like Oracle refuse to acknowledge the spatial index if accessed via view. Here is some simplified scripts:
--- connect as USER1.
--update meta data
INSERT INTO USER_SDO_GEOM_METADATA ( TABLE_NAME, COLUMN_NAME, DIMINFO, SRID ) VALUES
('LOCATIONS', 'MDSYS.SDO_GEOMETRY(2001,2264,SDO_POINT_TYPE(NVL(X_COORD,0),NVL(Y_COORD,0),NULL),NULL,NULL)',
SDO_DIM_ARRAY( SDO_DIM_ELEMENT('X', 1300000, 1600000, 1), SDO_DIM_ELEMENT('Y', 400000, 700000, 1) ), 2264 );
--created index
CREATE INDEX LOCA_XYGEOM_IDX ON LOCATIONS
( SDO_GEOMETRY(2001,2264,SDO_POINT_TYPE(NVL(X_COORD,0),NVL(Y_COORD,0),NULL),NULL,NULL)
) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
--create view
CREATE VIEW USER1.MY_VIEW AS SELECT ID ,X_COORD,Y_COORD, SDO_GEOMETRY(2001,2264,SDO_POINT_TYPE(NVL(X_COORD,0),NVL(Y_COORD,0),NULL),NULL,NULL) SHAPE
FROM USER1.LOCATIONS WHERE X_COORD>0 AND Y_COORD>0;
-- run spatial query from view, works fine by user1 by failed on user2.
SELECT SHAPE FROM (
SELECT * FROM USER1.MY_VIEW
) a WHERE sdo_filter (shape, sdo_geometry ('POLYGON ((1447000 540000, 1453000 540000, 1453000 545000, 1447000 545000, 1447000 540000))', 2264), 'querytype=window') = 'TRUE';
-- run spatial query from table directly, simply replace the view with actual statements that created the view. works fine by user1 AND user2.
SELECT SHAPE FROM (
SELECT ID ,X_COORD,Y_COORD, SDO_GEOMETRY(2001,2264,SDO_POINT_TYPE(NVL(X_COORD,0),NVL(Y_COORD,0),NULL),NULL,NULL) SHAPE
FROM USER1.LOCATIONS WHERE X_COORD>0 AND Y_COORD>0
) a WHERE sdo_filter (shape, sdo_geometry ('POLYGON ((1447000 540000, 1453000 540000, 1453000 545000, 1447000 545000, 1447000 540000))', 2264), 'querytype=window') = 'TRUE';
When run against the view by user2, the error is:
ORA-13226: interface not supported without a spatial index
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 8
ORA-06512: at "MDSYS.SDO_3GL", line 1173
13226. 00000 - "interface not supported without a spatial index"
*Cause:    The geometry table does not have a spatial index.
*Action:   Verify that the geometry table referenced in the spatial operator
has a spatial index on it.
Note, the SELECT SHAPE FROM (****) A WHERE SDO_FILTER(....) syntax is a third party application, all we have control is the part inside "(select ...)".
So it appears Oracle is treating view differently. Have attempted fake the view name into USER_SDO_GEOM_METADATA, did not work. Also, granted select on the index table to user2, did not work.
if we re-created the view in user2 schema, it worked for user2 but not user1, so it's not something we can do for every user.
Searched the forum, no good match found. A few posts talked about "union all" in view caused the problem but I do not have the union.
We are only use Oracle 10g Locator, not full spatial edition.
Any ideas?
Thanks!
Edited by: liu.284 on Oct 4, 2011 12:08 PM

It seems a bug, where a function-based spatial index is not correctly handled in a view query transformation.
Not sure if the following works for you or not.
add a new column "shape" (mdsys.sdo_geometry) in table locations, use a trigger and x_coord/y_coord
to set values for this new column, and just create a normal spatial index on this new column. (drop the
function-based spatial index). And create a view like:
CREATE VIEW USER1.MY_VIEW2 AS SELECT ID , X_COORD, Y_COORD, SHAPE
FROM USER1.LOCATIONS WHERE X_COORD>0 AND Y_COORD>0;

Similar Messages

  • Why do i get ORA-03113 when doing a spatial query against union all view?

    Hi, i created the following view
    CREATE OR REPLACE FORCE VIEW cola_markets_v
    AS
      (SELECT mkt_id, NAME, shape shape_a, NULL shape_b, NULL shape_c,
              NULL shape_d
         FROM COLA_MARKETS
        WHERE NAME = 'cola_a')
       UNION ALL
      (SELECT mkt_id, NAME, NULL shape_a, shape shape_b, NULL shape_c,
              NULL shape_d
         FROM COLA_MARKETS
        WHERE NAME = 'cola_b')
       UNION ALL
      (SELECT mkt_id, NAME, NULL shape_a, NULL shape_b, shape shape_c,
              NULL shape_d
         FROM COLA_MARKETS
        WHERE NAME = 'cola_c')
       UNION ALL
      (SELECT mkt_id, NAME, NULL shape_a, NULL shape_b, NULL shape_c,
              shape shape_d
         FROM COLA_MARKETS
        WHERE NAME = 'cola_d');added the necessary entries in USER_SDO_GEOM_METADATA and created a spatial index on COLA_MARKETS (SHAPE). However, when i do a spatial query against this view, i get ORA-03113. A spatial query against the base table works fine. Any ideas why this happens? (This is Oracle 10.2.0.3.0)
    Thanks in advance, Markus
    PS: This is my spatial query
    SELECT *
      FROM cola_markets_v t
    WHERE sdo_filter (t.shape_a,
                             SDO_GEOMETRY (2003,
                                           NULL,
                                           NULL,
                                           sdo_elem_info_array (1, 1003, 3),
                                           sdo_ordinate_array (1, 1, 2, 2)
                             'querytype=window'
                            ) = 'TRUE';

    Thank you for your reply. I have tried it with 11.1.0.6.0 today and it works. This might be an issue with 10.2.0.3.0.

  • Reports fail when run against a different data source

    Hello,
    We have a VB.NET 2008 WinForms application running on Microsoft .NET 3.5. We are using Crystal Reports 2008 runtime, service pack 3 -- using the CrystalDecisions.Windows.Forms.CrystalReportViewer in the app to view reports. In the GAC on all our client computers, we have versions 12.0.1100.0 and 12.0.2000.0 of CrystalDecisions.CrystalReports.Engine, CrystalDecisions.Shared, and CrystalDecisions.Windows.Forms.
    Please refer to another one of our posted forum issues, u201CCritical issue since upgrading from CR9 to CR2008u201D, as these issues seem to be related:
    Critical issue since upgrading from CR9 to CR2008
    We were concerned with report display slow down, and we seemed to have solved this by using the Oracle Server driver (instead of either Microsoft's or Oracle's OLEDB driver).  But now we must find a resolution to another piece of the puzzle, which is:  why does a report break if one data source is embedded in the .rpt file is different than the one you are trying to run the report against, in the .NET Viewer?
    Problem:
    If you have a production database name (e.g. "ProdDB") embedded in your .rpt file that you built your report from and try to run that report against a development database (e.g. "DevDB") (OR VICE VERSA -- it is the switch that is the important concept here), the report fails with a list of messages such as this:
        Failed to retrieve data from the database
        Details:  [Database vendor code: 6550 ]
    This only seems to happen if the source of the report data (i.e. the underlying query) is an Oracle stored procedure or a Crystal Reports SQL Command -- the reports run fine against all data sources if the source is a table or a view).  In trying different things to troubleshoot this, including adding a ReportDocument.VerifyDatabase() call after setting the connection information, the Crystal Reports viewer will spit out other nonsensical errers regarding being unable to find certain fields (e.g. "The field name is not known), or not able to find the table (even though the source data should be coming from an Oracle stored procedure, not a table).
    When the reports are run in the Crystal Reports Designer, they run fine no matter what database is being used; but the problem only happens while being run in the .NET viewer.  It's almost as if something internally isn't getting fully "set" to the new data source, or something -- we're really grasping at straws here.
    For the sake of completeness of information, here is how we're setting the connection information
            '-- Set database connection info for the main report
            For Each oConnectionInfo In oCrystalReport.DataSourceConnections
                oConnectionInfo.SetConnection(gsDBDataSource, "", gsDBUserID, gsDBPassword)
            Next oConnectionInfo
            '-- Set database connection info for each subreport
            For Each oSubreport In oCrystalReport.Subreports
                For Each oConnectionInfo In oSubreport.DataSourceConnections
                    oConnectionInfo.SetConnection(gsDBDataSource, "", gsDBUserID, gsDBPassword)
                Next oConnectionInfo
            Next oSubreport
    ... but in troubleshooting, we've even tried an "overkill" approach and added this code as well:
            '-- Set database connection info for each table in the main report
            For Each oTable In oCrystalReport.Database.Tables
                With oTable.LogOnInfo.ConnectionInfo
                    .ServerName = gsDBDataSource
                    .UserID = gsDBUserID
                    .Password = gsDBPassword
                    For Each oPair In .LogonProperties
                        If UCase(CStr(oPair.Name)) = "DATA SOURCE" Then
                            oPair.Value = gsDBDataSource
                            Exit For
                        End If
                    Next oPair
                End With
                oTable.ApplyLogOnInfo(oTable.LogOnInfo)
            Next oTable
            '-- Set database connection info for each table in each subreport
            For Each oSubreport In oCrystalReport.Subreports
                For Each oTable In oSubreport.Database.Tables
                    With oTable.LogOnInfo.ConnectionInfo
                        .ServerName = gsDBDataSource
                        .UserID = gsDBUserID
                        .Password = gsDBPassword
                        For Each oPair In .LogonProperties
                            If UCase(CStr(oPair.Name)) = "DATA SOURCE" Then
                                oPair.Value = gsDBDataSource
                                Exit For
                            End If
                        Next oPair
                    End With
                    oTable.ApplyLogOnInfo(oTable.LogOnInfo)
                Next oTable
            Next oSubreport
    ... alas, it makes no difference.  If we run the report against a database that is different than the one specified with "Set Datasource Location" in Crystal, it fails with nonsense errors 

    Thanks for the reply, Ludek.  We have made some breakthroughs, uncovered some Crystal bugs and workarounds, and we're probably 90% there I hope.
    For your first point, unfortunately the information on the Oracle 6550 error was generic, and not much help in our case.  And for your second point, the errors didn't have anything to do with subreports at that time -- the error would manifest itself even in a simple, one-level report.
    However, your third point (pointing us to KB 1553921) helped move us forward quite a bit more.  For the benefit of all, here is a link to that KB article:
    Link: [KB 1553921|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533353333333933323331%7D.do]
    We downloaded the tool referenced there, and pointed it at a couple of our reports.  The bottom line is that the code it generated uses a completely new area of the Crystal Reports .NET API which we had not used before -- in the CrystalDecisions.ReportAppServer namespace.  Using code based on what that RasConnectionInfo tool generated, we were able gain greater visibility into some of the objects in the API and to uncover what I think qualifies as a genuine bug in Crystal Reports.
    The CrystalDecisions.ReportAppServer.DataDefModel.ISCRTable class exposes a property called QualifiedName, something that isn't exposed by the more commonly-used CrystalDecisions.CrystalReports.Engine.Table class.  When changing the data source with our old code referenced above (CrystalDecisions.Shared.ConnectionInfo.SetConnection), I saw that Crystal would actually change the Table.QualifiedName from something like "SCHEMAOWNER.PACKAGENAME.PROCNAME" to just "PROCNAME" (essentially stripping off the schema and package name).  Bad, Crystal...  VERY BAD!  IMHO, Crystal potentially deserves to be swatted on the a** with the proverbial rolled-up newspaper.
    I believe this explains why we were also able to generate errors indicating that field names or tables were not found -- because Crystal had gone and changed the QualifiedName to remove some key info identifying the database object!  So, knowing this and using the code generated by the RasConnectionInfo tool, we were able to work around this bug with code that worked for most of our reports ("most" is the key word here -- more on that in a bit).
    So, first of all, I'll post our new code.  Here is the main area where we loop through all of the tables in the report and subreports:
    '-- Replace each table in the main report with new connection info
    For Each oTable In oCrystalReport.ReportClientDocument.DatabaseController.Database.Tables
        oNewTable = oTable.Clone()
        oNewTable.ConnectionInfo = GetNewConnectionInfo(oTable)
        oCrystalReport.ReportClientDocument.DatabaseController.SetTableLocation(oTable, oNewTable)
    Next oTable
    '-- Replace each table in any subreports with new connection info
    For iLoop = 0 To oCrystalReport.Subreports.Count - 1
        sSubreportName = oCrystalReport.Subreports(iLoop).Name
        For Each oTable In oCrystalReport.ReportClientDocument.SubreportController.GetSubreportDatabase(sSubreportName).Tables
            oNewTable = oTable.Clone()
            oNewTable.ConnectionInfo = GetNewConnectionInfo(oTable)
            oCrystalReport.ReportClientDocument.SubreportController.SetTableLocation(sSubreportName, oTable, oNewTable)
        Next oTable
    Next iLoop
    '-- Call VerifyDatabase() to ensure that the tables update properly
    oCrystalReport.VerifyDatabase()
    (Thanks to Colin Stynes for his post in the following thread, which describes how to handle the subreports):
    Setting subreport connection info at runtime
    There seems to be a limitation on the number of characters in a post on this forum (before all formatting gets lost), so please see my next post for the rest....

  • Errors when querying against universe with DBlink tables

    Running XI 3.1
    DB1: MS SQL Server
    DB2: Oracle 11g
    Universe created on DB2 has linked tables from DB1.
    I created a view as Select * from table@DB1
    Using Webi Rich Client: successful query results
    Using Webi Lite: ORA-12154 error: TNS:could not resolve the connect identifier specified
    Using Deski: ORA-01002: fetch out of sequence. ORA-02063: preceding line from DBlink_name
    I've tried numerous array fetch size parameters but Deski still has that error message. Is there a different way to fetch data from a DBLink table? Why no errors when using Webi Rich? when creating universe against DBlink tables
    Thanks

    In our environemnt, we have encountered ORA-4030 and ORA-4031 in the past in one particular windows server. What i remember from that is , a single process in windows will be limited to use 2Gb of memory(irrespective of how much you allocate and how much RAM the server has). All the oracle user and server processes in windows has to get their share from this 2Gb allocated to a single process called oracle.exe. There is some way to extend this 2Gb limit to 3Gb or 4Gb by enabling a switch on some windows config file. You can easily get that by google.
    Check the memory used by oracle.exe in 10g server's task manager.
    Next, you may need to reduce SGA size... to give more room for user processes. You may investigate on these lines.

  • "invalid LRS segment" when querying an Oracle Spatial DB

    I have a table of GIS segments in an Oracle Spatial database. I'm using C# and ODP to connect to the database. For a given measure from the start of a segment, I want to find the GPS coordinates for that point. I'm running the following query:
    select g.geom.sdo_ordinates ord_array from
    *(select sdo_lrs.locate_pt(shape,0.02,0) as geom from test_schema.test_table*
    where route='ABC' and segmentnum='101.1') g
    where shape is of type SDO_GEOMETRY. I'm getting the following error:
    ORA-13331: invalid LRS segment
    Is there a problem with how I'm passing shape to locate_pt()? The Oracle Spatial documentation says the argument should be SDO_geometry, so that seems ok.
    Edited by: 964844 on Oct 11, 2012 2:10 PM

    I'm using C# with ODP.NET.
    Here is the current version of the code that is failing:
    var param = new OracleParameter("geom", OracleDbType.Object);
    param.UdtTypeName = "MDSYS.SDO_GEOMETRY";
    param.Direction = ParameterDirection.Input;
    OracleCommand oCmd = new OracleCommand();
    oCmd.Connection = this.oConn;
    oCmd.CommandText = queryStr;
    oCmd.CommandType = CommandType.Text;
    oCmd.Parameters.Add(param);
    OracleDataAdapter da = new OracleDataAdapter(oCmd);
    DataTable dt = new DataTable();
    da.Fill(dt);
    The exception is generated by the da.Fill(dt) line.

  • ERROR: objectManager.QueryObjects() failing when querying users

    I have a list of user ObjectIDs saved in a community preference and am trying to write a function to itterate through them and display a link to each user's profile page where the hyperlink text is the user's description property.
    The profile page links works just fine thanks to the cool pt:OpenerLink transformer tag, but I'm having trouble doing a query for a user's Description property.
    I get an "Object Reference not set to an instance of an object." at: Plumtree.Remote.PRC.ObjectManagerWrapper.QueryObjects(Int32 folderID, Int32 startRow, Int32 maxRows, ObjectProperty sortProperty, Boolean ascending, ObjectProperty[] propsToReturn, QueryFilter[] filters) at sam7.portlet3.buildUserLinks3(String strValue) in C:\Plumtree\ZZZRemotePortlets\sam7\portlet3.aspx.vb:line 126
    The buildUserLinks3() routine that does the query and builds the link is included below. Line 126 is the queryResults=ObjectManager.QueryObjects(...) call.
    What have I missed?
    Public Function buildUserLinks3(ByVal strValue As String)
    Dim arrValues As Array Dim intObjectID As Integer Dim strOutput As StringBuilder = New StringBuilder
    Dim RemoteSession As IRemoteSession Dim ObjectManager As IObjectManager Dim strUserDescription As String
    Dim folderID As Integer folderID = -1 'search all folders
    Dim startRow As Integer startRow = 0 'start at the first found
    Dim maxRows As Integer maxRows = 1 'return a single result
    Dim sortProperty As ObjectProperty sortProperty = UserProperty.UniqueName 'sort on the unique name
    Dim ascending As Boolean ascending = True 'sort ascending
    Dim propsToReturn(2) As ObjectProperty 'choose to return specific properties
    propsToReturn(0) = UserProperty.ObjectID propsToReturn(1) = UserProperty.SimpleName
    Dim filters(1) As QueryFilter 'filter the results
    RemoteSession = RemoteSessionFactory.GetTokenContext(portletRequest.GetRemoteAPIEndpoint(), portletRequest.GetLoginToken()) ObjectManager = RemoteSession.GetObjectManager(ObjectClass.User)
    ' parse the comma-separated list of User object IDs and look up the user's Properties. If strValue.Length > 1 And (strValue <> "null") Then arrValues = strValue.Split(",") For Each intObjectID In arrValues
    ' get the user's properties Try
    ' Set a query filter to sort for a unique objectID filters(0) = New StringQueryFilter(UserProperty.ObjectID, _ Operator.Equals, _ intObjectID.ToString) 'where the objectID equals the itterated value
    Dim queryResults As IObjectQuery queryResults = ObjectManager.QueryObjects( _ folderID, _ startRow, _ maxRows, _ sortProperty, _ ascending, _ propsToReturn, _ filters)
    ' There will be only one returned row based on the query filter above, but itterate anyway... ' it is good form in case something changes later. ' We'll keep overwriting the strUserDescription value until the last returned row. Dim i As Integer Dim queryObject As IObjectQueryRow For i = 0 To queryResults.GetRowCount() queryObject = queryResults.GetRow(i) strUserDescription = queryObject.GetStringValue(UserProperty.Description) Next i
    Catch e As Exception 'Response.Write("<BR>" & e.Message & " <BR>") 'Response.Write(e.StackTrace & " <BR>") 'Response.End()
    strUserDescription = "UserID " & intObjectID.ToString & vbCrLf & _ "<BR>    - NAME LOOOKUP ERROR" & vbCrLf & _ "<BR>    - " & vbCrLf & e.Message & _ "<BR>    - " & vbCrLf & e.StackTrace & _ "<BR>" & vbCrLf End Try
    ' handy little transformer tags... yes, precious, my precious... strOutput.Append("<pt:openerLink xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/' ") strOutput.Append("pt:objectID='") strOutput.Append(intObjectID.ToString) strOutput.Append("' ") strOutput.Append("pt:classID='1' ") strOutput.Append("pt:mode='3' ") strOutput.Append("target='myWindow' ") strOutput.Append("onclick=window.top.open('','myWindow','height=500,width=700,status=no,toolbar=no,menubar=no,location=no');") strOutput.Append(">") strOutput.Append(strUserDescription) strOutput.Append("</pt:openerLink>" & vbCrLf & "<BR>" & vbCrLf) Next Else strOutput.Append("") End If Return (strOutput.ToString) End Function

    I have a list of user ObjectIDs saved in a community preference and am trying to write a function to itterate through them and display a link to each user's profile page where the hyperlink text is the user's description property.
    The profile page links works just fine thanks to the cool pt:OpenerLink transformer tag, but I'm having trouble doing a query for a user's Description property.
    I get an "Object Reference not set to an instance of an object." at: Plumtree.Remote.PRC.ObjectManagerWrapper.QueryObjects(Int32 folderID, Int32 startRow, Int32 maxRows, ObjectProperty sortProperty, Boolean ascending, ObjectProperty[] propsToReturn, QueryFilter[] filters) at sam7.portlet3.buildUserLinks3(String strValue) in C:\Plumtree\ZZZRemotePortlets\sam7\portlet3.aspx.vb:line 126
    The buildUserLinks3() routine that does the query and builds the link is included below. Line 126 is the queryResults=ObjectManager.QueryObjects(...) call.
    What have I missed?
    Public Function buildUserLinks3(ByVal strValue As String)
    Dim arrValues As Array Dim intObjectID As Integer Dim strOutput As StringBuilder = New StringBuilder
    Dim RemoteSession As IRemoteSession Dim ObjectManager As IObjectManager Dim strUserDescription As String
    Dim folderID As Integer folderID = -1 'search all folders
    Dim startRow As Integer startRow = 0 'start at the first found
    Dim maxRows As Integer maxRows = 1 'return a single result
    Dim sortProperty As ObjectProperty sortProperty = UserProperty.UniqueName 'sort on the unique name
    Dim ascending As Boolean ascending = True 'sort ascending
    Dim propsToReturn(2) As ObjectProperty 'choose to return specific properties
    propsToReturn(0) = UserProperty.ObjectID propsToReturn(1) = UserProperty.SimpleName
    Dim filters(1) As QueryFilter 'filter the results
    RemoteSession = RemoteSessionFactory.GetTokenContext(portletRequest.GetRemoteAPIEndpoint(), portletRequest.GetLoginToken()) ObjectManager = RemoteSession.GetObjectManager(ObjectClass.User)
    ' parse the comma-separated list of User object IDs and look up the user's Properties. If strValue.Length > 1 And (strValue <> "null") Then arrValues = strValue.Split(",") For Each intObjectID In arrValues
    ' get the user's properties Try
    ' Set a query filter to sort for a unique objectID filters(0) = New StringQueryFilter(UserProperty.ObjectID, _ Operator.Equals, _ intObjectID.ToString) 'where the objectID equals the itterated value
    Dim queryResults As IObjectQuery queryResults = ObjectManager.QueryObjects( _ folderID, _ startRow, _ maxRows, _ sortProperty, _ ascending, _ propsToReturn, _ filters)
    ' There will be only one returned row based on the query filter above, but itterate anyway... ' it is good form in case something changes later. ' We'll keep overwriting the strUserDescription value until the last returned row. Dim i As Integer Dim queryObject As IObjectQueryRow For i = 0 To queryResults.GetRowCount() queryObject = queryResults.GetRow(i) strUserDescription = queryObject.GetStringValue(UserProperty.Description) Next i
    Catch e As Exception 'Response.Write("<BR>" & e.Message & " <BR>") 'Response.Write(e.StackTrace & " <BR>") 'Response.End()
    strUserDescription = "UserID " & intObjectID.ToString & vbCrLf & _ "<BR>    - NAME LOOOKUP ERROR" & vbCrLf & _ "<BR>    - " & vbCrLf & e.Message & _ "<BR>    - " & vbCrLf & e.StackTrace & _ "<BR>" & vbCrLf End Try
    ' handy little transformer tags... yes, precious, my precious... strOutput.Append("<pt:openerLink xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/' ") strOutput.Append("pt:objectID='") strOutput.Append(intObjectID.ToString) strOutput.Append("' ") strOutput.Append("pt:classID='1' ") strOutput.Append("pt:mode='3' ") strOutput.Append("target='myWindow' ") strOutput.Append("onclick=window.top.open('','myWindow','height=500,width=700,status=no,toolbar=no,menubar=no,location=no');") strOutput.Append(">") strOutput.Append(strUserDescription) strOutput.Append("</pt:openerLink>" & vbCrLf & "<BR>" & vbCrLf) Next Else strOutput.Append("") End If Return (strOutput.ToString) End Function

  • Wfsdupld fails when run against 8.1.7 database on 64 bit Sun SPARC Solaris 8

    Attempting to run in the seed data.
    Platform is 64 bit Solaris v8
    Database is 8.1.7.0
    Workflow 2.6
    Everything is fine until we run the wfsdupld script. The script
    fails with
    ORA-29516 Aurora Assertion Failed: Assertion failure at
    joncomp.c:127
    jtc_active_clint_ncomp_slots (oracle/xml/parser/v2/DTD, 0)
    returned 0
    ORA-6512 at OWF_MGR.WF_EVENT_SYNCHRONIZE_PKG line 373
    Any ideas?

    I raised this as a TAR #1838186.995 and received the following
    workaround which does seem to have worked on 8.1.7.0 >>
    I have taken a look at bug 2034596 which suggests a problem with
    the 8.1.7.0 database. However, by upgrading the database to
    8.1.7.2 the error was replaced by a nullpointerexception.
    As a possible workaround it may be worth trying the following
    (on a 8.1.7.0 database):
    $ svrmgrl
    SVRMGR>connect internal
    SVRMGR>alter system flush shared_pool;
    SVRMGR>alter system flush shared_pool;
    SVRMGR>alter system flush shared_pool;
    SVRMGR>alter java class "java/io/Serializable" check;
    SVRMGR>alter system flush shared_pool;
    SVRMGR>alter system flush shared_pool;
    SVRMGR>alter system flush shared_pool;
    SVRMGR>shutdown immediate;
    SVRMGR> startup

  • Kodo does not recognize when query created with extent created with different PM

    Extent ext = pm1.getExtent(ContactTarget.class, false);
    Query qu = pm2.newQuery(ContactTarget.class, ext);
    Collection c = (Collection)qu.execute();
    following code end up with SQL error (pm1 and pm2 are from different
    factories) instead of more meaningful error

    hi,
    We too facing the same problem in our code , our database verion is 10.2.0.3.0 .
    But in oracle article it was stated that the problem is resolved in 10g release 1 but we are still facing the problem
    our sample code is
    SELECT mtl.segment1,
    mtl.description,
    primary_uom_code,
    item_type,
    buyer_id,
    ( SELECT mtl.organization_id org_id, LTRIM (MAX (SYS_CONNECT_BY_PATH (organization_code, ',')),
    FROM (SELECT organization_code,
    ROW_NUMBER () OVER (ORDER BY organization_name)
    cur_row,
    ROW_NUMBER () OVER (ORDER BY organization_name)
    - 1
    prev_row
    FROM org_organization_definitions org,
    mtl_system_items_b mtc
    WHERE org.organization_id = mtc.organization_id
    AND MTC.INVENTORY_ITEM_ID = MTL.INVENTORY_ITEM_ID
    AND operating_unit = :p_org
    AND ORG.ORGANIZATION_ID <> MTL.ORAGANIZATION_ID)
    START WITH cur_row = 1
    CONNECT BY PRIOR cur_row = prev_row)
    FROM mtl_system_items_b mtl
    in ablove code we are geeting error invalid identifier MTL.ORAGANIZATION_ID (in inner subquery)
    Regards
    Nitin

  • Errors when browsing same table name in a different schema.

    I have two separate schema in a database and each has a table with the same name but different columns. I used the GUI to change the column order while looking at the data on one table. Now I can't see data in the other table and I get the error message ORA-00904: "DAY_DT": invalid identifier. I have tried to clear the persisted settings on both tables and I have disconnected and logged out SQLDeveloper and the problem still persists. How can I fix this.
    Edited by: user507794 on Apr 14, 2010 8:51 AM

    I had another user try to look at data in the table from his account on his PC and he saw the same error. So I looked a little deeper. The situation seems to be this
    user_a creates a table and a public synonym of the same name. user_a grants select on the table to user_c
    user_b creates a table using the same name as user_a's table with different columns. user_b grants select on the table to user_c
    user_c can use the GUI to see the the data in user_a's table.
    user_c cannot use the GUI to see user_b's table data. The GUI returns an error ORA-00904: "XXX": invalid identifier where XXX is a column on user_a's table.

  • Query against materialized view from stored procedure brings back empty row

    I have a stored procedure that runs a query against a materialized view. When I run the query outside the SP it works just fine. When I change the MV to a table name, the SP works. When I change it back to the MV i get an empty row. Any ideas? The code is below:
    PROCEDURE getAuth     (p_naid        IN  NUMBER,
                             p_scope       IN VARCHAR2,
                             o_xml_data    OUT SYS_REFCURSOR
                             ) IS
      BEGIN
        IF p_scope = 'Approved' THEN
          OPEN o_xml_data FOR
            SELECT naid,
                   p_naid,
                   auth_type,
                   xml_data
            FROM some_mv
            WHERE naid = p_naid;   
          RETURN;
          CLOSE o_xml_data;
    ... the rest of the procedure ...

    does procedure contain EXCEPTION handler?
    if so, then remove, delete & eliminate EXCEPTION handler (at least during testing & debugging)

  • Dbms_sql  in a different schema from query table-error  ** ORA-00942

    Oracle Experts,
    I think I am having problems with using DBMS_SQL in which the function was created in one schema and the query table was created in a different schema.
    We have 2 schemas: S1, S2
    We have 2 tables:
    T1 in Schema S1
    T2 in Schema S2
    We have a function F1 created by DBA in schema S1 that uses the dbms_sql as:
    CREATE OR REPLACE FUNCTION S1.F1(v1 in VARCHAR2) return NUMBER IS
    cursor1 INTEGER;
    BEGIN
    cursor1 := dbms_sql.open_cursor;
    dbms_sql.parse(cursor1, v1, dbms_sql.NATIVE);
    dbms_sql.close_cursor(cursor1);
    return (0);
    EXCEPTION
    when others then
    dbms_sql.close_cursor(cursor1);
    return (1) ;
    END;
    I am using jdeveloper 11G. We have an Oracle DB 11g.
    We have a java program which uses jdbc to talk to our Oracle DB.
    Basically, in my java program, I call function F1 to check if the query is valid.
    If it is, it returns 0. Otherwise, returns 1:
    oracle.jdbc.OracleCallableStatement cstmt = (oracle.jdbc.OracleCallableStatement) connection.prepareCall ("begin ? := S1.F1 (?); end;");
    cstmt.registerOutParameter (1, java.sql.Types.INTEGER);
    cstmt.setString(2, "Select * from S2.T2");
    cstmt.execute ();
    Since the table that I run the query is T2, created in different schema than F1 was created in, I have the error:
    ** ORA-00942: table or view does not exist
    So my questions are these:
    - I am using Oracle DB 11g, if I run the query on a table that created in a different schema from the one that the function (which uses dbms_sql) was created in, I would get the error ORA-00942?
    - If I runs the query on table T1 in the same schema as the function F1, would I have the same problem(The reason I ask is I cannot create any table in schema S1 because the DBA has to do it; I am not a DBA)
    - This is not a problem, but a security feature because of SQL injection?
    - How to resolve this issue other than creating the table in the same schema as the function that utilizes DBMS_SQL?
    Regards,
    Binh

    Definer rights (default) stored objects run under owner's security domain and ignore role based privileges. So regardless what user you are logged in as, function S1.F1 always executes as user S1 and ignores user S1 roles. Therefore exeuting statement within S1.F1:
    Select * from S2.T2requires user S1 to have SELECT privilege on S2.T2 granted to S1 directly, not via role.
    SY.

  • Which table/view has the schema details?

    Hi All,
    In which table/view I can view the different schemas present in the database? Should I sign-in as SYS or any user can read from that table?
    Please help...
    Thanks in advance...

    DBA_USERS will tell you the users that have been created in the database. Some or all of those users may have objects in their schemas, which you can see via DBA_OBJECTS.
    You don't need to be a DBA to query those views, but you do need appropriate privileges. Depending on your Oracle version, you'd need either the SELECT_CATALOG_ROLE role, the SELECT ANY DICTIONARY privilege, or a direct privilege grant on the particular views you're interested in.
    Justin

  • Spatial query on join view in another schema

    Background:
    I have a schema with tables containing four spatial columns per table. I have a second schema that contains join views of the tables in the first schema. The join view consists of the attributes and any other tabular data that is joined via foreign key to non-spatial tables and one of the four geometry columns. I have a third schema that owns no database objects of its own, but has select privilege to the second schema's view objects.
    We are using Oracle 10.2.0.2 on a windows platform.
    This worked in 9i, the problem only presented itself when we migrated to 10g.
    Problem:
    When I run a spatial query on a join view in the second schema(the schema that owns the object), it runs and returns results in about a second. When I run the exact same query in the third schema it routinely takes 20-30 seconds.
    Here is the query that I run in both schemas with varying query times:
    SELECT COUNT(*)
    FROM two.join_view_a A
    WHERE (MDSYS.SDO_FILTER(A.GEOM, SDO_GEOMETRY(2003,8307,NULL,SDO_ELEM_INFO_ARRAY(1,1003,3),SDO_ORDINATE_ARRAY(26.6396,26.5708,43.346,34.4083)),'QUERYTYPE=WINDOW')='TRUE');
    Question:
    Why does this happen?
    What can I do to fix this problem?
    Thanks,
    John

    Have a read of this posting: Oracle spatial view runing slow as different user
    There are details there about the 'optimizer_secure_view_merging' parameter and the effect it can have on cross schema views in 10.2

  • How to create spatial query (sdo_relate) on 2 views

    Hi, I want to create a spatial query in the form of:
    select /*+ORDERED*/ column1,column2
    from view1,view2
    where sdo_relate(view2.geometry,view1.geometry,'mask= ... ')Both views are very fast and return a smal number of rows out of a large dataset. I would expect that running the spatial query on this selection should be fast but when performing the above query it takes quite some time.
    It seems that the spatial query is performed on the underlying tables before the views make their selection.
    What is a good way to handle this kind of problem? How to make the spatial query to be executed on the resultset of the views?
    thanks Rene

    Hi Udo,
    Let me tell you a bit more about the requirements of the application.
    We have a table with geometries. Some geometries are buildings, others are roads, trees, parking areas, etc.
    We let users specify what geometries they are interested in. This can be the type (tree, building) or a list of types, plus some other selection such as type of tree, name of road etc. Based on the specifications the application creates a view that returns exactly the geometries the user is interested in.
    Users may not only be interested in just a tree but may be looking for a tree located inside a building, or a building within a certain distance from a road. This then would be the query I am talking about in this post. Two views and a spatial relationship between them.
    Depending on the definition of the views and the data currently loaded the number of rows returned by the views will vary. I can't be there all the time making sure that the correct table is queried first and the correct hints are given. This is why we have the CBO. But it seems to do a poor job when it comes to spatial queries.
    Rene

  • Error when running a query against Multiprovider using 0FIGL_VC1

    Hi SAP Gurus,
    I'm creating a MultiProvider for FI-GL.It has 2 Cubes.one is 0FIGL_VC1 (Virtual Cube) and other one is Customised Cube.When I run Query against this MultiProvider with  the combination of basic cubes key figures,I'm getting an error
    'Abort system error in Program SAPLRSDRC and Form RSDRC/Form DISPATCHER/RECEIV '
    then system gets disconnected from the Server .
    Please give me the solution to fix it & I'll assign the points .
    Thanks & Regards
    Raja

    Hello Suman,
    Check the table rszglobv for this variable - ZCONLEH.
    If it is available there then see which infoobject it belongs to and then look for that in the query designer. May be resaving the query solves the issue.
    If the variable is not available in the table, then it seems that the variable is lost and you might have to recreate it for keeping the semantics of the query the same as it was before the upgrade.
    Regards,
    Shweta

Maybe you are looking for

  • Background schedule process

    Hi I am new to Oracle 9iAS. Can someone tell me if there is any better way to implement a background scheduled process ? Currently, I am doing it via AT command. Just wondering if Oracle9iAS has any scheduler that I can make use of. Thanks CT

  • "An error has occurred saving the file because it could not be written to. Check ..."

    I have the familiar Mavericks issue of failing to save scanned files from my Mac:  "An error has occurred saving the file because it could not be written to. Check the properties for the file to make sure it is not read-only." As far as I can see, th

  • To see the content of a BLOB column from sqlplus

    Hi, I have a table which has a BLOB column. The blobs are text files. Is there a way to check the content of blob column from sqlplus itself. Thanks.

  • Scanning from Document Feeder captures only last page

    After reinstalling Acrobat 8.1 on a new computer, things worked fine for several weeks.  Now, I cannot scan a multipage document using the document feeder.  When I try, all mpages run through the document feeder (on a Brother 8640D) and Acrobat says

  • No sound with WXP - Satellite L40

    HI I just got a Toshiba Satellite L40-13G. I installed Windows XP but cant get sound after installing drivers. Please help me to solve this problem. Everything works except the sound Maybe I got the wrong drivers Send me if needed the correct one Rep