Wednesday, August 16, 2017

-- Some Teradata SQLs for newbies --

As I am learning Teradata Database Administration, I thought about sharing some of the SQLs that I found useful for the day to day operation. I will be adding to this list.


How to check if a user is locked

You connect to the database as sysdba, dbc won't have the privileges required.

Execute from Teradata SQL Assistant

SELECT * FROM .USERS WHERE lockedCount1; 

If there is a locked user, you can unlock it using the following command

modify USER "tariqn" as release password lock; 


where tariqn is the name of the account that you are attempting to unlock.

How to modify your password

MODIFY USER "USERNAME" AS PASSWORD = "ParsiPPany12!";


How to assign a temporary password to a user and prompt the user to enter a new password.


MODIFY USER ORTAR as password=********  FOR USER;