27th June, 2010

Gerald release 0.4

Filed under: database,oracle,python — admin @ 3:36 pm

I’ve been revelling in the Python goodness this weekend at PyCon Australia. This has motivated me to fix the last couple of issues and then package and release Gerald 0.4

What’s new in this release? The most important changes are fixes to a number of issues identified by users of SQLPython. Gerald was appearing to take a long time to collect large schemas but was actually failing silently. I added test cases to show the problem and then fixed the code. This shouldn’t happen any more.

I applied a couple of patches supplied by Catherine Devlin to cope with columns without defined lengths and to not get DBA objects in Oracle schemas.

I slipped in some new features as well; I implemented the to_xml and compare methods on the CodeObject class, and Gerald now supports views in MySQL (as long as you are running 5.1 or above).

Finally, I changed the project documentation to use Sphinx.

Downloads are available at the PyPI page and the SourceForge project page.

If you find any problems or want to contribute any code just send me an email.

3rd January, 2009

Gerald release 0.2.4

Filed under: database,oracle,python — admin @ 3:17 pm

I have packaged and released version 0.2.4 of gerald. This is a minor release with a couple of little features and some documentation and admin updates. You can find all of the details in the CHANGELOG.txt file that comes with the source distribution (or view it here) but in a nutshell the changes from the last release are;

  • Added support for comments on columns in Oracle
  • Added support for comments on tables in Oracle
  • Changed the stylesheet used for documentation
  • Added more information to the README file and converted it to reStructured Text format

Please download, install and enjoy. Bug reports or tumultuous praise to the usual address please.

9th December, 2008

Oracle Parameter Files

Filed under: database,oracle — admin @ 3:07 pm

This isn’t going to be news to any Oracle DBAs reading this. So if you are one, can I suggest you move along quickly to the next item in your feed reader.

Anyone left is hopefully curious like I was to figure out the difference between ‘traditional’ oracle initialisation files (init.ora) and the new fangled server parameter files (sp files). Well wonder no further fair reader for I can explain all.

Prior to Oracle 9.2 (a long time ago in Oracle database years) it was only possible to permanently effect the configuration parameters of your database by changing the init.ora file and restarting your database instance. You could make changes whilst the database was running by using the ‘ALTER SYSTEM SET’ command but these would be lost the next time your database was restarted because the startup process would use the values in your init.ora file. This meant that any instance tuning would require some informed ‘twiddling’ by the DBA to settle on a suitable value for an instance parameter and that would then be followed by a restart, causing anyone using the database to be mightily inconvenienced.

With the introduction of server parameter files in 9.2 and above changes made interactively (using ‘ALTER SYSTEM SET’) are automatically persisted. This is because whenever a change is made this way it is automagically written to your spfile.

This article has a much more comprehensive description of the differences between the two different types of files. One of the useful things it mentions is the resolution order the database server uses to select an initialisation file on startup. This is;

  • spfile<SID>.ora
  • spfile.ora
  • init<SID>.ora

Tick another thing off the list of ‘stuff that has been bothering me and I need to figure out’.

4th August, 2008

Gerald release 0.2.3

Filed under: database,oracle,python — admin @ 7:08 pm

I have packaged and released version 0.2.3 of gerald. This is mainly a tidy up and bug fix release, with numerous additional unit tests. You can find all of the details in the CHANGELOG.txt file that comes with the source distribution (or view it here) but in a nutshell the changes from the last release are;

  • Numerous renames to more fully comply with PEP-8
  • Added numerous tests, full details in the CHANGELOG.txt file
  • Added an ‘enabled’ flag to table constraints (except in the MySQL module, because that database doesn’t support them)
  • Added support for column defaults in Oracle
  • Added a ‘table_name’ attribute to the schema.Trigger class
  • Removed main and usage functions from each module that shouldn’t be imported

Please download, install and enjoy. Bug reports or tumultuous praise to the usual address please.

12th September, 2007

Oracle Business Intelligence Seminar

Filed under: oracle — admin @ 2:11 pm

Catching up on my blog reading I notice that Mark Rittman is down under next week. I’m not in a position to attend but if you are working in the Oracle and BI world you shouldn’t miss this seminar from a truly world class expert in all things Oracle and BI.

And Mark, there is an offer of a cold beer on your blog.

16th December, 2006

SQL Developer 1.1

Filed under: oracle — admin @ 6:19 pm

The latest release of SQL Developer slipped out yesterday.

I’ve been trying the pre-release version and its starting to become a really useful tool. My copy of 1.1 final is downloading as I type.

Update: When I got to work this morning I tried automatically updating the copy of 1.0 on my work machine. It doesn’t appear to work. It looks like you have to download a copy of 1.1 and install it yourself.

14th December, 2006

Dont Use Default Roles in Oracle Databases

Filed under: database,oracle — admin @ 9:39 am

The admonition (since the Oracle 6 days if my memory serves) for good DBAs is to never use the default roles when granting privileges to users in Oracle databases. Always grant users the specific privileges they require and never rely on ‘CONNECT’ or ‘RESOURCE’, because they generally grant more rights than you really want.

Oracle seems to have addressed this in 10g2, at least according to this this blog post and my observation. Now, granting the ‘CONNECT’ role is exactly the same as explicitly granting the ‘CREATE SESSION’ privilege and the ‘RESOURCE’ role has a more reasonable list of privileges.

I’d still be wary of them though, because through sheer laziness I granted these roles to a user in my development database and then got an ORA-01031 error when I tried to create a view. That’s right, the ‘RESOURCE’ role doesn’t (and as far as I can tell never did) contain the privilege to create a view. How strange.

So this advice would appear to still be valid – only grant those privileges that your users need and do it explicitly.

Powered by WordPress