Insufficient priv error when creating a materialised view using DB link!!!!

Hi,
I have a two databases db1 and db2.
I have created a database link from db2 to access user1 schema in db1.
When i try to create a materialised view by accessing user1 table using user 'user2' in db2 database, i get error "ORA-1031: Insufficient Privilege".
The user2 has the priviliges "create view", "create any view", "create materialised view" etc.
I am able to select data, of the table using the database link, but creating materialised view gives this error.
I want to know if the user "user1" should be granting any privilige to user2, if so how is it possible as user2 dosent exist in db1!
i.e should i give command something like "grant select on user1.table to user2@db2"(this dosent work as it says user2@db2 dosent exist, obviously as its taking user2@db2 as a username in db1 schema)
or is this a problem with user2 priviliges in db2 database, if so what are all the priviliges that have to be given to user2 in db2 schema.
regards,

Hi,
User from db1 can not assign any privs to user on db2 database. If user from db1 want to access any object from db2 database, then on local level user2 on db2 should have all the acess to required object. Then you can use user2 on db2 using dblink from db1 user to access those objects residing on remote database.
If user1 from db1 can grant privs to user2 on db2 database on any objects on db2 database then it is highly security issue. This is not permitted.
Regards
e.g.
conn userx@db2
grant select on userx.table1 to user2;
conn user2@db2
select count(*) from userx.table1;
conn user1@db1
select count(*) from userx.table1@db2_dblink;
Edited by: skvaish1 on Apr 29, 2010 3:57 PM

