Amazon books

Tuesday, March 5, 2013

Get EM Cloud 12c plugin status using emcli

emcli get_plugin_deployment_status -plugin_id=oracle.sysman.xa


Best Regards,
Paulo Portugal

New agentca for EM Grid Control 12c

In old Grid Control 10g, to force a reconfiguration of all targets for an agent we used "agentca -f" command.

For Cloud Control 12c we now use this command below:

/u01/app/oracle/product/12.1.0/agent_1/core/12.1.0.2.0/oui/bin/runConfig.sh ORACLE_HOME=/u01/app/oracle/product/12.1.0/agent_1/core/12.1.0.2.0 ACTION=Configure MODE=Perform


Best Regards,
Paulo Portugal

How to find files and zip using dcli on Exadata:


This command below will find files of date Jan 13 2008 and zip all to /tmp/osw.zip in all databse nodes os exadata that are listed in file dbs_group.

dcli -l root -g dbs_group 'cd /opt/oracle.oswatcher/osw/archive; find . -name "*13.01.28*" -exec zip /tmp/osw.zip {} \;'

Best Regards,
Paulo Portugal

EXPDP/IMPDP show error ORA-39006 and ORA-39213: Metadata processing is not available

When trying to expdp or impdp you got error below:

#################################################################################################
Export: Release 11.2.0.3.0 - Production on Tue Mar 5 11:57:03 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
ORA-39006: internal error
ORA-39213: Metadata processing is not available
#################################################################################################

Run the procedure below to fix the problem:

sqlplus / as sysdba

SQL> execute sys.dbms_metadata_util.load_stylesheets;


Best Regards,
Paulo Portugal

Monday, December 3, 2012

Some LOGDUMP commands for Golden Gate


--LOGDUMP Golden Gate

--View file header
Logdump 1> fileheader on

--View record header
Logdump 1> ghdr on

--Add column information
Logdump 1> detail on

--Add HEX and  ASCII data values to column list
Logdump 1> detail data

--To control how much record data is displayed
Logdump 1> reclen 280

--Go to first record
Logdump 1> pos 0
Logdump 1> next (or just type n)

--Position to aproximate RBA
Logdump 1> pos
Logdump 1> scanforheader (or just type sfh) --Go to next header

--Count records in trail
Logdump> count

--Filtering including a file name
Logdump> filter include filename TCUST*
Logdump> filter match all
Logdump> n

--Locating a Hex Data Value
Logdump> filter inc hex /7776543/
Logdump> pos 0
Logdump> n


--Save records from the current position to a new trail file
Logdump> save newtrail 10 records

--Create a log for your session
Logdump> log to temp1_session.log

--Stop logging
Logdump> log stop

Best Regards,
Paulo Portugal

Thursday, November 29, 2012

Some ILOM commands

--List hard disks
show -l all /SYS type=='Hard Disk'

--Show all temperatures
show -level all -output table /SYS type==Temperature value

--Show network configuration
show /SP/network/

--Start server
start /SYS

--Stop Server
stop [-force] /SYS

--Turn on LED
set /SYS/LOCATE value=Fast_Blink

--Turn off LED
set /SYS/LOCATE value=Off

--Show System information
show /SYS

Thursday, November 22, 2012

Erro ORA-12528 connecting to AUXILIARY Instance - RMAN Duplicate Database

If your database is in nomount, listener will show status as BLOCKED and to connect to this NOMOUNT database from a remote server you need to add (UR=A) in remote tnsnames.ora file as on example below:


DBNEW =
  (DESCRIPTION =
    (ADDRESS = (COMMUNITY = SAP.WORLD)(PROTOCOL = TCP)(HOST = hostname)(PORT = 1521)(QUEUESIZE = 90))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DBNEW.WORLD) (UR=A)
    )
  )