Installing Python 2.7 in local directory on Oracle Bare Metal Cloud

I know there will be Linux and Python specialist spitting feathers about this approach. But if you're in need of an up to date python environment then the following approach might be of help.It's worth nothing that this technique will probably work on most Oracle Enterprise Linux or Red Hat Platform releases.

#make localdirectory to install python i.e.
mkdir python

#make sure latest libs needs for python are installed
sudo yum install openssl openssl-devel
sudo yum install zlib-devel

#Download latest source i.e. Python-2.7.13.tgz and uncompress
tar xvfz Python-2.7.13.tgz

cd Python-2.7.13
#configure python for local install 
config --enable-shared --prefix=/home/opc/python --with-libs=/usr/local/lib
make; make install

#python 2.7.13 is now installed but isn't currently being used (2.6 is still the default)

#get pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
#install pip (this will still be installed with 2.6)
sudo python get-pip.py
#install virtualenv
sudo pip install virtualenv
#create a virtualenv using the newly installed python
virtualenv -p /home/opc/python/bin/python myvirtualenv
#activate it
source myvirtualenv/bin/activate
#install packages…
pip install cx_Oracle
Comments

Sharding videos on Youtube

I've uploaded 3 videos on installing and configuring sharding in Oracle Database 12c Release 2. I use Virtual Box running Oracle Linux to create a sharded database and run a swingbench workload against it. In part 3 I then add a new shard online and monitor the database as the data is rebalanced across the cluster. You can see them below but I reccomend running them full screen because there's quite a lot going on.

Part 1






Part 2






Part 3


Comments

Yet another minor update to swingbench 2.6

This release fixes an annoying issue where some smaller dimension tables weren't populated in the TPC-DS benchmark. It also significantly increases the speed that result files are parsed with the "results2pdf" utility. You can download it from here. Let me know if you have any problems
Comments

Minor update to swingbench 2.6

I've just updated swingbench 2.6 (still in Beta). It features a few bug fixes and the following

  • Now ships with Oracle Database 12c Release 2 Drivers
  • A new option to reverse the order in which tables are build by the data generators i.e. small tables first or large tables first.

You can download it at the usual place
Comments

Swingbench 2.6 Beta is now available

To celebrate the release of Oracle Database 12c Release 2, I'm releasing swingbench 2.6 into the wild. New features include
  • New JSON benchmark
  • New TPC-DS Like benchmark
  • New Declarative approach to creating a user defined benchmark
  • New SQL Query Editor to create queriers for the user defined benchmark
  • New chart rendering engine
  • Starting swingbench without a named config file now shows a "Select Benchmark" dialogue
  • Many internal fixes
  • Normal stats collection estimates percentiles
  • The stats files also contain tps,cpu and io readings where available.
  • Support for remote connectivity to Oracle Cloud in connection dialogues
  • New "SBUtil" (Swingbench Utility) to validate benchmarks and scale them up (SH and OE Only at present)
  • New "results2pdf" utility to convert results files into pdfs
NOTE : Java 8 is now the only supported VM You can download it here

SwingBench 2.6
Comments

Video on SQLBuilder for swingbench 2.6

I've posted a video showing the new SQLBuilder functionality of swingbench 2.6 to YouTube. You can check it out here



I'll be uploading the code shortly to the usual place.
Comments

Video on the new features of swingbench 2.6

I've posted a video showing some of the new features of swingbench 2.6 to YouTube. You can check it out here




I'll be uploading the code shortly to the usual place.
Comments

Changing the size of redo logs in python

I create a lot of small databases to do testing on. The trouble is that I often need to change the size of redo log files when I'm testing large transaction workloads or loading a lot of data. Now there are lots of better ways to do whats shown in the code below but this approach gave me the chance to keep brushing up my python skills and use the might cx_oracle driver. The following should never be considered anything but a nasty hack but it does save me a little bit of time i.e. don't use this on anything but a test database… Clearly the sensible way to do this is to write my own scripts to build databases.

The following code works it's way through the redo log files drops one thats inactive and then simply recreates it. It finished when it's set all of the redo to the right size.

Running the script is simply a case of running it with the parameters shown below

python ChangeRedoSize -u sys -p welcome1 -cs myserver/orclcdb --size 300

Note : the user is the sysdba of the container database if you are using the multitenant arhcitecture and the size is in Mega Bytes.

You should then see something similar to the following



Current Redo Log configuration
+-----------+------------+--------------+-----------+---------------+----------+
| Group No. | Thread No. | Sequence No. | Size (MB) | No of Members |  Status  |
+-----------+------------+--------------+-----------+---------------+----------+
|     1     |     1      |     446      | 524288000 |       1       | INACTIVE |
|     2     |     1      |     448      | 524288000 |       1       | CURRENT  |
|     3     |     1      |     447      | 524288000 |       1       |  ACTIVE  |
+-----------+------------+--------------+-----------+---------------+----------+
alter system switch logfile
alter system switch logfile
alter database drop logfile group 2
alter database add logfile group 2 size 314572800
alter system switch logfile
alter database drop logfile group 1
alter database add logfile group 1 size 314572800
alter system switch logfile
alter system switch logfile
alter system switch logfile
alter system switch logfile
alter database drop logfile group 3
alter database add logfile group 3 size 314572800
alter system switch logfile
All logs correctly sized. Finishing...
New Redo Log configuration
+-----------+------------+--------------+-----------+---------------+----------+
| Group No. | Thread No. | Sequence No. | Size (MB) | No of Members |  Status  |
+-----------+------------+--------------+-----------+---------------+----------+
|     1     |     1      |     455      | 314572800 |       1       |  ACTIVE  |
|     2     |     1      |     454      | 314572800 |       1       | INACTIVE |
|     3     |     1      |     456      | 314572800 |       1       | CURRENT  |
+-----------+------------+--------------+-----------+---------------+----------+
Comments