Oracle password security is implemented via Oracle "profiles" which are assigned to users. PASSWORD_LIFE_TIME - limits the number of days the same password can be used for authentication First, start by creating security "profile" in Oracle database and then alter the user to belong to the profile group.
1) Creating a profile:
create profile all_users
limit
PASSWORD_LIFE_TIME 60
PASSWORD_GRACE_TIME 10
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX 0
FAILED_LOGIN_ATTEMPTS 3
PASSWORD_LOCK_TIME UNLIMITED;
2) Create user and assign user to the all_users profile
SQL>create user chuck identified by norris profile all_users;
3) To "alter profile" parameter, say; change to three months:
SQL>alter profile all_users set PASSWORD_LIFE_TIME = 90;
48. How do you delete duplicate rows in a table?
There is a few ways to achieve that:
▪ Using subquery to delete duplicate rows:
DELETE FROM table_name WHERE rowid NOT IN (SELECT max(rowid) FROM table_name GROUP BY id);
More ways:
▪ Use RANK to find and remove duplicate table rows
▪ Use self-join to remove duplicate rows
▪ Use analytics to detect and remove duplicate rows
▪ Delete duplicate table rows that contain NULL values