Solved

Viewing content from DBF files using Oracle SQL Developer.

Posted on 2015-02-02
7
1,486 Views
Last Modified: 2015-02-02
I have a rather large Oracle environment which I am trying to pull data from.  I have a Microsoft SQL background, but I am not familiar with Oracle.  To look for this data, I am using Oracle SQL Developer.

I am noticing many DBF files which contain data.  There is one which I believe has the data that I am looking for.  I am making this assumption based on the name of the file.  When I look at the Oracle environment using Oracle SQL Developer, there are hundreds of tables which I am having to look through.  Is there a way in Oracle SQL Developer to have it only show tables a specific DBF files?

Any input or suggestions would be greatly appreciated.
0
Comment
Question by:rye004
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40584292
Spend some time in the Oracle Concepts guide in the online documentation.  If will help you a lot when first starting in Oracle.

DBF files are typically data files.  One or more are assigned to one TABLESPACE.  A table exists in a TABLESPACE.  Tables have one or more EXTENTS.  An EXTENT has many BLOCKS.

Even if you tracked down the data file that contained the tables data (the data can be spread all over the file), you really can't open the DBF file and 'see' the data.
0
 
LVL 22

Accepted Solution

by:
Steve Wales earned 500 total points
ID: 40584313
Further to the above, if you want it translated (roughly) into SQL Server terms.

Think of a tablespace to be like a filegroup, an extent is close to a SQL Server extent and a Block correlates to a page.

So, what you're asking is the same as saying "I have this MDF and all these NDF's - can I narrow it down based upon the name of the NDF".

Now, having said that ...

You can find what files make up each tablespace by querying dba_data_files:

select file_name, tablespace_name from dba_data_files;

You can then query what tables are in each tablespace by:

select owner, table_name
from dba_tables
where tablespace_name ='NAME_OF_YOUR_TABLESPACE';

That may or may not help you based upon whether or not whoever created the tables actually put the tables in the tablespace  you think they belong in.

But it's a place to start (even if it may be of limited usefulness).

If you're not connecting as a privileged (DBA) user, replace dba_ with user_ in the above queries (and remove owner from the columns being selected in the second query).
0
 

Author Comment

by:rye004
ID: 40584344
Wow, thanks for the fast response!

I am trying both of your suggestions now.
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 40584366
If you know the name of the Schema, query "DBA_SEGMENTS":
SELECT DISTINCT Owner
              , Segment_Name
              , Segment_Type
              , Tablespace_Name
  FROM Dba_Segments S
 WHERE Owner = 'MYSCHEMA'
   AND Segment_Type = 'TABLE'
   AND Tablespace_Name = 'TABLESPACE_THAT_OWNS_THE DBF_FILE';
ORDER BY 1, 2, 3;

Open in new window

0
 

Author Closing Comment

by:rye004
ID: 40584432
Thank you again for your fast response.  What is bizarre are the tables that are being returned don’t show up in the objects window on the left side.  Either way, I was able to find the tables.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40584433
>>don’t show up in the objects window on the left side

Check the 'owner' versus who you are connecting as.

You may need to drill down to the actual owner and look at the tables there.
0
 
LVL 22

Expert Comment

by:Steve Wales
ID: 40584442
As slightwv mentioned, if you're looking at tables  that the user you're connecting as doesn't own, look all the way down at the bottom of the SQL developer tree to Other Users - expand the user who does own the table and they will be there.

(Had that exact issue with one of my colleagues this week being unable to find tables they expected to be shown).
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question