sql - trying to create a group of users from a flat file every has to be done using the package -
this main problem try sql loader execute inside package.
procedure addgroup num number; name1 varchar2(20); load varchar2(200); begin load := 'host sqlldr kevonia_workspace/pass123 control = c:\users\kevonia\desktop\dba\usernames.ctl log = c:\users\kevonia\desktop\dba\usernames.log'; execute immediate(load); num in 1..10 loop select username name1 loaded userid=num; dba_package.newuser(name1); dbms_output.put_line(name1|| ': added' ); end loop; end addgroup;
ora-00900: invalid sql statement
you have several options
create external table. can manipulate table normal table. best option.
if don`t have privileges create table , insist on using host commands @ this (but really, don't it).
same above using
dbms_scheduler
executable job.
Comments
Post a Comment