Skip to content

Improving the Improved – docs.ingres.com

As noted elsewhere this week saw the relaunch of the Ingres documentation site http://docs.ingres.com. At last we have the ability to deep link into the documentation without having to do acrobatics to extract links in the docs, for example

http://docs.ingres.com/Ingres/9.3/Database%20Administrator%20Guide/largedataloadswsetnologgingstatement.htm

has become

http://docs.ingres.com/ingres/9.3/database-administrator-guide/1757-large-data-loads-with-the-set-nologging-statement

To get the URL for the first required some navigation of the documentation index, via the tree or via the search engine. Since Google is used by many people as their home page, even to search for facebook.com it makes more sense that the documentation is more accessible from Google, Bing et. al.

One of the downsides with the new docs.ingres.com site is the use of screen real-estate. The main ingres.com properties have their content squeezed in to 980px which is ok in the 1990 world of “This website supports 1024×786″ resolutions. However in this day and age I would make the supposition that 1280×1024 would be more common, something that’s borne out by Valve Software’s monthly hardware survey. With the increasing trend towards wide-screen displays in laptops as well as desktop displays a 1440×900 resolution will become more common.

With this in mind I’ve put together a couple of hacks that when used with Google Chrome or the Firefox Greasemonkey addon – increases the amount of space used for the content to 60% of the width of the browser window. To install, click on the relevant link for your browser – note that the Greasemonkey script can be used with Google Chrome (from 4.0 onwards).

Once installed go to any docs.ingres.com page and after the page finishes loading the content area will be super-sized. If there’s any interest I’ll look into to how the page can be rendered full size without having to expand on screen.

Popularity: 42% [?]

  • Share/Bookmark

Changes to the Ingres RPM installer

Over the last couple of days I’ve done couple of Ingres installations using the latest, bleeding edge, RPMs and have come across a change in behaviour that might catch you out, as indeed it did me. What follows is a more or less verbatim copy of the output from an install of the latest SVN head revision I performed earlier today:

[grant@usrc-git T1]$ sudo rpm -ihv ingres-32bit-T1-10.1.0-00.x86_64.rpm ingres-dbms-T1-10.1.0-00.x86_64.rpm ingres-odbc-T1-10.1.0-00.x86_64.rpm
ingres-T1-10.1.0-00.x86_64.rpm ingres-net-T1-10.1.0-00.x86_64.rpm
[sudo] password for grant:
Preparing...                ###########################################[100%]
    1:ingres-T1               ###########################################[ 20%]
    2:ingres-32bit-T1        ###########################################[ 40%]
    3:ingres-dbms-T1       ###########################################[ 60%]
    4:ingres-odbc-T1        ###########################################[ 80%]
    5:ingres-net-T1          ###########################################[100%]
Building the password validation program 'ingvalidpw'.
Executable successfully installed.
[grant@usrc-git T1]$ sudo -u ingres -i
Release                     Running Script II_SYSTEM
-------------------------------------------------------------------------------
II 10.1.0 (a64.lnx/100)NPTL    N    loadII /opt/Ingres/IngresII
II 10.1.0 (a64.lnx/00)NPTL     N    loadT1 /opt/Ingres/IngresT1
[ingres@usrc-git ~]$ loadT1
[ingres@usrc-git ~]$ ingstart
Ingres/ingstart
No Ingres servers have been configured to start up.
[ingres@usrc-git ~]$ iipmhost
localhost
[ingres@usrc-git ~]$ ingprenv
II_INSTALLATION=T1
II_HOSTNAME=localhost
II_SHADOW_PWD=/opt/Ingres/IngresT1/ingres/bin/ingvalidpw
[ingres@usrc-git ~]$ cat /opt/Ingres/IngresT1/ingres/files/install.log
Installing Terminal Monitor utility files...
[ingres@usrc-git ~]$

