This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT /* + RULE */ df.tablespace_name "Tablespace", df.bytes / (1024 * 1024) "Size (MB)", SUM(fs.bytes) / (1024 * 1024) "Free (MB)", Nvl(Round(SUM(fs.bytes) * 100 / df.bytes),1) "% Free", Round((df.bytes - SUM(fs.bytes)) * 100 / df.bytes) "% Used" FROM dba_free_space fs, (SELECT tablespace_name,SUM(bytes) bytes FROM dba_data_files GROUP BY tablespace_name) df WHERE fs.tablespace_name (+) = df.tablespace_name GROUP BY df.tablespace_name,df.bytes Order by 4; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SQL statement with SQL_ID 113ffqdfha2gs | |
| declare | |
| stmt_task VARCHAR2(64); | |
| BEGIN | |
| STMT_TASK:=DBMS_SQLTUNE.CREATE_TUNING_TASK(SQL_ID => '7asshajftkyzw', TIME_LIMIT => 300, TASK_NAME => 'Tune_7asshajftkyzw', description => 'Tune task for 7asshajftkyzw'); | |
| END; | |
| / | |
| PL/SQL procedure successfully completed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --Note: 135294.1 | |
| select to_char(creation_time, 'RRRR Month') "Month", | |
| sum(bytes)/1024/1024 "Growth in Meg" | |
| from sys.v_$datafile | |
| where creation_time > SYSDATE-365 | |
| group by to_char(creation_time, 'RRRR Month') | |
| order by "Month" desc; | |
| select to_char(CREATION_TIME,'RRRR') year, to_char(CREATION_TIME,'MM') month, round(sum(bytes)/1024/1024/1024) "Growth in GB" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ksh | |
| export ORACLE_SID=mxapps1 | |
| export ORACLE_HOME=/u001/MXDB/oracle/product/11.2.0/db | |
| export PATH=$ORACLE_HOME/bin:$PATH | |
| $ORACLE_HOME/bin/sqlplus -s "/as sysdba" <<EOF | |
| SET PAGES 2000 LINES 200 | |
| SET HEAD OFF HEADING OFF FEEDBACK OFF | |
| SET SERVEROUTPUT ON | |
| spool /home/oracle/dbascripts/sizing/historical_db_growth.log append; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dba_users; antes en 10g se podian ver los passwords en esa vista. | |
| SQL> select name, password from sys.user$ where name like 'LWTSADM1'; | |
| lwtsadm1 | |
| NAME PASSWORD | |
| ------------------------------ ------------------------------ | |
| SYS 8A8F025737A9097A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DECLARE | |
| l_object_id NUMBER; | |
| BEGIN | |
| -- Create a segment advisor task for the PAPERLESS tablespace. | |
| DBMS_ADVISOR.create_task ( | |
| advisor_name => 'Segment Advisor', | |
| task_name => 'PAPERLESS_SEGMENT_ADVISOR', | |
| task_desc => 'Segment Advisor For PAPERLESS'); | |
| DBMS_ADVISOR.create_object ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set verify off | |
| col username format a8 heading 'DB User' | |
| col terminal format a8 trunc | |
| col osuser format a10 heading 'OS User' trunc | |
| col sid format 9999 heading SID | |
| col serial# format 99999 heading SRL# | |
| col spid format a6 heading DBPROC | |
| col process format a8 heading APPPROC | |
| col mins format 9990.9 heading 'Status|mins' | |
| col program format a30 trunc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set verify off | |
| col username format a13 heading 'DB User' trunc | |
| col terminal for a10 | |
| col osuser format a12 heading 'OS User' trunc | |
| col sid format 9999 heading SID | |
| col serial# format 99999 heading SRL# | |
| col spid format a6 heading DBPROC | |
| col process format a8 heading APPPROC | |
| col mins format 9990.9 heading 'Status|mins' | |
| col program format a30 trunc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Script para monitoreo de procesos de usuario | |
| set verify off | |
| col status format a8 | |
| col username format a13 heading 'DB User' trunc | |
| col osuser format a12 heading 'OS User' trunc | |
| col sid format 9999 heading SID | |
| col serial# format 99999 heading SRL# | |
| col spid format a6 heading DBPROC | |
| col process format a10 heading APPPROC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ORACLE_SID=MXBRIDGE | |
| export ORACLE_SID | |
| ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/MXBRIDGE | |
| export ORACLE_HOME | |
| PATH=$PATH:$ORACLE_HOME/bin | |
| export PATH | |
| mailto="[email protected]" | |
| TIMING=`date +"%d-%b-%Y %H:%M"` | |
| $ORACLE_HOME/bin/sqlplus scott/tiger@'(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = lfoitmatdb01.foit-foxconn.net)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = MXBRIDGE) (FAILOVER_MODE = (TYPE = select) (METHOD = basic))))' <<END |
OlderNewer