How to connect to different user in Oracle
------------------------------------------
Step 1:
SQL> connect / as sysdba
Connected.
SQL> select password from
dba_users where username='SCOTT';
PASSWORD
------------------------------
F894844C34402B67
SQL> alter user scott
identified by abc123;
User altered.
SQL> connect scott/abc123
Connected.
SQL> create table t...
SQL> connect / as sysdba
Connected.
SQL> alter user scott
identified by values 'F894844C34402B67';
User altered.
Step 2:
SQL> alter session set current_schema=scott;
Session altered.
Step 3:
SQL> create user su identified by secret123;
User created.
SQL> alter user scott grant connect through su;
User altered.
SQL> connect su[scott]/secret123;
Connected.
No comments:
Post a Comment