Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querying for datafile name and size

Status
Not open for further replies.

DeepDiverMom

Programmer
Jul 28, 2003
122
US
I don't want to bring up Brand X (Oracle), but what query can I issue in Sybase that will yield similar results to this Oracle query:
Code:
SQL> select file_name, bytes,maxbytes
  2  from dba_data_files
  3  order by file_name;

FILE_NAME                                                               BYTES        MAXBYTES
------------------------------------------------------------ ---------------- ---------------
/dbsrv/oracle/data1/oradata/IBMORA4/cert06.dbf                    178,257,920   2,097,152,000
/dbsrv/oracle/data1/oradata/IBMORA4/cert07.dbf                     52,428,800   2,097,152,000
/dbsrv/oracle/data1/oradata/IBMORA4/cert08.dbf                     31,457,280   2,097,152,000
/dbsrv/oracle/data2/oradata/IBMORA4/IBMORA4rbs01.dbf            1,336,934,400   2,097,152,000
/dbsrv/oracle/data2/oradata/IBMORA4/IBMORA4system01.dbf           146,800,640   2,097,152,000
/dbsrv/oracle/data2/oradata/IBMORA4/IBMORA4temp01.dbf              94,371,840   2,097,152,000
/dbsrv/oracle/data2/oradata/IBMORA4/cert01.dbf                  2,097,152,000   2,097,152,000
/dbsrv/oracle/data2/oradata/IBMORA4/cert02.dbf                  2,097,152,000   2,097,152,000
/dbsrv/oracle/data2/oradata/IBMORA4/cert03.dbf                  2,097,152,000   2,097,152,000
/dbsrv/oracle/data2/oradata/IBMORA4/cert04.dbf                  2,097,152,000   2,097,152,000
/dbsrv/oracle/data2/oradata/IBMORA4/cert05.dbf                  2,097,152,000   2,097,152,000
                                                             ----------------
sum                                                            12,326,010,880
I am particularly interested in data file names.

Thanks.
 
1. You can run:
exec sp_helpdevice
sp_helpdevice is a system procedure to see all database devices information,
OR
2. you can query the master..sysdevices system table directly to retrieve all devices information needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top