Basic Oracle Concepts and Programming Question:
Download Job Interview Questions and Answers PDF
How To List All User Accounts in Oracle?
Answer:
User accounts can be accessed through a system view called ALL_USERS. A simple SELECT statement can be used to get a list of all user accounts. Try the following script:
>.insqlplus /nolog
SQL> connect SYSTEM/globalguideline
Connected.
SQL> SELECT * FROM ALL_USERS;
<pre>USERNAME USER_ID CREATED
------------------------------ ---------- ---------
FLOWS_020100 35 07-FEB-06
FLOWS_FILES 34 07-FEB-06
HR 33 07-FEB-06
MDSYS 32 07-FEB-06
ANONYMOUS 28 07-FEB-06
XDB 27 07-FEB-06
CTXSYS 25 07-FEB-06
DBSNMP 23 07-FEB-06
TSMSYS 20 07-FEB-06
DIP 18 07-FEB-06
OUTLN 11 07-FEB-06
SYSTEM 5 07-FEB-06
SYS 0 07-FEB-06</pre>
>.insqlplus /nolog
SQL> connect SYSTEM/globalguideline
Connected.
SQL> SELECT * FROM ALL_USERS;
<pre>USERNAME USER_ID CREATED
------------------------------ ---------- ---------
FLOWS_020100 35 07-FEB-06
FLOWS_FILES 34 07-FEB-06
HR 33 07-FEB-06
MDSYS 32 07-FEB-06
ANONYMOUS 28 07-FEB-06
XDB 27 07-FEB-06
CTXSYS 25 07-FEB-06
DBSNMP 23 07-FEB-06
TSMSYS 20 07-FEB-06
DIP 18 07-FEB-06
OUTLN 11 07-FEB-06
SYSTEM 5 07-FEB-06
SYS 0 07-FEB-06</pre>
Download Oracle Database Interview Questions And Answers
PDF
Previous Question | Next Question |
How To Use Windows User to Connect to the Server? | How To Create a New User Account in Oracle? |