Feed aggregator

Unbreakable Linux Network APIs available

Wim Coekaerts - Tue, 2014-05-13 15:37
Aside from the uln_channel tool that we recently released, we are now also supporting a number of webservices on ULN. A handful of useful APIs are available. Below is a little simple python example that works out of the box on Oracle Linux 6 (when you have an account on ULN) and a description of the currently available APIs. Note that the python code is very simplistic... I know no exception handling, wasn't the point ;)...

Additionally, the ULN integration with Spacewalk uses these APIs as well. See here

APIs :

client.auth.login(username,password) returns sessionKey 
client.errata.listCves(sessionKey, advisory) returns cveList
client.errata.applicableToChannels(sessionKey, advisory) returns channelList
client.channel.software.listLatestPackages(sessionKey, channelLabel) returns packageList
client.channel.software.listErrata(sessionKey, channelLabel) returns errataList
client.packages.listProvidingErrata(sessionKey, pid) returns errataList
client.channel.listSoftwareChannels(sessionKey) returns channelList
client.channel.software.listAllPackages(sessionKey, channelLabel) returns packageList
client.errata.listPackages(sessionKey, advisory) returns packageList
client.errata.getDetails(sessionKey, advisory) returns errataDetail
client.channel.software.getDetails(sessionKey, channelLabel) returns channelDetail
client.packages.getDetails(sessionKey, pid) returns packageDetail
client.auth.logout(sessionKey) returns retval

sample output of the code :

$ ./sample.py
Login : client.auth.login(username,password) returns sessionKey
Logged in...

List CVEs for a particular advisory : client.errata.listCves(sessionKey, advisory) returns cveList
Example : CVEs for advisory 'ELSA-2013-1100' : ['CVE-2013-2231']

List channels applicable to advisory : client.errata.applicableToChannels(sessionKey, advisory) returns channelList
Example : Channels applicable to advisory 'ELSA-2013-1100' : [{'channel_name': 'Oracle Linux 6 Latest (i386)', 'channel_label': 'ol6_i386_latest', 'parent_channel_id': ' ', 'channel_id': 941}, {'channel_name': 'Oracle Linux 6 Latest (x86_64)', 'channel_label': 'ol6_x86_64_latest', 'parent_channel_id': ' ', 'channel_id': 944}, {'channel_name': 'Oracle Linux 6 Update 4 Patch (i386)', 'channel_label': 'ol6_u4_i386_patch', 'parent_channel_id': ' ', 'channel_id': 1642}, {'channel_name': 'Oracle Linux 6 Update 4 Patch (x86_64)', 'channel_label': 'ol6_u4_x86_64_patch', 'parent_channel_id': ' ', 'channel_id': 1644}]

List latest packages in a given channel : client.channel.software.listLatestPackages(sessionKey, channelLabel) returns packageList
Example : Packages for channel 'ol6_x86_64_latest' returns 6801 packages

List errata in a given channel : client.channel.software.listErrata(sessionKey, channelLabel) returns errataList
Example : Errata in channel 'ol6_x86_64_latest' returns 1403 errata

List errata for a given package : client.packages.listProvidingErrata(sessionKey, pid) returns errataList
Example :
[{'errata_update_date': '2011-06-08 00:00:00', 'errata_advisory_type': 'Security Advisory', 'errata_synopsis': 'subversion security update', 'errata_advisory': 'ELSA-2011-0862', 'errata_last_modified_date': '2011-06-08 00:00:00', 'errata_issue_date': '2011-06-08 00:00:00'}]

List software channels available : client.channel.listSoftwareChannels(sessionKey) returns channelList
Example : List of channels returns '253' channels

List all packages for a given channel : client.channel.software.listAllPackages(sessionKey, channelLabel) returns packageList
Example : All packages for channel 'ol6_x86_64_latest' returns 25310 packages

List packages for a given advisory : client.errata.listPackages(sessionKey, advisory) returns packageList
Example : Packages for advisory 'ELSA-2013-1100' returns 12 packages

Details for a specific advisory : client.errata.getDetails(sessionKey, advisory) returns errataDetail
Example :
{'errata_update_date': '7/22/13', 'errata_topic': ' ', 'errata_type': 'Security Advisory', 'errata_severity': 'Important', 'errata_notes': ' ', 'errata_synopsis': 'qemu-kvm security update', 'errata_references': ' ', 'errata_last_modified_date': '2013-07-22 00:00:00', 'errata_issue_date': '7/22/13', 'errata_description': '[qemu-kvm-]\n- kvm-qga-cast-to-int-for-DWORD-type.patch [bz#980758]\n- kvm-qga-remove-undefined-behavior-in-ga_install_service.patch [bz#980758]\n- kvm-qga-diagnostic-output-should-go-to-stderr.patch [bz#980758]\n- kvm-qa_install_service-nest-error-paths-more-idiomatically.patch [bz#980758]\n- kvm-qga-escape-cmdline-args-when-registering-win32-service.patch [bz#980758]\n- Resolves: bz#980758\n (qemu-kvm: CVE-2013-2231 qemu: qemu-ga win32 service unquoted search path [rhel-6.4.z])'}