Prior to Ingres 10.1, the RPM install scripts would perform the post-laydown configuration. As of 10.1 this is no longer the case as you can see from the output above. The 10.1 RPMs only lay down the files and do minimal configuration, which sets up the symbol table as per the output from ingprenv. Ingres now gets configured when started as a service for the first time:

[grant@usrc-git T1]$ sudo service ingresT1 start
Ingres, instance T1 has not been setup
Running setup for Ingres 10.1.0-00...
	Running setup for dbms...                                        OK
	Running setup for net...                                         OK
	Running iisusupp32...                                            OK
	Running iisudbms...                                              OK
	Running iisuc2...                                                OK
	Running iisutux...                                               OK
	Running iisuodbc...                                              OK
	Running iisubr...                                                OK
	Running iisudas...                                               OK
Starting Ingres, instance T1:                              [  OK  ]
[grant@usrc-git T1]$

Leaving us with a configured and running installation.

Popularity: 59% [?]

  • Share/Bookmark

Ingres VectorWise Webinars

(Picked up from the forums).

Ingres are broadcasting live webinars for Ingres VectorWise, starting this week. The first is entitled ‘Welcome to Ingres VectorWise”

Join our Ingres System Engineers as they share a high-level overview of the Ingres VectorWise technology including a demonstration of the product. Find out more about this new feature and to understand how to increase the performance of your analytic workloads using Ingres VectorWise with your existing hardware.

Duration will be approximately 40 mins.

Presenter: Joel Brunger
Date: Friday, July 8, 2010
Time: 10am ET / 2pm GMT / 3pm BST / 4pm CET
Register – http://info.ingres.com/g/?BGGYOVT4OJ

Presenter: Mary Schulte
Date: Friday, July 8, 2010
Time: 4pm PT / 11pm GMT / 9 am EST (July 9)
Register – http://info.ingres.com/g/?PCGJ51KY29

Presenter: Stephane Padique (Presentation will be in French/En français)
Date: Vendredi, July 23, 2010
Time: 1pm GMT / 2pm BST / 3pm CET
Register – http://info.ingres.com/g/?UX1J8X7Y71

Popularity: 100% [?]

  • Share/Bookmark

IUA VectorWise Demo Video

Thanks to Andrew Ross and FOSSLC, the Ingres VectorWise demo from this year’s UK IUA conference can be seen below or via Vimeo.com (Flash is required).

Popularity: 65% [?]

  • Share/Bookmark

PECL ingres-2.2.2 released

Yesterday I pushed out an update to the PHP driver for Ingres into the PHP Extension Community Library (PECL). Whilst it’s been labelled as a minor update there have been 15 fixes/additions to the driver:

- Update the unit tests to be more independent
- Add support for the Ingres BOOLEAN type
- Add ingres_fetch_assoc()
- Allow for a 0 offset in all ingres field functions
- Update build scripts for OpenVMS CSWS PHP 2.0
- Fix bug 17556 – Handle errors for non-result returning statements
- Fix bug 16960 – SEGV when fetching the results from a row producing procedure
- Fix bug 16990 – SEGV when executing a database procedure
- Fix bug 17510 – Fix php_ii_set_connect_options so they work as documented
- Fix bug 17302 – _close_statement is unable to free active statements
- Fix bug 17207 – Under certain conditions the driver can SEGV when doing cleaning up
- Fix bug 17198 – Unable to close non-result statements
- Fix bug 17092 – SIGBUS when fetching data on 64-bit Solaris
- IIapi_getDescriptor() should only be called for SELECT statements
- Fix bug 16752 – Send all string values as IIAPI_VCH_TYPE

You can download the source code from http://pecl.php.net/get/ingres or install directly from the command line using the command:

sudo pecl install ingres-2.2.2

Pre-built Windows binaries are available from ESD for PHP 5.1.6, 5.2.13 and 5.3.2. An OpenVMS binary for CSWS PHP 2.0 will be updated today. You can raise questions/problems via the Ingres Community Forums, the project home page or via Service Desk.

