BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Fleroo
Calcite | Level 5

I am having problems connecting to an Oracle database vis my SAS program in order to execute a Select.   I looked at the log (which I attached the snippet below), and it appears for some reason the letters "XX" are being substituted for the numbers "72" in the first two positions of the pasword on the connection.   I know that these login credentials work because I can log into that database using those very same credentials through a SQL tool (Quest SQL Navigator).   Why is it doing that ?  Why is SAS subtituting the first two positions.  Does it have to do with Password length ?  That's beyond my control as it's set by a DB Admin.

Thanks.


30         proc sql noprint;

31             connect to oracle (path='testdb' user=sysadmin_read_user  password=XXb9PCPtS5CCCx2H3jUGCdCZt);

ERROR: Invalid option name b9PCPtS5CCCx2H3jUGCdCZt.

NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.

32             create table  PDTABLE as

33             select * from connection to oracle

34             (

35              select b.DEPTID AS "PSTTN",

36                     b.ZG_FEDEX_ID AS "DRIVER1",

37                     b.ZG_WRK_AREA_ID AS "PDPSA1",

38                     TO_CHAR(b.ZG_ON_DUTY_DT,'yyyymmdd') AS "DATE1"

39              from SYSADM.PS_ZG_SAF750_TBL b

40              where b.ZG_ON_DUTY_DT = &YESTERDAY1

41             );

NOTE: Statement not executed due to NOEXEC option.

42             disconnect from oracle;

NOTE: Statement not executed due to NOEXEC option.

43         quit;

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

Fleroo

I might have to do with the length, I am not sure, I generally put quotes around userid and password.

Please mark the discussion as answered, so others can see immediately that this has been answered

Enjoy using SAS

View solution in original post

7 REPLIES 7
Fleroo
Calcite | Level 5

I should probably add..... I CAN connect to a different Oracle database in the very same program.  Of course the Userid: and Password: are different.

Doc_Duke
Rhodochrosite | Level 12

try putting the password in quotes.

OS2Rules
Obsidian | Level 7

Hi:

Can you try putting the password in a macro variable?

%let orapwd=mybiglongpassword;

Then use:

proc sql noprint;

        connect to oracle (path='testdb' user=sysadmin_read_user  password="&orapwd");

I suspect that the problem is caused by SAS trying to mask the password so it is not visible in the log.  There may be an option to suppress this as well.

BrunoMueller
SAS Super FREQ

Flreoo

Put the password in quotes like password='XXb9PCPtS5CCCx2H3jUGCdCZt'

Fleroo
Calcite | Level 5

WOOHOO... the single quotes worked.   BUT, I'm puzzled as to why I didn't need the quotes on the password for the other database I'm connecting to.  That password is .... password=oct24.   Could it be the length of the password ?   Hmmm, oh well, it works.  THANK YOU ALL SO MUCH

BrunoMueller
SAS Super FREQ

Fleroo

I might have to do with the length, I am not sure, I generally put quotes around userid and password.

Please mark the discussion as answered, so others can see immediately that this has been answered

Enjoy using SAS

Fleroo
Calcite | Level 5

I got an email from Administrations stating I have not set a "status update" and they are asking that I do.  What does that mean ?  How do I go about doing it ?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 3909 views
  • 0 likes
  • 4 in conversation