Details for a given channel : client.channel.software.getDetails(sessionKey, channelLabel) returns channelDetail
Example :
{'channel_description': 'All packages released for Oracle Linux 6 (x86_64), including the very latest updated packages', 'channel_summary': 'Oracle Linux 6 Latest (x86_64)', 'channel_arch_name': 'x86_64', 'metadata_urls': {'group': [{'url': 'https://uln-qa.oracle.com/XMLRPC/GET-REQ/ol6_x86_64_latest/repodata/comps.xml', 'checksum': '08ec74da7552f56814bc7f94d60e6d1c3d8d9ff9', 'checksum_type': 'sha', 'file_name': 'repodata/comps.xml'}], 'filelists': [{'url': 'https://uln-qa.oracle.com/XMLRPC/GET-REQ/ol6_x86_64_latest/repodata/filelists.xml.gz', 'checksum': '2fb7fe60c7ee4dc948bbc083c18ab065384e990f', 'checksum_type': 'sha', 'file_name': 'repodata/filelists.xml.gz'}], 'updateinfo': [{'url': 'https://uln-qa.oracle.com/XMLRPC/GET-REQ/ol6_x86_64_latest/repodata/updateinfo.xml.gz', 'checksum': '15b889640ad35067d99b15973bb71aa1dc33ab00', 'checksum_type': 'sha', 'file_name': 'repodata/updateinfo.xml.gz'}], 'primary': [{'url': 'https://uln-qa.oracle.com/XMLRPC/GET-REQ/ol6_x86_64_latest/repodata/primary.xml.gz', 'checksum': '21f7115120c03a9dbaf25c6e1e9e3d6288bf664f', 'checksum_type': 'sha', 'file_name': 'repodata/primary.xml.gz'}], 'repomd': [{'url': 'https://uln-qa.oracle.com/XMLRPC/GET-REQ/ol6_x86_64_latest/repodata/repomd.xml', 'file_name': 'repodata/repomd.xml'}], 'other': [{'url': 'https://uln-qa.oracle.com/XMLRPC/GET-REQ/ol6_x86_64_latest/repodata/other.xml.gz', 'checksum': '30a176c8509677b588863bf21d7b196941e866af', 'checksum_type': 'sha', 'file_name': 'repodata/other.xml.gz'}]}}

Details for a given package : client.packages.getDetails(sessionKey, pid) returns packageDetail
Example :
{'package_size': 5855337, 'package_arch_label': 'i686', 'package_cookie': '1307566435', 'package_md5sum': 'e74525b5bbaa9e637fe818f3f5777c02', 'package_name': 'subversion', 'package_summary': 'A Modern Concurrent Version Control System', 'package_epoch': ' ', 'package_checksums': [{'md5': 'e74525b5bbaa9e637fe818f3f5777c02'}], 'package_payload_size': 5857988, 'package_version': '1.6.11', 'package_license': 'ASL 1.1', 'package_vendor': 'Oracle America', 'package_release': '2.el6_1.4', 'package_last_modified_date': '2011-06-08 15:53:55', 'package_description': 'Subversion is a concurrent version control system which enables one\nor more users to collaborate in developing and maintaining a\nhierarchy of files and directories while keeping a history of all\nchanges. Subversion only stores the differences between versions,\ninstead of every complete file. Subversion is intended to be a\ncompelling replacement for CVS.', 'package_id': 2814035, 'providing_channels': ['ol6_x86_64_latest'], 'package_build_host': 'ca-build44.us.oracle.com', 'package_build_date': '2011-06-08 15:53:55', 'download_urls': ['https://uln-qa.oracle.com/XMLRPC/GET-REQ/ol6_x86_64_latest/subversion-1.6.11-2.el6_1.4.src.rpm'], 'package_file': 'subversion-1.6.11-2.el6_1.4.src.rpm'}

Logout : client.auth.logout(sessionKey) returns retval
Logged out...

Sample code :

#!/usr/bin/env python
    import os
    import sys
    import getpass
    import datetime
    import xmlrpclib

except ImportError, e:
    raise ImportError (str(e) + ': Module  not found')

SERVER_URL = 'https://linux-update.oracle.com/rpc/api'

USERNAME = 'myusername@company.com'
PASSWORD = 'mypassword'

client = xmlrpclib.Server(SERVER_URL)

# login
print "Login : client.auth.login(username,password) returns sessionKey "
sessionKey = client.auth.login(USERNAME,PASSWORD)
if len(sessionKey) != 43:
   print "Invalid %d sessionKey : '%s'" % sessionKey

print "Logged in..."

print ""
print ""
print ""

# list CVEs for an advisory
print "List CVEs for a particular advisory : client.errata.listCves(sessionKey, advisory)\
 returns cveList"
advisory = "ELSA-2013-1100"
cveList = client.errata.listCves(sessionKey, advisory)
print "Example : CVEs for advisory '%s' : %s" % (advisory, cveList)

