Search code examples
oracle-databaseplsqldatabase-administration

Oracle pl sql new user gets PROCEDURE DOESN'T EXIST


I have Oracle based application that has a database and apache with modplsql set as application server, I am fairly new to Oracle so forgive me if this is not a very smart question, but its a question I could not find an answer to.

The problem is I need to add a couple of new users to this oracle application and can't figure out how to do so, I tried both: creating them using a console and using oracle sql developer UI tool, in both cases I grant all the roles and privileges that current users have, yet when I connect to my application with new credentials I get PROCEDURE DOESN'T EXIST error. I know the problem is with roles or privileges, but can't figure out what it is.

Can someone with more experience guide me in correct direction?

Thanks in advance!

Code:

1) create user myuser identified by pass2;
2) ALTER USER "myuser" DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK ;
3) GRANT "DBA","CONNECT","our_USER","RESOURCE" TO "myuser";
4) GRANT create database link  TO "myuser";
   GRANT create materialized view  TO "myuser";
   GRANT create procedure  TO "myuser";
   GRANT create public synonym  TO "myuser";
   GRANT create role  TO "myuser";
   GRANT create sequence  TO "myuser";
   GRANT create synonym  TO "myuser";
   GRANT create table  TO "myuser";
   GRANT create trigger  TO "myuser";
   GRANT create type  TO "myuser";
   GRANT create view  TO "myuser";
   GRANT create tablespace  TO "myuser";
   GRANT create session  TO "myuser";

Solution

  • I know its been awhile, but I noticed a few people looked at this post, so I decided to post what the problem was hoping that it may help someone. Well in our case it was the problem with schemas, therefore a trigger was required liko so:

    create or replace TRIGGER my_user.swithtomyschema
    AFTER LOGON ON my_user.SCHEMA 
    BEGIN
      EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA=my_schema';
    END;
    

    I know it now so it seems simple, but back then I was new to the system and it took me days untill I figured out what was wrong with it. I hope nobody else is in the same situation, but if you are I hope you will come accross this answer and it will point you in the right dirrection. Best of luck!

    And thanks to all who tried to help!