Popularity: 70% [?]

  • Share/Bookmark

Ingres 10.0 – “sql -history_recall” now enabled by default

History what?

For some time the Ingres terminal monitor has had the, slightly cryptic (to me at least), flag “-history_recall”. This flag allows you to use the cursor keys within a terminal monitor session to scroll through previous queries and edit them in-line. Users of Ingres on Windows have been able to do this by default, without any special flags, by virtue of Microsoft Windows Console API. As of change 2911 this feature is now active by default on UNIX/Linux and should be part of Ingres 10.0 when it gets released.

Popularity: 73% [?]

  • Share/Bookmark

Ingres 10.0 – Escaping from the Ingres terminal monitor

For new users to Ingres quitting from the Ingres terminal monitor, tm or sql, just got easier. With change 2901 the terminal monitor has gone from this:

$ sql iidbdb
INGRES TERMINAL MONITOR Copyright 2010 Ingres Corporation
Ingres Linux Version II 10.0.0 (int.lnx/2863)NPTL login
Thu Apr 29 08:46:38 2010
continue
*

to:

$ sql iidbdb
INGRES TERMINAL MONITOR Copyright 2010 Ingres Corporation
Ingres Linux Version II 10.0.0 (int.lnx/2903)NPTL login
Thu Apr 29 09:16:40 2010
Enter \g to execute commands, "help help\g" for help, \q to quit
continue
*

No more ninja skills needed for executing a query or to escape from the terminal monitor.

Popularity: 99% [?]

  • Share/Bookmark

Simplifying an OpenAPI trace log

Ingres’s OpenAPI C interface can be challenging at times especially when it comes to debugging or reading an API trace. For example, right now I’m trying to debug a problem in the PHP driver for Ingres. For some reason during the tear-down of the request the driver is unable to close a statement. Turning to a level 5 API trace I get this. Which, to be honest has information in there that I don’t exactly need. Specifically I’m not too interested in the calls to IIapi_wait() [1] or the lower level Dispatch() functions. With this in mind using grep I can filter out this “chaff”, and produce a more concise log file:

grep -v "IIapi_wait\|Dispatch" api.log

Turning this into:

!IIapi_initAPI: initializing API.
!IIapi_initialize: INGRES API initialized, envHndl = 090F9308
!IIapi_initialize: startup API
!IIapi_initialize: version = 6
!IIapi_initialize: INGRES API initialized, envHndl = 09078018
!IIapi_connect: connect to DBMS Server
!IIapi_connect: envHndl = 09078018, connHndl = 00000000, tranHndl= 00000000
!IIapi_connect: target = @server,tcp_ip,ii[user:secret]::dbname
!IIapi_thread(-1226205472): allocated local storage 091A5E78
!IIapi_appCallback: request completed, status = SUCCESS
!IIapi_setEnvParam: set environment parameter
!IIapi_setEnvParam: envHndl = 09078018
!IIapi_setEnvParam: paramID = 24.
!IIapi_autocommit: set autocommit state
!IIapi_autocommit: connHndl = 091A5960, tranHndl = 00000000
!IIapi_appCallback: request completed, status = SUCCESS
!IIapi_query: starting a query
!IIapi_query: connHndl = 091A5960, tranHndl = 091A69B8, queryType = 0
!IIapi_query: queryText = set session with description='hello'
!IIapi_appCallback: request completed, status = SUCCESS
!IIapi_close: closing a query
!IIapi_close: stmtHndl = 091A8070
!IIapi_appCallback: request completed, status = SUCCESS
!IIapi_query: starting a query
!IIapi_query: connHndl = 091A5960, tranHndl = 091A69B8, queryType = 0
!IIapi_query: queryText = set lockmode session where readlock=nolock
!IIapi_appCallback: request completed, status = SUCCESS
!IIapi_close: closing a query
!IIapi_close: stmtHndl = 091A6580
!IIapi_appCallback: request completed, status = SUCCESS
!IIapi_cancel: cancelling a query
!IIapi_cancel: invalid handle
!IIapi_appCallback: request completed, status = INVALID_HANDLE
!IIapi_close: closing a query
!IIapi_close: invalid statement handle
!IIapi_appCallback: request completed, status = INVALID_HANDLE
!IIapi_autocommit: set autocommit state
!IIapi_autocommit: connHndl = 091A5960, tranHndl = 091A69B8
!IIapi_appCallback: request completed, status = SUCCESS
!IIapi_disconnect: disconnecting a connection
!IIapi_disconnect: connHndl = 091A5960
!IIapi_appCallback: request completed, status = SUCCESS
!IIapi_releaseEnv: Release Environment
!IIapi_releaseEnv: envHndl = 09078018
!IIapi_terminate: shutdown API
!IIapi_releaseEnv: Release Environment
!IIapi_releaseEnv: envHndl = 090F9308
!IIapi_terminate: shutdown API
!IIapi_termAPI: shutting down API completely.
!IIapi_termAPI: API shutdown.