print ""
print ""
print ""

# list channels for CVE
print "List channels applicable to advisory : \
client.errata.applicableToChannels(sessionKey, advisory) returns channelList"
channelList = client.errata.applicableToChannels(sessionKey, advisory)
print "Example : Channels applicable to advisory '%s' : %s" % (advisory, channelList)

print ""
print ""
print ""

# list latest packages in a channel
print "List latest packages in a given channel : \
client.channel.software.listLatestPackages(sessionKey, channelLabel) returns\
channelLabel= 'ol6_x86_64_latest'
packageList = client.channel.software.listLatestPackages(sessionKey, channelLabel)
print "Example : Packages for channel '%s' returns %d packages" %(channelLabel, 

print ""
print ""
print ""

# list errata in a channel
print "List errata in a given channel : \
client.channel.software.listErrata(sessionKey, channelLabel) returns errataList"
errataList = client.channel.software.listErrata(sessionKey, channelLabel)
print "Example : Errata in channel '%s' returns %d errata" %(channelLabel, len(errataList))

print ""
print ""
print ""

# list errata for a package with a specific id
print "List errata for a given package : client.packages.listProvidingErrata(sessionKey,
 pid) returns errataList"
pid = '2814035'
errataList = client.packages.listProvidingErrata(sessionKey, pid)
print "Example : \n%s\n" % errataList

print ""
print ""
print ""

# list software channels
print "List software channels available : client.channel.listSoftwareChannels(sessionKey)\
 returns channelList"
channelList = client.channel.listSoftwareChannels(sessionKey)
print "Example : List of channels returns '%d' channels" %(len(channelList))

print ""
print ""
print ""

# list all packages of a channel
print "List all packages for a given channel : \
client.channel.software.listAllPackages(sessionKey, channelLabel) returns packageList"
packageList = client.channel.software.listAllPackages(sessionKey, channelLabel)
print "Example : All packages for channel '%s' returns %d packages" %(channelLabel, 

print ""
print ""
print ""

# list packages for an errata
print "List packages for a given advisory : client.errata.listPackages(sessionKey,
 advisory) returns packageList"
