Posts

Find the IP address of the user who locked a Oracle account

It's been awhile since the last post planning to start again with a small and simple post. OK.. the background, there is a application user account in db, which has " FAILED_LOGIN_ATTEMPTS" set to 3 in the users profile. Now the user is locked because of invalid logins and we need to identify the culprit. Requirments - We need the auditing enabled in the database. Then we can use below queries to get the required details. 1. select account_status, username, LOCK_DATE from  dba_users where username like '%USERNAME%'; 2. select AU.userid ,substr(AU.comment$text, 68,21) as "Host / IP_ADDRESS" from sys.aud$ AU where to_char(AU.ntimestamp#, 'DD-MM-YY') IN ('28-04-14') and AU.returncode=1017  

Moving Oracle Database between AWS instance.

When moving an Oracle database between two Amazon ec2 instances, we can easily accomplish it without backup/restore or Rman duplication as below. Setup - Oracle 11.2.0.1 Running on Amazone ec2 Linux 6.4 Requirment - Moving above oracle database from one Amazone ec2 instance (A) to another (B). Restrications - Need to Shutdown the database on source instance. (A) Step 1. In source ec2 instance, Take control file create statement to trace using below command, alter database backup controlfile to trace; Create pfile from spfile. create pfile from spfile Step 2. In source ec2 instance, Shutdown the oralce database. (In order put all data files on consistent state) Identify the volumes (EBS) which are storing the data files and take snapshot of each of the volume. (If you are dealing with large volumes, take a full AMI (Machine Image) prior to taking volume snapshots. Then after db shutdown take the volume snapshot. This will reduce the snapshot time) Ste...

Oracle Startup failed with ORA-00119 and ORA-00130 in Linux

Image
Reasons for ORA-00119 and ORA-00130 during Oracle database startup Oracle startup can be failed on Linux system with below error message. ORA-00119: invalid specification for system parameter LOCAL_LISTENER and ORA-00130 . Common reasons for ORA-00119 and ORA-00130 includes, Incorrectly defined local_listener parameter Issues with server hostname configuration In the given instance no value was set for the LOCAL_LISTENER parameter. And the hostname for the system was correct. But " hostname –i " was failing, with host name lookup failure as below. Check the '/etc/hosts' and '/etc/sysconfig/network' for difference on hostname definition. Set the same hostname in both files and reboot the server.

OpenEdge Replication Setup

This is a step by step guide on OpenEdge Replication setup with 2 nodes. Here I ll be setting up replication for Openedge 10.2B databases on RHEL 6.2 on top of Virtualbox. My replication environment will be configured for automatic transition, (DR conversion to primary) and will be using Defer Agent Startup (DR database can be created while production is running - minimum production timeout) method. With OpenEdge DR option comes as a separate installable add-on products for database. It has two variants. 1. OpenEdge Replication. 2. OpenEdge Replication Plus. (Provides the possibility to perform read-only actions on DR DB) Virtualbox Setup Install OS (Mine - RHEL 6.2) and  Progress Openedge database (Mine -OpenEdge Enterprise DB 10.2B) and the Fathom replication product (Mine - OpenEdge Replication plus). After installation check with ‘showcfg’ on proenv prompt, should display both the products. Clone or manually create another duplicate server.  ...

High Availability Series: Part 1 - DB2 HADR Setup

I am planning to post a set of articles covering various DR options provided by Oracle, DB2 and Progress OpenEdge database. This will include setup guides for Oracle DataGuard, DB2 HADR and OpenEdge Fathom Replication. Series will be started with basic setup of each of these technologies, and then these will be reconfigured, changed as per the requirements to demonstrate different recovery scenarios. First I will setup a simple HADR system using Virtualbox. At the start only basic setup will be configured and will be changed/ reconfigured when testing different DR situations. Virtualbox Setup Install OS and db2 (I am using Oracle linux 5.6 (32) and db2 10.1 (32)) into single VM. Clone or manually create another duplicate server.  Make sure to configure network connectivity between two machines. Use different hosts names. In this example my primary would be "db21" and standby is "db22" DB2 Setup step 1 – Create two db2 instances ...

Oracle silent install on Linux.

Image
DB - Oracle 11gR2 OS - Oracle Linux 5.6 Sometimes it is required to install Oracle without the GUI. Oracle provides silent install capability for this, where installation is totally controlled by a response file. Response files can be generated while performing a GUI installation using OUI by starting the   runInstaller with –record and –destinationFile options as below, ./runInstaller -record -destinationFile <Path_to_Create_Response_File> This will record whatever the options selected on GUI installation and store them in response file in given path. Also you can use sample response file and edit them. I have attached the response file used for this example. The options on the file are self-explanatory so you can edit them to match your environment. Once you have a proper response file silent installation is straight forward task. Also oracle provides some runInstaller options to manage the setup as well. So using the attached response fi...

Multi-Tenancy in Database...

Image
DB - OpenEdge 11.2  OS - Windows  Abbreviations - MT -> Multi-Tenancy/Tenant,  OE -> OpenEdge  Recently we had to go through on MT architecture and had to use OpenEdge for the implementation. From this post I am hoping to discuss the summary of MT architecture and a very simple use case for demonstrating multi-tenancy support in db level using OpenEdge 11.2.  Multy-Tenancy is a resource sharing concept where deferent tenants (Logical set of users – eg. different clients of a cloud service provider) are accessing same service despite having well differentiated data access, security and resource allocations. Multi Tenancy support was there for infrastructure layer (IaaS providers) and also for application layer. Now database vendors provide MT support built in to the database layer as well so the users can access fully shared applications without even knowing it.  Below image demonstrate the shared tenant access where all entities (Infras...