I use Oracle Database 11g and I have a fairly simple code:
set serveroutput on format wrapped;
declare
result_ clob;
begin
result_ := dbms_random.string('P', 10);
dbms_output.put_line(result_);
end;
When I try to run it gives me an error saying:
identifier 'DBMS_RANDOM' must be declared
Why dbms_random is not recognized as a valid identifier? Do I have to import it?
GRANT EXECUTE ON SYS.DBMS_RANDOM TO <your user name here>;