Comandos uteis oracle RAC – Utilitarios de manutenção rac 11g

11g RAC Administration and Maintenance Tasks and Utilities:

Task List:



Checking CRS Status:

The below two commands are generally used to check the status of CRS. The first command lists the status of CRS
on the local node where as the other command shows the CRS status across all the nodes in Cluster.

crsctl check crs <<-- for the local node
crsctl check cluster <<-- for remote nodes in the cluster

[root@node1-pub ~]# crsctl check crs
Cluster Synchronization Services appears healthy
Cluster Ready Services appears healthy
Event Manager appears healthy
[root@node1-pub ~]#

Checking Viability of CSS across nodes:

crsctl check cluster

For this command to run, CSS needs to be running on the local node. The “ONLINE” status for remote node says that CSS is running on that node.
When CSS is down on the remote node, the status of “OFFLINE” is displayed for that node.

[root@node1-pub ~]# crsctl check cluster
node1-pub    ONLINE
node2-pub    ONLINE


Viewing Cluster name:

I use below command to get the name of Cluster. You can also dump the ocr and view the name from the dump file.

ocrdump -stdout -keyname SYSTEM | grep -A 1 clustername | grep ORATEXT | awk '{print $3}'

[root@node1-pub ~]# ocrdump -stdout -keyname SYSTEM | grep -A 1 clustername | grep ORATEXT | awk '{print $3}'
test-crs
[root@node1-pub ~]#

OR

ocrconfig -export /tmp/ocr_exp.dat -s online
for i in `strings /tmp/ocr_exp.dat | grep -A 1 clustername` ; do if [ $i != 'SYSTEM.css.clustername' ]; then echo $i; fi; done



[root@node1-pub ~]# ocrconfig -export /tmp/ocr_exp.dat -s online
[root@node1-pub ~]# for i in `strings /tmp/ocr_exp.dat | grep -A 1 clustername` ; do if [ $i != 'SYSTEM.css.clustername' ]; then echo $i; fi; done
test-crs
[root@node1-pub ~]#

OR

Oracle creates a directory with the same name as Cluster under the $ORA_CRS_HOME/cdata. you can get the cluster name from this directory as well.

[root@node1-pub ~]# ls /u01/app/crs/cdata
localhost  test-crs


Viewing No. Of Nodes configured in Cluster:

The below command can be used to find out the number of nodes registered into the cluster.
It also displays the node’s Public name, Private name and Virtual name along with their numbers.

olsnodes -n -p -i

[root@node1-pub ~]# olsnodes -n -p -i
node1-pub       1       node1-prv       node1-vip
node2-pub       2       node2-prv       node2-vip

Viewing Votedisk Information:

The below command is used to view the no. of Votedisks configured in the Cluster.

crsctl query css votedisk

[root@node1-pub ~]# crsctl query css votedisk
 0.     0    /u02/ocfs2/vote/VDFile_0
 1.     0    /u02/ocfs2/vote/VDFile_1
 2.     0    /u02/ocfs2/vote/VDFile_2
Located 3 voting disk(s).
[root@node1-pub ~]#

[root@node1-pub ~]# crsctl check crs
Cluster Synchronization Services appears healthy
Cluster Ready Services appears healthy
Event Manager appears healthy
[root@node1-pub ~]#

Viewing OCR Disk Information:

The below command is used to view the no. of OCR files configured in the Cluster. It also displays the version of OCR
as well as storage space information. You can only have 2 OCR files at max.

ocrcheck