packageList = client.errata.listPackages(sessionKey, advisory)
print "Example : Packages for advisory '%s' returns %d packages" %(advisory, 

print ""
print ""
print ""

# get errata details
print "Details for a specific advisory  : \
client.errata.getDetails(sessionKey, advisory) returns errataDetail"
errataDetail = client.errata.getDetails(sessionKey, advisory)
print "Example : \n%s\n" %errataDetail

print ""
print ""
print ""

# get channel details
print "Details for a given channel : \
client.channel.software.getDetails(sessionKey, channelLabel) returns channelDetail"
channelDetail = client.channel.software.getDetails(sessionKey, channelLabel)
print "Example : \n%s\n" % channelDetail

print ""
print ""
print ""

# get package details from package with an id
print "Details for a given package : client.packages.getDetails(sessionKey, pid) \
returns packageDetail"
packageDetail = client.packages.getDetails(sessionKey, pid)
print "Example : \n%s\n" % packageDetail

print ""
print ""
print ""

print "Logout : client.auth.logout(sessionKey) returns retval"
retval = client.auth.logout(sessionKey)
if retval == 1:
  print "Logged out..."
  print "Failed to log out..."

Channel subscription from command-line support added to the Unbreakable Linux Network(ULN)

Wim Coekaerts - Tue, 2014-05-13 12:41
Until recently, to add channels to a server or to register a server as a yum-repository server, one had to log into ULN and manually do this. First a server had to be tagged as a yum server and then any channels that would be included, would have to be added to this server. While this is an easy task, it does involve logging into the website, and manually following a few steps and it could not be automated.

We provided an updated rhn-setup RPM that now adds a new tool called uln-channel which allows users with ULN access to enable a server as a yum server and also add/remove/list channels for this server. This will allow for easy automation.

The latest version of the rhn-setup rpm is rhn-setup- The uln-channel rpm is currently only supported with Oracle Linux version 6.

# uln-channel -h
Usage: uln-channel [options]

  -c CHANNEL, --channel=CHANNEL
                        name of channel you want to (un)subscribe
  -a, --add             subscribe to channel
  -r, --remove          unsubscribe from channel
  -l, --list            list channels
  -b, --base            show base channel of a system
  -L, --available-channels
                        list all available child channels
  -v, --verbose         verbose output
  -u USER, --user=USER  your user name
  -p PASSWORD, --password=PASSWORD
                        your password
  --enable-yum-server   enable yum server setting
  --disable-yum-server  disable yum server setting
  -h, --help            show this help message and exit

# uln-channel --list
Username: wim@company.com

# uln-channel --base
Username: wim@company.com

# uln-channel --enable-yum-server
Username: wim@company.com

# uln-channel --disable-yum-server
Username: wim@company.com

# uln-channel --available-channels
Username: wim@company.com

# uln-channel --add --channel=ol6_x86_64_oracle
Username: wim@company.com

# uln-channel --list
Username: wim@company.com

OpenStack for Oracle Linux and Oracle VM

Wim Coekaerts - Tue, 2014-05-13 12:32
We just made an announcement today about support for OpenStack with Oracle Linux and Oracle VM. The press release can be found here.

America’s Cup Boat Installation Time Lapse Video

David Haimes - Tue, 2014-05-13 08:55

On Friday I realized the America’s Cup yacht was going to be installed at Oracle HQ over the weekend so I went home and got my GoPro camera and set it up to take a picture every 30 seconds.  For some reason it shut off on Saturday morning, when the helicopter brought the hull over the building, but I still think the footage came out pretty well.  Take a look and let me know what you think in the comments below.

(Pro Tip: It’s worth popping out the embedded video and going fullscreen to get the full effect)

Categories: APPS Blogs

archive_lag_target Works in SE

Don Seiler - Mon, 2014-05-12 15:34
TL;DR: The archive_lag_target parameter will force log archiving in Standard Edition.

Just a quick note here that I wanted to share since I didn't see anything directly confirming this when I was searching around.

I have an Oracle 11gR2 Standard Edition (SE) database that I'm also maintaining a manual standby for, since Oracle Data Guard is not available in SE. I created a metric extension in EM12c to alert me if the standby is more than 1 hour behind the primary. However since this is a very low-activity database, archive logs were not switching even once an hour. Obviously, I could include a command to force a log switch/archive in the script that I use to push archivelogs to the standby. However we all know that with Data Guard on Enterprise Edition (EE), one would use the archive_lag_target initialization parameter to set the desired maximum standby lag. Oracle enforces this by performing a log switch at most every X seconds, where X is the number specified by the archive_lag_target value. By default this is set to 0, which disables the feature.

I had assumed that archive_lag_target would only work in EE but decided to give it a try and was pleasantly surprised to see that it does work as intended in SE. So I can set archive_lag_target=900 to specify a 15 minute maximum log archiving (it would be more frequent if the database activity warranted an earlier switch).
Categories: DBA Blogs

Middle East North Africa (MENA) OTN Tour - May 26 - June 1

Syed Jaffar - Mon, 2014-05-12 00:53
Middle East North Africa (MENA) OTN Tour, scheduled through May 26 until June 1 in Tunisia, Saudi Arabia and Dubai countries.

More updates about agenda, registration will be published very shortly. Stay tuned.

Americas Cup Winning Boat Arrives at Oracle HQ

David Haimes - Sun, 2014-05-11 22:50

UPDATE: Check out this post for a time lapse video of the boat being installed over the weekend.

On May 20th 2008, I arrived at work and was surprised to see an Americas cup yacht as I looked out from my office window and posted pictures to this blog.  This weekend, almost 6 years later to the day, we had a new boat arrive to live on the lake and this time I was ready because preparations have been going on for a while.  I popped into the office on Saturday to see how it was looking and it was looking, well it was looking very big.  These multi hulled machines are amazing pieces engineering and seeing one so close is pretty cool.  Take a look below at the old boat and the new one viewed from the same office and you will get an idea of the difference in size.  More pictures to come soon…







Categories: APPS Blogs

Announcing the ORCLAPEX NOVA Meetup Group

Scott Spendolini - Thu, 2014-05-08 12:41

Following in the footsteps of a few others, I’m happy to announce the formation and initial meeting of the ORCLAPEX NOVA (Northern Virginia) group!  

As Dan McGhan and Doug Gault have mentioned in their blogs, a bunch of us who are regular APEX users are trying to continue to grow the community by providing in-person meetings where we can meet other APEX developers and trade stories, tips and anything else.  Each of the groups is independently run by the local organizers, so the formats and topics will vary from group to group, but the core content will always be focused around Oracle APEX. Groups will also be vendor-neutral, meaning that the core purpose of the group is to provide education and facilitate the sharing of APEX-related ideas, not to market services of products.

Right now, there are a number of groups already formed across the world: 

I’m happy to announce that the first meeting of the ORCLAPEX NOVA group will be Thursday, May 29th, 2014 at Oracle’s Reston office in Reston, VA at 7:00 PM.  Details about the event can be found here.  We will start the group with a bang, as Mike Hichwa, VP of Database Development at Oracle, will be presenting APEX 5.0 New Features for the bulk of the meeting.  You can guarantee that we’ll get to see the latest and greatest features being prepared for the upcoming APEX 5.0 release.  Here’s the rest of the agenda:

 7:00 PM Pizza & Sodas; informal chats 

 7:15 PM Welcome - Scott Spendolini, Enkitec 

 7:30 PM APEX 5.0 - Mike Hichwa, Oracle Corporation 

 9:00 PM Wrap Up & Poll for Next MeetUp

IMPORTANT: In order to attend, you must create a MeetUp.com account, join the group and RSVP.  You will also have to use your real name, as it will be provided to Oracle Security prior to the event, and if you’re not listed, you may not be able to attend.  All communications and announcements will be facilitated via the MeetUp.com site as well.

Also, not all meetings need to be at the Oracle Reston facility; we’re using it because Mike & Shakeeb were able to secure the room for free, and it’s relatively central to Arlington, Fairfax and Loudoun Counties.  Part of what we’ll have to figure out is how many smaller, more local groups we may want to form (i.e. PW County, DC, MD, etc.) and whether or not we should try to keep them loosely associated.  One thought that I had would be for the smaller groups to meet more locally and frequently, and for all of the groups to seek out presenters for an “all hands” type meeting that we can move around the region.  All options are on the table at this point.

I look forward to meeting many of you in person on the 29th!

Oracle Application Express. Fast. Like a Veyron Super Sport.

Joel Kallman - Wed, 2014-05-07 14:18

A partner from the United Kingdom recently asked me for some statistics about apex.oracle.com, as I had authored something similar in a blog post back in 2009.  This gentleman was proposing a magazine article and sought some updated statistics.  Since I compiled this information for him, I reasoned it was worthwhile to also share this same information with the APEX community.

In the past 7 days on apex.oracle.com:

Total Page Views: 4,875,173
Distinct Applications Used: 5,842
Distinct Users: 9,048
Total Number of Workspaces: 20,974
Total Number of Applications: 77,478
New Workspaces Approved: 904

As most people know, apex.oracle.com is the customer evaluation instance, for anyone on the Internet to come and "kick the tires" of Oracle Application Express.

However, what I find even more interesting is the internal instance of Oracle Application Express (apex.oraclecorp.com), hosted inside of Oracle for anyone in the company to come along and build applications, requiring nothing but a browser.  It is run and managed by professionals in Product Development IT.  It's used by virtually every line of business in the company (e.g., HR, Product Development, QA, Sales, Marketing, Real Estate & Facilities, Manufacturing & Distribution, just to name a few).  Instead of merely kicking the tires, these are real applications that the business depends upon, even if some of them are opportunistic applications:

In the past 7 days on apex.oraclecorp.com:

Total Page Views: 2,389,593
Distinct Applications Used: 2,023
Distinct Users: 18,203
Total Number of Workspaces: 2,759
Total Number of Applications: 14,592

And lastly, we have an internal application which is really nothing more than a sophisticated mini data warehouse serving as an employee directory.  Most Oracle employees know it by the name of Aria People.  Tom and others had written this application in lovingly hand-crafted PL/SQL before I even joined Oracle, and we eventually rewrote it in APEX.  As you can imagine, it's used by virtually every employee in the company.  We average 1.4M - 1.5M page views per day.  In reviewing the last 100 days of activity, there was one day (18-MAR-2014) where this application did 3,132,573 page views from 45,767 distinct IP addresses.  The median page rendering time was 0.03 seconds.  In this same application, again looking back across the last 100 days, the busiest hour we had was on 11-MAR-2014, with 171,156 page views in a single hour, from 6,254 distinct IP addresses.  That averages out to 47.543 page views per second.

Oracle Application Express is as scalable as the Oracle Database.  And with some mad Oracle skills, you can scale to great heights.

G+ Public Hangout Fail

Catherine Devlin - Tue, 2014-05-06 22:09
tl;dr:Do not use public Google+ Hangouts under any circumstances, because people suck.

Before the PyCon 2014 CFP came due, PyLadies hosted several G+ hangouts for talk proposal brainstorming. Potential speakers could talk over and flesh out their ideas with each other, producing better talk proposals. More importantly, it was a nice psychological stepping stone on the way to filling out that big, scary CFP form all alone. I thought they went great.

I wanted to emulate them for Postgres Open and PyOhio, which both have CFPs open now. The PyLadies hangouts had used EventBrite to preregister attendees, and I unfortunately did not consider this and the reasons why. Instead, I just scheduled hangouts, made them public, and sent out invitations with the hangout URLs, encouraging people to forward the invites onward. Why make participating any harder than it has to be?

The more worldly of you are already shaking your heads at my naiveté. It turns out that the world's exhibitionists have figured out how to automatically detect and join public hangouts. For several seconds I tried kicking out and banning them as they joined, but new ones kept arriving, faster than one per second. Then I hung up - which unfortunately did not terminate the hangout. It took me frantic minutes to find how to delete a hangout in progress. I dearly hope that no actual tech community members made it to the hangout during that time.

I had intended to create a place where new speakers, and women especially, would feel safe increasing their community participation. The absoluteness of my failure infuriates me.

Hey, Google: public G+ hangouts have been completely broken, not by technical failure, but by the degraded human condition. You need to remove them immediately. The option can only cause harm, as people accidentally expose themselves and others to sexual harrassment.

In the future, a "public" hangout URL should actually take you to a page where you request entrance from the organizer by text message (which should get the same spam filtration that an email would). But fix that later. Take the public hangouts away now.

Everybody else, if you had heard about the hangouts and were planning to participate, THANK YOU - but I've cancelled the rest of them. You should present anyway, though! I'd love to be contacted directly to talk over your ideas for proposals.

My MySQL database impressions

Kubilay Çilkara - Mon, 2014-05-05 07:30
I have been in the data and database world for over a decade now, working with mainly Oracle and data integration projects with Salesforce.

I have also spent time working with MySQL a relational database with open source roots, now part of Oracle. In this post I want to talk about my impressions of MySQL and some tips and tricks I learned working with it.

First and for all, you will have to be ready to get your hands dirty. I couldn't find a package structure for database administration in MySQL - like DBMS libraries of packages and procedures in Oracle. That means you will have to do most of the things on your own. Nevertheless good news is he database starts showing an Oracle banner when you login from version 5.0 onwards and some features like on-line Schema changes, more cost based optimisation and partitioning are added in versions 5.6 - a sign of good things to come.

Some key points

  • Data Import/Export - You can use the native mysqldump utility to dump data with parameters, but it is slow. You can dump schemas and data. I couldn't get it to dump data fast (in parallel) though that is why I strongly recommend mydumper an open source utility written by guys in Oracle and MySQL to dump data using parallel threads and is very fast. Import can be done in parallel as well and it can give you that boost provided your hardware permits it. Don't try to disable constraints, drop indexes before imports as you will read in posts and suggestions on the net, mysqldump already does that for you.
  • Hot Backup - mylvmbackup seems like the de-facto script to take hot backups when the database in online. There are tools like XtraBackup from Percona too. It takes a snapshot of the disk where your datafiles and logfiles are. At restore it does a crash recovery using the logs and brings the database transactions forwards to the point of crash. Then if you have the logs after that, you can play them forwards and bring the database to a point in time after the backup. 
  • Parallel processing - Nada, there is none! I couldn't get it do anything in parallel. The only thing I managed to do in parallel was to export and import data with mydumper, that works! So if you have many CPUs you will be watching them being idle most of the time as one thread only will be chugging away. Unless you use mydumper for your import/export operations where you can make those CPUs sweat. 
  • DBMS packages - You fancy automating, do you need scripts to do repetitive tasks? Well there is no DBMS package library to help you administer the database in MySQL. Instead, you can use Percona Toolkit scripts, a consultancy specialising in helping MySQL DBAs to do great work with MySQL databases. They have a variety of scripts from comparing (diff), syncing databases, tables to extracting metadata and GRANTS structures.  
  • Hints, Explain Plan, Performance Tuning. I couldn't see much of Cost Based Optimisation in MySQL, the data dictionary (INFORMATION_SCHEMA) has metadata names but doesn't hold any dynamic statistics about objects, estimates of counts of rows in tables and indexes it holds can be up 50% wrong. The whole thing is based on heuristics, I suppose. The EXPLAIN PLAN is just a row where it says what the optimiser will do, there is no cost analysis or logical tree structure of execution plans yet.  I couldn't see much on Join orders either, no Nested Loops, HASH or MERGE joins yet. 

MySQL is a popular, relational database. The free version of this database is probably what a small website and a start-up needs. But having said that, many sites outgrow MySQL and still stay with it.

Oracle will probably turn it to a serious database too. Adding partitioning, multi threading to it in the recent releases, is a step forwards in becoming an Enterprise size and scale database.  I don't know much about the MySQL Cluster Version and MySQL Replication I know takes a load off from the reads. I want to see it doing more Performance Tuning science.

Top tools with MySQL that I used

MySQL Workbench - SQL IDE.
Mydumper - Fast logical backup and restore.
Mylvmbackup - Hot backup script
Pentaho Kettle - PDI is an all round data integration and middle-ware tool

Categories: DBA Blogs

start python learning with "Introduction to Python"

Surachart Opun - Sun, 2014-05-04 00:53
Python is programming language, that supports object-oriented, imperative and functional programming. The key is its simplicity, easy language to learn and easy moving code from development to production more quickly. It's power tool to use with Big Data. So, I believe it's a good time to learn about Python programming language.
You can find many resources about it on the Internet. I started to learn about Python by watching "Introduction to Python" By Jessica McKellar. It's good  learning video help to start with Python.
It gives a lot of examples for Python and easy to learn. If you would like to start Python programming by your owner, starting with this and learn:
- Set up a development environment with Python and a text editor
- Explore basic data types such as integers, strings, lists, and dictionaries
- Learn how looping lets you do lots of work with a little bit of code
- Gain access to more functionality in Python with modules
- Practice reading, writing, and running your first Python programs
- Navigate the command line for writing larger programs
- Write your own functions for encapsulating useful work
- Use classes to group, name, and reuse functions and variables
- Practice what you’ve learned with the state capitals quizzer and Scrabble cheater projects
You are supposed to learn and get what are necessary for Python beginning by video course.
During study, you can follow up practice at link.
Categories: DBA Blogs

Setting up Eclipse with SVN on OSX Mavericks

Barry McGillin - Fri, 2014-05-02 10:49
So My macbook pro died the other day and much to my wife's amusement, my dell laptop died 30 minutes later with disk errors as I hadn't used in it in forever.  She wasn't laughing long though cos I swiped her Macbook Air to get me out of a hole while the Apple store replace the magsafe card. (Don't worry, though, cos Lisa grabbed one of the kids laptops and now they are the only ones fuming. )

