As stated in "Oracle Database: Change Password Expiration" when installing DB I usually change password expiration for DEFAULT profile from 180days to UNLIMITED.
This is because if you create users that uses DEFAULT profile after 180days Oracle gives you:
ORA-28001: the password has expired
So...you can edit DEFAULT profile in two ways:
1) Via Enterprise Manager Console as stated in Oracle Database: Change Password Expiration
2) Via SQLPlus
In this post I explain how to recover a locked user via SQLPlus and set DEFAULT profile with an unlimited password expiration time.
Connect to the instance:
[oracle@oracle ~]$ sqlplus
SQL> conn sys/password@sid as sysdba
SQL> select username,account_status from dba_users;
The above command will return all dba users and their corresponding status presenting them in a view similar to this:
USER1 LOCKED&EXPIRED
USER2 OPEN
Now let's unlock the user(s):
SQL> alter user [user_name] identified by [password] account unlock;
Then modify DEFAULT profile setting the password expiration time to UNLIMITED:
SQL> alter profile DEFAULT limit PASSWORD_LIFE_TIME UNLIMITED;
That's all!!
lunedì 6 maggio 2013
giovedì 4 aprile 2013
Oracle Linux: NIC bonding
NIC bonding allow the use of multiple NICs for increased network performance or availability. Multiple NICs are combined into a single "network entity" called bond in which NICs can be added or removed.
So, let's start:
Create the bond alias. This alias will point to a network configuration file where we will define the properties of our bond like the IP address and bonding options.
[root@oracle ~]# nano /etc/modprobe.conf
add the following line into modprobe.conf
alias bond0 bonding
Now create the configuration file for interface bond0:
[root@oracle ~]# cd /etc/sysconfig/network-scripts/
[root@oracle network-scripts]# touch ifcfg-bond0
[root@oracle network-scripts]# nano ifcfg-bond0
Insert this in ifcfg-bond0 file:
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=10.0.0.0
NETMASK=255.255.255.0
IPADDR=10.0.0.122
USERCTL=no
BONDING_OPTS="mode=1 miimon=100"
Where:
NETWORK=10.0.0.0 is the network class we are using.
IPADDR=10.0.0.122 is the IP address of this machine
BONDING_OPTS="mode=1 miimon=100" are the bonding options.
mode=1 is used for active backup policy which means that only one network adapter is active and the remaining are waiting for main NIC to fail in order to replace it.
Common values for "mode" are: 0 round robin and 1 active backup
miimon=100 is the frequency in milliseconds of MII link monitoring. 100ms is a suggested value.
bond0 configuration file is completed, now we need to edit configuration files for all NICs participating into this bond. For this guide I'm using only two NICs in bond0 so I have to edit only ifcfg-eth0 and ifcfg-eth1
[root@oracle ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:50:56:BF:00:25
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
[root@oracle ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
HWADDR=00:50:56:BF:00:34
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
As you can see we configure all interfaces of the bond to be slaves using bond0 as master.
Restart network to apply changes:
[root@oracle ~]# service network restart
As for last step we need to add a default gateway for our machine:
[root@oracle ~]# /sbin/route add -net default gw 10.0.0.250
Try to ping an internet address, if ping echo reply returns correctly make permament this route adding previous command to rc.local file.
[root@oracle ~]# nano /etc/rc.local
Add:
/sbin/route add -net default gw 10.0.0.250
rc.local will be called each time the machine will startup.
That's all!!
So, let's start:
Create the bond alias. This alias will point to a network configuration file where we will define the properties of our bond like the IP address and bonding options.
[root@oracle ~]# nano /etc/modprobe.conf
add the following line into modprobe.conf
alias bond0 bonding
Now create the configuration file for interface bond0:
[root@oracle ~]# cd /etc/sysconfig/network-scripts/
[root@oracle network-scripts]# touch ifcfg-bond0
[root@oracle network-scripts]# nano ifcfg-bond0
Insert this in ifcfg-bond0 file:
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=10.0.0.0
NETMASK=255.255.255.0
IPADDR=10.0.0.122
USERCTL=no
BONDING_OPTS="mode=1 miimon=100"
Where:
NETWORK=10.0.0.0 is the network class we are using.
IPADDR=10.0.0.122 is the IP address of this machine
BONDING_OPTS="mode=1 miimon=100" are the bonding options.
mode=1 is used for active backup policy which means that only one network adapter is active and the remaining are waiting for main NIC to fail in order to replace it.
Common values for "mode" are: 0 round robin and 1 active backup
miimon=100 is the frequency in milliseconds of MII link monitoring. 100ms is a suggested value.
bond0 configuration file is completed, now we need to edit configuration files for all NICs participating into this bond. For this guide I'm using only two NICs in bond0 so I have to edit only ifcfg-eth0 and ifcfg-eth1
[root@oracle ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:50:56:BF:00:25
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
[root@oracle ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
HWADDR=00:50:56:BF:00:34
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
As you can see we configure all interfaces of the bond to be slaves using bond0 as master.
Restart network to apply changes:
[root@oracle ~]# service network restart
As for last step we need to add a default gateway for our machine:
[root@oracle ~]# /sbin/route add -net default gw 10.0.0.250
Try to ping an internet address, if ping echo reply returns correctly make permament this route adding previous command to rc.local file.
[root@oracle ~]# nano /etc/rc.local
Add:
/sbin/route add -net default gw 10.0.0.250
rc.local will be called each time the machine will startup.
That's all!!
martedì 2 aprile 2013
VMware: How to install Cisco Nexus 1000v - Part1
In this topic I briefly explain how to install Cisco Nexus 1000v virtual switch in VMware vSphere 5.1
Prerequisites for this installation are:
These networks should be separated usingh VLANs as stated in Cisco Nexus 1000V Getting Started Guide.
First we need to install Nexus 1000V Virtual Supervisor Module(VSM).
Unzip Nexus1000v.4.2.1.SV2.1.1a.zip, the OVA file that will be deployed is located in "Nexus1000v.4.2.1.SV2.1.1a\VSM\Install" folder.
Open VMware vSphere Client, click File > Deploy OVF Template, choose nexus-1000v.4.2.1.SV2.1.1a.ova and follow the installation as stated in screenshots below.
Insert the Nexus 1000v administrator password and the management IP Address of the switch:
Once VSM is installed, we need to use Cisco installer to finalize the installation of the switch providing vCenter credentials.
Go to "Nexus1000v.4.2.1.SV2.1.1a\VSM\Installer_App" folder and run Nexus1000V-install_CNX.jar (Java must be installed in your machine in order to run this).
Select vCenter Server Connection and provide vCenter credentials as in the following images:
Once installation is finished click Close and in vSphere Client under Inventory > Networking you will see the Cisco 1000v Virtual Distributed Switch.
In a following post I will explain how to simple configure it creating port groups.
That's all!!
Prerequisites for this installation are:
- Nexus1000v.4.2.1.SV2.1.1a.zip file which contains Cisco software. You can download it from this page.
- Three VM Networks:
- Management Network (VM Kernel)
- Control Network (VM PortGroup)
- Port Network (VM PortGroup)
These networks should be separated usingh VLANs as stated in Cisco Nexus 1000V Getting Started Guide.
First we need to install Nexus 1000V Virtual Supervisor Module(VSM).
Unzip Nexus1000v.4.2.1.SV2.1.1a.zip, the OVA file that will be deployed is located in "Nexus1000v.4.2.1.SV2.1.1a\VSM\Install" folder.
Open VMware vSphere Client, click File > Deploy OVF Template, choose nexus-1000v.4.2.1.SV2.1.1a.ova and follow the installation as stated in screenshots below.
Insert the Nexus 1000v administrator password and the management IP Address of the switch:
Once VSM is installed, we need to use Cisco installer to finalize the installation of the switch providing vCenter credentials.
Go to "Nexus1000v.4.2.1.SV2.1.1a\VSM\Installer_App" folder and run Nexus1000V-install_CNX.jar (Java must be installed in your machine in order to run this).
Select vCenter Server Connection and provide vCenter credentials as in the following images:
Once installation is finished click Close and in vSphere Client under Inventory > Networking you will see the Cisco 1000v Virtual Distributed Switch.
In a following post I will explain how to simple configure it creating port groups.
That's all!!
mercoledì 27 marzo 2013
VMware: Alarm 'Host IPMI System Event Log Status'
Today I logged-in into vSphere Client and stepped into this alert.
According to KB 1033725 this alarm is triggered when IPMI System Event log is full.
So...to resolve this issue click on the host with this alarm and go to Hardware Status tab, you should see something similar to this which states the log archive is full.
Click View -> System Event Log then click Reset event log. Once done alert will disappear from host but to complete the process you have to click Reset sensors button.
That's all!!
According to KB 1033725 this alarm is triggered when IPMI System Event log is full.
So...to resolve this issue click on the host with this alarm and go to Hardware Status tab, you should see something similar to this which states the log archive is full.
Click View -> System Event Log then click Reset event log. Once done alert will disappear from host but to complete the process you have to click Reset sensors button.
That's all!!
martedì 26 marzo 2013
VMware: How to extend system volume on Windows 2008
In this post I will simply explain how to increase the size of System partition on a Windows 2008 R2 server. According to Microsoft this procedure applies to Windows Vista and Windows 7 too.
I will increase my C:\ drive from 60GB to 80GB while the VM in powered on.
Open vSphere Client right click the Windows 2008 VM you need to expand disk, and select Edit Settings.
Select hard disk, in this case I have a 60GB hard disk.
Now go to your Windows VM, run diskmgmt.msc
You will see the unallocated capacity. If not click Refresh button.
Select disc C:\ and right click then click Extend Volume
Follow the wizard assigning all unallocated space to the disk C:\, or, if you prefer, just a portion of it.
After this you will see the system partition increased to the new added capacity.
That's all!!
I will increase my C:\ drive from 60GB to 80GB while the VM in powered on.
Open vSphere Client right click the Windows 2008 VM you need to expand disk, and select Edit Settings.
Increase capacity to your desired capacity, in this case I bring it to 80GB:
Now go to your Windows VM, run diskmgmt.msc
You will see the unallocated capacity. If not click Refresh button.
Select disc C:\ and right click then click Extend Volume
After this you will see the system partition increased to the new added capacity.
That's all!!
venerdì 22 marzo 2013
VMware: Some good readings
This is a bit different post, infact it's not something that will help you solve "things" but its a suggestion of good VMware ESXi related books I would like to share with you.
Lately I'm deeply involved in VMware projects. I always have been fascinated by VMware products, in particular by vSphere because it's a rock solid hypervisor that is pretty easy to install and configure and besides it offers a LOT of possibilities.
You can consider vSphere as the first brick of your "virtualization house" upon which you can add other bricks that incredibly expands vSphere capabilities. For example you can add the Horizon Suite that brings Desktop Virtualization benefits to your enterprise, or you can add the vCloud "brick" that bring your datacenter and move it to the cloud allowing you to aggregate computing resources from all of your datacenters even if they are geographically dispersed and opens it to new Organizations allowing you to provide VMs for Organizations creating a public cloud infrastructure.
So...I spent last months introducing VMware products to a lot of new customers and then recreating their datacenters moving them from physical world to the virtual world (or "vWorld" as VMware-fanboys would say).
This process brought a lot of effort in constant documenting about what are the best practices and the "gold rules" for the modern datacenters. I consumed a lot of reading material and in this post I would like to briefly discuss it with you.
Starting from the basics I found two really interesting books: VCP5: VMware Certified Professional on vSphere 5: VCP-510: Exam VCP-510 - Brian Atkinson which is a book dedicated to VCP certification. It covers all the basics aspects of VMware vSphere and it's a great start point. Another good book, but in my opinion not good as the former, is The Official Vcp5 Study Guide - Bill Ferguson. This book also covers all VCP materials based literally on exam blueprint but I think it does cover it in a not-so-well-organized-way because when I say "literally" it is...content is not so linear as in the former book but it could also be a great reading.
Another great book that is beyond VCP scope is Mastering VMware vSphere 5 - Scott Lowe that covers pretty everything vSphere concerned in a quite detailed way.
Last book I would recommend is for those who likes deepdiving, a book that really fascinates me,VMware vSphere 5.1 Clustering Deepdive - Duncan Epping which interely covers VMware HA explaining how this feature works giving great detailed schemes and pointing also out some differences from HA implemented in ESXi 5.1 with ones implemented in previous releases.
That's all!!
Lately I'm deeply involved in VMware projects. I always have been fascinated by VMware products, in particular by vSphere because it's a rock solid hypervisor that is pretty easy to install and configure and besides it offers a LOT of possibilities.
You can consider vSphere as the first brick of your "virtualization house" upon which you can add other bricks that incredibly expands vSphere capabilities. For example you can add the Horizon Suite that brings Desktop Virtualization benefits to your enterprise, or you can add the vCloud "brick" that bring your datacenter and move it to the cloud allowing you to aggregate computing resources from all of your datacenters even if they are geographically dispersed and opens it to new Organizations allowing you to provide VMs for Organizations creating a public cloud infrastructure.
So...I spent last months introducing VMware products to a lot of new customers and then recreating their datacenters moving them from physical world to the virtual world (or "vWorld" as VMware-fanboys would say).
This process brought a lot of effort in constant documenting about what are the best practices and the "gold rules" for the modern datacenters. I consumed a lot of reading material and in this post I would like to briefly discuss it with you.
Starting from the basics I found two really interesting books: VCP5: VMware Certified Professional on vSphere 5: VCP-510: Exam VCP-510 - Brian Atkinson which is a book dedicated to VCP certification. It covers all the basics aspects of VMware vSphere and it's a great start point. Another good book, but in my opinion not good as the former, is The Official Vcp5 Study Guide - Bill Ferguson. This book also covers all VCP materials based literally on exam blueprint but I think it does cover it in a not-so-well-organized-way because when I say "literally" it is...content is not so linear as in the former book but it could also be a great reading.
Another great book that is beyond VCP scope is Mastering VMware vSphere 5 - Scott Lowe that covers pretty everything vSphere concerned in a quite detailed way.
Last book I would recommend is for those who likes deepdiving, a book that really fascinates me,VMware vSphere 5.1 Clustering Deepdive - Duncan Epping which interely covers VMware HA explaining how this feature works giving great detailed schemes and pointing also out some differences from HA implemented in ESXi 5.1 with ones implemented in previous releases.
That's all!!
martedì 5 marzo 2013
VMware Data Recovery: Could not connect to the Data Recover service on the appliance
In this post I would explain this issue I encountered while deploying Data Recovery vApp.
...Yes, I know Data Protection Suite is the current backup solution and Data Recovery is now old anyway our customer just needed it so I was told to install it.
After VM deployment I went to vSphere Client -> Solutions and Applications -> VMware Data Recovery selected Data Recovery appliance and clicked connect.
After a while it returned me this error:
Could not connect to the Data Recover service on the appliance. If the problem persists, please restart or redeploy the Data Recovery appliance.
Well, after logging in into Data Recovery console I figured out my error:
vCenter is in 192.168.0.0 network while VMs and consequently Data Recovery appliance runs in 10.0.0.0 network so obviously Data Recovery was unable to reach vCenter.
To solve this issue was enough to add to Data Recovery appliance an IP in 192.168.0.X class.
So...
cd /etc/sysconfig/network-scripts/
By default Data Recovery appliance is deployed by an OVF which attaches two NICs to this VM. In my case just one of these (eth0) was used so I had eth1 connected to VM but with no IP assigned. For me it was sufficient to edit eth1 config file; if you have eth1 already configured you need to add another network adapter to Data Recovery virtual appliance and edit the corresponding ifcfg-ethX file under /etc/sysconfig/network-scripts/
vi ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.19
NETMASK=255.255.255.0
BROADCAST=192.168.0.255
NETWORK=192.168.0.0
HWADDR=00:50:YOUR:MAC:ADDRESS:HERE
service network restart
ping your_vcenter_ip
Then back to vSphere Client I was able to connect to VMware Data Recovery appliance and schedule backup jobs.
That's all!!
...Yes, I know Data Protection Suite is the current backup solution and Data Recovery is now old anyway our customer just needed it so I was told to install it.
After VM deployment I went to vSphere Client -> Solutions and Applications -> VMware Data Recovery selected Data Recovery appliance and clicked connect.
After a while it returned me this error:
Could not connect to the Data Recover service on the appliance. If the problem persists, please restart or redeploy the Data Recovery appliance.
Well, after logging in into Data Recovery console I figured out my error:
vCenter is in 192.168.0.0 network while VMs and consequently Data Recovery appliance runs in 10.0.0.0 network so obviously Data Recovery was unable to reach vCenter.
To solve this issue was enough to add to Data Recovery appliance an IP in 192.168.0.X class.
So...
cd /etc/sysconfig/network-scripts/
By default Data Recovery appliance is deployed by an OVF which attaches two NICs to this VM. In my case just one of these (eth0) was used so I had eth1 connected to VM but with no IP assigned. For me it was sufficient to edit eth1 config file; if you have eth1 already configured you need to add another network adapter to Data Recovery virtual appliance and edit the corresponding ifcfg-ethX file under /etc/sysconfig/network-scripts/
vi ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.19
NETMASK=255.255.255.0
BROADCAST=192.168.0.255
NETWORK=192.168.0.0
HWADDR=00:50:YOUR:MAC:ADDRESS:HERE
service network restart
ping your_vcenter_ip
Then back to vSphere Client I was able to connect to VMware Data Recovery appliance and schedule backup jobs.
That's all!!
Iscriviti a:
Post (Atom)

























