I'm attempting to write code (VBA) to connect to an Oracle database and query the DBA_USERS table. Our current DBA will not give the users (read) rights to the table, So I need to connect without the use of username/password, ie, 'connect internally' in SQL-Plus. Could you help out on this one?
If the DBA will not give you permission to select from the DBA_USERS view, I'm afraid you're out of luck! You asked about how to connect without the use of a username/password or "connect internally" and this is also not possible without DBA intervention/permissions. To use connect internal you need DBA level access.
You can however access a dictionary view called user_users, which contains identical columns (except password) for the currently logged in users only. Any data dictionary view beginning with user_ is accessible by each user and holds information specific to their account. Depending on what you're trying to do, this table could possibly suffice.
For More Information
- What do you think about this answer? E-mail the editors at editor@searchDatabase.com with your feedback.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle and SQL
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.