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 owner, index_name from dba_indexes where status='UNUSABLE'; |
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
| To backup a database in NOARCHIVELOG mode you have to shutdown it first, | |
| open in mount mode and only then you can start your backup process. | |
| [oracle@localhost ~]$ rman target / | |
| Recovery Manager: Release 11.2.0.2.0 - Production on Thu Jan 21 11:44:08 2016 |
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 | |
| FECHA=$(date +"%d%m%y%H%M") | |
| hostname=`hostname` | |
| export ORACLE_HOME=/optware/oracle/11.2.0.4/db_1 | |
| export ORACLE_SID=ORAC256 | |
| export PATH=$ORACLE_HOME/bin:$PATH:.:$ORACLE_HOME/OPatch | |
| export ruta=/optware/oracle/dbascripts/backups/logs | |
| export rutafs=/u05/oradata/ORAC256/RMAN_BACKUP | |
| rm -f ${rutafs}/*.arc | |
| rm -f ${ruta}/ReportBKP_${ORACLE_SID}.log |
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
| CREATE DATABASE mynewdb | |
| USER SYS IDENTIFIED BY sys_password | |
| USER SYSTEM IDENTIFIED BY system_password | |
| LOGFILE GROUP 1 ('/u01/logs/my/redo01a.log','/u02/logs/my/redo01b.log') SIZE 100M BLOCKSIZE 512, | |
| GROUP 2 ('/u01/logs/my/redo02a.log','/u02/logs/my/redo02b.log') SIZE 100M BLOCKSIZE 512, | |
| GROUP 3 ('/u01/logs/my/redo03a.log','/u02/logs/my/redo03b.log') SIZE 100M BLOCKSIZE 512 | |
| MAXLOGHISTORY 1 | |
| MAXLOGFILES 16 | |
| MAXLOGMEMBERS 3 | |
| MAXDATAFILES 1024 |
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
| e----------------------------------------------------------------------------------------------------- | |
| ----------------------------------------------------------------------------------------------------- | |
| ----------------------------------------------------------------------------------------------------- | |
| ----------------------------------------------------------------------------------------------------- | |
| GGSCI (jagibmxdbu1n1) 1> info all | |
| Program Status Group Lag at Chkpt Time Since Chkpt | |
| MANAGER RUNNING |
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 long 1000 | |
| set pages 500 | |
| set lines 200 | |
| SELECT DBMS_METADATA.GET_DDL('DB_LINK',db.db_link,db.owner) from dba_db_links db; |
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 base /u01/app/oracle | |
| show home | |
| show alert | |
| show alert -p "message_text like "%incident%"' | |
| show alert -p "message_text like "%ORA%"' | |
| purge -age 43200 --purga diagnostic information de hace un mes | |
| show problem | |
| show incident | |
| show incident -mode detail -p "incident_id=72697" |
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 SCOTT.EMP table. | |
| DBMS_ADVISOR.create_task ( | |
| advisor_name => 'Segment Advisor', | |
| task_name => 'EMP_SEGMENT_ADVISOR', | |
| task_desc => 'Segment Advisor For EMP'); | |
| 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
| 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
| -- ----------------------------------------------------------------------------------- | |
| -- File Name : https://oracle-base.com/dba/10g/segment_advisor.sql | |
| -- Author : Tim Hall | |
| -- Description : Displays segment advice for the specified segment. | |
| -- Requirements : Access to the DBMS_ADVISOR package. | |
| -- Call Syntax : Object-type = "tablespace": | |
| -- @segment_advisor.sql tablespace (tablespace-name) null | |
| -- Object-type = "table" or "index": | |
| -- @segment_advisor.sql (object-type) (object-owner) (object-name) | |
| -- Last Modified: 08-APR-2005 |
NewerOlder