EM12C – Metrics, history and graphics of SQL Server Instance

I recently came across the following problem, the metrics were not saving history and graphs of instances of SQL Server were not being populated.

After opening an SR in ORACLE there could figure out the problem and the same was at OMS repository.

Steps performed:

  1. Connect as SYSDBA to the repository and check the parameter value job_queue_processes.
  2. If the value is 0 we have to change for 1000.
  3. Stop cloud control (OMS) with the command emctl stop oms.
  4. Change the parameter in the database – alter system set job_queue_processes = 1000 scope = both;
  5. Restart data base and start OMS

Done it a few minutes past the metrics are already saving historic and graphics of SQL instances are populated.

It was also resolved the pending status of several data bases.

Em12C_SQL

 

I hope it was useful!!!
Cheers

Find LOB object parent table

Some times you find that there are some BIG lob segments and you don’t know which table they belong to…

Here’s the solution:

SELECT TABLE_NAME, column_name
FROM   user_lobs
WHERE  segment_name = (SELECT object_name
                       FROM   user_objects
                       WHERE  object_name = UPPER('&object_name')
                       AND    object_type = 'LOB');

in MacLochlainns Weblog

I hope it was useful!!!
Cheers

Recover GAP on Logical Standby with errors on apply

  • Verify logstandby background processes
SELECT PID, TYPE, STATUS, HIGH_SCN FROM V$LOGSTDBY;
  • Start logstandby apply processes
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
  • If the processes stop, verify the logstandby events and generate the script to skip the transaction if necessary

NOTE: If it’s your production environment, please check with application development team the transactions with error.

set lines 200 pages 200
col status for a30
col script for a50
SELECT to_char(EVENT_TIME,'dd-mm-yyyy hh24:mi:ss'), XIDUSN, XIDSLT, XIDSQN, STATUS, STATUS_CODE,
'EXEC DBMS_LOGSTDBY.SKIP_TRANSACTION ('||XIDUSN||','||XIDSLT||','||XIDSQN||');' "SCRIPT"
FROM DBA_LOGSTDBY_EVENTS WHERE EVENT_TIME = (SELECT MAX(EVENT_TIME) FROM DBA_LOGSTDBY_EVENTS);
  • Skip Transaction
EXEC DBMS_LOGSTDBY.SKIP_TRANSACTION (XIDUSN=>10,XIDSLT=>40,XIDSQN=>36784);

The script above is generated on logstandby events query.

I hope it was useful!!!
Cheers

Drop Database Oracle 11gR2

Got from http://oracledbabhuvan.blogspot.pt/2012/02/drop-database-in-11gr2-with-rac.html.

(Thanks to Bhuvanesh by the post)


I am planning to remove my cluster database which is running on 11gR2 Stop the entire cluster environment

bhuora01[BHU_1]>srvctl stop database -d BHU_a

Start only one instance to edit the cluster_database parameter to FALSE

bhuora01[BHU_1]>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Feb 10 16:03:03 2012

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area 2.6924E+10 bytes
Fixed Size 2241104 bytes
Variable Size 1.3086E+10 bytes
Database Buffers 1.3824E+10 bytes
Redo Buffers 11227136 bytes
Database mounted.

SQL> alter system set cluster_database=FALSE scope=spfile sid='*';

System altered.

SQL> shutdown abort;
ORACLE instance shut down.

Now starting only one instance after editing below parameter CLUSTER_DATABASE parameters to FALSE

SQL> startup mount exclusive restrict
ORACLE instance started.

Total System Global Area 2.6924E+10 bytes
Fixed Size 2241104 bytes
Variable Size 1.3086E+10 bytes
Database Buffers 1.3824E+10 bytes
Redo Buffers 11227136 bytes
Database mounted.

Make sure whether you have started in the restricted mode

SQL> select logins,parallel from v$instance;

LOGINS PAR
---------- ---
RESTRICTED NO

When you issue this command, this will drop the database including datafiles, control files, redo log files & archive log files

