• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 376
  • Last Modified:

need help executing procedure

I created a procedure as user A and grant execute on that privilege to user B however, every time i try to execute the procedure as user B i get the following error message.


Am I missing something?

execute COPYSTIRECORDTOBIBHOLDINGS
BEGIN COPYSTIRECORDTOBIBHOLDINGS; END;

      *
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'COPYSTIRECORDTOBIBHOLDINGS' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
0
sikyala
Asked:
sikyala
  • 4
  • 3
2 Solutions
 
woolmilkporcCommented:
BEGIN 'COPYSTIRECORDTOBIBHOLDINGS'; END;

wmp
0
 
sikyalaSenior Database AdministratorAuthor Commented:
the procedure name is COPYSTIRECORDTOBIBHOLDINGS
0
 
sdstuberCommented:
do you have a synonym owned by B pointing to that procedure?  or a public synonym?

if not, you must prefix it with the owner


execute A.COPYSTIRECORDTOBIBHOLDINGS

or

BEGIN A.COPYSTIRECORDTOBIBHOLDINGS; END;
0
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 
sikyalaSenior Database AdministratorAuthor Commented:
i tried creating a synonym but i keep getting the error

create synonym temsws.COPYSTIRECORDTOBIBHOLDINGS for temswsuser;
create synonym temsws.COPYSTIRECORDTOBIBHOLDINGS for temswsuser
                      *
ERROR at line 1:
ORA-00955: name is already used by an existing object

when i try to drop the synonym i get the error

ERROR at line 1:
ORA-01434: private synonym to be dropped does not exist

0
 
sdstuberCommented:
as user B

create synonym COPYSTIRECORDTOBIBHOLDINGS for A.COPYSTIRECORDTOBIBHOLDINGS

-------

assuming A = temsws  and B=temswsuser
as temswsuser


create synonym COPYSTIRECORDTOBIBHOLDINGS for temsws.COPYSTIRECORDTOBIBHOLDINGS


0
 
sikyalaSenior Database AdministratorAuthor Commented:
awseome thanks. Is it possible to view the text for that procedure logged in as temswsuser
0
 
sdstuberCommented:
yes  look in all_source


elect * from all_source where owner = 'TEMSWS'
and name = 'COPYSTIRECORDTOBIBHOLDINGS'
order by line
0
 
sikyalaSenior Database AdministratorAuthor Commented:
thank you so much
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now