• Home
  • Tätigkeitsbereiche
    • IT-Personal
    • Softwareentwicklung
    • Projektmanagement
    • Reseller
  • IT-Blog
  • Kontakt

spatial error ORA-29902

Details
02 November 2016

I was having fun with Oracle Spatial lately, and stumbled over a fantastic bug (which should have been already fix what he not is...). I got the following:

ORA-29902: error in executing ODCIindexStart()routine ORA-13207: incorrect use of ... ORA-06512: at "MYSYS.SDO_INDEX_METHOD_10I...

which was caused by

AND SDO_ANYINTERACT(XSP.GEOM,XCG.GEOM) = 'FALSE'

what I really like here is the solution, which really works

AND SDO_ANYINTERACT(XSP.GEOM,XCG.GEOM) != 'TRUE'

This bug (18718478) should be solved (at least for SDO_RELATE) with 12.1.0.2 which I am currently working on...

history for SQL/PLUS and RMAN II

Details
05 January 2014

As explained previously, you can easily get a history for sqlplus and rman on lnux.

apt-get install rlwrap

I forgot to mention that the easiest way to automatically use it is to set up an alias in your shell

alias sqlplus='rlwrap sqlplus'

Oracle 12c Installation on Debian Wheezy

Details
04 January 2014

debian3

oralogo_small

Ok, after having some time for playing around I decided to try a 12c installation on debian wheezy.

install mandatory packages

apt-get install binutils autoconf automake bzip2 gcc less libc6-dev make libstdc++5 unzip zlibc build-essential libaio1

create some links

Some libs are expected in other directories, we need to change that

ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib64

x-terminal

I chose fluxbox but you can also take anything else like xterm, gnome, kde….

apt-get install fluxbox

prepare user and groups

groupadd oinstall
groupadd dba
useradd oracle -m -d /home/oracle -g oinstall -G dba -s /bin/bash
passwd oracle

check environment

there are several kernel parametersw that have to be changed to succesfully install the database, here is a script that helps you to determine them

echo "sem: ";echo "min 250 32000 100 128"; echo "is " `cat /proc/sys/kernel/sem`; echo; \
echo "shmall: ";echo "min 2097152"; echo "is " `cat /proc/sys/kernel/shmall`; echo; \
echo "shmmax - should be able to hold the SGA - max 4G-1byte: ";echo "is " `cat /proc/sys/kernel/shmmax`; echo; \
echo "shmmni: ";echo "min 4096"; echo "is " `cat /proc/sys/kernel/shmmni`; echo; \
echo "file-max: ";echo "min 6815744"; echo "is " `cat /proc/sys/fs/file-max`; echo; \
echo "ip_local_port_range: ";echo "min/max 9000 65500"; echo "is " `cat /proc/sys/net/ipv4/ip_local_port_range`; echo; \
echo "rmem_default: ";echo "min 262144"; echo "is " `cat /proc/sys/net/core/rmem_default`; echo; \
echo "rmem_max: ";echo "min 4194304"; echo "is " `cat /proc/sys/net/core/rmem_max`; echo; \
echo "wmem_default: ";echo "min 262144"; echo "is " `cat /proc/sys/net/core/wmem_default`; echo; \
echo "wmem_max: ";echo "min 1048576"; echo "is " `cat /proc/sys/net/core/wmem_max`; echo; \
echo "aio-max-nr: ";echo "max 1048576"; echo "is " `cat /proc/sys/fs/aio-max-nr`; echo;

change necessary parameters

you have just to change the parameters that don't fit, but feel free to set them all to the minimum with this script

echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
# !!!! needs to fit YOUR SGA (=main memory for database, be sure to have enough ram for PGA etc.)!!!!
echo "kernel.shmmax = 1200000000" >> /etc/sysctl.conf
#echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "fs.file-max = 6815744" >> /etc/sysctl.conf
#echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.rmem_max = 4194304" >> /etc/sysctl.conf
echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.wmem_max = 1048576" >> /etc/sysctl.conf
echo "fs.aio-max-nr = 1048576" >> /etc/sysctl.conf

change some limits

also some limits have to be set

echo "oracle soft nproc 2047" >> /etc/security/limits.conf
echo "oracle hard nproc 16384" >> /etc/security/limits.conf
echo "oracle soft nofile 1024" >> /etc/security/limits.conf
echo "oracle hard nofile 65536" >> /etc/security/limits.conf

create directories

I prefer to separate software, database files and recovery files so i put them under /opt/oracle (mountpoint) in different directories

mkdir -p /opt/oracle/app/oracle
mkdir -p /opt/oracle/oradata
mkdir -p /opt/oracle/flash_recovery_area
chown -R oracle:oinstall /opt/oracle
chmod -R 775
/opt/oracle

These steps prevent errors when the installer links some libraries

ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/basename /bin/basename

finish preparations

reboot

after unzipping the installation files add some tweaks...

Some makefiles need manual tweaking because they can't find required libs beause of some environment issues

sed -i 's/\$(PLSHPROF_LINKLINE)/\$(PLSHPROF_LINKLINE) -lons/g' /opt/oracle/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk sed -i 's/\$(RMAN_LINKLINE)/\$(RMAN_LINKLINE) -lons/g' /opt/oracle/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk sed -i 's/\$(TG4PWD_LINKLINE)/\$(TG4PWD_LINKLINE) -lnnz12/g' /opt/oracle/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk

installer

su oracle

/pathtoinstallfileshere/database/runInstaller -ignoreSysPrereqs

The installer should guide you through each step in simple and advanced mode. When the requirements are checked you can savely bypass the warnings, because not everything can be checked on an unsupported ;-) environment.

!!!I really want to keep this up-to-date so please send me a note if i missed something or something is easier to handle than i did it!!!

Errors that can happen and how to bypass them

Could not retrieve local nodename

that happens if the hostname is not in your /etc/hosts file, just insert it there as localhost and it should work

java exception when calling the installer

happened at my side because I installed it over vnc This should help:

xhost localhost

Error in invoking target 'install' of makefile ins_ctx.mk

seems to be a problem with a newer? glibc version in the make.log file you should find something like

warning: libstdc++.so.5, needed by /u01/app/oracle/product/11.2.0/dbhome_1/ctx/lib//libsc_fa.so, not found

simply install libstdc++5 apt-get install libstdc++5

ASM disk already member of diskgroup

Details
24 August 2013

If you are ever reinstalling on an ASM and you can't select your disks in the DBCA because they are already member of the diskgroup, you have to delete the label before

dd if=/dev/zero of=/dev/oracleasm/disks/MYDB_ASM_ARC_1 bs=1024 count=100
dd if=/dev/zero of=/dev/oracleasm/disks/MYDB_ASM_DB_1 bs=1024 count=100
Found myself the solution at Burlescon

Gerrit Permission denied (public key)

Details
04 August 2013
Lessons learnded part 3291: SSH error "permission denied (public key)", seems to have an obvious reason, I thought when a colleague asked me on supporting him. I explained how to generate public/private keys, how to put it to gerrit etc. Nothing worked. After 4 hours of sweat I found the error. He registered on Gerrit, was in the correct group, but had no username. It seems that the username in gerrit is NOT mandatory. However it's not possible to push via SSH without providing the user the public key should work for.

Gerrit delete-project plugin for 2.6

Details
13 July 2013

Gerrit is great! And one of the most needed plugins is the delete-project plugin, for easy deleting projects without the need to manuall delete files from the harddisk and remove rows from the underlying database. What is missing? The plugin... it is NOT prebuilt available. Why? I don't know... However I needed to compile it and so here it is for the actual Gerrit version (2.6) delete-project.2.6.jar

Android debug bridge (adb) for Debian

Details
20 November 2012

After a fullwipe of my phone (after playing around ;-P) I ended up with a almost bricked phone and needed to copy some files. You normally do that with adb (android debug bridge) an command line client for your (to the pc connected) phone that runs on your client. Normally you need to install the Android SDK (some hundred MBs) and do a bunch of configurations, but there seems to be a new package "android-tools-adb" currently in Debian SID. Installation was not more than download it from packages.debian.org and install it with

