我已经使用数据库链接和存储过程在另一个数据库上创建了用户,但是在向新创建的用户授予权限时遇到了问题。
检查以下代码:
CREATE OR replace PROCEDURE Hostname10 (user_name IN VARCHAR2,
pass_word IN VARCHAR2,
table_space IN VARCHAR2,
pro_file IN VARCHAR2)
AS
BEGIN
dbms_utility.Exec_ddl_statement@rahul2('CREATE USER '
||user_name
||' IDENTIFIED BY '
||pass_word
||' DEFAULT TABLESPACE '
||table_space
|| ' PROFILE '
|| pro_file
|| ' ACCOUNT UNLOCK');
dbms_utility.Exec_ddl_statement@rahul2('grant create table,create session,create view,create sequence,create procedure,create job,create synonym to'
||user_name
||'');
END;
/
执行时出现错误:
Error:
Error report -
ORA-06550: line 1, column 7:
PLS-00201: identifier 'HOSTANAME10' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action: