Unix Technical Forum

help for SQL beginner

This is a discussion on help for SQL beginner within the Oracle Database forums, part of the Database Server Software category; --> hi I try to get file_name and size for tablespace having objects from USER1 I tried some joins with ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-24-2008, 11:43 AM
zeb
 
Posts: n/a
Default help for SQL beginner

hi

I try to get file_name and size
for tablespace having objects from USER1

I tried some joins with this two queries
but no success, can you help me ?


select tablespace_name
from dba_segments
where owner = 'USER1'
group by tablespace_name

select tablespace_name, file_name, bytes
from dba_data_files
where tablespace_name='rows from above query'


Thanks in advance ...



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-24-2008, 11:43 AM
Mark C. Stock
 
Posts: n/a
Default Re: help for SQL beginner


"zeb" <spam@nowhere.com> wrote in message
news:422ae928$0$27842$626a14ce@news.free.fr...
> hi
>
> I try to get file_name and size
> for tablespace having objects from USER1
>
> I tried some joins with this two queries
> but no success, can you help me ?
>
>
> select tablespace_name
> from dba_segments
> where owner = 'USER1'
> group by tablespace_name
>
> select tablespace_name, file_name, bytes
> from dba_data_files
> where tablespace_name='rows from above query'
>
>
> Thanks in advance ...
>
>
>


what have you tried? post it along with the db version and any error
messages you get

meanwhile, here's some references:

http://tahiti.oracle.com lists the manuals, you should download the SQL and
Concepts manuals

google'ng on ORACLE JOIN SYNTAX is a good idea too, it will get you stuff
like
http://www.oracle.com/technology/ora...ov/o61sql.html
and http://www.psoug.org/reference/joins.html

Oracle By Example at Oracle Technology Network is also a good resource:
http://www.oracle.com/technology/obe/start/index.html

++ mcs


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-24-2008, 11:43 AM
DA Morgan
 
Posts: n/a
Default Re: help for SQL beginner

zeb wrote:

> hi
>
> I try to get file_name and size
> for tablespace having objects from USER1
>
> I tried some joins with this two queries
> but no success, can you help me ?
>
>
> select tablespace_name
> from dba_segments
> where owner = 'USER1'
> group by tablespace_name
>
> select tablespace_name, file_name, bytes
> from dba_data_files
> where tablespace_name='rows from above query'
>
>
> Thanks in advance ...


Join dba_segments and dba_data_files
where segment_owner = 'USER1'
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:33 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com