0

I am trying to connect to Oracle DB from my local computer and I use the following libname statement.

libname liblibb oracle path='galaxy' defer=no
                  connection=globalread readbuff=4000 ;

this works... as it uses the windows AD details to login. However, the problem is when i run this libname statement with rsubmit(server UNIX).

rsubmit;
libname liblibb oracle path='galaxy' defer=no
                  connection=globalread readbuff=4000 ;

endrsubmit;

Error:

ORA-01017 Invalid Username/Password
Error in the LIBNAME statement

But when I use it with username and password it works.

rsubmit;
libname liblibb oracle path='galaxy' user=xxxx password='xxxx'       
defer=no
                  connection=globalread readbuff=4000 ;
endrsubmit; 

Is there any possible way to logon to Oracle on rsubmit without writing the user and password details in the libname statement or atleast like a dbprompt for the username and password? or how can the we make UNIX work with the windows AD in sync with Oracle so it takes the single sign on concept.

user3658367
  • 641
  • 1
  • 14
  • 30
  • Can you connect to Oracle from the Unix machine using other tools like sqlplus without having to re-type your credentials? – Tom Nov 05 '15 at 12:11
  • @Tom Ya but I am using SAS. – user3658367 Nov 05 '15 at 12:28
  • @user3658367 I think Tom's getting at, if SQL*Plus can connect without password, maybe that same method will work with SAS. – Joe Nov 05 '15 at 15:36
  • @user3658367 How are you connecting to your unix machine? Are you using a Spawner, or a telnet script? See [this page](http://support.sas.com/documentation/cdl/en/connref/67933/HTML/default/viewer.htm#n1mnvt2zgyyaqzn1gq0m8t9q7qbu.htm) for a comparison of these methods. – Joe Nov 05 '15 at 15:38

2 Answers2

0

You need to have credentials on your unix box to the Oracle database if you don't want to submit the password in your rsubmit. By using rsubmit, the db is seeing the unix version of you trying to log in, not the windows version of you.

Tammy
  • 1
  • 1
0

When you are using rsubmit, you are passing the statement to the remote server and the statement is running on the remote server. Therefore 1. Your credentials should be available to the statement on the remote server 2.Your remote server should have access to oracle

In the first case when you use libname statement on the local machine the odbc connection must be having uid and password saved in the connection profile. So no need to specify. In the second case the profile does not have your credentials saved.Therefore you need to have them available there on the remote machine. One approach is to save user name and password as macros and make available on server. A typical scenario will be like this %let dbpw= your_db_passwd; %let usrid= your_user_id; These could be placed anywhere you feel secure may be in the sign on script or some where outside your program on the local machine. Include this with %include statement.

%include passwd_file.sas;

Now make them available on the remote machine as

%syslput dpw=&dbpw;
%syslput userid=&userid;
rsubmit;
libname liblibb oracle path='galaxy' user=&userid password="&dbpw"       
defer=no
                  connection=globalread readbuff=4000 ;
your_program_statements_here;
endrsubmit; 

This how I use it.

babu
  • 21
  • 1