So, here we are, no development environment to speak of on this laptop, not even Xcode tools or anything and a release to go out!  First thing out of the box was to down load eclipse, from eclipse.org, which at time of writing is still keplar.
Download it, and expand it.  then take the complete eclipse folder and drop it into your /Applications folder.  It'll look like this.
Also, when you click on the Launcher, you'll see eclipse added to the list of applications.

Now, When you run it, you may be asked if you want to install java 1.6 to run Eclipse.  Accept the install and sit back until it completes.  When its installed, you'll be able to run eclipse, so click the icon in the launcher, as above.
Eclipse will appear like this below. 
We'll want to see what java versions we have installed and for that you can go to preferences and type jdk into the filter box which will show a number of java related options. 
As you can see, we have a preference called installed JRE's which, when we click on it will only have the apple JDK we installed when we first tried to start eclipse.  I want JDK 8 and JDK 7 and I got them on the oracle site for Java.  Download both dmg files from Oracle, double click them and follow the instructions on the installer to drop them in.  If you restart eclipse, and go back to the preferences, to this page you will now see the appropriate JDKs installed and you can choose your default for your project.  

Now, part two.  Getting subversion into your eclipse, which turns out to be kinda difficult when you are trying to figure out which path to do.  There are various schools of thought on how to get subversion on to your mac, but for me so far, I have found Brew to be one of the best of the latest package installers out there.  If you do not have Brew installed you can do that really quickly by running this command in a terminal window.
which gets you this output.
lisas-MacBook-Air:~ bamcgill$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
==> This script will install:

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 169292, done.
remote: Compressing objects: 100% (47341/47341), done.
remote: Total 169292 (delta 120836), reused 169278 (delta 120826)
Receiving objects: 100% (169292/169292), 32.51 MiB | 121 KiB/s, done.
Resolving deltas: 100% (120836/120836), done.
From https://github.com/Homebrew/homebrew
* [new branch] master -> origin/master
HEAD is now at 23e1c24 ansible: fix --HEAD install
==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help