SQL> drop database;

Database dropped.

To drop the database including the backup, we can go for the below option

RMAN> DROP DATABASE INCLUDING BACKUPS NOPROMPT;

Recriar a FRA (Fast Recovery Area)

Recriar a FRA (Fast Recovery Area)

 Links de apoio:

 

Criação nova FRA

Basta criarmos a nova FRA e já podemos passar a lá por os redo log files e archive log files. Entretanto os controlfiles requerem restart da base de dados (toda).

alter system set db_recovery_file_dest_size = '50G' scope=both sid='*';

System altered.

SQL> alter system set db_recovery_file_dest = '+FRADG' scope=both sid='*';

System altered.

 

Passagem ControlFiles para FRA

Normalmente existe mais de um controlfile por motivos de segurança a serem escritos ao mesmo tempo pela BD, por isso os passos para mover o controlfile para a nova FRA são:

 

1) Passar a ter um controlfile somente fora da FRA antiga (em um datagroup de dados, por exemplo).

 

alter system set control_files = +FCHFRADG/SIBSP13/CONTROLFILE/control02.ctl' scope=spfile sid='*';

Neste passo temos de parar a base de dados toda e trabalharmos somente em uma instância:

 

srvctl stop database -d <service name>

Arrancamos numa instância somente e passamos a adicionar agora o novo FRA como uma copia do controlfile, mas não especificamos o path completo, só o nome do FRA (usado no db_recovery_file_dest). Outro restart da instância e deixamos a mesma em modo mount.

startup

alter system set control_files = '+FCHFRADG/SIBSP13/CONTROLFILE/control02.ctl', '+FCHFRADG' scope=spfile sid='*';

shutdown immediate

startup nomount

Passamos para o Rman para realizarmos uma cópia fidedigna do novo controlfile para a nova FRA e não especificamos mais uma nova o path.

 

rman nocatalog
connect target /

restore controlfile from '+FCHFRADG/SIBSP13/CONTROLFILE/control02.ctl';

Podemos voltar ao SQLPLUS e montar e abrir a instância:

 

alter database mount;

alter database open;

Vefica-se os novos controlfiles criados e se eles estão mesmo na FRA (IS_RECOVERY_DEST_FILE):

select name, is_recovery_dest_file as is_recovery from gv$controlfile;

NAME                                                                                                 IS_RECOVERY       
---------------------------------------------------------------------------------------------------- ----------------- 
+FDATDG/sibsp11/controlfile/current.280.784135039                                                    NO                
+RECODG/sibsp11/controlfile/current.272.784135039                                                    YES               
+FDATDG/sibsp11/controlfile/current.280.784135039                                                    NO                
+RECODG/sibsp11/controlfile/current.272.784135039                                                    YES               

4 row(s) fetched

Agora aproveitamos para deixar o Rman a executar automaticamente o backup do controlfile a medida que ele é alterado:

rman nocatalog
rman> connect target /
CONFIGURE CONTROLFILE AUTOBACKUP ON;

Pode ser que seja preciso executar o seguinte statement para direccionar o controle file auto backup para a FRA.

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;

Neste ponto, estamos prontos para passarmos os archive logs e os redo logs.

Passagem Redo e Arhive Log Files

Os archivelogs basta que alteramos o seguinte parâmetro:

alter system set LOG_ARCHIVE_DEST_1 = 'LOCATION = USE_DB_RECOVERY_FILE_DEST' scope=both;

Os redo log files devem ser passados segundo o procedimento já descrito nesta pagina: http://blogdaprima.com/2012/redimensionar-red-logs-11gr2/

 

Block Tracking

Não devemos esquecer de ligar o block tracking (para backups mais rápidos e etc) e apontar a nova configuração para a nova FRA.

 

alter database enable block change tracking using file '+FCHFRADG';

e verificando o status na view:

 

select * from v$block_change_tracking;

