DBA Hub

📋Steps in this guide1/1

Connect to user without knowing password

--- 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.

oracle configurationintermediate
by OracleDba
12 views
1

Connect to user without knowing password

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- 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

Comments (0)

Please to add comments

No comments yet. Be the first to comment!