DBA Hub

📋Steps in this guide1/3

Proxy User and Connect Through

Proxy User and Connect Through 1. Overview 2. Grant Proxy authentication 3. List Proxy Users 4. Revoke Proxy authentication 1. Overview -- We want to login to database with user scott, but i don't the password. -- We can change the scott's user password, but i don't want to do this, becuase some apps jobs … Continue reading Proxy User →

oracle clusteringintermediate
by OracleDba
17 views
1

Overview

1. Overview 2. Grant Proxy authentication

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- We want to login to database with user scott, but i don't the password.
-- We can change the scott's user password, but i don't want to do this,
   becuase some apps jobs might be  interrupted
-- It is possible using Proxy User and Connect Through

CONN / AS SYSDBA
CREATE USER test_raj IDENTIFIED BY
raj
;
<-- create dummy user
ALTER USER scott GRANT CONNECT THROUGH test_raj;
CONN test_raj[scott]/
raj
SHOW USER
2

Section 2

<-- create dummy user Output 3. List Proxy Users

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
SQL>
CONN / AS SYSDBA
Connected.
SQL>
CREATE USER test_raj IDENTIFIED BY raj;
User created.

SQL>
ALTER USER scott GRANT CONNECT THROUGH test_raj;
User altered.

SQL>
CONN test_raj[scott]/
raj
Connected.
SQL> SHOW USER
USER is "
SCOTT
"
SQL>
select count(*) from emp;
COUNT(*)
----------
        14

SQL>

SQL> conn / as sysdba
Connected.
SQL>
SELECT * FROM proxy_users;
PROXY     CLIENT  AUT FLAGS
--------- ------- --- -----------------------------------
TEST_RAJ
SCOTT
NO  PROXY MAY ACTIVATE ALL CLIENT ROLES

SQL>
3

Section 3

4. Revoke Proxy authentication Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using. Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
SQL> conn / as sysdba
Connected.
SQL>
ALTER USER scott REVOKE CONNECT THROUGH test_raj;
User altered.

SQL>
SELECT * FROM proxy_users;
no rows selected

SQL>

SQL>
CONN test_raj[scott]/
raj
ERROR:
ORA-28150: proxy not authorized to connect as client
Warning: You are no longer connected to ORACLE.
SQL>

Comments (0)

Please to add comments

No comments yet. Be the first to comment!