STATUS           FILENAME                                                                                             BYTES                                        
---------------- ---------------------------------------------------------------------------------------------------- -------------------------------------------- 
ENABLED          +FCHFRADG/sibsp13/changetracking/ctf.292.792003881                                                                                       11599872

Confirmação FRA em uso

select file_type, percent_space_used, number_of_files from V$FLASH_RECOVERY_AREA_USAGE

select file_type, percent_space_used, number_of_files from V$FLASH_RECOVERY_AREA_USAGE

FILE_TYPE                  PERCENT_SPACE_USED                           NUMBER_OF_FILES                              
-------------------------- -------------------------------------------- -------------------------------------------- 
CONTROL FILE                                                       0,24                                            1 
REDO LOG                                                           3,56                                            4 
ARCHIVED LOG                                                       1,12                                            2 
BACKUP PIECE                                                       1,05                                            4 
IMAGE COPY                                                            0                                            0 
FLASHBACK LOG                                                         0                                            0 
FOREIGN ARCHIVED LOG                                                  0                                            0 

7 row(s) fetched

 

Redimensionar Red Logs – 11gR2

Para se aumentar os Redo é necessário criar novos e nesta fase há que se tomar a decisão se estes deverão permanecer na FRA (Fast Recovery Area) ou não. Se permanecerem será o Oracle a gerir os ficheiros da FRA (control file, redo, archive, etc). Se não a gestão dos componentes é autónoma.

 

Cada Thread é atribuída a um nó do RAC. Lembrar que é sempre necessário ter pelo menos 2 Threads por nópara geração de Redo activas no RAC.

 

Verificar os grupos de log files existentes e os ficheiros que cada grupo contém:

select * from gv$log;

   INST_ID     GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------ ---------
         1          1          1         76  104857600        512          2 YES INACTIVE               3339909 22-AUG-12      3397686 22-AUG-12
         1          2          1         77   52428800        512          2 YES INACTIVE               3397686 22-AUG-12      3433508 23-AUG-12
         1          6          1         78   52428800        512          2 NO  CURRENT                3433508 23-AUG-12   2.8147E+14
         1          7          2         71  104857600        512          2 NO  CURRENT                3443555 23-AUG-12   2.8147E+14 23-AUG-12
         1         14          2         70  104857600        512          2 YES INACTIVE               3339409 22-AUG-12      3339658 22-AUG-12
         2          1          1         76  104857600        512          2 YES INACTIVE               3339909 22-AUG-12      3397686 22-AUG-12
         2          2          1         77   52428800        512          2 YES INACTIVE               3397686 22-AUG-12      3433508 23-AUG-12
         2          6          1         78   52428800        512          2 NO  CURRENT                3433508 23-AUG-12   2.8147E+14
         2          7          2         71  104857600        512          2 NO  CURRENT                3443555 23-AUG-12   2.8147E+14 23-AUG-12
         2         14          2         70  104857600        512          2 YES INACTIVE               3339409 22-AUG-12      3339658 22-AUG-12

select * from gv$logfile;

INST_ID     GROUP# STATUS  TYPE    MEMBER                                             IS_RECOVERY_DEST_FILE

