Solved

Viewing content from DBF files using Oracle SQL Developer.

Posted on 2015-02-02
7
1,077 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
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 76

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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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 76

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows how to recover a database from a user managed backup
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now