Badda Bing. Now, we can install subversion from the Brew repository and as all homebrew experts know, you keep your home-brews in the Cellar, so look out for /usr/local/Cellar appearing.   Now you may be asked for your administrator passwords as you do this because brew setups up the Cellar under /usr/Local and needs to create that there if it does not exist and set the permissions on the directory.
Next, we'll want to install subversion with Brew.
This will install subversion and its dependencies for you.  

Now, lastly, you'll need to install SVN support on eclipse.  The best one I've seen and have been using for ages has been Subclipse from Tigris.org. If you go to the download page, you'll see some notes on the download pages and sections for each release like this

What we want to pick up is the Eclipse update Site URL. We can then take that and use it in eclipse to install subclipse for us.
So. Open eclipse again and go to HELP > Install New Software
This will popup the window below for available software and if you use the drop box, you'll see things like eclipse and myln and other update sites which base eclipse uses.
 We need to add another for Subclipse.  Remember we grabbed the update url from the Subclipse site, we can add a new site by clicking add and pasting in the URL and a name for the site as shown.
 This will appear like this and will give you the options that below to install subclipse and the SVNKit.

Install these and its normally good to restart eclipse after these installs.  The last thing you need to do then is to make sure you are using the right svnkit in eclipse once you restart.
You can make sure of this by going to the preferences again and searching for SVN.  Click on the main SVN preference and make sure the SVN interface is set to SVNKit instead of javaHL.