---------- ---------- ------- ------- -------------------------------------------------- ------------------------

      1          1         ONLINE  +FDATDG/sibsp10/onlinelog/group_1.566.788460973    NO
      1          1         ONLINE  +RECODG/sibsp10/onlinelog/group_1.631.788460975    YES
      1          2         ONLINE  +FDATDG/sibsp10/onlinelog/group_2.565.788461005    NO
      1          2         ONLINE  +RECODG/sibsp10/onlinelog/group_2.629.788461007    YES
      1          3         ONLINE  +FDATDG/sibsp10/onlinelog/group_3.564.788461011    NO
      1          3         ONLINE  +RECODG/sibsp10/onlinelog/group_3.415.788461013    YES
      1          4         ONLINE  +FDATDG/sibsp10/onlinelog/group_4.563.788461017    NO
      1          4         ONLINE  +RECODG/sibsp10/onlinelog/group_4.408.788461019    YES
      2          1         ONLINE  +FDATDG/sibsp10/onlinelog/group_1.566.788460973    NO
      2          1         ONLINE  +RECODG/sibsp10/onlinelog/group_1.631.788460975    YES
      2          2         ONLINE  +FDATDG/sibsp10/onlinelog/group_2.565.788461005    NO
      2          2         ONLINE  +RECODG/sibsp10/onlinelog/group_2.629.788461007    YES
      2          3         ONLINE  +FDATDG/sibsp10/onlinelog/group_3.564.788461011    NO
      2          3         ONLINE  +RECODG/sibsp10/onlinelog/group_3.415.788461013    YES
      2          4         ONLINE  +FDATDG/sibsp10/onlinelog/group_4.563.788461017    NO
      2          4         ONLINE  +RECODG/sibsp10/onlinelog/group_4.408.788461019    YES

Antes de adicionarmos, verificar se a configuração da FRA esta activa (parametros abaixo, um indica o sitio onde estará a FRA e o outro o tamanho da mesma para a base de dados):

select name, value, display_value from v$parameter where upper(name) like '%DB_RECOVERY_FILE_DEST%';

NAME                                                         VALUE                DISPLAY_VALUE
------------------------------------------------------------ -------------------- ------------------------------
db_recovery_file_dest                                        +FCHFRADG            +FCHFRADG
db_recovery_file_dest_size                                   6005194752           5727M

Se quisermos utilizar a FRA, não é necessários informarmos nomenclatura para os ficheiros. Adicionar os novos log files com o tamanho desejado:

alter database add logfile thread 1 group 5 size 200M;
alter database add logfile thread 1 group 6 size 200M;
alter database add logfile thread 2 group 7 size 200M;
alter database add logfile thread 2 group 8 size 200M;

Se quisermos ter um controlo mais acirrado, a sintaxe seria como abaixo:

alter database add logfile thread 1 group 1 ('+FDATDG/sibsp13/onlinelog/redo5a.log','+FCHFRADG/sibsp13/onlinelog/redo5b.log') size 50m;
alter database add logfile thread 1 group 3 ('+FDATDG/sibsp13/onlinelog/redo3a.log','+FCHFRADG/sibsp13/onlinelog/redo3b.log') size 50m;

Para verificarmos se os ficheiros estão sob gestão da FRA (Coluna IS_RECOVERY_DEST_FILE com valor YES):

select * from gv$logfile;
<pre>  INST_ID     GROUP# STATUS  TYPE    MEMBER                                             IS_RECOVERY_DEST_FILE
---------- ---------- ------- ------- -------------------------------------------------- -------------------------
         1          1         ONLINE  +FDATDG/sibsp10/onlinelog/group_1.566.788460973    NO
         1          1         ONLINE  +RECODG/sibsp10/onlinelog/group_1.631.788460975    YES
         1          2         ONLINE  +FDATDG/sibsp10/onlinelog/group_2.565.788461005    NO
         1          2         ONLINE  +RECODG/sibsp10/onlinelog/group_2.629.788461007    YES
         1          3         ONLINE  +FDATDG/sibsp10/onlinelog/group_3.564.788461011    NO
         1          3         ONLINE  +RECODG/sibsp10/onlinelog/group_3.415.788461013    YES
         1          4         ONLINE  +FDATDG/sibsp10/onlinelog/group_4.563.788461017    NO
         1          4         ONLINE  +RECODG/sibsp10/onlinelog/group_4.408.788461019    YES
         2          1         ONLINE  +FDATDG/sibsp10/onlinelog/group_1.566.788460973    NO
         2          1         ONLINE  +RECODG/sibsp10/onlinelog/group_1.631.788460975    YES
         2          2         ONLINE  +FDATDG/sibsp10/onlinelog/group_2.565.788461005    NO
         2          2         ONLINE  +RECODG/sibsp10/onlinelog/group_2.629.788461007    YES
         2          3         ONLINE  +FDATDG/sibsp10/onlinelog/group_3.564.788461011    NO
         2          3         ONLINE  +RECODG/sibsp10/onlinelog/group_3.415.788461013    YES
         2          4         ONLINE  +FDATDG/sibsp10/onlinelog/group_4.563.788461017    NO
         2          4         ONLINE  +RECODG/sibsp10/onlinelog/group_4.408.788461019    YES

