How to Change Timezone of Oracle VM Server 3.2

If you want to change the timezone of your Oracle VM Server and – like me – are a little bit puzzled by how to do it then take a peek at this Article by Redhat which tells you exactly what you need to know and do. Its written with Redhat Linux in mind but as Oracle VM is pretty much a Redhat Linux server you’ll find that the instructions work. Well, i’ll qualify that, applied the instructions to an installation of Oracle VM Server 3.2.7. Others should work though.

You can find the link here.

Best of luck,

Seamus.

Free Upgrade to OS X Mavericks

Here’s a new one from Apple. A Free upgrade OS X Mavericks provided your on Snow Leopard or higher and your hardware is up to scratch (more details on that can be found at the link at the bottom of this article) . I’d managed to avoid to relatively inexpensive upgrades to Lion and Mountain Lion but now, well, a free upgrade was to good to miss.

The good is news is that the upgrade worked first time and Mavericks has, so far, been pretty stable.

You can find the instructions and other info at https://www.apple.com/uk/osx/how-to-upgrade/

 

Good luck with your upgrade!

Seamus

Oracle VM 3.2.2 Server Loses Default Route After Reboot

If, like me, you’ve spent a great deal of time getting your shiny new Oracle VM cluster set up only to find that after rebooting one or more of the cluster members, networking no longer works for that member server then read on… for a potential solution..

In my case it looked like the default route had gone walkabout. I couldn’t ping anything except the ip address assigned to the ac180800 interface (an Ethernet bridge, apparently).

I’ll be honest with you. I’m not a Linux network expert. So, I had a poke around and gave the following a go:

route delete default
route add default gw xxx.xxx.xxx.xxx ac180800

Much to my surprise networking came back to life. So I added the two lines to the end of my rc.local file. Rebooted again and it worked! I tried various combinations of editing files in /etc/sysconfig but got nowhere. Anyway, this works for me. For now at least. Going to hit metalink (or MOS) and look for an official fix for Oracle VM loses default route after a reboot when I get back to work tomorrow.

Encrypt and decrypt with the Java 6 Crypto API ~ javax.crypto

Here’s bit of Java code which uses the Java 6 Crypto API classes and functions to encrypt and decrypt a string. The code encrypts a string using AES, decrypts it again and then displays the plaintext, the cipher text and the decrypted text.

Can’t guarantee the code is ‘correct’ but it seems to do what it says on the tin.

 

import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
public class myFirstEncryptionCode {

     public static void main(String[] args) {

          String plainText = "This is a plaintext message. You should be able to read this.";

          try {
               // Encrypt ze plaintext..
               SecretKey mySecretKey = KeyGenerator.getInstance("AES").generateKey();
               Cipher myCypherOut = Cipher.getInstance("AES");
               myCypherOut.init(Cipher.ENCRYPT_MODE, mySecretKey);
               byte[] cipherText = myCypherOut.doFinal(plainText.getBytes());

              // And Now Decrypt ze plaintext
              Cipher myCypherIn = Cipher.getInstance("AES");
              myCypherIn.init(Cipher.DECRYPT_MODE, mySecretKey);
              String decryptText = new String(myCypherIn.doFinal(cipherText);

              // Display the plaintext, cipher text et al.
              System.out.println("PlainText: " + plainText);
              System.out.println("Encrypted Text: " + new String(cipherText, "UTF-8"));
              System.out.println("Decrypted Text: " + decryptText);
          } catch (Exception ex1)
          {
              System.out.print(ex1.toString());
          }
     }
}

3DS Will Not Power on even though it is charged — how to fix it (maybe)

My 3DS wouldn’t power on this morning. I hadn’t used it for a week. I guess the battery was as flat as a pancake. After charging the 3DS for an hour it still wouldn’t power on (it was still plugged into the mains and charging as far as I could tell).

Hmm. That’s a bit weird I thought. In a fit of desperation/pique I removed the game card (Mario Kart 7) and I removed the SD Card too. I immediately tried to power on the 3DS and bingo it came on first time. I powered it down again, put the SD card and game card back in and bingo, it powered up again.

Phew.

 

Seamus

The Bears Breeches

 

 

Fix Database Won’t start due to invalid parameter in spfile.

Hmmm. Database Won’t start due to invalid parameter in spfile.. hmm..

This is a quote from appsdba.comWhen using an SPFILE it is possible to get into the situation where the database won’t start due to an invalid parameter, and since the database won’t start it is not possible to fix the SPFILE.

I got into this situation this morning. Its very very frustrating but relatively straightforward to fix. Here goes.

Step 0: Check for a pfile equivalent of your spfile! If it exists then start the database using startup pfile=/path/to/pfile and issue a create spfile from pfile when the database starts and then restart your database. Bingo. Amend your spfile parameters at your leisure. If you haven’t got a pfile then read on..

Step 1: find your spfile. If you don’t know where this is you’re goose is already cooked. It usually lives in $ORACLE_HOME/dbs and is called spfile<ORACLE_SID>.ora though yours may have a different name. In my case the ORACLE_SID is TEST so my spfile is called spfileTEST.ora. 

Step 2: Back up your spfile (and pfiles too).

Step 3: Open a command prompt, navigate to the directory containing your spfile and type strings spfile_name > $ORACLE_HOME/dbs/temp_pfile.ora (this creates a pfile not an spfile!!). If the spfile file is in $ORACLE_HOME/dbs then rename the spfile to something you’ll remember…  IF the spfile is stored within ASM then login as the ASM owner, start asmcmd and use the cp command to copy the file to a directory your database/instance owner can read and run strings /path/to/spfile/spfile_name > $ORACLE_HOME/dbs/temp_pfile.ora.

Step 4: open temp_pfile.ora with a text editor and check its parameters. Tidy up incomplete entries and amend offending entries where appropriate. (I’d accidentally reduced one of the memory parameters from 24G to 2G preventing the instance from starting up).

Step 5: try starting up the database.. startup pfile=/path/to/file/temp_pfile.ora should do the trick. If the instance starts shut it down immediately (shutdown immediate should do the trick). If the instance doesn’t start then check your parameters and try again!

Step 6: rename temp_pfile.ora to init<ORACLE_SID>.ora. Mine is called initTEST.ora.

Step 7: startup the database again. once its started type create spfile from pfile and press enter.

Step 8: Restart the database. Your database should now start up but this time its using the newly created spfile.

Step 9: Take applause from your colleagues and count your lucky stars.

 

This document was typed rather hastily on a train on my way home. If you spot a mistake please let me know.

 

Enjoy,

Seamus

 

 

TSM client tuning (Tune your TSM Client)

If you’re TSM backups are taking an age to complete and you want to try to do something about this then read on. It is possible to Tune your TSM client. This little piece won’t go into the ins and outs of tuning the TSM client. Rather, I’ll give the before tuning stats, the post tuning stats and the changes to the dsm.sys file I made to do this. BTW, these optimizations are for TSM Client 6.2.1.0 on Redhat Enterprise Linux 5.8 and i’m backing up a compressed RMAN backup of an Oracle database that is about 100GB in size.

The ‘before’ position.

SErvername        TSM_SERVER1
COMMMethod        TCPip
TCPPort           1500
TCPServeraddress  192.168.1.1
Passwordaccess    generate
TCPNodelay        YES
TCPBuffsize       32
TCPWindowsize     64
TXNByteLimit      25600
Nodename          NODE1
InclExcl          /opt/tivoli/tsm/client/ba/bin/inclexcl.list

 

This was pretty much the default dsm.sys bar the node name and server name. The summary from dsmc incr was..

Total number of objects inspected: 3,600,655
Total number of objects backed up:    6,243
Total number of objects updated:          1
Total number of objects rebound:          0
Total number of objects deleted:          0
Total number of objects expired:         85
Total number of objects failed:           3
Total number of bytes inspected:     374.40 GB
Total number of bytes transferred:   94.03 GB
Data transfer time:                21,723.66 sec
Network data transfer rate:        4,538.74 KB/sec
Aggregate data transfer rate:      4,113.49 KB/sec
Objects compressed by:                    0%
Total data reduction ratio:           74.89%
Elapsed processing time:           06:39:29
xx/xx/12 03:39:33 TSM incremental backup ended

 

The average elapsed processing time for my backups was about 7 hours. Thats a long time. Compare that to the ‘after’ position.

The ‘after Position’

I made a couple of changes to my dsm.sys file:

 

SErvername        TSM_SERVER1
COMMMethod        TCPip
TCPPort           1500
TCPServeraddress  192.168.1.1
Passwordaccess    generate
TCPNodelay        YES
TCPBuffsize       32
TCPWindowsize     256
TXNByteLimit      25600
Nodename          NODE1
InclExcl          /opt/tivoli/tsm/client/ba/bin/inclexcl.list
MEMORYEFFICIENTBACKUP No
RESOURceutilization 10

 

I’ve highlighted the changes with bold type. Now the dsmc incr summary looks like:

Total number of objects inspected: 3,869,826
Total number of objects backed up:    6,253
Total number of objects updated:          0
Total number of objects rebound:          0
Total number of objects deleted:          0
Total number of objects expired:        278
Total number of objects failed:          11
Total number of bytes inspected:     320.06 GB
Total number of bytes transferred:   100.27 GB
Data transfer time:                66,562.14 sec
Network data transfer rate:        1,579.60 KB/sec
Aggregate data transfer rate:      10,010.40 KB/sec
Objects compressed by:                    0%
Total data reduction ratio:           68.68%
Elapsed processing time:           02:55:03
xx/xx/12 23:55:06 TSM incremental backup ended

 

The average elapsed processing time has dropped from an average of about 7 hours to an average of about 3. Maths isn’t my strong point so I’ll leave it to someone better at maths than me to work out the time saving. For me the average Aggregate data transfer rate has risen from around 4000 KB/sec to around 10,000 KB/sec.

Please leave a comment if you found this useful. Or even better, link to me.

Regards,

Seamus.

 

Redhat Virtualization, its installation and the pesky “ERROR Host does not support any virtualization options” error message fix

If you’re setting up a Redhat server as a virtualization host running KVM and you’re following Redhat’s instructions’s as per Redhat’s  Red Hat Enterprise Linux 5 Virtualization Guide Edition 5.8 then there’s something you must do between installing the required packages (see Sections 6.3 and 6.4)…

I found that if I took an existing RHEL 5.8 installation and installed the necessary packages detailed in section 6.4 then virt-manager would fail with the error message “ERROR Host does not support any virtualization options“. Strange as my server had virtualisation extensions enabled in the bios.

 

The answer was to reboot the server. its seemed that /dev/kvm was missing and on reboot it is  miraculously created.

After the reboot I could create VMs to my heart’s content.

 

Thought you might like to know,

Seamus

How I installed the Flash Plugin with Centos 6.3

Maybe it was a little naive of me to expect my newly-installed CentOS installation to have the Adobe Flash plugin installed by default… After a little scratching of heed It turned out to be easier to do than I thought it would be.

Here’s how I did it:

 