Now, svn should be all set up and you can go look at adding new repositories and checking out code.


SQL*Plus error logging – New feature release 11.1

OraFAQ Articles - Fri, 2014-05-02 09:39

One of the most important things that a developer does apart from just code development is, debugging. Isn’t it? Yes, debugging the code to fix the errors that are raised. But, in order to actually debug, we need to first capture them somewhere. As of now, any application has it’s own user defined error logging table(s).

Imagine, if the tool is rich enough to automatically capture the errors. It is very much possible now with the new SQL*PLus release 11.1

A lot of times developers complain that they do not have privilege to create tables and thus they cannot log the errors in a user defined error logging table. In such cases, it’s a really helpful feature, at least during the unit testing of the code.

I made a small demonstration in SCOTT schema using the default error log table SPERRORLOG, hope this step by step demo helps to understand easily :

NOTE : SQL*Plus error logging is set OFF by default. So, you need to “set errorlogging on” to use the SPERRORLOG table.

SP2 Error

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> desc sperrorlog;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------

 USERNAME                                           VARCHAR2(256)
 TIMESTAMP                                          TIMESTAMP(6)
 SCRIPT                                             VARCHAR2(1024)
 IDENTIFIER                                         VARCHAR2(256)
 MESSAGE                                            CLOB
 STATEMENT                                          CLOB

SQL> truncate table sperrorlog;

Table truncated.

