Skip to content

Instantly share code, notes, and snippets.

@anjuls
Created July 26, 2017 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjuls/cdb0515702a4c6cbebc5756fdbe389e1 to your computer and use it in GitHub Desktop.
Save anjuls/cdb0515702a4c6cbebc5756fdbe389e1 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ "$1" = '-s' ]]; then
sqlplus -s scott/oracle@ORCL<<EOF
declare
foo clob;
begin
dbms_application_info.set_action('LOBLOAD');
foo:=rpad(dbms_random.value(),30000,dbms_random.value());
for i in 1..1000 loop
insert into T (id, payload1)
(select secfile_seq.nextval, foo from dual connect by level
<=1000);
commit;
end loop;
end;
/
EOF
exit
fi
c=0
while [[ $c -lt 20 ]]; do
let c=$c+1
$0 -s >>lobload.log &
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment