Oracle
Connect as system user
connect SYSTEM@localhost
Commands
dbms_random.value(0,20)
- generate random number,sysdate
- get current date,systimestamp + interval '0 01:51:15' day to second
- add some time to current time,
Account password will expire in X days
Change default password policy:
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
Reassign password to user:
PASSWORD username;
To show passwords status:
SELECT USERNAME, ACCOUNT_STATUS FROM DBA_USERS;
Drop all tables
select 'drop table ' || table_name || ' cascade constraints; ' from tabs;
Check constraints
select * from user_constraints where constraint_name = 'NAME';
Insert string value to blob column
update table set blob_column = utl_raw.cast_to_raw('testing this') where id = 1;
Start and stop the listener service
lsnrctl stop
lsnrctl start
Import database dump
imp system/password file=database.dmp full=yes