How to Check Database Schemas in Oracle Database on Linux Server?

I'm not a Unix expert, but we have installed an Oracle DB on Linux server. we ran a script that created a lot of oracle schemas inside a database called: demo.

I am logged on to that database server and using Sqlplus to login as SYSTEM.

I would like to be able to view all the schemas that were created and also to be able to change the password for some of them.

could you please provide some commands on how I can do this type of DB admin tasks direclty from the sqlplus command line?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Check with

select * from dba_users;

Alter the password with

alter user schema identified by new_password;

Darius GhassemCommented:
One you can use Oracle Enterprise Manager

Or from sqlplus using this command select distinct owner from dba_objects;
slightwv (䄆 Netminder) Commented:
Instead of 'select *':  select username
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Gerwin Jansen, EE MVETopic Advisor Commented:
I'm no Oracle expert either, but try these:

SELECT username FROM all_users ORDER BY username;

alter user <user_name> identified by <new_password>;
matrix0511Author Commented:
Guys, How can I use Oracle Enterprise Manager? I think that the GUI of using Oracle Enterprise Manager would be best.

I have the Oracle client intalled with admin stools but i don't see Oracle Enterprise Manager. Can someone help me with access to OEM?

slightwv (䄆 Netminder) Commented:
>>Can someone help me with access to OEM?

OEM is now browser based as of 10g.  The 9i OEM fat Java version still works against a 10g database.  After that:  Either dbConsole inside the database itself or Grid Control for managing multiple instances.   Either way:  Browser based.

>>I think that the GUI of using Oracle Enterprise Manager would be best.

Opinion.  I prefer sqlplus and a simple select statement.  But, that is just me.  Besides, OEM doesn't offer a SQL worksheet like SQL Developer, if you like GUIs.
Gerwin Jansen, EE MVETopic Advisor Commented:
matrix0511Author Commented:
Last thing Guys, whats the SQL command to search for ALL tablespaces in the Oracle DB?
slightwv (䄆 Netminder) Commented:
>>whats the SQL command to search for ALL tablespaces in the Oracle DB?

This is a different question.

All the data dictionalry views are in the docs:
select tablespace_name from dba_tablespaces;

Keep this SQL handy:
select view_name from dba_views where view_name like upper('%&view_to_find%') order by 1

I call it: find_view.sql

When you execute it and prompted, just enter a partial word like tablespace and it will show you ALL the views that are like that term.

99% of the time a view will pop up and it will be obvious what one you need.
matrix0511Author Commented:

With the SQL you provided: select view_name from dba_views where view_name like upper('%&view_to_find%') order by 1

Are you suggesting that I take that one line and paste it in Notepad and save it as...  .SQL file? then upload it to my Oracle DB Linux server  location?

If so, how would I run that script from the Linux server? Not sure how to execute sql scripts on Oracle Linux server.

I just need more detailed steps. Thanks
slightwv (䄆 Netminder) Commented:
>>then upload it to my Oracle DB Linux server  location?

Save it where ever you run sqlplus from.  To execute the script from sqlplus:

by default sqplplus looks for scripts in the folder you execute sqlplus from.  If you save it to another folder:
SQL> @/some/path/find_view
matrix0511Author Commented:
Ok. I just copied your SQL and pasted it into my Sqlplus session. See results below. It still doesn't list all of my tablespaces. Did I not enter the correct info? when it prompted me I entered: tablespace.

But I know I have tablespaces called: PRODDTAT, PRODDTAI, TESTDTAT, TESTDTAI, etc, etc.
matrix0511Author Commented:
SQL Command Results
slightwv (䄆 Netminder) Commented:
you are mis-understanding what I am saying:

To find your tablespaces uses  the DBA_TABLESPACES view that I posted in http:#a37827849

select tablespace_name from dba_tablespaces;

The other SQL is just a helper to help you locate the data dictionary view you need.  For example: You were looking for tablespaces, run my find_view script and enter tablespace.  In the list, you see DBA_TABLESPACES?  That might be the view you need...

The original question, you were looking for USERS, run the find_view script, enter USER and you see the view: DBA_USERS.

If is just a simple way to locate the correct view to find what you are looking for.  Then again, you can always ask a question here...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Darius GhassemCommented:
That shows you the views within the system this is not showing you the tablespaces.

this will show you the view for tablespaces:

select tablespace_name from dba_tablespaces;
slightwv (䄆 Netminder) Commented:

I already posted that exact query in http:#a37827849

The rest of the SQL was for future help in finding the correct view.

Please read all previous posts before posting.
Darius GhassemCommented:

I was explaining to him what you put. I wasn't trying to post the same thing over again.
slightwv (䄆 Netminder) Commented:
"this will show you the view for tablespaces:" comes across as posting duplicate information not explaining a previous post without a reference to a previous post.
matrix0511Author Commented:
I got it guys. Thanks for explaining all this Slightwv. I appreciate it.
Darius GhassemCommented:

As you can see the first part of the second sentence was cut off which was pointing back to your post.

Look I have been an expert for a while on EE check my credentials.
matrix0511Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.