[root@node1-pub ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3848
         Available space (kbytes) :     258272
         ID                       :  744414276
         Device/File Name         : /u02/ocfs2/ocr/OCRfile_0
                                    Device/File integrity check succeeded
         Device/File Name         : /u02/ocfs2/ocr/OCRfile_1
                                    Device/File integrity check succeeded
 
         Cluster registry integrity check succeeded
 

Various Timeout Settings in Cluster:

Disktimeout:
    Disk Latencies in seconds from node-to-Votedisk. Default Value is 200. (Disk IO)
Misscount:
    Network Latencies in second from node-to-node (Interconnect). Default Value is 60 Sec (Linux) and 30 Sec in Unix platform. (Network IO)
    Misscount < Disktimeout

NOTE: Do not change them without contacting Oracle Support. This may cause logical corruption to the Data.

IF
  (Disk IO Time > Disktimeout) OR (Network
IO time > Misscount)
THEN
   REBOOT NODE
ELSE
   DO NOT REBOOT
END IF;

crsctl get css disktimeout
crsctl get css misscount
crsctl get css  reboottime


[root@node1-pub ~]# crsctl get css disktimeout
200

[root@node1-pub ~]# crsctl get css misscount
Configuration parameter misscount is not defined. <<<<< This message indicates that the Misscount is not set maually and it is set to it’s
Default Value On Linux, it is default to 60 Second. If you want to chang it, you can do that as below. (Not recommended)

[root@node1-pub ~]# crsctl set css misscount 100
Configuration parameter misscount is now set to 100.
[root@node1-pub ~]# crsctl get css misscount
100

The below command sets the value of misscount back to its Default values:

 crsctl unset css misscount

[root@node1-pub ~]# crsctl unset css misscount

[root@node1-pub ~]# crsctl get css  reboottime
3

Add/Remove OCR file in Cluster:


Removing OCR File

(1) Get the Existing OCR file information by running ocrcheck utility.

[root@node1-pub ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3852
         Available space (kbytes) :     258268
         ID                       :  744414276
         Device/File Name         : /u02/ocfs2/ocr/OCRfile_0 <-- OCR
                                    Device/File integrity check succeeded
         Device/File Name         : /u02/ocfs2/ocr/OCRfile_1 <-- OCR Mirror
                               &n
bsp;    Device/File integrity check succeeded

         Cluster registry integrity check succeeded

(2) The First command removes the OCR mirror (/u02/ocfs2/ocr/OCRfile_1). If you want to remove the OCR
      file (/u02/ocfs2/ocr/OCRfile_1) run the next command.

ocrconfig -replace ocrmirror
ocrconfig -replace ocr

[root@node1-pub ~]# ocrconfig -replace ocrmirror
[root@node1-pub ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3852
         Available space (kbytes) :     258268
         ID                       :  744414276
         Device/File Name         : /u02/ocfs2/ocr/OCRfile_0 <<– OCR File
                                    Device/File integrity check succeeded

                                    Device/File not configured  <– OCR Mirror not existed any more

         Cluster registry integrity check succeeded

Adding OCR

You need to add OCR or OCR Mirror file in a case where you want to move the existing OCR file location to the different Devices.
The below command add ths OCR mirror file if OCR file alread exists.

(1) Get the Current status of OCR:

[root@node1-pub ~]# ocrconfig -replace ocrmirror
[root@node1-pub ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3852
         Available space (kbytes) :     258268
         ID                       :  744414276
         Device/File Name         : /u02/ocfs2/ocr/OCRfile_0 <<– OCR File
                                    Device/File integrity check succeeded

                                    Device/File not configured  <– OCR Mirror does not exist

         Cluster registry integrity check succeeded

As You can see, I only have one OCR file but not the second file which is OCR Mirror.
So, I can add second OCR (OCR Mirror) as below command.

ocrconfig -replace ocrmirror

[root@node1-pub ~]# ocrconfig -replace ocrmirror /u02/ocfs2/ocr/OCRfile_1
[root@node1-pub ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3852
         Available space (kbytes) :     258268
         ID                       :  744414276
         Device/File Name         : /u02/ocfs2/ocr/OCRfile_0
                                    Device/File integrity check succeeded
         Device/File Name         : /u02/ocfs2/ocr/OCRfile_1
                                    Device/File integrity check succeeded

         Cluster registry integrity check succeeded

You can have at most 2 OCR devices (OCR itself and its single Mirror) in a cluster. Adding extra Mirror gives you below error message

[root@node1-pub ~]# ocrconfig -replace ocrmirror /u02/ocfs2/ocr/OCRfile_2
PROT-21: Invalid parameter
[root@node1-pub ~]#


Add/Remove Votedisk file in Cluster:

Adding Votedisk:

Get the existing Vote Disks associated into the cluster. To be safe, Bring crs cluster stack down on all the nodes
but one on which you are going to add votedisk from.

(1) Stop CRS on all the nodes in cluster but one.

[root@node2-pub ~]# crsctl stop crs


(2) Get the list of Existing Vote Disks

crsctl query css votedisk

[root@node1-pub ~]# crsctl query css votedisk
 0.     0    /u02/ocfs2/vote/VDFile_0
 1.     0    /u02/ocfs2/vote/VDFile_1
 2.     0    /u02/ocfs2/vote/VDFile_2
Located 3 voting disk(s).

(3) Backup the VoteDisk file

Backup the existing votedisks as below as oracle:

dd if=/u02/ocfs2/vote/VDFile_0 of=$ORACLE_BASE/bkp/vd/VDFile_0

[root@node1-pub ~]# su – oracle
[oracle@node1-pub ~]$ dd if=/u02/ocfs2/vote/VDFile_0 of=$ORACLE_BASE/bkp/vd/VDFile_0
41024+0 records in
41024+0 records out
[oracle@node1-pub ~]$

(4) Add an Extra Votedisk into the Cluster:

    If it is a OCFS, then touch the file as oracle. On raw devices, initialize the raw devices using “dd” command

touch /u02/ocfs2/vote/VDFile_3 <<-- as oracle
crsctl add css votedisk /u02/ocfs2/vote/VDFile_3 <<-- as oracle
crsctl query css votedisks

[root@node1-pub ~]# su – oracle
[oracle@node1-pub ~]$ touch /u02/ocfs2/vote/VDFile_3
[oracle@node1-pub ~]$
crsctl add css votedisk /u02/ocfs2/vote/VDFile_3
Now formatting voting disk: /u02/ocfs2/vote/VDFile_3.
Successful addition of voting disk /u02/ocfs2/vote/VDFile_3.

(5) Confirm that the file has been added successfully:

[root@node1-pub ~]# ls -l /u02/ocfs2/vote/VDFile_3
-rw-r—–  1 oracle oinstall 21004288 Oct  6 16:31 /u02/ocfs2/vote/VDFile_3
[root@node1-pub ~]# crsctl query css votedisks
Unknown parameter: votedisks
[root@node1-pub ~]# crsctl query css votedisk
 0.     0    /u02/ocfs2/vote/VDFile_0
 1.     0    /u02/ocfs2/vote/VDFile_1
 2.     0    /u02/ocfs2/vote/VDFile_2
 3.     0    /u02/ocfs2/vote/VDFile_3
Located 4 voting disk(s).
[root@node1-pub ~]#

Removing Votedisk:

Removing Votedisk from the cluster is very simple. Tthe below command removes the given votedisk from cluster configuration.

crsctl delete css votedisk /u02/ocfs2/vote/VDFile_3

[root@node1-pub ~]# crsctl delete css votedisk /u02/ocfs2/vote/VDFile_3
Successful deletion of voting disk /u02/ocfs2/vote/VDFile_3.
[root@node1-pub ~]#

[root@node1-pub ~]# crsctl query css votedisk
 0.     0    /u02/ocfs2/vote/VDFile_0
 1.     0    /u02/ocfs2/vote/VDFile_1
 2.     0    /u02/ocfs2/vote/VDFile_2
Located 3 voting disk(s).
[root@node1-pub ~]#

Backing Up OCR

Oracle performs physical backup of OCR devices every 4 hours under the default backup direcory $ORA_CRS_HOME/cdata/
and then it rolls that forward to Daily, weekly and monthly backup. You can get the backup information by executing below command.

ocrconfig -showbackup

[root@node1-pub ~]# ocrconfig -showbackup

node2-pub     2007/09/03 17:46:47     /u01/app/crs/cdata/test-crs/backup00.ocr

node2-pub     2007/09/03 13:46:45     /u01/app/crs/cdata/test-crs/backup01.ocr

node2-pub     2007/09/03 09:46:44     /u01/app/crs/cdata/test-crs/backup02.ocr

node2-pub     2007/09/03 01:46:39     /u01/app/crs/cdata/test-crs/day.ocr

node2-pub     2007/
09/03 01:46:39     /u01/app/crs/cdata/test-crs/week.ocr
[root@node1-pub ~]#

Manually backing up the OCR

ocrconfig -manualbackup <<--Physical Backup of OCR

The above command backs up OCR under the default Backup directory. You can export the contents of the OCR using below command (Logical backup).

ocrconfig -export /tmp/ocr_exp.dat -s online <<-- Logical Backup of OCR

Restoring OCR

The below command is used to restore the OCR from the physical backup. Shutdown CRS on all nodes.

ocrconfig -restore

Locate the avialable Backups

[root@node1-pub ~]# ocrconfig -showbackup

node2-pub     2007/09/03 17:46:47     /u01/app/crs/cdata/test-crs/backup00.ocr

node2-pub     2007/09/03 13:46:45     /u01/app/crs/cdata/test-crs/backup01.ocr

node2-pub     2007/09/03 09:46:44     /u01/app/crs/cdata/test-crs/backup02.ocr

node2-pub     2007/09/03 01:46:39     /u01/app/crs/cdata/test-crs/day.ocr

node2-pub     2007/09/03 01:46:39     /u01/app/crs/cdata/test-crs/week.ocr

node1-pub     2007/10/07 13:50:41     /u01/app/crs/cdata/test-crs/backup_20071007_135041.ocr

Perform Restore from previous Backup

[root@node2-pub ~]# ocrconfig -restore /u01/app/crs/cdata/test-crs/week.ocr

The above command restore the OCR from week old backup.
If you have logical backup of OCR (taken using export option), then You can import it with the below command.

ocrconfig -import /tmp/ocr_exp.dat

Restoring Votedisks

  • Shutdown CRS on all the nodes in Cluster.
  • Locate the current location of the Votedisks
  • Restore each of the votedisks using “dd” command from the previous good backup of Votedisk taken using the same “dd” command.
  • Start CRS on all the nodes.

crsctl stop crs
crsctl query css votedisk
dd if= of= <<-- do this for all the votedisks
crsctl start crs

Changing Public and Virtual IP Address:

Current Config                                               Changed to

Node 1:

Public IP:       216.160.37.154                              192.168.10.11
VIP:             216.160.37.153                              192.168.10.111
subnet:          216.160.37.159                              192.168.10.0
Netmask:         255.255.255.248                             255.255.255.0
Interface used:  eth0                                        eth0
Hostname:        node1-pub.hingu.net                         node1-pub.hingu.net

Node 2:

Public IP:       216.160.37.156                              192.168.10.22
VIP:             216.160.37.157                              192.168.10.222
subnet:   &nbsp
;      216.160.37.159                              192.168.10.0

Netmask:         255.255.255.248                             255.255.255.0
Interface used:  eth0                                        eth0
Hostname:        node1-pub.hingu.net                         node2-pub.hingu.net

=======================================================================
(A)

Take the Services, Database, ASM Instances and nodeapps down on both the Nodes in Cluster. Also disable the nodeapps, asm and database instances to prevent them from restarting in case if this node gets rebooted during this process.

srvctl stop service -d test
srvctl stop database -d test
srvctl stop asm -n node1-pub
srvctl stop asm -n node2-pub
srvctl stop nodeapps -n node1-pub,node1-pub2
srvctl disable instance -d test -i test1,test2
srvctl disable asm -n node1-pub
srvctl disable asm -n node2-pub
srvctl disable nodeapps -n node1-pub
srvctl disable nodeapps -n node2-pub


(B)
Modify the /etc/hosts and/or DNS, ifcfg-eth0 (local node) with the new IP values
on All the Nodes

(C)
Restart the specific network interface in order to use the new IP.

ifconfig eth0 down
ifconfig eth0 up


Or, you can restart the network.
CAUTION: on NAS, restarting entire network may cause the node to be rebooted.

(D)
Update the OCR with the New Public IP.
In case of public IP, you have to delete the interface first and then add it back with the new IP address.

As oracle user, Issue the below command:

oifcfg delif -global eth0
oifcfg setif -global eth0/192.168.10.0:public


(E)
Update the OCR with the New Virtual IP.
Virtual IP is part of the nodeapps and so you can modify the nodeapps to update the Virtual IP information.

As privileged user (root), Issue the below commands:

srvctl modify nodeapps -n node1-pub -A 192.168.10.111/255.255.255.0/eth0 <-- for Node 1
srvctl modify nodeapps -n node1-pub -A 192.168.10.222/255.255.255.0/eth0 <-- for Node 2


(F)
Enable the nodeapps, ASM, database Instances for all the Nodes.

srvctl enable instance -d test -i test1,test2
srvctl enable asm -n node1-pub
srvctl enable asm -n node2-pub
srvctl enable nodeapps -n node1-pub
srvctl enable nodeapps -n node2-pub


(G)
Update the listener.ora file on each nodes with the correct IP addresses in case if it uses the IP address instead of the hostname.

(H)
Restart the Nodeapps, ASM and Database instance

srvctl start nodeapps -n node1-pub
srvctl start nodeapps -n node2-pub
srvctl start asm -n node1-pub
srvctl start asm -n node2-pub
srvctl start database -d test

=======================================================================

Fonte: http://www.oracledba.org/11g/rac/11g_RAC_Admin_Utilities.html

Criar um link entre bancos de dados

Para criar o link primeiro configure o seu tnsnames.ora (do servidor do banco onde vc quer criar o vinculo)

abra o tnsnames.ora e inclua o apelido da conexao:

BANCOREMOTO =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.11.12)(PORT = 1521))

)

(CONNECT_DATA =

(SID = bdo)

)

)
 
sqlplus / as sysdba
sql> CREATE public DATABASE LINK PRODUC CONNECT TO scott IDENTIFIED BY tiger using ‘BANCOREMOTO’;

sql> SELECT * FROM v$instance@produc;

Restaurar um datafile para outro local

RMAN> RUN {

2> SET NEWNAME FOR DATAFILE ‘/u02/oracle/banco/logix/dados07.dbf’ TO ‘/u03/oracle/banco/logix/dados07.dbf’;

SET NEWNAME FOR DATAFILE ‘/u02/oracle/banco/logix/tbsindxl01.dbf’ TO ‘/u03/oracle/banco/logix/tbsindxl01.dbf’;

restore DATAFILE 32;

restore DATAFILE 35;

SWITCH DATAFILE ALL;

}

3> 4> 5> 6> 7>

executing command: SET NEWNAME

using target database controlfile instead of recovery catalog

executing command: SET NEWNAME

Starting restore at 04-FEB-10

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=14 devtype=DISK

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00032 to /u03/oracle/banco/logix/dados07.dbf

channel ORA_DISK_1: restored backup piece 1

piece handle=/u03/backup/bkp_LOGIX_15973_1_20100203.bkp tag=FULLBACKUP params=NULL

channel ORA_DISK_1: restore complete

Finished restore at 04-FEB-10

Starting restore at 04-FEB-10

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00035 to /u03/oracle/banco/logix/tbsindxl01.dbf

channel ORA_DISK_1: restored backup piece 1

piece handle=/u03/backup/bkp_LOGIX_15976_1_20100203.bkp tag=FULLBACKUP params=NULL

channel ORA_DISK_1: restore complete

Finished restore at 04-FEB-10

datafile 32 switched to datafile copy

input datafilecopy recid=4668 stamp=710093659 filename=/u03/oracle/banco/logix/dados07.dbf

datafile 35 switched to datafile copy

input datafilecopy recid=4669 stamp=710093659 filename=/u03/oracle/banco/logix/tbsindxl01.dbf

RMAN>

Tamanho das tabelas por usuario/esquema – banco etc…

Tabelas muito grandes sao candidatas a ficarem em tablespaces separadas, isso se sao fruto de full table scan, principalmente. Seus segmentos serao criados todos em uma unica tablespace. Melhora signficativa em performance.

SELECT a.owner, a.tablespace_name, a.segment_name, b.num_rows,

round(sum(a.bytes/1024/1024),2) as Tamanho_MB –, extents as Num_extents
FROM dba_segments a, dba_tables b
WHERE — a.owner = ‘LOGIX’ AND
a.segment_type = ‘TABLE’
AND a.segment_name = b.table_name
AND a.owner = b.owner
AND a.tablespace_name = b.tablespace_name
–AND segment_name like ‘%LOTE%’
GROUP BY a.owner, a.tablespace_name, a.segment_name, b.num_rows
ORDER BY round(sum(a.bytes/1024/1024),2) DESC

O script acima podemos gerar a saida para criar os comandos para alterar os objetos de tablespace e alterarmos a tablespace da qual se encontram. Melhor estarem em tablespaces separadas.
 
 
 
— Maiores tabelas do banco – tamanho e registros

– Tamanho de Cada Tabela

SELECT owner, tablespace_name, segment_name,
round(sum(bytes/1024/1024),2) as Tamanho_MB –, extents as Num_extents
FROM dba_segments
WHERE owner = ‘SYSTEM’
AND segment_type = ‘TABLE’
– AND segment_name like ‘CLIENTE%’
GROUP BY owner, tablespace_name, segment_name

– Tamanho das Tabelas Por Usuário

SELECT owner, round(sum(bytes/1024/1024),2) as Tamanho_MB
FROM dba_segments
GROUP BY owner

– Tamanho Total das Tabelas

SELECT round(sum(bytes/1024/1024),2) as Tamanho_MB
FROM dba_segments

– % de Uso das TableSpaces

SELECT a.TABLESPACE_NAME “TableSpace Name”,

round(a.BYTES/1024/1024) “MB Allocated”,

round((a.BYTES-nvl(b.BYTES, 0)) / 1024 / 1024) “MB Used”,

nvl(round(b.BYTES / 1024 / 1024), 0) “MB Free”,

round(((a.BYTES-nvl(b.BYTES, 0))/a.BYTES)*100,2) “Pct Used”,

round((1-((a.BYTES-nvl(b.BYTES,0))/a.BYTES))*100,2) “Pct Free”

FROM (SELECT TABLESPACE_NAME,

sum(BYTES) BYTES

FROM dba_data_files

GROUP BY TABLESPACE_NAME) a,

(SELECT TABLESPACE_NAME,

sum(BYTES) BYTES

FROM sys.dba_free_space

GROUP BY TABLESPACE_NAME) b

WHERE a.TABLESPACE_NAME = b.TABLESPACE_NAME (+)

ORDER BY ((a.BYTES-b.BYTES)/a.BYTES);

Melhores instrutores


OU LAD Delivery Team                     

Programa Mejores Instructores LAD
FY10-Q2

Continuando con nuestro Programa Mejores Instructores LAD, queremos comunicarles los resultados obtenidos en Q2-FY10. Recuerden que  este programa hace reconocimiento a aquellos instructores que han obtenido un alto desempeño en todos los cursos brindados durante el trimestre y que cumplen las siguientes condiciones:

Requisitos

  • Obtener promedio mayor o igual a 95% en las evaluaciones del trimestre.
  • Tener 100% de las evaluaciones completadas por los estudiantes. Es decir cada curso ejecutado debe tener la evaluación completada.
  • Haber ejecutado 2 o más cursos en el trimestre.
          
    Les compartimos los instructores que cumplieron estas condiciones durante el segundo trimestre del FY10.
Pais
Instructor
Partner
Pais
Instructor
Partner
MX
PERERA CARLOS-ABRAHAM
 Compueducación México
MX
MARTINEZ  OMAR ORLANDO
 Compueducacion Monterrey
Vzla
ASCANIO  EDUARDO JOSE
  
EDA Venezuela
MX
Morales Javier
 Compueducación México
CH
BURAGLIA CAMILO ANTONIO
In Motion
MX
RAMIREZ GALDI CARLOS
 Independiente

CO
CABRERA GUILLERMO
 BusinessMind
MX
Rivera Madrid Hector
 Independiente
CO
CUBIDES GUILLERMO
 EDA Colombia
CO
Robayo Rodriguez Jasmin
 GTS
BR
Rocha Andre-Luiz-O
 Techmax

BR
Rocha Andre-Luiz-O
Techmax
Vzla
Gonzalez Claudia
  EDA Venezuela
CO
RODRIGUEZ  WILMAR
 externo
BR
Gonzalez Macedo Daniela
 Education Tecnologia da
Informacao LTDA
MX
RUIZ MA.DEL CARMEN
 EDA México
MX
Hernandez Hugo
 SCAP
MX
SANCHEZ MAURICIO
 Independiente
MX
Lara-Morales Claudia
 Independiente
MX
Sarabia Ortiz, Victor
 Independiente
MX
LAZARINI ULISES
 Independiente
CO
Troya-Toscano Jose
 BusinessMind
CH
Leyton, Sebastian
 In Motion
ARG
VALDEZ GONZALO
 Vault Consulting
BR
Lovato Wallace
 Quasar Consultoria e Sistemas

MX
Villanueva Jose-Alfredo
 Compueducación México
Vzla
Yanes Carlos-Eduardo
  EDA Venezuela
MX
Cesar Hiraldo 
 Integrasoft
MX
Rodolfo Rosales
  EDA México
 

          
De manera especial queremos reconocer también a aquellos instructores que dictaron 4 o más cursos en FY10Q2, y que lograron obtener un promedio igual o mayor a 95% en cada curso.
Pa
is
Instructor
Partner
#Cursos
#Eval
Promedio
Delivery
Promedio
Total Eval
MX
Sarabia- Ortiz, Victor
Compueducación Mexico
11
11
98,95
99,39
MX
RAMIREZ GALDI, CARLOS
Independiente
6
6
98.16
98,86
MX
Mauricio Sanchez
Independiente
8
8
98,07
98,36
VE
Gonzalez, Claudia
EDA Venezuela
10
10
97,66
97,84
MX
LAZARINI-CASTANEDA,ULISES
Independiente
5
5
96,83
97,70
MX
Villanueva, Jose-Alfredo
Compueducación Mexico
10
10
97,53
97,02
CO
Troya-Toscano, Jose
BusinessMind                            
5
5
95,20
97.18
VE
Yanes-Veracierta, Carlos-Eduardo
EDA Venezuela
10
10
96,62
96,88
BR
Rocha, Andre-Luiz-O
Casa de Software S.A
9
9
95,94
96,86
MX
Lara-Morales, Claudia
Independiente
10
10
94,02
96,46
AR
VALDEZ, GONZALO
Vault Consulting
5
5
90,76
95,22
MX
Cesar Hiraldo
Integrasoft
15
15
97.06
97.35
MX
Rodolfo Rosales
EDA México
6
6
96.08
97.16

             Invitamos a todos los instructores a ser parte de esta distinción, mejorando cada día los servicios y velando por completar las evaluaciones de los cursos.

El paso extra es mas que una acción, es una filosofía de trabajo y vida.  No se dan pasos extra todos los días, pero todos los días debemos de buscar oportunidades para dar un paso extra

LAD Delivery Team

Nao consigo reduzir o meu datafile ! O problema é marca dagua …

Com os scripts abaixo conseguimos reduzir a marca dagua movendo as tabelas que estao
no final dos datafiles. O que fazemos é sempre repetir o script de move table, e reindexando…
Os scripts abaixo geram novos scripts que devem ser rodados..

########################################
Verificar o tamanho do bloco do banco
########################################
set pagesize 1000
set head off

column value new_val blksize
select value
from v$parameter
where name = ‘db_block_size’
/

##############################################################
Usei o tamanho do bloco de 4096 conforme na consulta abaixo.
Essa consulta ela simplesmente lista quais sao os datafiles
que podem sofrer encolhimento, e gera o comando para ja
reduzir o tamanho conforme a marca dagua.
Essa consulta deve ser repetida toda vez que voce rodar a
consulta que gera o alter table, ou seja movendo a tabela
que esta na marca dagua podemos entao encolher ainda mais
os datafiles. Lembrando que se mover a tabela de lugar
devemos reindexar os indices com status UNUSABLE.
##############################################################

select ‘alter database datafile ”’ ||
file_name || ”’ resize ‘ ||
ceil( (nvl(hwm,1)*4096)/1024/1024 )
|| ‘m;’ cmd
from dba_data_files a,
( select file_id,
max(block_id+blocks-1) hwm
from dba_extents
group by file_id ) b
where a.file_id = b.file_id(+)
and
ceil(blocks*4096/1024/1024)-
ceil((nvl(hwm,1)*
4096)/1024/1024 ) > 0
/

##############################################################
Cria o script para fazer o alter table das tabelas que estao
na marca dagua permitindo o encolhimento do datafile,
lembrando que temos que sempre trocar os datafiles
para tentar promover o encolhimento o primeiro que estou
investigando é o ‘/u01/banco/dados01.dbf’
##############################################################
select * from
( select’alter table ‘||owner||’.’||segment_name||’ move tablespace ‘||TABLESPACE_NAME||’;’ dados
from dba_extents
where segment_type = ‘TABLE’
and file_id = ( select file_id from dba_data_files
where file_name = ‘/u01/logix10/dados02.dbf’ )
order by block_id desc )
where rownum <=25;

##############################################################
Cria o script para fazer o rebuild dos indices UNUSABLE
##############################################################
select ‘alter index ‘||owner ||’.’||index_name||’ rebuild tablespace ‘||TABLESPACE_NAME||’;’
from dba_indexes
where status = ‘UNUSABLE’;

Monitoramento do alert.log

Acho interessante criar uma tabela para acessar o arquivo alert, assim nao e necessario abrir o arquivo de alerta para se verificar o conteudo das linhas.
Outro detalhe e que se pode criar rotinas para percorrer o arquivo de alerta
para verificar seu conteudo. Primeiro passo e criar um diretorio:

Create directory BDUMP as ‘c:oracle9iadminprodbdump’;
Create directory BDUMP as ‘c:oracle9iadminprodbdump’;

Create table alert_log (text varchar2(200))
Organization EXTERNAL (
Type oracle_loader
Default directory BDUMP
Access parameters
(
Records delimited by newline
Badfile ‘rejeitado.bad’
Logfile ‘logs.log’
Fields terminated by ‘
)
Location (‘diralert.log’)
)
Reject limit unlimited;

Exemplo .bash_profile para o ORACLE

#.bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME

umask 022

PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib

ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
ORACLE_SID=orcl
PATH=$ORACLE_HOME/bin:$PATH

export PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID

Doskey LINUX para o SQLPLUS

Quem nao se lembra do doskey… hoje é so voltar a setinha do teclado para cima e o ultimo comando se repete.. No linux isso tambem é possivel.

Instale o rlwrap. E facil. Descompacte,
gunzip NOMEARQUIVO.gz e tar -xvf NOMEARQUIVO.gz ou tar -xvfg NOMEARQUIVO.gz

Em seguida como root:
cd rlwrap-0.33
./configure
make
make install

Depois va ate a pasta:
cd /etc/profile.d/
crie o arquivo sqlplus.sh com o conteudo:

alias sqlplus=’rlwrap sqlplus’

Sobre o RLWRAP pode ser baixado do link abaixo:

rlwrap is a ‘readline wrapper’ that uses the GNU readline library to allow the editing of keyboard input for any other command. Input history is remembered across invocations, separately for each command; history completion and search work as in bash and completion word lists can be specified on the command line.

http://utopia.knoware.nl/%7Ehlub/uck/rlwrap/

Pode ser baixado pelo link:
http://utopia.knoware.nl/%7Ehlub/uck/rlwrap/rlwrap-0.33.tar.gz