Basic Python Object

One of my students wanted a quick example of a Python object with getters and setters. So, I wrote a little example that I’ll share.

You define this file in a physical directory that is in your $PYTHONPATH, like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class Coordinate:
  def __init__ (self, x, y):
    self.x = x
     (more...)

Create a Python Module

Sometime formal programming documentation is less than clear. At least, it’s less than clear until you’ve written your first solution. The Modules section of the Python language is one of those that takes a few moments to digest.

Chapters 22 and 23 in Learning Python gives some additional details but not a clear step-by-step approach to implementing Python modules. This post is designed to present the steps to write, import, and call a Python module. (more...)

Python for loops

It’s always interesting to explain a new programming language to students. Python does presents some challenges to that learning process. I think for loop can be a bit of a challenge until you understand them. Many students are most familiar with the traditional for loop like Java:

for (i = 0; i < 5; i++) { ... }

Python supports three types of for loops – a range for loop, a (more...)

Install cx_Oracle for Python

This shows you how to install the cx_Oracle library for Python 2.7 on Fedora Linux. If Fedora has it on the server you can download it with the following yum command:

yum install -y cx_Oracle-5.2.1-11g-py27-1.x86_64.rpm

Currently, you’ll get the following failure because it’s not available in the Fedora repository:

Loaded plugins: langpacks, refresh-packagekit
mysql-connectors-community                                      | 2.5 kB  00:00:00     
mysql-tools-community                                           | 2.5 kB  00:00:00     
mysql56-community                                               | 2.5  (more...)

Oracle Segment Fails

The instance that I’ve built for my students in a Fedora VM is quite stable except for one feature. The feature is the hibernation process of the base operating system. Sometimes when the base operating system hibernates, it causes the Oracle shared memory segment to fail. When that happens you get the following error:

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process  (more...)

Multitenant Architecture 12c

I thought this illustration was an interesting view of Oracle Database 12c’s Multitenant Architecture. It posted on ToadWorld.com today in a new article by Deiby Gomez and I thought it might be interesting for others.

multitenantarchitecture12c

You can see how to provision a pluggable database in this article on provisioning a pluggable database. As always, I hope it helps.

OpenWorld/JavaOne

Brendan and me at AT&T Park

Brendan and me at AT&T Park

Interesting beginning to OpenWorld/JavaOne yesterday. I had the chance to visit with Brendan Tierney and he gave me a copy of his new Oracle R Enterprise: Harnessing the Power of R in Oracle Database, which I went through quickly last night. It looks well written and I liked the examples.

Brendan also gave me a copy of the group effort on Real World SQL and PL/SQL: Advice from (more...)

Oracle EBS 12.2 & Ruby

As does seem to occur from time-to-time, I’m out there in the weeds again and sorting out a solution that fits a customer’s need. They wanted to know if they could write Oracle EBS 12.2 Concurrent Manager Programs in Ruby. They don’t want to write Java.

I checked the documentation, which as is too common, didn’t answer the question. I’m sure if I downloaded the PDF and searched it for one of the (more...)

DB_LINK w/o tnsnames.ora

A question popped up, which I thought was interesting. How can you create a DB_LINK in Oracle without the DBA changing the tnsnames.ora file? It’s actually quite easy, especially if the DBA sets the TNS address name the same as the instance’s service name or in older databases SID value.

  1. Do the following with the tnsping utility:
    tnsping mohawk

    It should return this when the server’s hostname is mohawk and domain name is techtinker. (more...)

Can’t Display 256 Colors

If you’re reading this post, you most likely are trying to run the Oracle Database 11g or 12c runInstaller program, and it’s failing a critical dependency check and displaying an error like the one below. If so, choose n because if you choose y it won’t launch the Oracle Installer.

Starting Oracle Universal Installer...
 
Checking Temp space: must be greater than 500 MB.   Actual 30824 MB    Passed
Checking swap space: must be greater than  (more...)