BTEQ .BAT file to Reset users password

General

BTEQ .BAT file to Reset users password

Hello all

I'm new in Terdata and i'm trying to write a .bat file to do the following

1) Choose between 2 batabases to connect

2) Imput user's username and reset it to a predefined password.

 

I can connect to the databases from BTEQ but the reset eludes me.

 

any help is appreciated

 

Thanks all

3 REPLIES
rjg
Supporter

Re: BTEQ .BAT file to Reset users password

Chismage,

Do you need to know how to pass the values for username and password to the BTEQ?

 

 

Rglass

Re: BTEQ .BAT file to Reset users password

I created a bat file that connects to my database on BTEQ but i cant get it to run any commands, i would like to input just the usemane and run the reset command if that is possible.

Enthusiast

Re: BTEQ .BAT file to Reset users password

We have a SP for reset password. You may call the SP from your Bteq also. Command to reset password is :

  SET MU_Stmt = 'MODIFY USER '          || '"' ||
                db_Name                 || '"' ||
                ' AS PASSWORD='         ||
                Password_Stmt           ||
                ' FOR USER;';

  CALL dbc.SysExecSQL( MU_Stmt );

db_name is username and password_stmnt  is new password. They are passed as parameters to the SP.

--Samir Singh