Posted on 2013-01-16
Medium Priority
Last Modified: 2013-01-25
SQL> @dba_tablespaces;
SP2-0310: unable to open file "dba_tablespaces.sql"

The expected output is like this format..

--------- ------------------ ------------ ---------- --------- ----------------- ----------------- ---------
ONLINE    UNDOTBS1           UNDO         LOCAL      MANUAL        1,073,741,824         9,109,504         1
ONLINE    SYSAUX             PERMANENT    LOCAL      AUTO          1,073,741,824       545,062,912        51
ONLINE    USERS              PERMANENT    LOCAL      AUTO          1,073,741,824       133,365,760        12
ONLINE    SYSTEM             PERMANENT    LOCAL      MANUAL        1,073,741,824       525,991,936        49
ONLINE    EXAMPLE            PERMANENT    LOCAL      AUTO          1,073,741,824        63,045,632         6
ONLINE    UNDOTBS2           UNDO         LOCAL      MANUAL        1,073,741,824        11,927,552         1
ONLINE    TEMP               TEMPORARY    LOCAL      MANUAL        1,073,741,824        28,311,552         3
                                                               ----------------- ----------------- ---------
avg                                                                                                       18
sum                                                                7,516,192,768     1,316,814,848

7 rows selected.
Question by:walkerdba
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
LVL 74

Expert Comment

ID: 38784045
you need to include the path to your script  or start sqlplus from within the same directory where the script is located

assuming you execute it, does it produce the correct results?

if not, why not? what is the query in your script?
LVL 23

Expert Comment

ID: 38784051
I recommend you fully specify the path for the SQL file.  It apparently is not in the directory from which you started your SQLPLUS session.

Author Comment

ID: 38784243
seriously  I do not know the script for that out put....

I thought that inbuilt..

how to create script for that..
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 74

Expert Comment

ID: 38784291
what are the numeric values supposed to be?

are those extents? bytes? data files?

how did you get that output if you don't know where to find the script?
LVL 23

Accepted Solution

David earned 2000 total points
ID: 38784436
A sys-privileged user may execute from a command prompt, SELECT * FROM sys.dba_tablespaces; to see output (without totals).  

If you exit out of your sqlplus session, what directory are you in?
LVL 35

Expert Comment

by:Mark Geerlings
ID: 38789657
I'm not an expert in SQL Server, but this syntax "@dba_tablespaces;" looks to me like examples I have seen of SQL Server syntax.  Are you possibly familiar with SQL Server but new to Oracle?  If yes, be aware that these two database systems are very different!  Yes, they are both "SQL compliant" and they both store data in tables that contain rows and columns.  But, that is about the limit of their similarities.

There have been a number of postings in this forum over the years highlighting some of their major differences.

Author Closing Comment

ID: 38821443

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Suggested Courses

770 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