Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Viewing content from DBF files using Oracle SQL Developer.

Posted on 2015-02-02
7
Medium Priority
?
1,582 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 23

Accepted Solution

by:
Steve Wales earned 2000 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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 23

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

664 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