Sunday, December 17, 2017

How to set up EC2 instance in AWS Cloud

Today, I am going to show how to set up EC2 instance on  AWS cloud.


Login to AWS console and go to Services> Compute >EC2


Next, choose the  OS/platform you want to select. I selected Ubuntu which is also free tier eligible.

Next, choose the hardware type-cpu, memory, storage etc


Next, choose other details, like security groups, choose a new key pair if you haven't created.Download your private key here -this is important.It will be in .pem format. Add tags etc and finally review the configuration


Finally, launch the instance. It will take a while-couple of minutes and then instance will come up


Finally your instance us up! and you can get the details-public dns, public IP and other details. 

Now before connect to this instance using putty, Use puttykeygen to convert .pem into .ppk. 
Load . pem and save the private key-.ppk.  Now connect to putty using 
ubuntu@"Public DNS" as give above, remember to give the above .ppk in Connection >SSH >Auth in putty.







Friday, August 4, 2017

In Oracle 12c Sql tuning advisor is not running even though its enabled

Faced a strange issue in oracle 12c. In automated maintenance task, sql tuning advisor was enabled. However, it was still not running. Validated  dba_autotask_operation, that  "sql tuning advisor" is enabled. However, view -dba_scheuler_job_run_details and dba_autotask_task showed that it was NOT running. 

This is a  bug in 12c.  


As per metalink note, either we have to apply a patch"20540751" or as a workaround, run @?/rdbms/admin/execsqlt.sql to create the scheduler program "'AUTO_SQL_TUNING_PROG" that was dropped. This program should then show in in dba_scheduler_programs.


References:
Automatic SQL Tuning Task Not Executing after upgrading to 12.1.0.2 (Doc ID 2171154.1)

Friday, July 28, 2017

In 12c- unified auditing not capturing l succesful login & failures

In oracle 12.1, oracle has come up with unified audit trail.  Ideally for this, audit_trail parameter should be set to none. However we observed that even though, ORA_LOGON_FAILURES   was  available in AUDIT_UNIFIED_ENABLED_POLICIES , but unified audit trail was not capturing successful  logins and failures.


 select /*+ parallel(a,3) */ a.os_username,a.dbusername,a.userhost,a.target_user,a.action_name,
to_char(a.EVENT_TIMESTAMP,'mm/dd/yyyy hh24:mi:ss') EVENT_TIMESTAMP,
a.RETURN_CODE from UNIFIED_AUDIT_TRAIL a where a.unified_audit_policies = 'ORA_LOGON_FAILURES'  and a.RETURN_CODE > 0 order by a.EVENT_TIMESTAMP desc ;
--no rows selected

This came out to be a bug in oracle 12.1 and patch "19383839" was to be applied for this. This bug was fixed in 12.2