Odi logical schema referring deleted context in scenario

Hi,
We had a Context that was getting used by default in development. We deleted that default context and updated interfaces and regenerated scenarios to use new Context.
But logical schema is still referring to old deleted context, when scenario runs.
Any idea?
Thanks,
Kshipra

The error is happening in Flow step type. Interfaces are updated to use new context.
ODI-1279: The Source Logical Schema LGCL_TERADATA_EDW_FIN_MAS_DATA_EIL and Context CONTEXT1 of the task Load data are not mapped to any Physical Schema.
Caused By: com.sunopsis.core.SnpsInexistantSchemaException: ODI-17523: There is no connection for this logical schema / context pair: LGCL_TERADATA_EDW_FIN_MAS_DATA_EIL / CONTEXT1.
at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnectByLSchemaNameAndContext(SnpConnect.java:239)
at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnect(SnpConnect.java:193)
at com.sunopsis.dwg.dbobj.SnpSessTask.getCollectConnection(SnpSessTask.java:358)
at com.sunopsis.dwg.dbobj.SnpSessStep.getSrcDataServer(SnpSessStep.java:1435)
at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:700)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:465)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1931)
at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$2.doAction(StartScenRequestProcessor.java:580)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor.doProcessStartScenTask(StartScenRequestProcessor.java:513)
at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$StartScenTask.doExecute(StartScenRequestProcessor.java:1073)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$1.run(DefaultAgentTaskExecutor.java:50)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor.executeAgentTask(DefaultAgentTaskExecutor.java:41)
at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor.doExecuteAgentTask(TaskExecutorAgentRequestProcessor.java:93)
at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor.process(TaskExecutorAgentRequestProcessor.java:83)
at oracle.odi.runtime.agent.support.DefaultRuntimeAgent.execute(DefaultRuntimeAgent.java:68)
at oracle.odi.runtime.agent.servlet.AgentServlet.doPost(AgentServlet.java:516)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

