Connect to user without knowing password - Oracle Database Script. --- You can connect to another user without knowing the password, with grant connect through privilege --- Suppose a user TEST1 wants to connect to TEST2 user and create a table and we don’t know the password of TEST2. Conn / as sysdba SQL >alter user TEST2 grant connect through TEST1; User altered. SQL >conn TEST1[TEST2] Enter password:< Give password for TEST1> SQL >show user USER is "TEST2" SQL >create table emp_test as select * from emp; Table created. SQL > conn / as sysdba connected SQL > select owner from dba_tables where table_name='EMP_TEST'; OWNER ------ TEST2
--- You can connect to another user without knowing the password, with grant connect through privilege --- Suppose a user TEST1 wants to connect to TEST2 user and create a table and we don’t know the password of TEST2. Conn / as sysdba SQL >alter user TEST2 grant connect through TEST1; User altered. SQL >conn TEST1[TEST2] Enter password:< Give password for TEST1> SQL >show user USER is "TEST2" SQL >create table emp_test as select * from emp; Table created. SQL > conn / as sysdba connected SQL > select owner from dba_tables where table_name='EMP_TEST'; OWNER ------ TEST2