dpkg -i downloadedpackagename.deb
worked out of the box, perfectly I LOVE DEBIAN!!!

add macro plugin to gedit

Details
17 November 2012

I really don't know why, but there is no macro (record/playback) component included in gedit, and if you are used to that as I am from Notepad++ it's hard not to cry if you come to source you need to reformat or change....

But there is a plugin for gnome2 that Eduardo Romero changed to work in gnome3. Here the (very few) steps you need to get this plugin working on your gnome3 desktop

  • get the files "macropy.plugin" and "macropy.py" from https://github.com/eguaio/gedit-macropy
  • copy them to /usr/lib/gedit/plugins
  • restart gedit
  • activate plugin in Edit/Preferences/Plugins

If you prefer to not configure the plugin for global use then you can also do it per user following the README included in the github

You are done, have fun!

Java in Oracle Forms without Beans and Pluggable Java Components

Details
15 August 2012
An often discussed topic is Java in Oracle Forms. There are various sites out there that explain how to build and deal with PJCs and Beans. Rarely covered is some basic functionality Forms has builtin since it's on the web (6i). That's the Java-Importer. Basically you have the possibility to use Java not just on Client side (with PJCs and Beans) you also are able to use Java via your frmweb process on the application Server. I recently needed it - once again. I tried to complete the implementation of the CELLWRAPPER parameter in the Reports Server (see previous post). It should be enough to put the file in the REPORTS_PATH, but that DOES NOT WORK . So I tried to get the workingDirectory, and found out that the easiest way is to use the Java System Class. First import the Java Class within your Formsbuilder:
  • Program -> Import Java Classes
  • enter "java.lang.System" as in "Import Classes"
  • Press "Import"
This few steps created a complete PL/SQL Wrapper for the java System Class. Now it's an easy task to get the user-directory (a bit reading of the java-doc) with:
SYSTEM.getProperty('user.dir')
Especially when using Java you need a better exception handling here's an rudimentary example of this:
BEGIN

  MESSAGE (SYSTEM.getProperty('user.dir'));
  PAUSE;
  
-- just an example, of course some better errorhandling should be done here
EXCEPTION
 -- important that you handle JAVA_ERROR AND EXCEPTION_THROWN
 -- you could even do a better handling by importing the Exception class
 WHEN ORA_JAVA.JAVA_ERROR then 
      MESSAGE('Java Error occured: '||ORA_JAVA.LAST_ERROR);
      PAUSE;
 WHEN ORA_JAVA.EXCEPTION_THROWN then                    
       MESSAGE('Java Exception occured');                  
       PAUSE;
 WHEN OTHERS THEN
       MESSAGE('others occured....');
       PAUSE;
END;
Have fun! Let me know if anybody needs more examples!

FRM-41214 Unable to run Report with CELLWRAPPER

Details
14 August 2012

If you use the output format DELIMITEDDATA in Oracle Reports, that exports the report as CSV file, then sometimes you need to use a wrapper (e.g. if there are CR in a field) means output is not like

SCOTT;TIGER;TESTUSER;
CAPERS;JONES;TESTUSER2;
it's
"SCOTT";"TIGER";"TESTUSER";
"CAPERS";"JONES";"TESTUSER2";
In Reports it's pretty easy, there is a parameter that you can set called CELLWRAPPER. With this parameter you can define which character should be used to wrap the cells. If you use double quotes (") then you get FRM-41214 Unable to run Report (when running from Forms, another error when running from rwservlet directly). I am currently working on 11g, but it seems thats something that's not fixed since 10g. So it's kind of terrible that for such a long time there is a bug that has not been fixed. Metalink Note 397279.1 describes a workaround, by using another parameter CMDFILE, basically a file that contains parameters for the reports. In this file you put in your CELLWRAPPER=" (UX) or CELLWRAPPER='"' (WIN) parameter, and call it with CMDFILE=/tmp/mycmdfile.cmd. Means you change your Url (or forms parameter lists whatever...) from
http://myreportsserver....&desformat=delimited&cellwrapper="
to
http://myreportsserver....&desformat=delimited&cmdfile=/tmp/mycmdfile.cmd.

gnome connection manager - ssh

Details
17 July 2012

Almost everybody who is using SSH knows Putty well. If you have multiple servers to administrate putty lacks of the feature to easily administrate these. Of course it's possible, but not very easy to use.

On Windows I an using the "Putty Connection manager", a pretty nice tool thats doing the job. It has some minor bugs, is not supported anymore, but works well on any flavour of windows.

After (already mentioned several times) moving to Gnome, I needed some kind of substitute and stumbled upon a incredible good piece of software called "Gnome Connection Manager". After using it for several weeks, I can say it is so simple and powerful that I just can just recommend it to everybody working on Linux.

As you can see in this screenshots, you can easily define connection details, tunnels, startup commands, X11 forwarding.

screenshot1 gnome connection manager

Also more advanced features, like the sending of host-commands to multiple connections is supported.

screenshot2 gnome connection manager Heavily recommended, get it!!!

P.S. Screenshots taken directly from kuthulu.com

splitting a comma delimited string in Oracle

Details
28 May 2012

Recently I needed to split a delimited string with PL/SQL. I just did not want to write the xx version of a "parse delimited string" package, and so I stumbled upon Alex Nuijtens Blog. This solution was not the least complex, but so beautiful I almost wanted to cry ;-). !Thanks for sharing your solution at this point Alex! It worked perfectly and so I implemented it in my programs. After a few more tests with larger string (~5000-10000) I noticed huge performance issues. So I did a fast check with using a "normal" loop and not the hierachic query Alex is using. Same result, terribly slow (~30s). After thinking a bit (...happens from time to time...) it was clear, normally if you parse a delimited string, you always cut the part off the front, that you parsed and put it somewhere else (collection....), what did not happen by using this solution. So I rewrote the pure SQL approach to a PL/SQL function. So The code looks now:

vParseString := pParseText;
FOR i IN 1..length (regexp_replace (vParseString,vRegExp))  + 1
LOOP
            vToken := REGEXP_SUBSTR (vParseString,vRegExp);
            vCutPos := REGEXP_INSTR(vParseString,vRegExp,1,2);
            vParseString := substr(vParseString,vCutPos);
            DBMS_OUTPUT.PUT_LINE(vToken);
      EXIT WHEN vCutPos = 0;
