Results 1 to 3 of 3

Thread: Where data will populate

  1. #1
    Contributing Member
    Join Date
    Sep 2007
    Answers
    35

    Where data will populate

    How can one see if somebody modified any code.

    Also, If scott has created the Procedure p1 which inserts the data into table t1 which is created in scott schema.if the scott gives the execute permission on produre p1 to denis(another user),denis also created the table t1 in his shema.when the denis execute the p1 in which user table will populate the data.


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Where data will populate

    Data will always insert into scott schema.
    Because by default all the procedures are Definer Right .


  3. #3
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Where data will populate

    Define the procedure like this sample to make that invoker right. That means the user who is calling / invoking the procedure has all the right not the definer (the user who has defined the procedure and granted the priviliges.)
    Code:
    create or replace procedure deptins ( dno dept.deptno%type, dn dept.dname%type, lc dept.loc%type ) 
    authid current_user 
    is 
    begin 
    insert into dept values(dno,dn,lc); 
    dbms_output.put_line('one row inserted......!'); 
    commit; 
    exception 
    when dup_val_on_index then dbms_output.put_line('duplicate value......!'); end;


    Last edited by debasisdas; 01-10-2008 at 08:43 AM. Reason: formatting

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact