- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: datafiles that belong to tablespaces
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2003 09:24 PM
тАО09-14-2003 09:24 PM
datafiles that belong to tablespaces
Is it ok to see just the dba_data_files in order to see it?
If I have the tablespace offline, does the dba_data_datafiles still shows me the datafiles attached?
Another question, what would happend if some disk where I have some raw datafiles are damaged?
would the database crash?
Thanx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2003 09:29 PM
тАО09-14-2003 09:29 PM
Re: datafiles that belong to tablespaces
file_id,
file_name,
bytes/1024/1024 "size"
from dba_data_files
order by tablespace_name, file_id, file_name;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2003 09:35 PM
тАО09-14-2003 09:35 PM
Re: datafiles that belong to tablespaces
select tablespace_name, file_name from dba_data_files;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2003 09:35 PM
тАО09-14-2003 09:35 PM
Re: datafiles that belong to tablespaces
select tablespace_name, file_name from dba_data_files;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2003 09:37 PM
тАО09-14-2003 09:37 PM
Re: datafiles that belong to tablespaces
select tablespace_name, file_name from dba_data_files;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2003 09:38 PM
тАО09-14-2003 09:38 PM
Re: datafiles that belong to tablespaces
It depends on your definition of crash whether or not the database would crash. It certainly wouldn't be very useful. There would be a lot of nasty error messges in the alert log.
If by crash, do you mean would the database processes, smon, pmon log writer, etc stop. Answer eventually, but you'll probably detect the problem first and have to do a shutdown abort.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2003 09:47 PM
тАО09-14-2003 09:47 PM
Re: datafiles that belong to tablespaces
select tablespace_name, file_name from dba_data_files;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2003 09:55 PM
тАО09-14-2003 09:55 PM
Re: datafiles that belong to tablespaces
you can query dba_data_files for the datafiles and the tablespaces.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2003 10:03 PM
тАО09-14-2003 10:03 PM
Re: datafiles that belong to tablespaces
To get the datafile name and path you can select the view DBA_DATA_FILES. The columns file_name, tablespacE_name, status will display the datafile (name in full path), tablesapce name and the status as available. If you take a tablespace offline for backup or some maintenance the above status column will still show you as "available. The view DBA_TABLESPACS will shut the status as offline / online depending on the tablespace being online oor offline.
Not the other question that you asked. Whn the raw device on which a datafile is defined in a database is damaged, then the database will not crash. But you cannot access the data from the tables defined in that tablespace. The tablespace will be offline and will request for recovery.
I hope this helps you.
IA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 11:21 AM
тАО09-15-2003 11:21 AM
Re: datafiles that belong to tablespaces
While dba_data_files tends to have all the critical data fro your question, there are mor file to the database not listed there: TEMP, REDO, CONTROL.
Here is the simple script I made for this purpose which may provide a starting point...
hth,
Hein.
column status format a8
column member format a55
column Tablespace format a15
column owner format a10
column file format a45
column id format 99
set pages 9999
set heading off
set FEEDBACK off
select 'redo_'||l.group# "Tablespace", l.group# "Id", l.bytes/(1024*1024) "MB",
MEMBER "File" from v$logfile f, v$log l where l.group# = f.group#
union
select tablespace_name "Tablespace", FILE_ID "Id", bytes/(1024*1024) "MB",
file_name "File" from dba_data_files
union
select tablespace_name "Tablespace", FILE_ID "Id", bytes/(1024*1024) "MB",
file_name "File" from dba_temp_files
union
select 'Control file' "Tablespace", rownum "Id", 0 "MB",
name "File" from v$controlfile
order by 1
/