Protecting a SQLPLUS account password in a script
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Protecting a SQLPLUS account password in a script

  1. #1
    Join Date
    Jan 2012
    Posts
    2

    Protecting a SQLPLUS account password in a script

    Hello!

    I have a SQL SQLPLUS script that needs to run on a Windows 2008R2 server.

    I have coded the script commands in script.sql

    I call script.sql using sqlplus /nolog @c:\scripts\script.sql

    How do I protect the password for the account so that the password is not in clear txt in the script.

    I don't want to have in the script

    connect user@host/PASSWORD

    How are other people out there protecting the password so it can't be seen clear txt in the script?

    Thanks!

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    Not that much different than on UNIX, where an env file is sourced - the password is clear text within that file, but the rub is: who can read it? Same thing applies in Windows - use NTFS permissions to allow reading of the file only by whomever. A "dot" env file in UNIX is owned by oracle, so the perms may be rw-------. In Windows, block access to the file via NTFS.

  3. #3
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,477

    Cool

    Or...you also can use an "externally identified" account.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

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