A lot simpler to read – Now I can see that a bad statement handle has been passed to IIapi_cancel() and IIapi_close(). Now I know what the problem is it’s time to find where the statement handle is coming from.

[1] It should be noted that you cannot always discount IIapi_wait() calls. A number of years ago I hit a weird timing issue due to a missing IIapi_wait() call.

Popularity: 92% [?]

  • Share/Bookmark

Ingres and Apache on Redhat Enterprise Server

Introduction

Getting web applications to connect to Ingres via Apache on UNIX/Linux can be quite fiddly. Here is a simple guide on the setup steps needed to allow the Ingres PHP, Python and Ruby drivers to work with Apache on RedHat Enterprise Linux, CentOS and Fedora Linux. I’ve also published articles on doing the same for Debian/Ubunutu and Novell SLES/OpenSUSE in the Ingres Community Wiki.

Pre-requisites

It is assumed that you have the following installed:

  • Ingres 2006 or newer ( Ingres >= 9.0.4 )
  • RedHat Enterprise Linux 5.4, CentOS 5.4 and Fedora Linux 11
    • These steps might apply to earlier releases as well
  • Apache 2.2.8
    • The steps here apply to other releases of Apache from 1.3 onwards
    • mod_env – An Apache module which modifies the environment which is passed to CGI scripts and SSI pages

Disabling SELinux

As of writing this Ingres and SELinux do not interact very well. To use Ingres on an SELinux enabled system, SELinux needs to be placed in permissive or disabled modes. To determine the current state of SELinux run the following:

sestatus

sample output:

$ sudo /usr/sbin/sestatus
SELinux status:                 disabled

If the status is enforcing then SELinux must be disabled using the command:

setenforce 0
# or to disable SELinux but log exceptions to policy to /var/log/secure
setenforce Permissive

This will only disable SELinux until the next reboot of the server. To make the change permanent edit /etc/sysconfig/selinux, changing SELINUX to disabled or permissive.

Enabling Ingres for Apache

Any user that connects to Ingres must be a known (defined) user. Specifically a user account must be created within Ingres using CREATE USER .... In the case of web applications served by Apache, Tomcat or whatever, the server process owner is the user that Ingres will initially see. To determine the process owner for Apache execute the following:

ps -fe | grep httpd | grep -v grep

On my system I get the following:

[grant@uksl-grant-rhel64 ~]$ ps -fe | grep httpd | grep -v grep
root      3331     1  0 Apr08 ?        00:00:02 /usr/sbin/httpd
apache   23356  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23357  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23358  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23359  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23360  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23361  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23362  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd
apache   23363  3331  0 Apr11 ?        00:00:00 /usr/sbin/httpd

Which shows two user accounts for Apache. The root account can be ignored since it is a monitor/control process that starts up and shuts down servers as required. The processes run under the apache account will be used to connect to Ingres.

To add apache to Ingres run the following, as the ingres administrator:

