Solved

Viewing content from DBF files using Oracle SQL Developer.

Posted on 2015-02-02
7
1,311 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

733 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