Announcement

Collapse
No announcement yet.

java.sql.SQLException: ORA-28115: policy with check option violation

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • java.sql.SQLException: ORA-28115: policy with check option violation

    The following query

    insert into shipment_stop(SHIPMENT_GID,STOP_NUM,LOCATION_GID)V ALUES('RAJ01EPUDO.SUMMER',1,'RAJ01EPUDO.PUDO ID')

    throws the following error
    java.sql.SQLException: ORA-28115: policy with check option violation

    but the same is working fine in DBA.ADMIN.
    Kindly suggest a way to implement this without any issues in RAJ01EPUDO.ADMIN

  • #2
    Re: ORA-28115olicy with check option violation

    Hi,

    1. How are you running that insert command ? (from within an automation agent ?)
    2. What version of OTM are you on ?
    3. Does the RAJ01EPUDO.ADMIN user have a custom VPD profile associated ?

    Comment


    • #3
      Re: ORA-28115olicy with check option violation

      Originally posted by bmj_23
      Hi,

      1. How are you running that insert command ? (from within an automation agent ?)
      2. What version of OTM are you on ?
      3. Does the RAJ01EPUDO.ADMIN user have a custom VPD profile associated ?
      I am running this query using Automation Agent.
      While I check the Log the log shows policy with check option violation .
      While i try to insert the query using sql.SqlServlet(Backend) i get the following error:
      java.sql.SQLException: ORA-28115: policy with check option violation.

      Comment


      • #4
        Re: ORA-28115olicy with check option violation

        Moshe,

        I would refer back to your VPD Policies, as the error indicates that you are either trying to change the very column that a table is restricted on, or that you are trying to insert a row that will not satisfy the viewing policy.

        This also explains why it works as DBA.ADMIN (i.e. no VPD restrictions) and not as the user that you're logged in as.

        Thanks,
        Chris
        Chris Plough
        twitter.com/chrisplough
        MavenWire

        Comment


        • #5
          Re: ORA-28115olicy with check option violation

          Moshe, Do you have multiple domains? If so, which domain is the agent in and which domain are you trying to insert the record to? I think I have had similar issues when trying to use an agent to act on objects in other domains... one question, though, why are you trying to insert a shipment stop??

          Comment


          • #6
            Re: ORA-28115olicy with check option violation

            I agree

            I have seen this error when trying to insert data into Domain X from Domain Y.
            Regards
            Gary Cunningham
            www.cbmc.co.uk
            www.mavenwire.com

            Comment


            • #7
              java.sql.SQLException: ORA-28115: policy with check option violation

              When I write the following query to insert shipment through backend

              INSERT INTO SHIPMENT(SHIPMENT_GID,SHIPMENT_XID,START_TIME,END_ TIME)VALUES('RAJ01EPUDO.JES','M',TO_DATE( '2-DEC-2006', 'DD-MON-YYYY' ),TO_DATE( '3-DEC-2006', 'DD-MON-YYYY' ))
              I get the following error:
              java.sql.SQLException: ORA-28115: policy with check option violation

              Can you provide me a solution to resolve the same

              Comment


              • #8
                Re: java.sql.SQLException: ORA-28115: policy with check option violation

                in your insert statement - you do not reference the domain_name field.
                Therefore OTM thinks you're trying to write to PUBLIC - and you're not allowed to write to public unless you're logged in as DBA.ADMIN

                Hope this helps
                Gary
                Regards
                Gary Cunningham
                www.cbmc.co.uk
                www.mavenwire.com

                Comment

                Working...
                X
                😀
                🥰
                🤢
                😎
                😡
                👍
                👎