Ubuntu Server - Setting root password

By default Ubuntu Server has no password set for the root account. The account is locked until you set the password for the account.

This is done by executing the following command in a shell:

sudo passwd root

Then you have to enter the same password twice. From now on a su - will work ...

Ubuntu/Linux Server - Switch between tty's

Well for those not used to it and are always working on boring windows displays in stead of performant - back to basics and essentials - character based screens ...
There seem to be six of them.
At startup you are by default using the first.
By pressing ctrl-alt-Fx you can select any of the six tty's.
Ctrl-Alt-F2 will go to the second tty
Ctrl-Alt-F1 will go back to the first (the default in use)

Ubuntu - server - setting fixed ip adress iso dhcp

If Your Ubuntu System has set to use DHCP, you will want to change it to a static IP address here is simple tip

open the /etc/network/interfaces file.

sudo vi /etc/network/interfaces

If you are using DHCP for your primary network card which is usually eth0, you will see the following lines

auto eth0
iface eth0 inet dhcp

As you can see, it’s using DHCP right now. We are going to change dhcp to static, and then there are a number of options that should add and here is the example and you can change these settings according to your network settings.

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Restart the neworking service using the following command

sudo /etc/init.d/networking restart

Client language used with Oracle Forms

Context
Forms application hosted on a forms server
Client is running jinitiator.
Language is set for the default functions to the local language.
Problem
control end user language to be somethng for example english
Solution
set NLS_LANG in the client environment to for example AMERICAN_AMERICA.WE8ISO8859P1

Oracle Forms Icons

The icons displayed in Oracle Forms (web) are defined by the following parameters:
- The imagebase definition in the formsweb.cfg file
- the name of the icon set on item level in the form
- the definitions for the their use in the registry.dat file ($ORALCE_HOME/java/oracle/forms/registry/registry.dat

Imagebase


Name used in items

Registry.dat
Look for the following settings:

#
# The Application Level icon files are relative to the DOCUMENTBASE
# example: icons/
# or an absolute URL.
# example: http://www.forms.net/~luser/d2k_project/
#
default.icons.iconpath=
default.icons.iconextension=gif



From the documentation: ( http://www.di.unipi.it/~ghelli/didattica/bdl/A97329_03/web.902/a92175/chap03.htm#1030692 )
--------------

Icons

When deploying an Oracle9iAS Forms Services application, the icon files used must be in a Web-enabled format, such as JPG or GIF (GIF is the default format).

By default, the icons are found relative to the DocumentBase directory. That is, DocumentBase looks for images in the directory relative to the base directory of the application start HTML file. As the start HTML file is dynamically rendered by the Forms Servlet, the forms90 directory becomes the document base.

For example, if an application defines the icon location for a button with myapp/, then the icon is looked up in the directory forms90/myapp.

To change the default location, you can set the imageBase parameter to codebase in the formsweb.cfg configuration file. Alternatively, you can change the default.icons.iconpath value of the registry.dat file in the forms90/java/oracle/forms/regsitry directory.

Setting the imageBase parameter to codebase enables Oracle9i Forms to search the forms90/java directory for the icon files. Use this setting if your images are stored in a Java archive file. Changing the image location in the registry.dat configuration file is useful if you want to store images in a central location independent of any application and independent of the Oracle9i Forms installation.

---------------

Icons in Jars: from the same documentation:

Storing Icons in a Java Archive

If an application uses a lot of custom icon images, it is recommended you store icons in a Java archive file and set the imageBase value to codebase. The icon files can be zipped to a Java archive via the Jar command of any Java Development Kit (JDK).

For example, the command Jar -cvf myjar.jar *.gif zips all files with the extension .gif into an archive file with the name myico.jar.

In order for Oracle9i Forms to access the icon files stored in this archive, the archive needs to be stored into the forms90/java directory. Also, the name of the archive file must be part of the archive tag used in the custom application section of the formsweb.cfg file (for example, archive_jini=f90all_jinit.jar, myico.jar). Now, when the initial application starts, the icon files are downloaded to and permanently stored on the client until the archive file is changed.

Note: As Oracle9i Forms default icons (for example, icons present in the default smart icon bar) are part of the f90all.jsr file, you do not need to deploy them.

Creating a service on redhat linux / Oracle enterprise linux

Question

How to start a certain application automatically for example at startup of the machine, it is required to define it as a service.

Well ...

This can be achieved 4 rather easy steps:
  • Create a script that performs everything required to start and stop the application, including the setting of the environment;
  • Save the script in the /etc/init.d directory
  • Give the script the permissions to execute
    chmod u+x
  • install the service
    chkconfig --add
The tricks are inside the script.

Start and Stop logic in the script
When a service is started the start keyword is passed as parameter $1 to the script. When the service is stopped the stop keyword is passed.

Runlevel and Runorder arguments
In the script a lines identify at what runlevel and in which sequence the service should be started or stopped.
#chkconfig: 2345 80 05
This line is composed of the chkconfig keyword followed by three paramters:
  • the first indicates at what runlevels the service should be started
  • the second indicates what the priority is (scriptsequence) at startup
  • the third indicates the priority when stopping

Description of the service

To set the description of the service enter a line like the following in the script
#description: Oracle 8 Server


Further details

iDS on Oracle Enteriprise Linux

Symptom of the problem : launching any script causes 'segmentation fault'. Even tnsping gives this error.

Found on the internet that this has to do with a setting of grub.conf (/boot/grub/grub.conf had to add noexec=off to the line of the kernel)

This is not the solution however.

Installation forms server on Oracle Enterprise Linux

I got a problem with a missing library which caused forms server not to be able to run.
I guess this was also the source of a frm-92101 problem cause after solution the frm message did not occure anymore.

Installation was on Oracle Enterprise Linux which is based on a redhat distribution but which does not contain the library libXm.so.2. (open motif library)
Just install this library and a number of problems seem to vanish.

HSODBC onder Linux

Momenteel in onderzoek ...

Wat je hier dus vindt is nog niet echt getest ... en meer en lijst van dingen die ik gevonden heb daarover.

Opmerkingen en restricties:
  • Momenteel enkel beschikbaar voor linux in 32 bit versie, niet in 64 bit versie.

Referenties:
Oracle Metalink
note 264567.1 : How to setup generic connectivity - hsodbc - on linux

easysoft and Oracle hsodbc

At easysoft http://www.easysoft.com/developer/interfaces/odbc/linux.html

Software:

Odbc Linux software:

DB onder Windows verbinding naar MS-Access db

Dit artikel probeert duidelijk te maken hoe je vanuit een Oracle Database (9 r2 of hoger) een MS-Access database rechtstreeks kan aanspreken.

De omgeving waarin dit gebeurd is een ... sorry voor het ongemak ... windows omgeving: de database is op dezelfde machine geïnstalleerd als waar we de mdb-file plaatsen. Voor andere omgevingen ... nog te testen ...

In basis heet deze feature van de Oracle database Heterogeneous Services (HS) ... maar dit is al de derde naam voor het gevaarte ...

Het process bestaat uit 6 stappen :
  1. Plaats de mdb file op een goed 'georganiseerde' plaats.
  2. Creatie van een DSN
  3. Aanmaken van een init file voor de datasource.
  4. Aanpassen van de listener.ora file
  5. Aanpassen van de tnsnames.ora file
  6. Maken van een database link
  7. optioneel: aanmaken van synonyms voor de aan te spreken database objecten.
Ieder van deze punten worden hieronder besproken.

1. Plaats de mdb file op een verstandige plaats

Doel is hier om geen wirwar te creeren en er voor te zorgen dat met de bestanden die worden aangesproken geen andere dingen gebeuren. Dit laatste is een veiligheidsmaatregel. Ik heb geen testen gedaan met het simultaan gebruik van de mdb file via een access applicatie en via de oracle database.

Naar goede Oracle gewoonte is het best alles ergens samen te proppen. Voor de gelegenheid veronderstel ik dat alle Oracle producten onder c:\oracle staan (ORACLE_BASE). In deze ORACLE_BASE directory maken we een nieuwe directory met de naam HS_FILES. We zullen deze locatie verder omschrijven als HS_HOME. Binnen de HS_HOME maken we per soort van bestanden een directory, voorbeeld per applicatie die de MDB file aanlevert. Voor de gelegenheid is dat applicatie APPKE die een bestand appke.mdb gebruikt. Het pad is dan c:\oracle\HS_FILES\APPKE\appke.mdb
.

2. Creëer een DSN.

Dit doe je via je configuratiescherm > systeembeheer > beheer gegevensbronnen (odbc)
Let er op dat je een System dsn aanmaakt en geen user dsn !!! (anders krijg je problemen, zie oracle metalink nota .... )

Als voorbeeld creeren we een dsn met de naam 'sysdsnappke'.

Het testen van de dsn kan je doen door bijvoorbeeld met OpenOffice Base (liefst de meest recente versie) naar de dsn te connecteren. Je kan dan ook ineens de tabellen bekijken om de layout terug te vinden.

3. Aanmaken van een initXXXX.ora file.

Deze file definieert de initialisatie parameters voor de externe database of datasource.

Deze file staat in de hs/admin directory van ORACLE_HOME, met ORACLE_HOME de home directory van de database installatie. In ons voorbeeld zou dit in c:\oracle\db10gr2\hs\admin zijn.

Deze file ziet er als volgt uit:

#
# HS init parameters
#
HS_FDS_CONNECT_INFO = sysdnsappke
HS_FDS_TRACE_LEVEL = 0

HS_DB_NAME = appke
HS_DB_DOMAIN = birds.be

#
# Environment variables required for the non-Oracle system
#
#set =


Hierbij is
HS_FDS_CONNECT_INFO de naam van de system dsn definitie.
HS_FDS_TRACE_LEVEL gebruikt voor debugging ... dus gewoon op 0 laten staan.
HS_DB_NAME en HS_DB_DOMAIN respectievelijk de hostname en domain name van de global names database definitie voor de externe database. (zie verder nota over global names)

Houdt er rekening mee dat de global name van de database niet langer dan 8 characters mag zijn. (zie metalink nota xxxxxxx )

In de directory van de database zit een voorbeeld file voor het aanmaken van de file.

De naam van de file is belangrijk !!!
De listener zal bij het gebruik van de HS source een init file gaan zoeken met de naam die in de listener.ora gedefinieerd is als sid. In ons voorbeeld zullen wij deze file dus initappke.ora noemen.

4. Aanpassen van de listener.ora.

De mdb file wordt aangesproken door een agent (hsodbc). Deze agent wordt op zijn beurt aangesproken door de Oracle listener. Dus ... wanneer je een select zal doen tegen een tabel uit de ms-access database vanuit bijvoorbeeld sql*plus zal de database engine de listener aanspreken voor het aanleveren van de data.

Wat moet er in de listener.ora komen ?

Wel heel simpel : een entry die verteld welke dsn er dient gebruikt te worden (=sysdsnappke), wat de oracle home is onde dewelke de HS definitie file staat (zie stap 3) en welke agent er moet gebruikt worden om de dsn aan te spreken (hsodbc).

SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=sysdsnappke)
(ORACLE_HOME=c:\oracle\db10gr1)
(PROGRAM=hsodbc)
)
)
Normaal gezien staan er al entries in de file. In dat geval moet je alleen een SID_DESC toevoegen.
Na de aanpassing van de file moet je de listener stoppen en terug starten. Indien je je database automatisch laat registreren bij de listener is het noodzakelijk dat je de database heropstart.

4. Aanpassen van de tnsnames.ora file.

In de tnsnames file moet een definitie komen om de database de datasource te laten aanspreken.

appke =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = server.birds.be)(PORT = 1521))
(CONNECT_DATA =
(SID = appke)
)
(HS = ok)
)


In sommige documentatie staat dat de çHS = ok) binnen de connect data moet staan. Dit blijkt niet juist te zijn. Zie hiervoor metalink nota xxxxxxx.

5. Maken van een database link.

De database link is nodig om de objecten vanuit de 'andere' database aan te kunnen spreken.

Voer hiervoor het volgende sql-statement uit: create public databaase link for


create public database link appke using 'appke';


Het is niet noodzakelijk om de database link als public te definieren.

Indien de access database beveiligd is dient de username en het password gespecifieerd te worden in de database link. De username en password zijn de gene van de access database.

create public database link windocdb connect to "system" identified by "kaboeleke" using 'windocdb'

Let hierbij op het feit dat de username en het password tussen dubbele quotes moeten staan. Indien dit niet gedaan wordt, wordt deze informatie als case-insencitive bekeken en zal er mogelijk een fout password gebruikt worden.

Hierna is het mogelijk het geheel te testen op werking.
Doe hiervoor een select tegen een object uit de externe access database over de database link:

select * from @


6. Aanmaken van synonyms voor de database objecten.

Het aanmaken van de synonyms is niet noodzakelijk, doch het geeft het gemak dat alle selects gelijk kunnen blijven en onafhankelijk van het gebruik van database links en/of tabel of synonym namen.

Create synonym for @;

Problemen
Bij het uittesten kwam ik een aantal 'ambetante' dingen tegen.
Hier een lijst(je)

  • Global names
    Indien je database met global_names = true draait kan je problemen hebben met de naam.
    Het eenvoudigste om dit te verhelpen is de global_names naar false te zetten :
    alter session set global_names = false;



Referenties

Internet:


Metalink:

[
HO define: Long fetch] Ora-00600 error :
---> note 458441
----> solution is to select all colums directly and not through a *