select * from v$flash_recovery_area_usage

FILE_TY            PERCENT_SPACE_USED      PERCENT_SPACE_RECLAIMABLE                 NUMBER_OF_FILES                              
------------------ ---------------------- ------------------------------------------ ---------------------------- 
CONTROL FILE       0,24                                            0                                            1 
REDO LOG           3,56                                            0                                            4 
ARCHIVED LOG          0                                            0                                            0 
BACKUP PIECE       1,05                                         0,79                                            4 
IMAGE COPY            0                                            0                                            0 
FLASHBACK LOG         0                                            0                                            0 
FOREIGN ARCHIVED LOG  0                                            0                                            0

Podemos depois, se for o caso, separa cada ficheiro do grupo de Redo, permitindo que um fique na FRA e outro fique onde quisermos (para fins de redundância, por exemplo). Para isso, devemos adicionar outro membro (file) ao grupo manualmente e retirar o que não quisermos que lá esteja (ou que tenha sido criado a mais). O primeiro passo é saber da configuração da base de dados quantos Log Members são permitidos:

 
SQL> Select '--> MAXLOGMEMBERS ' || dimlm from x$kccdi;

'-->MAXLOGMEMBERS'||DIMLM
----------------------------------------------------------
--> MAXLOGMEMBERS 3

SQL>

e então adicionar e/ou retirar membros do grupo:

 
alter database add logfile member '+FDATDG/sibsp13/onlinelog/redfo14c.log' to group 14;
alter database drop logfile member '+FCHFRADG/sibsp13/onlinelog/group_14.275.791993657';

Agora é necessário remover os antigos e deixar somente os novos Redo adicionados com o valor pretendido.

Verificar os log files CURRENT, ACTIVE, INACTIVE e UNUSED:

select * from gv$log;

 INST_ID     GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME

---------- ---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------ ---------
        1          5          1       8287  209715200        512          2 NO  CURRENT             1.6265E+10 12-JUL-12   2.8147E+14
        1          6          1       8286  209715200        512          2 YES INACTIVE            1.6265E+10 12-JUL-12   1.6265E+10 12-JUL-12
        1          7          2      13830  209715200        512          2 YES ACTIVE              1.6265E+10 12-JUL-12   1.6265E+10 12-JUL-12
        1          8          2      13831  209715200        512          2 NO  CURRENT             1.6265E+10 12-JUL-12   2.8147E+14
        2          5          1       8287  209715200        512          2 NO  CURRENT             1.6265E+10 12-JUL-12   2.8147E+14
        2          6          1       8286  209715200        512          2 YES INACTIVE            1.6265E+10 12-JUL-12   1.6265E+10 12-JUL-12
        2          7          2      13830  209715200        512          2 YES ACTIVE              1.6265E+10 12-JUL-12   1.6265E+10 12-JUL-12
        2          8          2      13831  209715200        512          2 NO  CURRENT             1.6265E+10 12-JUL-12   2.8147E+14

NOTA: só os log files INACTIVE é que podem ser eliminados, os outros retornam erro.

NOTA: os log files UNUSED são os novos que nunca foram usados

 

Eliminar os log files INACTIVE

alter database drop logfile group 1;

NOTA: é necessário existirem sempre pelo menos 2 log files por instância (thread)

 

Para mudar o log file CURRENT executar:

alter system switch logfile;

Para mudar o log file de ACTIVE para INACTIVE executar (este comando força a DB a escrever em disco ou eliminar o conteúdo do REDO e passar ao próximo):

