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

Thread: batch sql programs

  1. #1
    Join Date
    Aug 2000
    Location
    Jolo, Sulu
    Posts
    639

    batch sql programs

    Hi,

    I have a batch file which contains a sqlplus
    command:

    sqlplus scott/tiger @c:\mis\prg\clean_up.sql

    How can I hide passwords on sqlplus batch file
    so that users won't be able to see my password?

    In unix, whenever you issue ps -ef, it will
    display completely the whole command.

    Do I have to convert my sqlplus programs to be
    able to secure it.

    Thanks,

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    depending on the contents of the file, you may do better to create a stored procedure to run the required commands, then give execute permission on the procedure to individual users.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Aug 2000
    Location
    Jolo, Sulu
    Posts
    639
    hi,

    Sorry, I mean the hard coded oracle userid and password,
    not the program.

    Thanks

  4. #4
    Join Date
    May 2002
    Location
    California, USA
    Posts
    175

    Thumbs up

    Use of the many batch file compilers - http://www.bdargo.com/info/batcomp.htm . You will have exe file, which is hard to read from a regular user. Hackers with some efforts will crack it.


    Hope that helps,

    clio_usa

    OCP 8/8i/9i DBA

    Visit our Web Site

  5. #5
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    on windoze

    C:\> set username=scott
    C:\> set password=tiger
    C:\> sqlplus %username%/%password%@connect_string

    on unix
    use ops$ authentication.

    HTH
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  6. #6
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Originally posted by kris123
    hi,

    Sorry, I mean the hard coded oracle userid and password,
    not the program.

    Thanks
    why not give the users their own id's and passwords?
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  7. #7
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Originally posted by kris123
    hi,

    Sorry, I mean the hard coded oracle userid and password,
    not the program.

    Thanks
    Work around wud be possible, but with an extra SQL file.



    Code:
    Sqlplus -S /NOLOG @Logon.sql
    
    Logon.sql
    =========
    
    Connect User_name/Pswd@String
    
    @c:\mis\prg\clean_up.sql 
    
    exit
    Abhay.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  8. #8
    Join Date
    Feb 2003
    Location
    Tehran/Iran
    Posts
    94
    Hi,
    Unix:
    Do like this:
    create test.sql put the following sql commands in the file:

    connect / as sysdba
    ..
    < any sql commands>
    select * from scott.emp;
    ...
    ..
    exit;

    And execute the command by:
    sqlplus /nolog @test.sql

    In this way you side the useid/password from world. You can run it as crontab.
    Remember this is possible only if you are on the
    same server.

    //hamhey

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