DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Can you SET ROLE <role_name> in sqlldr?

  1. #1
    Join Date
    Jun 2001
    Posts
    243
    hi,
    I need to have a role set before I run sqlldr. Is there anyway to set a role in sqlldr? currently, all the roles are set to none and this is the requirments. A role only can be set during that session. Any ideas?

    thanks.

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    I have never tried it but most probably is you can do it with a logon trigger

  3. #3
    Join Date
    Jun 2001
    Posts
    243
    I don't understand....logon trigger?

  4. #4
    Join Date
    Jun 2001
    Posts
    243
    I'm running sqlldr in unix script and need to set a role:


    sqlldr CONTROL=$controlFile LOG=$logFile BAD=$badFile DATA=$filePath << EOF > /dev/null 2>&1
    $login
    EOF
    if [ `egrep -c "(Error:|ORA-)" $logFile` -gt 0 ]; then
    egrep "(Error:|ORA-)" $logFile | head -1
    exit 1
    fi
    echo "SQLLOAD_OK"


    this is for Solaris 8 with Oracle 8.1.7

  5. #5
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    look oracle doco about event based triggers regarding logon triggers

  6. #6
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Originally posted by pando
    look oracle doco about event based triggers regarding logon triggers
    ... and forget unix scripts: use PL/SQL and DBMS_JOB! When I hear of unix cripts I sort of remember of ABBA and the Village People :-)

    If Jeff is reading this: you asked me last year how to shedule RMAN backups only from PL/SQL. I did that eventually. With a little help of my friends :-) Tim Hall and his great site).
    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g,12c
    email: ocp_9i@yahoo.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width