Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Viewing content from DBF files using Oracle SQL Developer.

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

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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
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 78

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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

885 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