ORA-01031: insufficient privileges

ORA-01031: insufficient privileges
ORA-06512: at "REPORT.SP_CREATETABLE", line 8
ORA-06512: at line 2


当oracle过程中调用create 创建表时候一直报错儿,原来是需要授权,这时候可以在过程中这样写:

create or replace procedure sp_createtable(in_table_name          in varchar
                              ) Authid Current_User  is  --创建表
  sqlstr varchar(1000);
  begin
 
     sqlstr :='create table '||in_table_name ||' as select * from '|| in_table_name ||'@zs_product';--创建表
         
        execute immediate sqlstr;   
  end;


(Authid Current_User  需要加这个给用户授权)

你可能感兴趣的:(privileges,Insufficient,ORA-01031)