Re: What Data Dictionary to query to get the database file path assoicated with a TableSpace

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 13 Mar 2003 14:24:29 -0800
Message-ID: <92eeeff0.0303131424.552d975e_at_posting.google.com>


avsrk_at_mailcity.com (Subrahmanyam Arya) wrote in message news:<25c1993e.0303131101.577d350f_at_posting.google.com>...
> Dear oracle gurus,
>
> I have an install script and want to create a table space and
> associate a data file path (for the dbf file). Instead of hardcoding
> the file path, I want to query the DataDictionary and if possible
> retrieve the path for other dbf files (liek user table space datafile
> or system table space datafile) and use this info to construct the
> path for my new tablespace.
>
> I did select table_name,comments from DICT where table_name like
> '%SPACE%'
> and i got 6 rows returned out fo which one was USER_TABLESPACES.
>
> I then did desc USER_TABLESPACES; I did not get any info as to where
> the associated dbf file is stored.
>
> Is there anyother data dictionary which i can query to know where dbf
> files associated with the table space are stored???
>
> This will avoid ugly hardcoding in my install_upgrade script.
>
> -thx,
> avsrk

SELECT file_name
FROM dba_data_files
WHERE tablespace_name = '&TABLESPACE_NAME';

Regards
/Rauf Sarwar Received on Thu Mar 13 2003 - 23:24:29 CET

Original text of this message