sql iidbdb <<EOSQL
create user apache\g
commit\g
\q
EOSQL

You should see something similar to:

ingres@esva-suse:~> sql iidbdb <<EOSQL
> create user apache\g
> commit\g
> \q
> EOSQL
INGRES TERMINAL MONITOR Copyright 2008 Ingres Corporation
Ingres Linux Version II 9.2.0 (a64.lnx/143)NPTL login
Tue Apr 13 23:33:18 2010
continue
* Executing . . .
continue
* Executing . . .
continue
* Ingres Version II 9.2.0 (a64.lnx/143)NPTL logout
Tue Apr 13 23:33:18 2010

Now the Ingres DBMS is setup for the Apache web server.

Enabling Apache for Ingres

  1. Edit, (as root), /etc/sysconfig/httpd to include the following:
     II_SYSTEM=/opt/Ingres/IngresII
     LD_LIBRARY_PATH=/opt/Ingres/IngresII/ingres/lib:/opt/Ingres/IngresII/ingres/lib/lp32
     ODBCSYSINI=/opt/Ingres/IngresII/ingres/files
     export II_SYSTEM LD_LIBRARY_PATH ODBCSYSINI

    NoteODBCSYSINI is only needed for the Python driver or applications based on ODBC

  2. Create a new config file (as root), /etc/httpd/conf.d/ingres.conf, adding the following:
  3. PassEnv II_SYSTEM LD_LIBRARY_PATH ODBCSYSINI
  4. Restart apache (as root):
    service httpd restart

Verifying the setup

To see that the environment variables are visible the following code snippets can be executed through Apache through PHP and mod_python.

PHP

  • Code:
    < ?php
      echo "II_SYSTEM is :" .$_SERVER["II_SYSTEM"] . "<br/>\n";
      echo "LD_LIBRARY_PATH is :" .$_SERVER["LD_LIBRARY_PATH"] . "<br />\n";
    ?>
  • Sample Output:
    II_SYSTEM is :/opt/Ingres/IngresII
    LD_LIBRARY_PATH is :/opt/Ingres/IngresII/ingres/lib:/opt/Ingres/IngresII/ingres/lib/lp32
    

Python

  • Code, save as python_env.py:
  • from mod_python import apache
    def environment(req):
        req.content_type = "text/html"
        req.add_common_vars()
        env_vars = req.subprocess_env.copy()
        req.write('< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">')
        req.write('<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">')
        req.write('<head><title>mod_python.publisher</title></head>')
        req.write('<body>')
        req.write('<h2>Environment Variables</h2>')
        req.write('<table border="1">')
        req.write('<tr><td>%s</td><td>%s</td></tr>' % ("II_SYSTEM", env_vars['II_SYSTEM']))
        req.write('<tr><td>%s</td><td>%s</td></tr>' % ("LD_LIBRARY_PATH", env_vars['LD_LIBRARY_PATH']))
        req.write('</table>')
        req.write('</body>')
        req.write('</html>')
    
  • Ouput from http://localhost/env.py/environment:
     Environment Variables
     II_SYSTEM	/opt/Ingres/II
     LD_LIBRARY_PATH	/lib:/usr/lib:/usr/local/lib:/opt/Ingres/II/ingres/lib:/opt/Ingres/II/ingres/lib/lp32
    

If you have any comments feel free to post them below.

Updated Apr 14, 2010 9:50 to include SELinux information

Popularity: 88% [?]

  • Share/Bookmark

List of Ingres functions per release

Yesterday Ray Fan published an article that shows IMA queries that allow you to see the list of functions available for different Ingres releases. I’ve now taken these queries an generated a list of functions for Ingres 9.2.0 with the added functions for 9.3.0 and 10.0.0 (a recentish build). I’ve not looked at earlier releases as the SQL did not work with my 9.1.0 installation. When I get the time I’ll update the page going back to 9.0.4, or you could do the same :) .

Popularity: 74% [?]

  • Share/Bookmark