MESSAGE
DATE | 2014-11-24 |
FROM | Ruben Safir
|
SUBJECT | Subject: [LIU Comp Sci] Oracle DBA short cuts
|
From owner-learn-outgoing-at-mrbrklyn.com Mon Nov 24 13:48:17 2014 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by mrbrklyn.com (Postfix) id 9E382161154; Mon, 24 Nov 2014 13:48:17 -0500 (EST) Delivered-To: learn-outgoing-at-mrbrklyn.com Received: by mrbrklyn.com (Postfix, from userid 28) id 7FA7316115B; Mon, 24 Nov 2014 13:48:17 -0500 (EST) Delivered-To: learn-at-nylxs.com Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by mrbrklyn.com (Postfix) with ESMTP id 757F3161154 for ; Mon, 24 Nov 2014 13:48:16 -0500 (EST) Received: from [10.0.0.42] (unknown [96.57.23.82]) by mailbackend.panix.com (Postfix) with ESMTP id 3FF3412E29 for ; Mon, 24 Nov 2014 13:48:16 -0500 (EST) Message-ID: <54737DB7.2080706-at-panix.com> Date: Mon, 24 Nov 2014 13:49:27 -0500 From: Ruben Safir User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: learn-at-nylxs.com Subject: [LIU Comp Sci] Oracle DBA short cuts Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: owner-learn-at-mrbrklyn.com Precedence: bulk Reply-To: learn-at-mrbrklyn.com
http://tuxiom.com/forum/index.php?topic=33.0
List all users/schema SET PAGESIZE 50 SELECT DISTINCT USERNAME FROM DBA_USERS; List ONLY your tables SET PAGESIZE 80 COL TABLE__NAME FORMAT a30; COL TABLE_TYPE FORMAT a30; SELECT * FROM CAT;
List the Oracle Tablespaces and free space SELECT * from v$TABLESPACE;
List the free space for all Oracle Tablespaces within a Database SELECT * from DBD_FREE_SPACE where TABLESPACE_NAME = 'IATOR';
List the space ALREADY USED for a specific Oracle Tablespace SELECT * from DBA_SEGMENTS where TABLESPACE_NAME = 'myTABLESPACE';
List extents for segments SELECT TABLESPACE_NAME, count(*), max(blocks), sum(blocks) from dba_free_space group by TABLESPACE_name;
See all the tables you have access to: SET PAGESIZE 90 COLUMN "OBJECT NAME" format a26 COLUMN "OBJECT TYPE" format a20 SELECT object_name "OBJECT NAME", object_type "OBJECT TYPE" FROM user_objects WHERE object_type = 'TABLE';
See your TABLESPACE SELECT TABLESPACE_NAME from ALL_TABLES where TABLE_NAME = '' « Last Edit: November 05, 2009, 10:47:35 by Nitin » ? Logged
|
|