Link to home
Start Free TrialLog in
Avatar of scoobykidd
scoobykidd

asked on

sql query, amateur

I need help writing queries for the following items:
the size of the database buffer cache
number of datablocks in the db buffer cache
identify db name
identify name of host computer
syntax to show how many users currently connected to database
instance name
size of database blocks
name and location of datafiles
id name and location of online redo log files
id name and location of control files
id db version number
size of shared pool

I know this is alot, I'm not trying to make a career out of this I just wanna get through this class. I would appreciate any help you can offer. If you know of a web site that would help me that would be great or if you feel like giving me some examples I would be eternally greatful.
Avatar of Jax Tan
Jax Tan
Flag of Singapore image

Its looks like you are trying to access the information from a Oracle Database.
Here are 2 links which you will find it useful for this purpose.

http://www.adp-gmbh.ch/ora/misc/dynamic_performance_views.html
http://www.adp-gmbh.ch/ora/misc/x.html

Perform the SQL queries in SQL*Plus (Log in as sys or system in your database) and it should display certain set of information. You may not need all the data in each table/view.

Example: Shows you basic information from this database.
select * from v$database;
Avatar of scoobykidd
scoobykidd

ASKER

So, to display the size of the db buffer cache I would use
SELECT * FROM V$BH;

Am I going in the right direction?
ASKER CERTIFIED SOLUTION
Avatar of Jax Tan
Jax Tan
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial