Archive for the ‘Linux’ Category

MediaWiki Project

Tuesday, February 22nd, 2011

MediaWiki is the wiki application that underlies Wikipedia and many other websites. It is written in PHP and licensed as open source under the GPL. Historically, it has run on MySQL, but it does have a sophisticated database abstraction layer that provides support for PostgreSQL, IBM DB2, and other databases.

MediaWiki

Our main goals for this project are to:

  • integrate DB2 support with the new MediaWiki installer being developed for the 1.17release;
  • debug the core wiki functionality on DB2;
  • implement search, possibly taking advantage of DB2’s Full Text Search features.

This project is being developed by AndréCésarDaniel and Diego.

DB2 9.7

Monday, April 27th, 2009

A IBM acabou de anunciar uma nova versão do DB2 :)

Que tem esta versão de novo?
  1. Imensas melhorias em termos de performance.
  2. Melhor gestão automática da base de dados, menos necessidade de DBA.
  3. Melhor compressão de XML (inlined).
  4. Compressão de indexes e de documentos XML no XDA.
  5. Suporte de XML em datawarehousing.
  6. Suporte do tipo de dados XML em stored procedures.
As novas alterações representam poupanças enormes nos custos normalmente associados a uma base de dados.
Versão grátis DB2 Express-C estará disponível em Junho. Para mais informações consulta aqui a press release.

Online Testing System ready for testing!

Wednesday, April 9th, 2008

Our very own open-source online testing system is ready for testing. This will be a part of the future DB2 on Campus website having a vital role in it has it provides the authentication and testing mechanism that will be used. You can check out how to install it (Linux) here and send feedback to db2minho [at] gmail.com. Finding vunerabilities in the code would be of great assistance! :)

Screen-cast: METS Standard with IBM DB2 Express C using XForms as user-interface and Ruby on Rails as a Rest Web-services #1

Thursday, March 6th, 2008

Originally posted at:

X Server access control problems

Monday, January 7th, 2008

If you tried to run db2cc as a user diferent from the one who started the X server, you’ll probably get the error below:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Assume x as the user that started the X server and y the other.

To avoid this you should run the folowing as x to give X server access to y:

xhost local:y

Express-C: Starting

Thursday, December 6th, 2007

1. Introduction

I’m writing this to help newbies starting Express-C.

First of all you’ll need to install a free version of DB2. You can get an old but functional deb here or you can click here to get an up to date how-to installation guide.

To start using Express-C and DB2 in general you need to know something about it’s hierarchy: the master’s name is DAS and the databases admins are known as instances. As you can see in the figures below, you can have multiple instances with several databases inside. There is only and only one DAS per installation and one or multiple instances (database managers).

Instances

Domain

(you should click to enlarge them)

2. Starting

In UNIX installations DAS and instances are just ordinary UNIX users with some profile specifications. So, you will need to switch to one of those users and load the profile:

geko@hydra:~$ ls /home/
cesium  dasusr1  db2fenc1  db2inst1 geko
geko@hydra:~$ su db2inst1
Password:
hydra:~$ . sqllib/db2profile
hydra:~$

Note that the creation of instances is not covered in this tutorial, however if you have installed the deb one instance was created.

Before we can work in a valid instance, we need to start one. In the deb installation you can run:

hydra:~$ /opt/ibm/db2exc/V9.1/adm/db2start
SQL1063N  DB2START processing was successful.

…and to stop it:

hydra:~$ /opt/ibm/db2exc/V9.1/adm/db2stop
SQL1064N  DB2STOP processing was successful.

3. Just a tip

If you are a smart guy (ok, lazy) you can change where you shell looks for programs. You can do that editing instance’s profile. In our case:

hydra:~$ echo "PATH=$PATH:/home/db2inst1/sqllib/bin:/home/db2inst1/sqllib/adm" \
>> ~/sqllib/db2profile

4. DB2 interpreter

This is the situation: we are logged as a valid instance and we have started it. To use the db2 interpreter and start testing db2/sql commands you should type:

hydra:~$ db2
(c) Copyright IBM Corporation 1993,2002
Command Line Processor for DB2 ADCL 9.1.2

-- omited output --

To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.

For more detailed help, refer to the Online Reference Manual.

db2 =>

Just as an introduction I’ll show you some valid commands.

4.1 Create database

In DB2 Express-C, only Unicode databases can store both XML documents and more traditional forms of SQL. Although this tutorial doesn’t cover XML stuff you should keep that in mind because that’s the exact reason why DB2 is so powerful. All commands are similar to SQL syntax. For instance:

create database test using codeset UTF-8 territory us

and

connect to test;

create table items (

  id          int primary key not null, 

  name   varchar(30),

  stuff    xml

  );

5. Conclusion

As I’m just learning, this is all i can give you. All i can promise you is that the more i learn the more i teach.

Get in touch for more advanced tutorials.