alter system checkpoint;

Eliminar todos os log files antigos (grupos 1 a 4) e o resultado deverá ser:

  INST_ID     GROUP# STATUS  TYPE    MEMBER                                             IS_RECOVERY_DEST_FILE
---------- ---------- ------- ------- -------------------------------------------------- -------------------------
         1          1         ONLINE  +FDATDG/sibsp10/onlinelog/group_1.566.788460973    NO
         1          1         ONLINE  +RECODG/sibsp10/onlinelog/group_1.631.788460975    YES
         1          2         ONLINE  +FDATDG/sibsp10/onlinelog/group_2.565.788461005    NO
         1          2         ONLINE  +RECODG/sibsp10/onlinelog/group_2.629.788461007    YES
         1          3         ONLINE  +FDATDG/sibsp10/onlinelog/group_3.564.788461011    NO
         1          3         ONLINE  +RECODG/sibsp10/onlinelog/group_3.415.788461013    YES
         1          4         ONLINE  +FDATDG/sibsp10/onlinelog/group_4.563.788461017    NO
         1          4         ONLINE  +RECODG/sibsp10/onlinelog/group_4.408.788461019    YES
         2          1         ONLINE  +FDATDG/sibsp10/onlinelog/group_1.566.788460973    NO
         2          1         ONLINE  +RECODG/sibsp10/onlinelog/group_1.631.788460975    YES
         2          2         ONLINE  +FDATDG/sibsp10/onlinelog/group_2.565.788461005    NO
         2          2         ONLINE  +RECODG/sibsp10/onlinelog/group_2.629.788461007    YES
         2          3         ONLINE  +FDATDG/sibsp10/onlinelog/group_3.564.788461011    NO
         2          3         ONLINE  +RECODG/sibsp10/onlinelog/group_3.415.788461013    YES
         2          4         ONLINE  +FDATDG/sibsp10/onlinelog/group_4.563.788461017    NO
         2          4         ONLINE  +RECODG/sibsp10/onlinelog/group_4.408.788461019    YES

 

 INST_ID     GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME

---------- ---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------ ---------
        1          5          1       8287  209715200        512          2 NO  CURRENT             1.6265E+10 12-JUL-12   2.8147E+14
        1          6          1       8286  209715200        512          2 YES INACTIVE            1.6265E+10 12-JUL-12   1.6265E+10 12-JUL-12
        1          7          2      13830  209715200        512          2 YES ACTIVE              1.6265E+10 12-JUL-12   1.6265E+10 12-JUL-12
        1          8          2      13831  209715200        512          2 NO  CURRENT             1.6265E+10 12-JUL-12   2.8147E+14
        2          5          1       8287  209715200        512          2 NO  CURRENT             1.6265E+10 12-JUL-12   2.8147E+14
        2          6          1       8286  209715200        512          2 YES INACTIVE            1.6265E+10 12-JUL-12   1.6265E+10 12-JUL-12
        2          7          2      13830  209715200        512          2 YES ACTIVE              1.6265E+10 12-JUL-12   1.6265E+10 12-JUL-12
        2          8          2      13831  209715200        512          2 NO  CURRENT             1.6265E+10 12-JUL-12   2.8147E+14

 


 

Abaixo um script útil para eliminar um Redo em uso, bastando para isso substituir o valor da variável lgrupo para o numero do grupo a ser eliminado.

declare
lgrupo varchar2(2)  := '14';
lapagou varchar2(1) := 'N';
lcontador number(1) := 0;
lquery varchar2(500);
begin
    while lapagou = 'N' loop
        lquery := 'select count(1) from gv$log where status = ''INACTIVE'' and group# = ' || lgrupo;
        execute immediate lquery into lcontador;
        if lcontador > 0 then
            Begin
                lquery := 'alter database drop logfile group ' || lgrupo;
                execute immediate lquery;
                lapagou:= 'S';
            end;
        else
            lquery := 'alter system switch logfile';
            execute immediate lquery;
            lquery := 'alter system checkpoint';
            execute immediate lquery;
        end if;
    end loop;
