[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference orarep::nomahs::rdb_60

Title:Oracle Rdb - Still a strategic database for DEC on Alpha AXP!
Notice:RDB_60 is archived, please use RDB_70..
Moderator:NOVA::SMITHISON
Created:Fri Mar 18 1994
Last Modified:Fri May 30 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:5118
Total number of notes:28246

5020.0. "EXTFUN_FAIL + INVRTNUSE + RTNIMAGEERR with SQL$x function" by 8292::PJACOB (Patrick [email protected]) Tue Feb 11 1997 13:54

One of my customer used to use function without problems . So far so good.
Now he tries to use SQL$GET_ERROR_TEXT in a function. He did not change
anything else than changing the link command to include SQL$USER object
library. Now it fails on VAX even when he uses a previous valid function:

	SQL> select  capitalize('a') from rdb$database;
	%RDB-E-EXTFUN_FAIL, external routine failed to compile or execute 
	successfully
	-RDMS-E-INVRTNUSE, routine CAPITALIZE can not be used in this request, 
	image USR$COMMON:rdbfunc.exe not activated
	-RDMS-E-RTNIMAGEERR, error activating the image USR$COMMON:rdbfunc.exe

And on Alpha, it still works ! 

I reproduced this with 6.0-15 VAX where it fails and 6.0-15 Alpha where it
succeeds . And also with Rdb 6.1-04 .

In V7.0 on VAX, the last error is changed to 
	-RDMS-I-TEXT, Error activating image FRVMSS$DKA200:[USER.PJACOB.RDB.JFP]
	RDBFUNC.EXE;14, Writable shareable images must be installed  
But if I install this image by :
	$ install add/share/write/open USR$COMMON:rdbfunc.exe
it then fails with:
      -RDMS-E-INVSECIMAGE, image location specification fails secure translation
      -RDMS-I-TEXT, File currently locked by another user

How can make it work on VAX with Rdb 6.0-15 ?
Are the V7.0 error messages really consistent ? Is it a requirement new in V7?

Patrick.

on VAX:
======
...
$ if F$GETSYI("ARCH_name") .EQS. "VAX"
$ then
$       write sys$output "it will fail on vax !!!"
it will fail on vax !!!
$ cc/decc/warning=disable=portable submitjob.c
$ cc/decc/warning=disable=portable capitalize.c
$ cc/decc/warning=disable=portable SQL_ERREUR_NSDK.C
$ show log sql$user
   "SQL$USER" = "SYS$COMMON:[SYSLIB]SQL$USER60.OLB" (LNM$PROCESS_TABLE)
$ link/share=rdbfunc.exe/notrace  -
        submitjob,capitalize,SQL_ERREUR_NSDK,rdbfunc_vax/opt,sql$user/lib
universal=submitjob
universal=capitalize
universal=sql_erreur_nsdk
$ else
$ endif
$ set file/prot=w:rwed RDBFUNC.EXE
$ mcr sql$
attach 'file jfp';
select  capitalize('a') from rdb$database;
%RDB-E-EXTFUN_FAIL, external routine failed to compile or execute successfully
-RDMS-E-INVRTNUSE, routine CAPITALIZE can not be used in this request, image
USR$COMMON:rdbfunc.exe not activated
-RDMS-E-RTNIMAGEERR, error activating the image USR$COMMON:rdbfunc.exe
...

on Alpha:
=========
...
$ if F$GETSYI("ARCH_name") .EQS. "VAX"
$ else
$       write sys$output "it will succeed on AXP !!!"
it will succeed on AXP !!!
$ cc/decc/warning=disable=portable submitjob.c
$ cc/decc/warning=disable=portable capitalize.c
$ cc/decc/warning=disable=portable SQL_ERREUR_NSDK.C
$ show log sql$user
   "SQL$USER" = "SYS$COMMON:[SYSLIB]SQL$USER60.OLB" (LNM$PROCESS_TABLE)
$ link/share=rdbfunc.exe/notrace -
        submitjob,capitalize,SQL_ERREUR_NSDK,rdbfunc_axp/opt,sql$user/lib
SYMBOL_VECTOR=(SPARE,-
SUBMITJOB=PROCEDURE,-
CAPITALIZE=PROCEDURE,-
SQL_ERREUR_NSDK=PROCEDURE)
$ endif
$ set file/prot=w:rwed RDBFUNC.EXE
$ mcr sql$
attach 'file jfp';
select  capitalize('a') from rdb$database;


 A
 >>
 >>
 >>
1 row selected
exit
T.RTitleUserPersonal
Name
DateLines
5020.1NOVA::SMITHIDon't understate or underestimate Rdb!Tue Feb 11 1997 14:0411
~In V7.0 on VAX, the last error is changed to 
~	-RDMS-I-TEXT, Error activating image FRVMSS$DKA200:[USER.PJACOB.RDB.JFP]
~	RDBFUNC.EXE;14, Writable shareable images must be installed  

This looks like you have a WRT PSECT.  Find out what it is and change it in
the options file NOWRT.  It is unusual to install an image /WRITE

You don't show us the source code or the function definitions.  Please show us
so we can help further.

ian
5020.2DUCATI::LASTOVICAIs it possible to be totally partial?Tue Feb 11 1997 14:207
re: .0, .-1
	I suspect that the problem is more along the lines of a
psect that is WRT and SHR.  Usually one would change the options
files to specify NOSHR.  This most often seems to happen with 
modules written in C that contain global variables.
	use a link map (/map/full) to determine what psect(s) are
SHR and WRT.
5020.3NOVA::SMITHIDon't understate or underestimate Rdb!Tue Feb 11 1997 16:183
right, I meant to so NOSHR, not NOWRT.  Sorry

Ian
5020.4additional info8292::PJACOBPatrick [email protected]Wed Feb 12 1997 13:5641
Thanks to both of you. I will investigate in this direction.

But in the meantime, let me share with you the funny side effect I found out
when I started to apply your suggestion: 
Once I added in V7.0 the shareable image ( /share/write/open USR$COMMON:rdbfunc
.exe ) from where I got the "file currently lock error", I relinked the object
to recreate a new image ( and the map of the linker ). What a surprise ! Now
the SELECT works !!!??? 


>You don't show us the source code or the function definitions.  Please show us
>so we can help further.

 Here it is :
create function SQL_ERREUR_NSDK (
in int,		-- code sql de l'erreur
in char(7),	-- nom du module ou programme
in char(15),	-- etiquette ou la fonction d'appel de la requete
in char(20),	-- user NSDK
in char(3))	-- code de l'application
returns integer;
    external
        location 'USR$COMMON:rdbfunc.exe'
            with SYSTEM logical_name translation
language c
general parameter style variant;
grant
    EXECUTE, SHOW, DROP, DBCTRL
    on function SQL_ERREUR_NSDK
    to ADMIN_RDB
    position 1;
grant
    EXECUTE
    on function SQL_ERREUR_NSDK
    to PG
    position 2;
revoke all
    on function SQL_ERREUR_NSDK
    from PUBLIC
    position 3;
commit work;
5020.5PSECT_ATTR=RDB$MESSAGE_VECTOR,NOSHR,LCL8292::PJACOBPatrick [email protected]Thu Feb 13 1997 09:4024
Hi,

I finally make it work properly on VAX with Rdb 6.0-15 , 6.1-04 and 7.0.
The map resulting fronm a LINK/MAP/FULl shows that psect RDB$MESSAGE_VECTOR was
both SHR and WRT. Thus adding PSECT_ATTR=RDB$MESSAGE_VECTOR,NOSHR,LCL in the
VAX option file fixed the problem. I should read Guide to SQL Programming 
more often... 

I kept however the Alpha option file without this psect attribute because it 
does not seem to be necessary. Do you think I need to change the option file 
on Alpha too? Currently it is:
	SYMBOL_VECTOR=(SPARE,-
	SUBMITJOB=PROCEDURE,-
	CAPITALIZE=PROCEDURE,-
	SQL_ERREUR_NSDK=PROCEDURE)

I gave up with the strange behaviour I mentionned of both install the shareable
image with /open/shared/writable and regenerate a new image upside on disk. It
workarounded the problem on the 3 mentionned versions but it was not a clean
workaround. The error messages were missleading.

Once again, thanks.
    
Patrick.
5020.6HOTRDB::LASTOVICAIs it possible to be totally partial?Thu Feb 13 1997 10:073
    I believe that the difference between vax and alpha is due to the DECC
    compiler being a little bit more vms-friendly.  If it works on Alpha, I
    think that there isn't much more you need to do.
5020.7I think it's all compilersORAREP::RTOAL2::MAHERTIER3 simply a better RPC!Thu Feb 13 1997 11:5921
    Hi,
    
    Not so long ago I asked the COBOL people the same thing and I believe
    the answer was that most people really wanted noshr so that is the
    default for (all?) compilers on Alpha. (Which seems reasonable but
    another change was that if you really wanted an installed common
    block then you had too explicitly put the psect name in the options
    file symbol_table directive so it could be linked against)
    
    Another curious new (apparently calling) standard is that these
    psects will have their size rounded up to multiples of 8 bytes.
    I think rdb$message_vector is 80 bytes so no change there. (MACRO
    has no such requirement even though it's a compiler  on Alpha)
    
    The other thing I remember from one of the earlier replies was
    about "locked by other user" messages. It's probably not related
    but once I received a similar error when installing a writeable
    shareable with a ";" specified in the filename. Taking it off
    fixed it. (But I think your errors were from Rdb not install)
    
    Regards Richard Maher.