END LOOP;
The complete programs needs below 0.1 seconds to finish in comparison to 30 before. So Alex program is good for small strings, but does not fit my needs in this case. Probably it's much faster if you use analytic functions, where you always replace the string of the previous line... I think if I have some time I will give that a try, because a pure SQL solution would be much more beautiful than a PL/SQL approach ;-).
  1. Empty calendar in Icedove/Thunderbird
  2. Gnome extension work for Debian Wheezy
  3. Printer problems in Gnome
  4. preseeding in Debian wheezy
  5. build thunderbird 7.x on Debian wheezy
  6. Enable Sound on Debian Wheezy for Dell Latitude 6500
  7. RMAN-06026 and RMAN-06023 when restoring
  8. history for SQL/PLUS and RMAN
  9. UTL_MAIL with SMTP authentication
  10. How to fix ORA-00600/ORA-07445
  11. clockworkmod "an error occured while downloading your recovery."
  12. KVM - bad usb drive performance
  13. KVM Kernel Based Virtual Machine vs. XEN
  14. Oracle 11g Installation on Debian Squeeze
  15. The type R is already defined
  16. HOWTO Sign Amazon Product API Requests
  17. Multiple Desktops in Windows 7
  18. java.security.AccessControlException: access denied
  19. FRM-13008 cannot find java bean
  20. SET_WINDOW_PROPERTY does not trigger WHEN-WINDOW-RESIZED
  21. subversion tortoisesvn with alternate ssh port
  22. developer suite 10g on vista and windows 7
  23. Securing the RBASH?
  24. sending bacula status mails with smtp authentication
  25. svnserve with slikSVN
  26. limit user rights - Jail Shell RBASH (Debian)
  27. limit user rights - Jail Shell RSSH (Debian)
  28. limit user rights - Jail Shell SFTP (Debian)
  29. limit user rights - Jail Shell SSH (Debian)
  30. Bacula "Network error with FD during Backup"
  31. port 9240 already in use
  32. XPlanner+ Permissions for security Manager
  33. XPlanner Plus
  34. Cannot configure CacheManager
  35. Tomcat on Debian
  36. Oracle Developer Patch 10.1.2.3
  37. Oracle Reports font subsetting
  38. Adding Fonts on Unix for Oracle Reports PDF
  39. Harddisk recovery tools free and not so free
  40. REP-1352 Font Issue
  41. Oracle Reports with barcode
  42. Enterprise-Manager + RMAN No RMAN found, Message file not found
  43. ORA-1017: invalid username/password when creating database link
  44. resolv.conf overwritten empty after reboot
  45. AmazonBestseller which products are cheap?
  46. 4gb seg fixup errors after upgrading from etch to lenny
  47. Oracle Bug ORA-07445: exception encountered
  48. C compiler cannot create executables.
  49. Oracle Java File permissions
  50. EM Manager "Compute dynamic property takes too long"
  51. where to download com_migrator
  52. PL/SQL Email-Validation
  53. Power Consumption of Dell Server
  54. Enterprise Manager and ORA-00018
  55. Io exception: The Network Adapter could ...
  56. Centos = Redhat Enterprise Linux
  57. Enterprise Manager notification not working
  58. the magic Oracle WITH-clause
  59. Error in invoking target - Oracle on Debian
  60. Oracle Installation on Debian for dummys II
  61. Oracle Installation on Debian for dummys I
  62. Oracle-Reports Asynchronous calls with SRW-API
  63. on-commit not working on materialized views
  64. using Materialized View
  65. How to determine the character-set in Oracle
  66. how to compile invalid sys-objects
  67. ORA-06553: PLS-320: the declaration of the type...
  68. Access Control with Context/Fine-Grained Access Control
  69. MDA Vario/Qtek 9100 Ersatzstift/Replacement Stylus
  70. Versioning of a table in Oracle
  71. datapump fails with ora-06502
  72. Where to find Opatch
  73. How to create a SPFILE from a PFILE
  74. How to use UTF8 in PDFs created by Oracle-Reports
  75. Oracle Failsafe and SPFILE
  76. phone-number check in constraint
  77. webutil wuc-024 (WUC-24)
  78. Failsafe ORA-00942 "View or Table does not exist" workaround
  79. direct access to the database without TNSNAME.ORA
  80. Failsafe ORA-00942 "View or Table does not exist"
  81. Connection to host failed. Bad SQL_SCRIPT at - line 227.
  82. Is Oracle Failsafe just for Databases?
  83. Do you know Oracle Failsafe???
  84. REP-56055: Exceed max connections allowed
  85. Troubles with OracleDataSource
  86. Enterprise Manager clone Database results in "insufficient disk space"
  87. How to distribute Oracle Reports Part II
  88. How to distribute Oracle Reports Part I
  89. No valid GPS-Signal on Acer N35
  90. How to use a terminal-file in webforms
  91. ORA-00257 ORA-16020 Archiver Stuck
  92. ORA-39002 ORA-39070 ORA-39087 with Datapump
  93. Installation Forms and Reports Service failed
  94. Simple Machine Forum
  95. Don't use timers in webforms - WHY NOT?
  96. The difference between PJC and Java Beans in Forms
  97. Forms and Reports Services Standalone
  98. ORA-00932: inconsistent datatypes
  99. Compare Database Performance
  100. Scott and Tiger
  101. Surprise Surprise Oracle Developer Suite 10gR2
  102. Working with Oracle Express Edition
  103. Oracle Express - an Oracle-Database that's for free

Page 2 of 11

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • Suche
  • Login
  • Impressum