Archive

Archive for April, 2009

Drop multiple tables in Oracle

April 23rd, 2009 13 comments

I just noticed that the Oracle instance that I am working with has the SMP_% tables added from the Oracle Enterprise Manager. Since I don’t need them I decided to drop them. Here is my sql that generates the delete statements:

select ‘drop table ‘||table_name||’;’ from user_tables where table_name like ‘SMP_%’;

or..

Read more…

Categories: Oracle Tags: ,

List IP Addresses used in WMWare ESX

April 22nd, 2009 Comments off

How to extract the IP addresses in use by the Guests in our VMware ESX host?
This was the question that I asked myself yesterday, when I had to go over a long list of IPs and check if any of the listed IPs was in use by any Guest Operating system on our ESX server. I immediately thought of the VMware VI Toolkit and all the nice commands that I have seen there, but none of those came to me immediately. A colleague was swifter and used python to get any matches after he copied all IPs manually using the Infrastructure Client, but since I had few spare minutes today, I decided to solve this one and post the answer. Here it is:

[VI Toolkit] C:\Program Files\VMware\Infrastructure\VIToolkitForWindows> get-vmg
uest -vm (get-vm *) |select IPAddress

IPAddress
———
{192.168.128.110}
{192.168.128.113}
{}
{192.168.128.127}
{}
{}
{192.168.128.125}
{}
{}
{192.168.128.175}
{}
{}
{}
{}
{192.168.128.186}
{192.168.128.153, 192.168.128.163, 10.10.128.153}
{}
{192.168.128.154, 192.168.128.164, 10.10.128.154}
{192.168.128.102}
{192.168.128.196}
{192.168.128.236}
{192.168.128.213}
{192.168.128.103}
{192.168.128.254}

Read more…

Categories: ESX, ESXi, VI, VMware Tags: , , ,

Extending VMDK file and resizing the partition – SLES 10 Linux

April 7th, 2009 Comments off

1. ESXi 3.5 Extending the VMDK file [Virtual Machine Hard Disk]

The main reason behind this is the fact that I needed more space for 2 more Oracle databases on a SLES10 Linux system. The partition mounted on /u01 was initially created as 21GB but I quickly depleted the space with 3 oracle 10g databases that took more than 17GB and the space left was not sufficient for the 2 new databases that I had to create.

Before I advanced with the extension of the VMDK file I connected to each separate instance and performed “shutdown immediate” command as sysdba.
Then I stopped the listener, dbconsole, isqlplus and once I confirmed that no oracle related processes were present on the system I performed a shutdown “shutdown -h now”.

In order to extend an existing hard drive attached to a virtual machine you have to make sure no snapshots of the virtual machine are present. I know that this is quite uncomfortable considering the risky operation that you are about to perform but there is a work around. (The work around is not in this post, so please let me know if you are interested or simply search for it. There is a good chance that I will have an article concerning that topic)

Read more…