SQL> set errorlogging on;
SQL> selct * from dual;
SP2-0734: unknown command beginning "selct * fr..." - rest of line ignored.
SQL> select timestamp, username, script, statement, message from sperrorlog;





11-SEP-13 AM





selct * from dual;
SP2-0734: unknown command beginning "selct * fr..." - rest of line ignored.

ORA Error

SQL> truncate table sperrorlog;

Table truncated.

SQL> select * from dula;
select * from dula
ERROR at line 1:
ORA-00942: table or view does not exist

SQL> select timestamp, username, script, statement, message from sperrorlog;





11-SEP-13 AM





select * from dula
ORA-00942: table or view does not exist

Like shown above, you can capture PLS errors too.

If you want to execute it through scripts, you can do it like this, and later spool the errors into a file. I kept these three lines in the sperrorlog_test.sql file -

truncate table sperrorlog;
selct * from dual;
select * from dula;

SQL> @D:\sperrorlog_test.sql;

Table truncated.

SP2-0734: unknown command beginning "selct * fr..." - rest of line ignored.
select * from dula
ERROR at line 1:
ORA-00942: table or view does not exist





11-SEP-13 AM

SP2-0734: unknown command beginning "D:\sperror..." - rest of line ignored.




11-SEP-13 AM
selct * from dual;
SP2-0734: unknown command beginning "selct * fr..." - rest of line ignored.




11-SEP-13 AM
select * from dula
ORA-00942: table or view does not exist


Check Oracle documentation on SPERRORLOG.

In addition to above, if you want to be particularly specific about each session’s error to be spooled into a file you could do this -

SQL> set errorlogging on identifier my_session_identifier

Above mentioned IDENTIFIER keyword becomes a column in SPERRORLOG table. It would get populated with the string value “my_session_identifier”. Now you just need to do this -
SQL> select timestamp, username, script, statement, message
2 from sperrorlog
3 where identifier = 'my_session_identifier';

To spool the session specific errors into a file, just do this -

SQL> spool error.log
SQL> select timestamp, username, script, statement, message
2 from sperrorlog
3 where identifier = 'my_session_identifier';
SQL> spool off


Professional support offering for the JasperReportsIntegration toolkit officially announced

Dietmar Aust - Thu, 2014-05-01 14:05
You are using the free tool JasperReportsIntegration from Opal Consulting and you might be struggling with setting it up and integrating it into you own APEX applications?

Now you have somebody to talk to!

Already several years ago I have built this software for my own reporting needs in a project for a client of mine.

Then I wrapped it up, documented it and gave it to the incredible and wonderful Oracle APEX community to help them with their reporting needs as well.

As time went by it would become more difficult for me to make the free time to answer the different questions, keep developing the software and adding new features.

In order to move the free tool forward but also because some people requested a professional support offering, I have finally created one.

You will get:
  • Priority email support,
  • can schedule support calls via Skype
  • and can participate in the monthly (1 hour) conference call to ask all kinds of questions
If you are interested, you will find more details here: http://www.opal-consulting.de/site/products/

So, this is your chance to contribute back and help me to further support the APEX community.

Also, when enough people have signed up for this support offering, I will create a professional version with thrilling advanced features, so that it will be able to use the same APEX integration as the BI Publisher, i.e. using report queries and report templates (not based on RTF but on JRXML).

Hope you find it interesting.


Let me know what you think.


Oracle Midlands User Group May 2014 Meeting

Stephen Booth - Thu, 2014-05-01 07:59
On 20th May 2014 Oracle Midlands User Group will be hosting a couple of talks by Christian Antognini.  For full details see: http://oraclemidlands.com/ The first talk covers adaptive query optimisation in Oracle 12c and how it can be used to ensure that the query optimiser generates better plans more often.  The second talk delves into the internals of row chaining and migration. The venue is: Stephen Boothhttps://plus.google.com/107526053475064059763noreply@blogger.com0

April 2014 CPU

Paul Wright - Tue, 2014-04-29 17:54
Hi Oracle Security Folks, Thanks to Oracle for fixing a batch of research I sent over in August 2013 regarding ADVISOR, DIRECTORIES, GAOP(GRANT ANY OBJECT PRIVILEGE) and also a critical privilege escalation which gains 8.5 in the CPU which I am not going to publish here as I want to give folks time to patch. [...]

Learn GoldenGate – The Index

VitalSoftTech - Tue, 2014-04-29 08:51
Learn about GoldenGate Extract, Pump, Replicat, GGSCI, Logdump, Troubleshooting and Upgrade.
Categories: DBA Blogs

Nationwide Deploys Database Applications 600% Faster

Pankaj Chandiramani - Mon, 2014-04-28 04:37

Nationwide Deploys Database Applications 600% Faster

Heath Carfrey of Nationwide, a leading global insurance and
financial services organization, discusses how Nationwide saves time and
effort in database provisioning with Oracle Enterprise Manager

Key-points :

  1. Provisioning Databases using Profiles  (aka Gold Images)

  2. Automated Patching

  3.  Config/Compliance tracking

Categories: DBA Blogs


Subscribe to Oracle FAQ aggregator