end;

Oracle EM DBConsole don’t start due to Error starting ORMI server

If your Enterprise Manager Console won’t start due to “Error starting ORMI server … port 5520. The socket name is already in use”, here’s the solution:

  • Shutdown Enterprise Manager Console.
emctl stop dbconsole
  • Check if there are any processes with name like “oc4j”. If there are, kill them.
ps -ef | grep oc4j
kill -9 ....
  • Open Enterprise Manager Console.
emctl start dbconsole

in Bünyamin Balaban – Oracle Blog

I hope it was useful!!!
Cheers

AIX: Nim Server Commands

To list all the mksysb resources

# lsnim -t mksysb

# lsnim -t spot

To list all the machines

# lsnim -t standalone

OR

# lsnim -c machines

To reset the NIM status of system host-10

# nim -o reset -a force=yes host-10

or

# nim -Fo reset host10

To Force Deallocate all the resources from system host-01

# nim -Fo deallocate -a subclass=all host-01

To rebuild the /etc/niminfo file in the master

# nimconfig -r

To rebuild the /etc/niminof file in the NIM client

# niminit -a master= -a name=

To remove a machine from the NIM environment

# nim -o remove

To define a mksysb resource

# nim -o define -t mksysb -a server=master -a location=file>

To enable Base OS install in a client using mksysb resource

# nim -o bos_inst -a source=mksysb -a spot=spot_53ML4 -a accept_licenses=yes

-a mksysb=file>

 

To add additional software to lppsource1

# nim -o update -a packages=all source=/dev/cd0 lppsource1

To update the spot and lppsource to the latest level

# nim_update_all -l -s -d -u -B

Some useful NIM SMIT Fast paths

smit nim_mkmac # Adding new machines

smit nim_bosinst # For doing BOS install operation on a machine

 

Common NIM Error codes

608 – tftp retrieve of client info file failure

Action If a 608 hang is encountered, verify that the ClientName.info file exists in the /tftpboot directory. If it does not exist, retry the NIM operation to create it. If it does exist, verify that tftp access to the /tftpboot directory is not restricted in the /etc/tftpaccess.ctl file. is also possible that the network adapter was not configured properly in the boot environment

611 – Remote mount of NFS file system failure

Action 611 hangs occur when the client machine is unable to mount a resource from a server. Ensure that NFS is running on the resource server. Verify that the resources specified for the operation are exported properly by checking the /etc/exports and /etc/xtab files on the server. Also, confirm that the resources have permissions set correctly for reading.

613 – Failure setting up route tables

Action 613 hangs usually occur because a route is incorrectly defined for a network in the NIM database. Verify that the correct gateways are specified between networks, and all gateways are functional. Use debug-enabled network boot images to determine which routes could not be defined.

Cheers, 🙂

HMC Command to get LPAR configuration

This displays what resources are assgined in the profile for a given LPAR.

# lssyscfg -r prof -m managed_system_name | grep name=LPAR_NAME

Cheers, 🙂

Auto-Hide Mac OS Menu ToolBar

A simple plist hack does the same thing on a per-app basis. To hack an app so that when it’s active, the menubar and dock are hidden, you need to find its info.plist file. Control-click on the program in question, choose Show Package Contents from the pop-up menu, and then navigate into the Contents folder.

 

Once there, add the following to the file:

<key>LSUIPresentationMode</key>

<integer>4</integer>

Be sure that it goes in alphabetical order, otherwise it won’t work (i.e. LSUIPresentationMode goes after LSMinimumSystemVersion but beforeNSAppleScriptEnabled). Save the file and enjoy.

 

Source: (http://hints.macworld.com/article.php?story=20070118003804854)

Video: (http://www.anil.biz/mac-how-to-hide-finder-menu-bar/)

Optimization WordPress Plugins & Solutions by W3 EDGE