Similar Messages

  • ODI logical schema is not enabled

    Hi,
    I am beginner to use ODI.
    What I did so far:
    - I created a project
    - Model created as follows:
         - source
             - Oracle
             - Firebird
             - File
       - destination
            - Oracle
    When I was in the source model Oracle folder (created above) as the right button
    New Model opens the screen for typing:
    Name: MODELO_ORIGEM_ORACLE
    Code: MODELO_ORIGEM_ORACLE
    Technology: Oracle
    Logical schema: the field is disabled can not choose
    If I try to save me the message "Logical Schema field is required"
    Someone can help me !!!!!!!!!!!!!!!!!!

    hi,
    doubts: why show message WARNING agent.scheduler.pingAgent.failed?
    already odi ide is disable schema logical in tab  Model ????
    what i did :
    on the program odi ide
    tab Topology
       - physical architecture
          - created agent_1
                - Name : agent_1
                - Host : localhost
                - Port: 20910
                - context Aplplication Web :oraclediagent
                - Protocol: http
                - Number session : 1000
        - logic architecture
               - created agent_1
                   Name: agent_1
                   Context: Global
                   Agent Phisical: agent_1
    file bat odiparams
    REM #
    REM # Repository Connection Information
    REM #
    set ODI_MASTER_DRIVER=oracle.jdbc.OracleDriver
    set ODI_MASTER_URL=jdbc:oracle:thin:@localhost:1521:xe
    set ODI_MASTER_USER=DEV_ODI_REPO
    set ODI_MASTER_ENCODED_PASS=eWyXAkR2ru.dKKEczY6kwb
    REM #
    REM # User credentials for agent startup program
    REM #
    set ODI_SUPERVISOR=SUPERVISOR
    set ODI_SUPERVISOR_ENCODED_PASS=bSyHgaSRHVNI8yC.HXHfp
    REM #
    REM # User credentials for ODI tools
    REM #
    set ODI_USER=%ODI_SUPERVISOR%
    set ODI_ENCODED_PASS=%ODI_SUPERVISOR_ENCODED_PASS%
    . change ODI IDE the name agent to agent_1 phisical and logic
    . off on the computer and on
    . typed the command below
    C:\oraclexe\product\11.1.1\Oracle_ODI_1\oracledi\agent\bin>agent.bat -NAME=agent
    _1 -PORT=20901
    OracleDI: Starting Agent ...
    2013-11-29 14:07:54.246 NOTIFICATION ODI-1128 O agente agent_1 estß sendo inicia
    do. Container: STANDALONE. VersÒo do Agente: 11.1.1.7.0 - 02/03/2013. Porta: 209
    01. Porta JMX: 21901.
    2013-11-29 14:08:06.403 NOTIFICATION ODI-1111 Agente agent_1 iniciado. VersÒo do
    agente: 11.1.1.7.0 - 02/03/2013. Porta 20901. Porta JMX: 21901.
    2013-11-29 14:08:06.405 NOTIFICATION ODI-1136 Iniciando Schedulers no Agente age
    nt_1.
    2013-11-29 14:08:07.839 WARNING agent.scheduler.pingAgent.failed
    2013-11-29 14:08:07.842 WARNING Agent is not reachable. Going to retry after int
    eval :30000
    2013-11-29 14:08:38.853 WARNING agent.scheduler.pingAgent.failed
    2013-11-29 14:08:38.856 WARNING Agent is not reachable. Going to retry after int
    eval :30000
    2013-11-29 14:09:09.867 WARNING agent.scheduler.pingAgent.failed
    2013-11-29 14:09:09.870 WARNING Agent is not reachable. Going to retry after int
    eval :30000
    2013-11-29 14:09:40.882 WARNING agent.scheduler.pingAgent.failed
    2013-11-29 14:09:40.885 WARNING Agent is not reachable. Going to retry after int
    eval :30000

  • Physical schema vs logical schema in odi

    hi, i am new to odi.I have successfully loaded data metadata to essbase and planning . But still i am not clear why odi uses physical schema when we just uses logical schema while reversing, execution of interfaces etc in designer

    Hi,
    Logical schema will always point to a Physical Schema .
    The aim of the logical schema is to ensure the portability of the procedures and models on the different physical schemas. In this way, all developments in Designer are carried out exclusively on logical schemas.
    A logical schema can have one or more physical implementations on separate physical schemas, but they must be based on data servers of the same technology. A logical schema is always directly linked to a technology.
    To be usable, a logical schema must be declared in a context. Declaring a logical schema in a context consists of indicating which physical schema corresponds to the alias - logical schema - for this context.
    Thanks,
    Sutirtha

  • ODI 11g Logical Schema Error [Error Code: 1222]

    Hi,
    One of my ODI Jobs is failing with an error "ODI-1222: Session start failure on agent Internal: logical schema BIAPPS_11g_RA cannot be found in the master repository."
    BIAPPS_11g_RA = Logical Schema in our System.
    However, all the other Jobs of the same Module is Passing Successfully.
    The Failure happens ONLY in the QA env and the same Job passes successfully in the DEV. I had checked all the topology connections and everything looks fine as all the other jobs in the same module are running fine. Can this be a problem with the Migration that happened from Dev to QA..?
    I figured out that for the failed Job in the QA env's operator we have the "Forced Context type" as "Development" where as the "Execution Context" in "QA". However, for all the other Jobs of the same module are having both as "QA". I tried re-importing the Scenarios from Dev but it did not help me..!
    Can anybody help me on this..
    Thnx!

    We dont know what the architecture of ODI is in your organization. However, as a general rule, you should not be forcing the contexts. Ideally they should be "Execution Context". And then you create the scenario out of interface/packages and then deploy them to the next environment.

  • Context,Physical schema and Logical schema

    Hi,
    How the context,physical schema,logical schema and agent are interrelated.
    Please explain
    Thanks
    Jack

    Hi Jack,
    Context:
    A context is a set of resources allowing the operation or simulation of one or more data processing applications. Contexts allow the same jobs (Reverse, Data Quality Control, Package, etc) to be executed on different databases and/or schemas.
    Its used to run the object(process) in different database.
    Physical Schema:
    The physical schema is a decomposition of the data server, allowing the Datastores (tables, files, etc) to be classified. Objects stored in data servers with this mode of classification can be accessed by specifying the name of the schema attached to the object name.
    Ex
    Oracle classifies its tables by "schema" (or User). Each table is linked to a schema, thus SCOTT.EMP represents the table EMP in the schema SCOTT.
    Logical schema:
    A logical schema is an alias that allows a unique name to be given to all the physical schemas containing the same datastore structures.
    ->The aim of the logical schema is to ensure the portability of the procedures and models on the different physical schemas. In this way, all developments in ODI Designer are carried out exclusively on logical schemas.
    Thanks
    Madha

  • ODI Interface + Logical Schema

    Hello Gurus, could someone please tell me how an ODI interface is linked to a logical schema. I understand before execution, you have to select the context, which is tied to a Physical Schema. But I need to execute an interface for a particular logical schema. Any help is highly appreciated.
    Thanks, Naveen.

    Everything that you build in the designer (design time) is linked to a logical schema which references the logical model information of your datastores. Logical schemas are mapped to physical schemas based on a given context i.e. the ODI context you select at run time. Therefore at runtime based on the chosen conext the actual physical information i.e. file paths, database connection details etc are substituted for the logical references and generate the execution code.    

  • Will deleting a column at logical schema delete the same at physical level by DDL Sync?

    Will deleting a column at logical schema delete the same at physical level by DDL Sync?

    Hi David,
    First of all thanks for your quick response and for your help logging the enhancement request,
    I am testing more or less your suggestion but I  am not sure if I understood exactly what you mean,
    1)I imported from data dictionary in a new model and into the options menu on the schema select screen I un-ckecked partitions and triggers,
    I guessed that the import should not get from the data dictionary the information about the partitions but the result is that the tables partitioned (by list in this case) are partitioned by range without fields into the physical model on SDDM,
    2)I select one of the tables modify a NO partitioned option and propagate the option for the rest of the tables
    3) I imported again from data dictionary but this time I included the partitions into the option menu on select schema screen,
    into tabular view on compare models screen I can select all the tables with different partitioned option, also I can change for "list partitions" and select only the partitions that I want to import.
    So I have a solution for my problem, thanks a lot for your suggestion
    The second step I'm not sure is needed or maybe I can avoid the step with some configuration setting in any of the preferences screen,
    if not, I think the options to not include partitions into select schema screen are not so clear, at least for me,
    please, could you confirm me if a way to avoid the second step exists or if I misunderstood this option?
    thanks in advance

  • ODI Procedure: Using Variable Logical Schema

    Hi!
    i wrote a PL\SQL procedure inside an odi procedure, using options, variables etc.
    now we need to execute the procedure in different logical schemas.
    We've at least 20 different logical schemas and to semplify the maintenance we'd like to pass the logical schema as an Option or something similar,
    is it possibile to do this with a procedure?
    The version of ODI is 11.1.1.5.0 and the targets are only Oracle DB.

    I've got a question : are all you schema in the same server (database) ?
    If so, you can LIST the schemas with a SQL Statement in the "command as SOURCE" tab.
    example :
    select owner as SCHEMA
    from all_tables
    where ...or a SQL Statement in ODI MASTER_Repository to get the logical schema :
    select lschema_name as SCHEMA
    from snp_lschema t1
    where ...And in the "command as destination" tab, you execute the PL SQL, but you use the result of SCHEMA.
    As a result, if you have 40 schema retrieved by the first SQL Statement, ODI will execut your PL/SQL statement 40 times, changing the SCHEMA value each time.
    And, in the first tab (command as destination), you use a generic Oracle User that have access to all schema of the dabase (or at least, the 40 schema you want).

  • Logical Schema not being found

    I have an incoming data feed that works fine in our Development environment but when we import the scenario into UAT it gets an error:
    ODI-1222: Session start failure on agent DATA_INTEGRATOR_UAT_11G: logical schema FTP_IMAGE_OUT cannot be found in the master repository.
    Initially the logical schema was mistyped so the error was fair enough but even now that we've fixed it we get the same error. We've even tried completely deleting and recreating everything.
    I've looked in the master repository database and there’s definitely a record in snp_lschema with an lschema_name of “FTP_IMAGE_OUT” (i_lschema 67001), a record in snp_pschema_cont with an i_lschema of 67001 and an i_pschema of 131001 which is “FTP_IMAGE_OUT.\” in snp_pschema so it all connects up.
    I've tested the connection of the physical schema and it's successful.
    Can anyone suggest anything else I can look at or try? I've run out of ideas.

    Never mind, I found the problem. On the "Command on Source" tab of the procedure I'd selected a Context of "Development", so in UAT (which only has a UAT context) it couldn't find it.
    No idea why, I've never done it before. Maybe it was a slip of the mouse.

  • How to 1 logical schema to many physical schemas?

    I have a database schema which is instantiated on many different servers. I set up a physical schema pointing to one, and a logical schema pointing to that physical schema. I imported the schema to a model, created interfaces for the tables, and created a package to execute it; and that is all working for that one physical instance.
    1) How can I implement that same model, interfaces, and package for each of the physical instances?
    1a) Can I change the JDBC parameters at package run time to point to a different database? How?
    1b) Can I select a different physical schema for the logical schema at package run time so that I only have to set up a different physical schema for each database? How?
    Thank you.

    "But if you have a lot of context (for example 1000 stores), you can define a generic physical schema, a logical one. The physical is based on variables (host, port,..). "
    Using contexts is working for me, but at least one of my schemas has more than 50 server instances, so this approach would be beneficial. Before I posted this question, I had tried to use variables for the host, port, and SID without success. I used a global variable and gave it default values, but it failed. Then I tried setting the value in a package and creating a scenario, but that too failed. What am I missing?

  • Physical Schema and logical schema

    Hi,
    When creating the data server in the topology corresponding to the appropriate technology we are creating a physical schema. But then why do we need to create logical schema. Is it created for execution of the interface? And can multiple physical schemas be mapped to same logical schema?

    Hi
    Physical schema represents the actual connection to the data source or data target. Logical schema represents the logical name associated to that source or target.
    One logical schema can be associated with multiple physical schema along with context, i.e. one logical schema is associated with different physical schema using different context.
    It can be understood with following example:
    You have 3 environments: Dev, QA, Prod, each having different database servers as DB1, DB2, DB3, respectively. Similarly we have 3 context corresponding to Dev, QA and Prod. You create logical schema with name DB_source
    Now you associate physical DB servers to logical schema (DB_source) for each context:
    DEV: DB1
    QA: DB2
    PROD: DB3
    Now when u develop ODI interfaces, you use one context DEV which associates DB_source to DB1. While mentioning context for execution, keep it as "Execution". This means, whatever context you choose during execution, corresponding physical DBs will be used.
    Thus if you change the execution context, corresponding physical schema will be used during execution.
    Let me know if you have further questions !!

  • Logical schema can have one or more physical schemas

    Hi Experts,
    Can a logical schema in ODI will have one or more physical schema, if possible in what case do we have it.
    In the same way can one physical schema have multiple logical schema if possible in what case.
    Please give me your brief explanation on it.
    Thx,
    Sahadeva.

    Hi Sahadeva,
    1) Yes. You can map it through different contexts. The goal is to use the same logical schema to point to a different physical schemas for each environment (Dev, Test, PROD, ...).
    So let's say you have a have the schema SH_DEV on database 1 for Dev and schema SH on database 2 for Dev :
    - Create one SH Logical schema
    - Create two data server : one for database1 and one for database2
    - Create the physical schemas SH_DEV under dataserver1 and SH under dataserver2
    - Create two context : Dev and Prod
    - Map logical SH to dataserver1.SH_DEV through context Dev
    - Map logical SH to dataserver2.SH through context Prod
    2) Technically yes, through different contexts. Though I don't see any use case for this.
    Hope it helps.
    Regards,
    JeromeFr

  • Resuable logical schema

    Hi Experts,
                i have create one physical schema like SRC_SCOTT  ,logical schema is SRC_SCOTT_LS in my development workrepo,and in my test environment physical schema is same structure like SRC_SCOTT
    can i reuse the logical schema SRC_SCOTT_LS IN my test environment and can i access the development physical schema in test by using same logical schema,please help me i am new to ODI
    Regards
    ksbabu

    Hi aetl,
                    Thanks for quick reply,i have already ctx_text context in text environment ,same physical schema( structure is same ) in my text environment, by using development logical schema can i access or not,
    regards
    ksbabu

  • ODI11g Logical Schema  definition

    Hello,
    I have installed ODI11G, and created the first procedure (PRD-create-populate-table) to create a table in an oracle schema (ODI_STAGE).
    During execution I get teh following messages:
    ODI-1217: Session PRD-create-populate-table (4001) fails with return code 7000.
    ODI-1226: Step PRD-create-populate-table fails after 1 attempt(s).
    ODI-1232: Procedure PRD-create-populate-table execution fails.
    ODI-1246: The Logical Schema has not been set for PRD-create-populate-table.
    I think that reaseon for the message is that I did not define the schema in the "Command on target"
    I defined there :
    technology : Oracle
    But it is nog possible to fill in the schema!!!
    How can I fix this?
    How can I create the physical and logical schema of oracle users in my workrepository?
    How can I import the structue of Oracle tables of an Oracle schema in ODI11?
    Can I import the structure of a flatfile in the repository?
    Thank you for your help...
    Frank
    How can I create the lo

    Got a different message now. I copied your code and its set up for autocommit.
    ODI-1228: Task PRD-create-populate-table (Procedure) fails on the target ORACLE connection odi_stage_logical.
    Caused By: java.sql.SQLException: ORA-06550: line 1, column 638:
    PLS-00103: Encountered the symbol "NSERT" when expecting one of the following:
    := . ( @ % ;
    ORA-06550: line 1, column 677:
    PLS-00103: Encountered the symbol "VALUES" when expecting one of the following:
    . ( , % from
    The symbol "VALUES" was ignored.
    ORA-06550: line 1, column 724:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    . ( , % from
    ORA-06550: line 1, column 1363:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
    ; <an identifier> <a double-quoted delimited-identifier>
    current delete exists prior <a single-quoted SQL string>
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1224)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3467)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java:665)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeUpdate(SnpSessTaskSql.java:3218)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java:1785)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2805)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:322)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:237)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:794)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:662)

  • How to restrict the user(Schema) from deleting the data from a table

    Hi All,
    I have scenario here.
    I want to know how to restrict a user(Schema) from deleting the values from a table created in the same schema.
    Below is the example.
    I have created a table employee in abc schema which has two values.
    EMPLOYEE
    ABC
    XYZ
    In the above scenario the abc user can only fire select query on the EMPLOYEE table.
    SELECT * FROM EMPLOYEE;
    He should not be able to use any other DML commands on that table.
    If he uses then Insufficient privileges error should be thrown.
    Can anyone please help me out on this.

    Hi,
    kumar0828 wrote:
    Hi Frank,
    Thanks for the reply.
    Can you please elaborate on how to add policies for a table for just firing a select DML statement on table.See the SQL Packages and Types manual first. It has examples. You can also search the web for examples. This is sometimes called "Virtual Private Database" or VPD.
    If you have problems, post a specific question here. Include CREATE TABLE and INSERT statements to create a table as it exists before the policies go into effect, the PL/SQL code to create the policies, and additonal DML statements that will be affected by the policies. Show what the table should contain after each of those DML statements.
    Always say which version of Oracle you're using. Confirm that you have Enterprise Edition.
    See the forum FAQ {message:id=9360002}
    The basic idea behind row-level security is that it generates a string that is automatically added to SELECT and/or DML statement WHERE clauses. For example, if user ABC is only allowed to query a table on Sunday, then you might write a function that returns the string
    USER  != 'ABC'
    OR      TO_CHAR (SYSDATE, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') = 'SUN'So whenever any user says
    SELECT  *
    FROM    table_x
    ;what actually runs is:
    SELECT  *
    FROM    table_x
    WHERE   USER  != 'ABC'
    OR      TO_CHAR (SYSDATE, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') = 'SUN'
    ;If you want to prevent any user from deleting rows, then the policy function can return just this string
    0 = 1Then, if somone says
    DELETE  employee
    ;what actually gets run is
    DELETE  employee
    WHERE   0 = 1
    ;No error will be raised, but no rows will be deleted.
    Once again, it would be simpler, more efficient, more robust and easier to maintain if you just created the table in a different schema, and not give DELETE privileges.
    Edited by: Frank Kulash on Nov 2, 2012 10:26 AM
    I just saw the previous response, which makes some additional good points (e.g., a user can always TRUNCATE his own tables). ALso, if user ABC applies a security policy to the table, then user ABC can also remove the policy, so if you really want to prevent user ABC from deleting rows, no matter how hard the user tries, then you need to create the policies in a different schema. If you're creating things in a different schema, then you might as well create the table in a different schema.

Maybe you are looking for