Amazon books

Thursday, March 26, 2015

Great White Paper for 12c In-Memory Advisor

In this link below you can find a great white paper for In Memory Advisor:

http://www.oracle.com/technetwork/database/manageability/info/twp-in-memory-advisor-bp-2430474.pdf


Best Regards,
Paulo Portugal

Tuesday, March 10, 2015

Using DBMS_PASSTHROUGH to run command in SQL Server from Oracle

This simple example below update a table in SQL Server from Oracle:

declare
   l_num_rows number;
begin
  l_num_rows := dbms_hs_passthrough.execute_immediate@TMMASTER ('USE ORAIntegration_V2_test');
  commit;
  execute immediate 'alter session close database link TMMASTER';
  commit;
 
  l_num_rows := dbms_hs_passthrough.execute_immediate@TMMASTER ('UPDATE trans SET    a=333 WHERE  a=222 ');
  commit;
 
--  l_num_rows := dbms_hs_passthrough.execute_immediate@TMMASTER ('COMMIT TRANSACTION');
  commit;


  execute immediate 'alter session close database link TMMASTER';
  commit;
end;



select * from trans@TMMASTER;


Best Regards,
Paulo Portugal

Friday, March 6, 2015

The new Oracle Exadata Deployment Assistant - Fev 2015 - Elastic Rack, OVM, COD

Already including X5, Zero Data Loss and Super Cluster configuration options:

http://www.oracle.com/technetwork/database/exadata/oeda-download-2076737.html



The new OEDA have options to install Exadata, Zero Data Loss and Super Cluster


With Elastic option you can customize your Exadata (19 DB Nodes and 3 Cells for example) The maximum number os cell+db nodes is 23.


  The Hardware Options now have the Elastic Rack with Flash Disks (HP disks does not exists anymore) or HC Disks.
  You can choose to have a Virtualized Exadata or all physical db nodes. Also you can choose COD to save money on your software licenses.
 
Here you see one RAC with 19 nodes and 3 cells.  This is only one from many possibilities:
 
At the end, your template shows something like that:


Best Regards,
Paulo Portugal

DBMS_SCHEDULER CREDENTIAL ORA-27486 privilegios insuficientes

If you create an external job and is using a credential that already exists in another schema you will face this error below if not provide the necessary privilege for the using running the job :

SQL> conn / as sysdba
SQL> exec dbms_scheduler.run_job('MY_JOB');
BEGIN dbms_scheduler.run_job('MY_JOB'); END;

*
ERROR at line 1:
ORA-27486: privilegios insuficientes
ORA-06512: em "SYS.DBMS_ISCHED", line 196
ORA-06512: em "SYS.DBMS_SCHEDULER", line 486
ORA-06512: em line 1


Fix:

You should connect with the credential owner and grant the execute on that credential to the other user:

--Connect with the credential owner:
SQL> conn edi/edi
SQL> grant execute on edi.edi_credential to sys;
--Connect back to SYS
SQL> conn / as sysdba
Connected.
SQL> exec dbms_scheduler.run_job('MY_JOB');

PL/SQL procedure successfully completed.

SQL>



Best Regards,
Paulo Portugal

Thursday, March 5, 2015

The new DBMCLI utility on Exadata 12.1

For you that is used to use CELLCLI in storage nodes on Exadata, now from 12.1 release that is a new DBMCLI for database nodes also.

Like the CELLCLI the DBMCLI can be used to manage the database server. Some commands are below:

DBMCLI> LIST METRICDEFINITION DS_CPUT DETAIL

DBMCLI> LIST METRICDEFINITION WHERE name LIKE 'DS_SWAP_*' -
         ATTRIBUTES name, metricType, description


DBMCLI> LIST METRICCURRENT DS_FANS DETAIL


DBMCLI> LIST METRICCURRENT WHERE objectType = 'DBSERVER' AND                 -
         metricValue != 0 ATTRIBUTES name, metricObjectName,                  -
         metricValue, collectionTime

DBMCLI> LIST METRICHISTORY DS_TEMP WHERE alertState='critical' DETAIL

DBMCLI> LIST METRICHISTORY WHERE objectType = 'DBSERVER' AND metricValue != 0   -
         AND collectionTime > '2014-08-12T09:10:51-07:00' -ATTRIBUTES name,      -
         metricObjectName, metricValue, collectionTime


DBMCLI> ALTER ALERTHISTORY 1671443714 -
                            examinedBy="jdoe"

DBMCLI> ALTER ALERTHISTORY ALL examinedBy="jdoe"

DBMCLI> ALTER DBSERVER iaasMode="on"
DBMCLI> ALTER DBSERVER iaasIdleInUse=true, iaasReason=reason

DBMCLI> ALTER DBSERVER smtpServer='my_mail.example.com',            -
                    smtpFromAddr='john.doe@example.com',         -
                    smtpFrom='John Doe',                         -
                    smtpToAddr='jane.smith@example.com',         -
                    snmpSubscriber=((host=host1),(host=host2)),  -
                    notificationPolicy='clear',                  -
                    notificationMethod='mail,snmp'


All the documentation is here:

http://docs.oracle.com/cd/E50790_01/doc/doc.121/e51951

Best Regars,
Paulo Portugal

Wednesday, March 4, 2015

Find files in ASM using ASMCMD find command

This single example will find all PARAMETER FILEs that you have in your ASM instance:

ASMCMD> find --type PARAMETERFILE . *

The types that can be used are these below:

SQL> select distinct TYPE from v$asm_file;

TYPE
----------------------------------------------------------------
ARCHIVELOG
ASMPARAMETERFILE
CHANGETRACKING
CONTROLFILE
DATAFILE
DATAGUARDCONFIG
OCRFILE
ONLINELOG
PARAMETERFILE
TEMPFILE

10 rows selected.



Best Regards,
Paulo Portugal

Tuesday, March 3, 2015

TOTAL_MB of V$ASM_DISK shows wrong value (diff from real OS space)

If you are checking your space in V$ASM_DISK and face a problem where the TOTAL_MB is different from the real size of that disk execute the command below to workaround this problem:

alter diskgroup DG_NFE_DATA resize disk DG_NFE_DATA_0000;


Best Regards,
Paulo Portugal