Search This Blog

Thursday, November 20, 2014

Audit failed logon attempts

Step 1 :
sqlplus / as sysdba
Connected.
SQL> alter system set audit_trail=DB scope=spfile ;
OR
audit_trail=true

Step 2 :
 SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup ;
ORACLE instance started.

Step 3 :
sqlplus / as sysdba
 SQL> audit session whenever not successful ;

Step 4 :
Test auditing if it works

sqlplus scott/osama ;

ERROR:
ORA-01017: invalid username/password; logon denied
Warning: You are no longer connected to ORACLE.

Step 5:
sqlplus / as sysdba

Use the below Script :

select os_username,username,userhost,to_char(timestamp,'mm/dd/yyyy hh24:mi:ss') timestamp,returncode from dba_audit_session where action_name = 'LOGON' and returncode > 0
order by timestamp ;

Tuesday, November 18, 2014

Configuration Network for Virtual Machine - VirtualBox

Before you can remote to virtual linux server you must configure network properly. Today I will illustrate how to configure network for your linux server to install Oracle database.

Open "Setting" window and select "Network" on the left panel. In my post I will add to virtual linux server 2 Network Adapter:
a) NAT: this network adapter is used to go out and access Internet. It has dynamic IP.

b) Host Only: this network adapter is use to configure static IP. And it is use to remote your linux server.


Click Start icon on toolbar to power on your linux server and login as root user. The above steps only add network adapters to server. You must set static IP. 
c) NAT: select eth0 and configure as below:



d) Host Only: select eth1 and configure static IP so that linux server is in the same VLAN as your labtop/PC:





Restart the network service and check IP, network;


Remote your Linux server using Putty(download page putty.exe):


Monday, November 17, 2014

Installation Oracle Linux 6 - 64bit using VirtualBox

Today I write about the installation Oracle Linux 6 - 64bit using VirtuaBox.

1.  Create virtual machine:
First you should configure the directory where your virtual machine will locate on your laptop/PC. You click menu File -> Preferences to open the VirtualBox - Settings window. In this post I chose E:\VirtualBoxVM :

And now you can create a new virtual machine where your installation will be located. The new virtual machine will be in the directory that you chose at the before step E:\VirtualBoxVM. Following below screenshot to create a virtual host:

You should enter 1024MB for RAM as minimum:

You can create Hard Drive with any type you like. In this my post I select VMDK:

I select "Dynamically allocated" to save my laptop HDD.

Then you have a new virtual machine for installation Oracle Linux:

2.  Now you install Oracle Linux on the new virtual machine:
You must download Oracle Linux at https://edelivery.oracle.com/EPD/Search/get_form:

After the download finish you will have a ISO file. You should rename it, ex: ora_linux_6.iso. Add this ISO file to your virtual machine: 

Click Start on toolbar to power on your virtual machine and begin installation. The installation start with the screen as below.  Click your mouse on the screen, using arrow key to chose the second. Then you press Enter. Note: using Right Ctrl to release your mouse from the virtual machine.

 Chose "Skip":

The rest of the installation, if your screen does not match screenshot of this post you simply select "Next".

OK, now take a cup of coffee and wait for the installation finish. Wow... finish, let reboot your server:

You finish the installation and have a linux server like this: