If you are trying to install the Oracle Secure Backup Cloud Module for Amazon S3 on your Oracle 10g database, one thing you’ll notice right away is that you need version 1.5 or higher of the JDK. Oracle 10g ships with java 1.4, so here is what we did to get this installed
Running the installer with JDK version 1.4
If you didn’t read the requirements from Oracle and just tried to download and run the installer, you’ll notice fairly quickly that this isn’t going to work. The actual values for the -AWSID and -AWSKEY options can be found from the Amazon S3 Security Credentials page, and you’ll want to supply your OTN/Metalink login and password.
$ORACLE_HOME/jdk/bin/java -jar /opt/oracle/admin/ows/osbws_install.jar -AWSID YOURASWSIDHERE -AWSKEY YOURAWSKEYHERE -otnUser email@example.com -otnPass yourpassword -walletDir $ORACLE_HOME/dbs/osbws_wallet -libDir $ORACLE_HOME/lib Exception in thread "main" java.lang.UnsupportedClassVersionError: oracle/osbws/install/ConfigSetup (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
A quick check and we see that the version of java that ships with Oracle 10g is insufficient.
$ORACLE_HOME/jdk/bin/java -version java version "1.4.2_14" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_14-b05) Java HotSpot(TM) Client VM (build 1.4.2_14-b05, mixed mode)
Downloading JDK version 1.5
You’ll want to grab a version 1.5 of java in order to install the Oracle Secure Backup Cloud Module for Amazon S3. What I did was I went to Metalink and downloaded patch 9477224, although there are probably other ways to download a stand-alone version of java 1.5. You don’t actually need to install java 1.5 into your 10g ORACLE_HOME. In fact, Oracle says in the patch notes that you should stick with the same major version of java in your 10g ORACLE_HOME (version 1.4). What I did was just unzip the patch into a temporary directory and run the self-extracting executables.
unzip p9477224_150_Linux-x86-64.zip ./jdkfb-1_5_0_30-linux-amd64.bin ./jrefb-1_5_0_30-linux-amd64.bin
Running the installer with JDK version 1.5
Now that we have java 1.5 extracted, we can run the installer from this temporary directory. The installer will create a couple files based on the environment you’ve sources (your ORACLE_HOME and ORACLE_SID environment variables). This stand-alone version of java is not needed after the installer runs and you can blow it away if you want to.
./jdk1.5.0_30/bin/java -jar /opt/oracle/admin/ows/osbws_install.jar -AWSID YOURASWSIDHERE -AWSKEY YOURAWSKEYHERE -otnUser firstname.lastname@example.org -otnPass yourpassword -walletDir $ORACLE_HOME/dbs/osbws_wallet -libDir $ORACLE_HOME/lib Oracle Secure Backup Database Web-Service Install Tool, build 2011-02-04.0001 AWS credentials are valid. S3 user already registered. Registration ID: [some-registration-id] S3 Logging Bucket: oracle-log-[your_aws_login]-1 Validating log bucket location ... Validating license file ... Create credential oracle.security.client.connect_string1 OSB web-services wallet created in directory /opt/oracle/product/10.2.0/db_1/dbs/osbws_wallet. OSB web-services initialization file /opt/oracle/product/10.2.0/db_1/dbs/osbwsorcl.ora created. Downloading OSB Web Services Software Library from file osbws_linux64.zip. Downloaded 16350454 bytes in 1 seconds. Transfer rate was 16350454 bytes/second. Download complete. Extracted file /opt/oracle/product/10.2.0/db_1/lib/libosbws11.so
Backing up to S3
You’ll notice it creates a directory for the wallet, an initialization file and a shared object. You’ll use the path to the initialization file it created, as well as the path to the shared object it extracted, to configure RMAN backups to S3 for this particular database. There’s no difference at this point between a 10g and 11g database in terms of configuring RMAN to backup to the cloud.
rman target / RMAN> configure channel device type 'SBT_TAPE' parms='ENV=(OSB_WS_PFILE=/opt/oracle/product/10.2.0/db_1/dbs/osbwsorcl.ora), SBT_LIBRARY=/opt/oracle/product/10.2.0/db_1/lib/libosbws11.so';
That’s all there is to it. At this point you can run a test backup.
RMAN> backup device type sbt spfile;
If you poke around, you’ll notice the contents of the initialization file will look something like this.
$ cat /opt/oracle/product/10.2.0/db_1/dbs/osbwsorcl.ora OSB_WS_HOST=s3.amazonaws.com OSB_WS_LICENSE_ID=[some-license-id] OSB_WS_WALLET='location=file:/opt/oracle/product/10.2.0/db_1/dbs/osbws_wallet CREDENTIAL_ALIAS=[your_aws_login]'
There are a few other parameters you can set in this initialization file, although they don’t seem to be well documented (a google search for “OSB_WS_BUCKET” at the time of writing this blog returns zero results). You can see those parameters by strings-ing the shared object. I’ve listed the non-underscore parameters here. We’ve used the OSB_WS_BUCKET parameter in particular to change the default location of where backups are sent to, but that’s a topic for another time.
OSB_WS_PFILE OSB_WS_HOST OSB_WS_PROXY OSB_WS_BUCKET OSB_WS_LOCATION OSB_WS_CHUNK_SIZE OSB_WS_LICENSE_ID OSB_WS_LICENSE_MAX_SESSIONS OSB_WS_WALLET
This process was tested on both the Standard Edition and Enterprise Edition of Oracle 10g. Dallas Willett Datavail – Remote DBA Services
EPM applications help measure the business performance. This post will help you choose the best EPM solutions for your organization’s needs and objectives.
Imagine there are over one hundred logins in the source server and you need to migrate them all over to the destination server. Wouldn’t it be awesome if we could automate the process by generating the scripts for the required tasks?