SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RupaJ
Lapis Lazuli | Level 10

Hello,

 

Is there a way to reset the database password from SAS? I would like to give the ability for SAS users to be able to reset their database password (in my case Teradata pw) from SAS. Is there a way to do it?

 

I was wondering if I could run a macro (that is on Teradata) from SAS that would reset the password for the user. Is that possible?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

I'd expect the syntax to be similar to Oracle's:

proc sql;                          
  connect to oracle (user="&username" path='xx' pw="&cur_pwd" ); 
  execute (alter user &username identified by "&new_pwd" replace "&cur_pwd" ) by oracle; 
quit;

 

View solution in original post

3 REPLIES 3
Krueger
Pyrite | Level 9

SQL Pass Through and you can use (EDIT): since your using TeraData it looks like you would use MODIFY USER to change passwords. Not very secure and is going to require an existing connection to the database, although I'm pretty sure your going to need a connection to the database regardless of method.

ChrisNZ
Tourmaline | Level 20

I'd expect the syntax to be similar to Oracle's:

proc sql;                          
  connect to oracle (user="&username" path='xx' pw="&cur_pwd" ); 
  execute (alter user &username identified by "&new_pwd" replace "&cur_pwd" ) by oracle; 
quit;

 

RupaJ
Lapis Lazuli | Level 10

Thank you @ChrisNZ  and @Krueger  for the response. I was reading further on how to connect to Teradata and here is how we do it.

 

proc sql; 
connect to teradata (user="john" server="abc" pw="test123" mode="teradata" ); 
execute (modify user john as password="test234" ) by teradata; 
quit;

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 4570 views
  • 3 likes
  • 3 in conversation