  • Fired up Firefox and headed over to http://get.adobe.com/flashplayer/
  • From the Select version to download drop-down box I selected .rpm for other Linux and clicked  on Download Now.
  • You’ll be prompted to save a file called something like adobe-release-x86_64-1.0-1.noarch.rpm.  I saved it in my standard download folder.
  • Start a Terminal session (I used Konsole) and, if you’re not logged in as root, type su – root and press enter.
  • Change your current directory your Downloads directory (cd Downloads and press enter).
  • type rpm -ivh adobe-release-x86_64-1.0-1.noarch.rpm and press enter.
  • It would seem this doesn’t install the flash plug-in (I could be wrong here but it happened to me…) – it sets up yum with Adobe’s repository settings… so, you need to do the following:
  • type yum list | grep flash and press enter.  You should see a line like flash-plugin.x86_64 11.2.202.236-release @adobe-linux-x86_64 if all is well.
  • Now to install the plug-in proper. Type yum install flash-plugin.x86_64 and press enter.
  • After a few seconds the plug-in will be installed.
  • [Re]Start Firefox.
  • Check the plug-in is working by heading on over to http://www.adobe.com/software/flash/about/

 

Sweet. Bit of a faff on but after this Bob really is your Uncle.

 

Seamus.

How To Change DNS Settings on your Mac

So, why woud you want to know How To Change the DNS Settings on your Mac? If you use wi-fi or even a wired connection chances are DHCP sorts out your DNS settings for you. Well, I’ve been having problems with my Mac and surprise surprise it uses DNS settings supplied by my router which in turn routes me to my ISPs DNS servers for name resolution. After a bit of testing the problem appeared to be my ISP’s Servers that were the problem and so, after rummaging around the world wide web of useful info for advice on what to do, I decided to use Google’s Public DNS Servers instead of my ISPs. Google’s Public Servers are at 8.8.8.8 and 8.8.4.4.

Here’s how I changed my settings:

 

Seamus