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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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