Similar Messages

  • APEX Insufficient Privs errors when trying to use dbms_sql.parse

    Hello,
    I have a simple database procedure that changes are user pswd:
    create or replace
    PROCEDURE chg_pswd_test(p_userid in varchar2,
    p_pswd in varchar2)
    -- Invoker rights allow a user with execute privileges to call a subprogram.
    -- Definer Rights allow programs to execute under the privileges of their
    -- definer / schema owner.
    AUTHID CURRENT_USER as x varchar2(20);
    v_cursor INTEGER;
    v_execute INTEGER;
    begin
    v_cursor := sys.DBMS_SQL.OPEN_CURSOR;
    sys.DBMS_SQL.PARSE(v_cursor, 'ALTER USER '||p_userid||' identified by '||p_pswd, sys.DBMS_SQL.NATIVE);
    v_execute := sys.DBMS_SQL.EXECUTE(v_cursor);
    sys.DBMS_SQL.CLOSE_CURSOR(v_cursor);
    commit;
    end chg_pswd_test;
    I can run this procedure in sqlplus as user x and also as my apex_public_user. I have granted both execute on dbms_sql and alter user privs. It runs for both without problems.
    I then create a validation process in APEX can call this database procedure. I then receive insufficient privs errors.
    If I grant all privs to public, the apex app will then run, if I remove all privs I receive the errors again.
    Does anyone know which database priv I am missing, I cannot grant all privs to public on my production database?
    Thanks

    Odd, as I would think that should work, being the DBA role and all...
    If it works as user X from SQL*Plus, could you try to change the parsing schema to User X and try again?
    Thanks,
    - Scott -
    http://spendolini.blogspot.com
    http://sumnertechnologies.com

  • ORA-01031 insufficient privileges  error when selecting from a view

    OK I think this might be a dumb question but I can't figure it out:
    User John has been granted SELECT privilege (directly, not through a database role) to schema FRED.table1;
    User John can issue select * from FRED.table1; and it works just fine.
    User John has then been granted SELECT privilege (directly, not via a database role) to schema
    MARK.view1;
    MARK.view1 only selects from FRED.table1. No other tables are in the view1.
    Schema MARK can successfully query the views. SELECT * FROM VIEW1 returns results.
    I also checked the MARK schema to ensure that it has been granted SELECT on FRED.table1 directly which it has.
    Now, when logged into schema John, I try SELECT * FROM MARK.VIEW1; and I get ORA-01031 insufficient privileges error.
    I'm not sure how to troubleshoot this. If John is granted SELECT ANY TABLE, it of course works but I don't want John to have that powerful priv.
    To recap, John has SELECT on both MARK.VIEW1 and the table which VIEW1 selects from (FRED.TABLE1).
    John can select from FRED.TABLE1 no problem but receives a privilege error even though John has SELECT on MARK.VIEW1.
    Any thoughts?
    Oh, Oracle EE 10.2.0.4

    JSebastian wrote:
    OK I think this might be a dumb question but I can't figure it out:
    User John has been granted SELECT privilege (directly, not through a database role) to schema FRED.table1;
    User John can issue select * from FRED.table1; and it works just fine.
    User John has then been granted SELECT privilege (directly, not via a database role) to schema
    MARK.view1;
    MARK.view1 only selects from FRED.table1. No other tables are in the view1.
    Schema MARK can successfully query the views. SELECT * FROM VIEW1 returns results.
    I also checked the MARK schema to ensure that it has been granted SELECT on FRED.table1 directly which it has.
    Now, when logged into schema John, I try SELECT * FROM MARK.VIEW1; and I get ORA-01031 insufficient privileges error.
    I'm not sure how to troubleshoot this. If John is granted SELECT ANY TABLE, it of course works but I don't want John to have that powerful priv.
    To recap, John has SELECT on both MARK.VIEW1 and the table which VIEW1 selects from (FRED.TABLE1).
    John can select from FRED.TABLE1 no problem but receives a privilege error even though John has SELECT on MARK.VIEW1.
    Any thoughts?
    Oh, Oracle EE 10.2.0.4Are you certain John has been granted select on Mark.view1 ? In order for that to work Mark would have to have been given select on Fred.table1 WITH GRANT OPTION ... otherwise the grant would fail and then John would not be able to select from the view because the grant was never successfully issued.
    Here's a basic test case (which i think conforms to what you've outlined) to get it working.
    drop user u1 cascade;
    drop user u2 cascade;
    drop user u3 cascade;
    create user u1 identified by u1;
    grant connect, resource to u1;
    create user u2 identified by u2;
    grant connect, resource, create view to u2;
    create user u3 identified by u3;
    grant connect, resource to u3;
    connect u1/u1@orcl
    create table test1 (col1 number);
    grant select on test1 to u2 with grant option; --> this is the important part
    grant select on test1 to u3;
    connect u2/u2@orcl
    create view test2 as select * from u1.test1;
    grant select on test2 to u3;
    connect u3/u3@orcl
    select * from u2.test2;

  • ORA-00905: missing keyword error while creating a materialised view

    Hi Gurus,
    I am trying to create a materialized view as :
    1 CREATE MATERIALIZED VIEW AMREG.ClientData
    2 TABLESPACE AMREG_DATA
    3 COMPRESS
    4 PARALLEL
    5 NOLOGGING
    6 BUILD IMMEDIATE
    7 REFRESH COMPLETE
    8 ON DEMAND
    9 DISABLE QUERY REWRITE
    10 REFRESH START WITH TRUNC( SYSDATE + 1 ) + 3/24 NEXT TRUNC( SYSDATE + 1 ) + 3/24
    11 AS
    12 SELECT
    13 CHILD.CLIENT_SGK "Child SGK",
    14 CHILD.CLIENT_NAME "Child Name",
    15 CHILD.ARC_ACCT_CD "Child ARC Acct Code",
    16 ULTIMATE.CLIENT_SGK "Ultimate Parent SGK",
    17 ULTIMATE.CLIENT_NAME "Ultimate Parent Name",
    18 ULTIMATE.ARC_ACCT_CD "Ultimate ARC Acct Code",
    19 HIER.LVL_FROM_ANCESTOR ,
    20 FROM [email protected] CHILD,
    21 [email protected] HIER,
    22 [email protected] ULTIMATE
    23 WHERE HIER.DESCENDANT_CLIENT_SGK = CHILD.CLIENT_SGK
    24* AND ULTIMATE.CLIENT_SGK = HIER.ANCESTOR_CLIENT_SGK;
    SQL> /
    REFRESH START WITH TRUNC( SYSDATE + 1 ) + 3/24 NEXT TRUNC( SYSDATE + 1 ) + 3/24
    ERROR at line 10:
    ORA-00905: missing keyword
    DBLink name is : DNYCPH60.WORLD
    Please guide me on this and help to resolve the issue.

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6002.htm#i2063793 gives you the syntax of the command.
    I think the fact that you have two REFRESH clauses separated by a query rewrite clause is causing some confusion.
    7 REFRESH COMPLETE
    8 ON DEMAND
    9 DISABLE QUERY REWRITE
    10 REFRESH START WITH TRUNC( SYSDATE + 1 ) + 3/24 NEXT TRUNC( SYSDATE + 1 ) + 3/24
    11 AS
    probably should be
    REFRESH COMPLETE
            ON DEMAND
            START WITH TRUNC( SYSDATE + 1 ) + 3/24 NEXT TRUNC( SYSDATE + 1 ) + 3/24
    DISABLE QUERY REWRITE

  • Error When Creating Oracle Text index using Lexer Keyword

    Hi All,
    I am getting following error when i creating oracle text index using lexer & stoplist keyword.
    Pls Help me if any body know.
    Thanks in Advance.
    Error starting at line 1 in command:
    CREATE INDEX TXT_INX_TEXT_SEARCH ON TEXT_SEARCH (BFILE_DOC)
    Post INDEXTYPE IS "CTXSYS"."CONTEXT" LOCAL (
    PARTITION "BEFORE_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)') ,
    PARTITION "Q1_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q2_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q3_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q4_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q1_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q2_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q3_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q4_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q1_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q2_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q3_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q4_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "THE_REST" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)')
    Error at Command Line:1 Column:13
    Error report:
    SQL Error: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-11000: invalid keyword LEXER
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 365
    29855. 00000 - "error occurred in the execution of ODCIINDEXCREATE routine"
    *Cause:    Failed to successfully execute the ODCIIndexCreate routine.
    *Action:   Check to see if the routine has been coded correctly.
    Regards,
    Jack R.

    Hi,
    it works if you put an extra PARAMETERS clause at the end so the creation looks like:
    CREATE INDEX TXT_INX_TEXT_SEARCH ON TEXT_SEARCH (BFILE_DOC)
    INDEXTYPE IS "CTXSYS"."CONTEXT" LOCAL (
    PARTITION "BEFORE_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)') ,
    PARTITION "Q1_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q2_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q3_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q4_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q1_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q2_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q3_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q4_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q1_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q2_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q3_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q4_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "THE_REST" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)')
    PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)') <== Added
    Hope this helps
    Herald ten Dam

  • Insufficient priv error when executing DBMS_ERRLOG through PLSQL

    Hi,
    I shall be grateful if any one of you give me the solution at the earliest.
    I have 2 schemas like A & B those are running on Oracle 10g rel2.
    As per my buz req' I need to create DML Error log table for 'A.T1' table in B schema using DBMS_ERRORLOG package.
    I have granted direct SELECT on A.T1 to B (...not through ROLE as it doesn't work in plsql)
    The problem is when i'm running the procedure,
    DBMS_ERRLOG.CREATE_ERROR_LOG('A.T1', 'err_T1', 'B');
    in SQL*Plus of B schema, it's creating the error log table successfully.
    But the same will get failed when i run this error log procedure with in a procedure owned by B schema.
    It throws 'ORA-01031: insufficient privileges'...
    I hope this is related to privilege issue which is working fine in SQL*Plus but NOT in PLSQL stored procedure.
    Awaiting your earliest reply.
    Thanks.
    - Ela

    >I dont think it's an issue with direct privilege. Actually the
    package is working when i execute it with in a ananymous block,
    but the same get fails when execute it through procedures...
    Role privs work with anonymous PL/SQL blocks. Does not work with stored PL/SQL code.
    SQL> create user user1 identified by user1 default tablespace users quota 2M on users;
    User created.
    SQL> grant create session to user1;
    Grant succeeded.
    SQL> create role user1_role;
    Role created.
    SQL> grant create table, create procedure to user1_role;
    Grant succeeded.
    SQL> grant user1_role to user1;
    Grant succeeded.
    SQL> connect user1/user1
    Connected.
    PL/SQL procedure successfully completed.
    SQL> create table x( n number );
    Table created.
    SQL> begin
    2 execute immediate 'create table y( n number )';
    3* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> create or replace procedure CreateTable is
    2 begin
    3 execute immediate 'create table z( n number )';
    4* end;
    SQL> /
    Procedure created.
    SQL> exec CreateTable
    BEGIN CreateTable; END;
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "USER1.CREATETABLE", line 3
    ORA-06512: at line 1
    SQL>

  • ORA-01031:Insufficient Privileges error when I am trying to use ALERT_QUE

    Hi,
    I am working on SYS.ALERT.QUE for getting system alerts. I am using ODP in C# for connecting to Oracle database with username = SYSTEM, but when I am trying to enque or deque any message from SYS.ALERT.QUE, its gives an error ORA-01031:Insufficient Privileges. I am not able to understand how to assign SYSDBA privileges to SYSTEM and access ALERT_QUE for getting system alerts. I am posting my code below, plz have a look and let me know whats wrong with the code. I am able to connect to databse using SYSTEM, do I need to use username = SYS for accesing ALERT_QUE of database? Plz let me know whats the solution.
    OracleConnection con = new OracleConnection(constr);
    // Create queue
    OracleAQQueue queue = new OracleAQQueue("sys.alert_que", con);
    // Open connection
    con.Open();
    // Begin txn for enqueue
    OracleTransaction txn = con.BeginTransaction();
    // Set message type for the queue
    queue.MessageType = OracleAQMessageType.Raw;
    // Prepare message and RAW payload
    OracleAQMessage enqMsg = new OracleAQMessage();
    byte[] bytePayload = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
    enqMsg.Payload = bytePayload;
    OracleAQAgent[] agent = new OracleAQAgent[1];
    agent[0] = new OracleAQAgent("SUBSCRIBER1");
    enqMsg.Recipients = agent;
    enqMsg.SenderId = new OracleAQAgent("SENDER1");
    // Prepare to Enqueue
    queue.EnqueueOptions.Visibility = OracleAQVisibilityMode.OnCommit;
    // Enqueue message
    queue.Enqueue(enqMsg);
    The code throws exception at line "queue.Enqueue(enqMsg);" saying ORA-01031:Insufficient Privileges
    Edited by: 916462 on Feb 27, 2012 3:31 AM

    Hi Sudheendra,
    Thanks a lot, that worked. Now I am facing one more new issue, when I am trying to deque message from ALERT_QUE which is oracle maintained queue for alerts, I am getting an error "ORA-25215:User data type and queue type do not match". Is there something wrong with my code like Message type, payload and all. I am very new to Oracle database so I don't have idea about this details. Can u plz help me in solving this.
    OracleTransaction txn = con.BeginTransaction();
    // Set message type for the queue
    queue.MessageType = OracleAQMessageType.Raw;
    // Prepare message and RAW payload
    OracleAQMessage enqMsg = new OracleAQMessage();
    byte[] bytePayload = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
    enqMsg.Payload = bytePayload;
    OracleAQAgent[] agent = new OracleAQAgent[1];
    agent[0] = new OracleAQAgent("SUBSCRIBER1");
    enqMsg.Recipients = agent;
    enqMsg.SenderId = new OracleAQAgent("SENDER1");
    // Begin txn for Dequeue
    txn = con.BeginTransaction();
    // Prepare to Dequeue
    queue.DequeueOptions.Visibility = OracleAQVisibilityMode.OnCommit;
    queue.DequeueOptions.Wait = 10;
    queue.DequeueOptions.ConsumerName = "SUBSCRIBER1";
    // Dequeue message
    OracleAQMessage deqMsg = queue.Dequeue();
    txn.Commit();
    Edited by: 916462 on Feb 28, 2012 9:55 PM

  • Enter short text error when creating a purchase requisition using ME51

    Hello
    I would be grateful if someone can help. I am currently trying to raise a purchase req using ME51. The purchase req is for one item so i enter details of this item on line 1. However when i try to save the purchase req i get an error message stating "enter short text"  on line 3 and it does not let me continue. Line 3 however does not contain any item information so i dont understand why i am getting this error message.
    Another user created the same purchase req and it worked fine for them so i am not sure why i am getting this message.
    I  would be grateful if you can please help.
    Thank you
    Regards
    Bindi

    Syed
    I  have tried logging off and logging back in and still having this issue.
    Jurgen
    No im only having this problem in a ME51 creating purchase requisitions and not in a CATT or any batch input recording
    Regards
    Bindi

  • Error when create schemas for webcenter using URM.

    Hi,
    I use Oracle Urm to create necessary schemas for Webcenter. Everything goes well when I create the tables.
    However, when I extend my domain with Webcenter, comes to the database connection testing step, the tests always fail.
    It said: A connection is establish but no result received from the Test query.
    I ignored the test but then later, start the WLS_Spaces manage server, the server can't start because of database error, the needed tables not found.
    I use SQl Developer to connect to the database but can't see those newly created tables.
    But during the URM step, nothing went wrong.
    Can you help me with this?
    Thank you very much.

    Hi Heather,
    The reason that you are receiving this error is because the niscope.h file (called by niScope.fp) uses a struct which cannot be compiled into a DLL. This means that the niScope.fp file cannot be included in the target settings. Here's a knowledgebase that describes the error.
    http://digital.ni.com/public.nsf/websearch/AC028D9586E947F08625661E006A182F?OpenDocument
    If you do want the niScope.fp file to be included then you will need to make some modifications to the niscope.h file and create a typedef for the niScope_wfmInfo struct. Here's info from the help file that describes the type library section and the use of the .fp file.
    "Type Library—This button lets you choose whether to add a type library resource to your DLL. Also, you can choose to include links in the type library resource to a Windows help file. LabWindows/CVI generates the type library resource from a function panel (.fp) file. You must specify the name of the .fp file. You can generate a Windows help file from the .fp file by using the Generate Windows Help command in the Options menu of the Function Tree Editor window.
    This feature is useful if you intend for your DLL to be used from Visual Basic."
    If you do not include the niScope.fp file then you will be able to compile the DLL.
    Hope this helps! Let me know if you have any questions.
    Erick

  • Error when creating an image (dmg) using hdiutil

    Hi everybody,
    I´m using a script which creates an image (dmg) from a selected folder.
    This works without errors.
    But I also want to create images from CDs and DVDs using this script. Doing so I always get the error "Only one image can be created at a time"
    I thought that a previous imaging process was not finished yet and I rebooted the Mac. But I still get this error. Any idea?
    Here is the script:
    set Ordner to choose folder
    tell application "Finder"
    set diskNames to name of Ordner
    set myNewPath to POSIX path of (path to desktop folder) as string
    set theListe to every process
    end tell
    set myNewPath to myNewPath & diskNames & ".dmg"
    set Quellordner to POSIX path of Ordner as string
    set Skript to "hdiutil create -srcfolder " & Quellordner & " " & myNewPath
    do shell script Skript
    iMac Core Duo/1,5 GB; MacBook Pro Core2Duo 2GB   Mac OS X (10.4.4)  

    I believe this has something to do with terminal and have spaces in folder names / disk names. As it sees the space and thinks it is another command and in this case i believe it thinks you are trying to do two or more disk images at once. Therefore it is important to deal with spaces. Thankfully you should be ablr to get around this by using the quoted form command which i have implemented below.
    I repeated your error using a folder called "Cd for Cherie". Folders without gaps such as "pH" worked fine.
    I havent tested this with any disk but i believe if you alter it to this hopefully it will work
    Also the name of the folder wasnt working for me so i altered to to work for me, i am using 10.4.8 so if it doesnt work for you then change it back.
    --Start Code
    tell application "Finder"
    set infor to info for Ordner
    set diskNames to name of infor
    -- display dialog diskNames as string
    --set diskNames to name of Ordner
    set myNewPath to POSIX path of (path to desktop folder) as string
    -- set theListe to every process
    end tell
    set myNewPath to quoted form of (myNewPath & diskNames & ".dmg")
    set Quellordner to quoted form of POSIX path of Ordner as string
    set Skript to "hdiutil create -srcfolder " & Quellordner & " " & myNewPath
    do shell script Skript
    --end code

  • Recieving ORA-01722 invalid number error while creating a materialized view

    Hi,
    I am receiving a ORA-01722 invalid number error while creating a materialized view. when run the select statement of the view i don't get any error, but when i use the same select statement to create a materialized view i receive this error. Could any please help in resolving this error. Here is the code i am using to create a materialized view.
    CREATE MATERIALIZED VIEW MV_EBS_CH_CLOSED
    REFRESH FORCE ON DEMAND
    AS
    SELECT DISTINCT kr.request_id, org.org_unit_name,
    ebs_ch_ticket_type (kr.request_id) ticket_type,
    DECODE
    (kr.status_code,
    'CLOSED_SUCCESS', kr.last_update_date,
    'IN_PROGRESS', (SELECT MAX (start_time)
    FROM ebs_ch_datastore ecd1
    WHERE kr.request_id = ecd1.request_id
    AND workflow_step_name =
    'Final BA Review and Deployment Exit Criteria')
    ) closed_date,
    substr(krhd.visible_parameter12,1,10) siebel_start_date,
    kr.creation_date itg_start_date
    FROM kcrt_requests kr,
    kcrt_request_types krt,
    kcrt_req_header_details krhd, kcrt_request_details krd1,
    (SELECT koum.user_id user_id,
    DECODE (koup.org_unit_name,
    'IT Implementations', 'CHS - Service Management BA',
    koup.org_unit_name
    ) org_unit_name
    FROM krsc_org_unit_members koum, krsc_org_units koup
    WHERE 1 = 1
    AND 'Y' = koup.enabled_flag
    AND koum.org_unit_id = koup.org_unit_id
    AND EXISTS (
    SELECT 'X'
    FROM krsc_org_units kouc
    WHERE koup.org_unit_id = kouc.org_unit_id
    START WITH kouc.parent_org_unit_id =
    ANY (SELECT org_unit_id
    FROM krsc_org_units krsc_org_units1
    WHERE 'Clearinghouse' =
    org_unit_name)
    CONNECT BY kouc.parent_org_unit_id =
    PRIOR kouc.org_unit_id)
    UNION
    SELECT kou.manager_id user_id,
    DECODE
    (kou.org_unit_name,
    'IT Implementations', 'CHS - Service Management BA',
    kou.org_unit_name
    ) org_unit_name
    FROM krsc_org_units kou
    WHERE 'Y' = kou.enabled_flag
    START WITH kou.parent_org_unit_id =
    (SELECT org_unit_id
    FROM krsc_org_units krsc_org_units2
    WHERE 'Clearinghouse' = org_unit_name)
    CONNECT BY kou.parent_org_unit_id = PRIOR kou.org_unit_id) org
    WHERE krt.request_type_id = kr.request_type_id
    AND krt.request_type_name IN ('Bug Fix', 'IT Enhancement')
    and kr.REQUEST_ID = krd1.request_id
    and krd1.batch_number = 1
    AND kr.request_id = krhd.request_id
    AND org.user_id in (krd1.parameter4, krd1.parameter5, krd1.parameter7)
    AND ( 'CLOSED_SUCCESS' = kr.status_code
    OR 'IN_PROGRESS' = kr.status_code
    AND kr.request_id IN (
    SELECT request_id
    FROM (SELECT DISTINCT request_id,
    MAX
    (start_time)
    closed_date
    FROM ebs_ch_datastore
    WHERE 'Final BA Review and Deployment Exit Criteria' =
    workflow_step_name
    GROUP BY request_id))
    Thanks,
    Shaik Mohiuddin

    This error occurs when you try to create a materialized view , but if you run the sql the results are perfectly fine. Well it happend to me also and to fix this I made sure all the coulmns have the same data type which are used in joins or in where clause.
    use
    where
    to_number(col1)=to_number(col2) and to_number(col3)=to_number(col4)
    hope this helps..

  • Error when creating link to documents from material

    Hi all,
    while creating the purchase order the error message "Error when creating link to documents from material 61260224060" is displayed.
    why this error message is displayed.?
    Regards,
    GaneshRaja

    Hello Ganesh
    Please check material master - view 'Bases data 2'.
    There is checkbox 'No link'. You can activate this checkbox if you are not storing any drawing/designe docuemnt for this material.
    Try to do this and check out again.....
    If this helps you in resolving your issue, i would appreciate if you reward the answer with suitable points.
    Best Regards
    Avinash

  • Error when creating Sequence inside a stored procedure

    I tried to drop a sequence and then re-create it with new starting number in a pl/sql procedure by using 'execute immediate' command.
    However, I got the 'ORA-01031: insufficient privileges' error when I actually executed the procedure.
    I was able to create the sequence directly from SQL*Plus prompt. So, I believe I have the sufficient privilege to create sequence.
    Why it's not working when it's in a procedure?
    Please advise. Thanks!

    I'm not mean at all. You asked a redundant question, and you didn't research it or for less than 1 minute.
    Doing so you add to the clutter, and contribute to turning this forum in a chatroom (which it isn't ) and to a place of garbage
    (which it is thanks to you and thousands of other DBAs who never consult documentation before asking a question)
    That's just the truth. I can't help it you can't bear to hear the truth. That is a problem with you, not with me.
    I am in forums like this one for over 15 years. Over the years I have seen more and more people who don't want to learn to fish.
    And as things are getting worser and worser: yes, it annoys me.
    And I did anwer the question, didn't I. Frankly, all over the globe real DBAs are tearing their hair out (provided they still have it) because of the sort of 'applications' you and your colleagues develop.
    They are a disaster.
    Sybrand Bakker
    Senior Oracle DBA

  • "Initial column cannot be generated" error when creating a planning book

    Hi,
    I have an error when creating a planning book with the planning book wizard. In the tab "data view", I enter values for the "Visible" and "Input" fields and validate. The following error is generated: "Initial column cannot be generated" and then "Maintain the time for the 'column visible from' field". I tried with different dates, and get the same error.
    I am running SCM 5.0.
    Any help would be greatly apreciated.
    Regards,
    Mikael.

    Hi,
    Generally these error come when we manually enter the value in the Visible and Input column. Instead we should try select value from the Drill down options which gets generated based on the Time Bucket Profile you have selected as input for Planning Horizon.

  • Error when creating index with parallel option on very large table

    I am getting a
    "7:15:52 AM ORA-00600: internal error code, arguments: [kxfqupp_bad_cvl], [7940], [6], [0], [], [], [], []"
    error when creating an index with parallel option. Which is strange because this has not been a problem until now. We just hit 60 million rows in a 45 column table, and I wonder if we've hit a bug.
    Version 10.2.0.4
    O/S Linux
    As a test I removed the parallel option and several of the indexes were created with no problem, but many still threw the same error... Strange. Do I need a patch update of some kind?

    This is most certainly a bug.
    From metalink it looks like bug 4695511 - fixed in 10.2.0.4.1

Maybe you are looking for

  • How can I watch video encoded with 10-bits color depth correctly via Adobe Flash Player?

    When I watching video on a site, one of those video said it is encoded with 10-bits color depth and require Flash Player 10.2+ and non-trident browser to watch it correctly , but with the latest flash player available installed and ising the Firefox,

  • My itunes keeps closing

    My itunes keeps closing, i have tryed uninstalling and reinstalling. its says itunes has encountered a problem and windows can not find a solution. Please can someone help thanks

  • Is there a way to find out the content of texts on my daughter's phone?

    We have a daughter with special needs who is trying very hard to be independent. I don't worry about her as much as I worry what others say to her. I try to monitor daily what she is texting and what others are texting to her. I have a pretty good ha

  • Customize the report margin while rendering

    I want to customize the report margin while rendering. I am using ReportExecution2005.ReportExecutionService  webservice to render report. how to customize the report margin? I try to use deviceinfo for this and set the below device info, it is not w

  • Why is volume lower when using Mono Audio? Can it be adjusted?

    I have switched my iPhone4's Mono Audio option in order to listen to music using my ear buds. (I need to use mono as am deaf in one ear). The volume, after switching on Mono Audio, is significantly less than with it off. I need to set the volume to m