ApplixWare

ÅäÖÃ

±ØÐëÕýÈ·ÅäÖàApplixWare £¬ÒÔ±ãÈÃËüÄܹ»·ÃÎÊ PostgresODBC Çý¶¯Èí¼þ£®
 
ÔÊÐí ApplixWare Êý¾Ý¿â·ÃÎÊ

ÕâЩָµ¼ÐÅÏ¢ÊÊÓÃÓÚ Linux É쵀 4.4.2 °æ±¾µÄ ApplixWare£®Çë²Î¿¼ Linux ϵͳ¹ÜÀí ÔÚÏßÊÖ²á»ñÈ¡¸üÏêϸµÄÐÅÏ¢£®

    Äã±ØÐëÐÞ¸Ä axnet.cnf ÒÔ±ãÓÚ elfodbc ¿ÉÒÔÕÒµ½ libodbc.so £¨ODBC Çý¶¯¹ÜÀíÆ÷£©¹²Ïí¿â£®Õâ¸ö¿â°üº¬ÔÚ ApplixWare ·¢²¼°æ±¾Àµ«ÊÇÒªÐÞ¸Ä axnet.cnf Ö¸ÏòÕýÈ·µÄλÖã®

    ÒÔ root Éí·Ý±à¼­Îļþ  applixroot/applix/axdata/axnet.cnf£®

      ÔÚ axnet.cnf µÄµ×²¿£¬ÕÒ³öÒÔÏÂÃæÎÄ×Ö¿ªÍ·µÄÒ»ÐÐ
      #libFor elfodbc /ax/...
      °ÑÕâÒ»ÐиijÉ
      libFor elfodbc applixroot/applix/axdata/axshlib/lib
      ¸æËß elfodbc ÔÚÕâ¸ö·¾¶Àï²éÕÒ ODBC Ö§³Ö¿â£®Í¨³£ Applix ±»×°ÔÚ /opt£¬ÕâÑùÍêÕûµÄ·¾¶¾ÍÊÇ /opt/applix/axdata/axshlib/lib£¬µ«Èç¹ûÄãÔÚÆäËûµØ·½°²×°ÁË Applix £¬ÏàÓ¦µÄÐ޸ķ¾¶£®
    ´´½¨ÉÏÃæÃèÊöµÄ .odbc.ini£®Äã¿ÉÄÜ»¹ÒªÔö¼Ó±êÖ¾
    TextAsLongVarchar=0
    µ½ .odbc.ini µÄÊý¾Ý¿âÉùÃ÷²¿·Ö£¬ÕâÑùÎı¾×ֶξͲ»»áÏÔʾΪ **BLOB**¡£
²âÊÔ ApplixWare ODBC Áª½Ó
    ÔËÐРApplix Data

    Ñ¡Ôñ¸ÐÐËȤµÄ Postgres Êý¾Ý¿â£®

      Ñ¡Ôñ Query->Choose Server£®

      Ñ¡Ôñ ODBC£¬²¢ÇÒÇû÷ Browse£®ÄãÔÚ .odbc.ini ÀïÅäÖõÄÊý¾Ý¿âÓ¦¸ÃÏÔʾ³öÀ´£®È·±£  Host: field  Êǿյģ¨Èç¹û²»ÊÇ£¬axnet ½«ÊÔͼÓëÁíһ̨»úÆ÷µÄ axnet Áª½Ó²éÕÒÊý¾Ý¿â£©£®S

      Ñ¡ÔñÇû÷ Browse ÏÔʾ³öµÄÊý¾Ý¿â£¬È»ºóÇû÷ OK£®

      ÔڵǼ±êʶ¶Ô»°¿òÀïÊäÈë username£¨Óû§Ãû£©ºÍ password £¨¿ÚÁ£®È»ºóÇû÷ OK£®

    ÄãÓ¦¸Ã¿´µ½ÔÚÊý¾Ý´°¿Ú×óϽÅÓÐ ¡°Starting elfodbc server¡± £¨Æô¶¯ elfodbc ·þÎñÆ÷£©×ÖÑù£®Èç¹ûµ¯³öÒ»¸ö´íÎó¶Ô»°¿ò£¬²Î¿¼ÏÂÃæµÄµ÷ÊÔÕ½ڣ®

    'Ready'£¨¾ÍÐ÷£©ÐÅÏ¢½«ÔÚÊý¾Ý´°¿ÚµÄ×óϽdzöÏÖ£®Õâ±íÃ÷ÄãÏÖÔÚ¿ÉÒÔÊäÈë²éѯ£®

    ´Ó Query->Choose tables Ñ¡ÔñÒ»¸ö±í£¬È»ºóÑ¡Ôñ Query->Query À´·ÃÎʸÃÊý¾Ý¿â£®±íµÄÍ· 50 ÐÐ×óÓÒµÄÐÅÏ¢½«ÏÔʾ³öÀ´£®

³£¼ûÎÊÌâ

ÔÚ³¢ÊÔͨ¹ý Applix Data ½¨Á¢Ò»¸ö ODBC Áª½ÓʱÏÂÃæµÄÐÅÏ¢¿ÉÄܳöÏÖ£º
Cannot launch gateway on server£¨ÎÞ·¨ÔÚ·þÎñÆ÷ÉϽ¨Á¢Íø¹Ø£©
elfodbc can't find libodbc.so. Check your axnet.cnf.£¨elfodbc ÎÞ·¨ÕÒµ½ libodbc.so£®¼ì²éÄãµÄ axnet.cnf£®£©
Error from ODBC Gateway: IM003::[iODBC][Driver Manager]Specified driver could not be loaded
libodbc.so ²»ÄÜÔÚÕÒµ½ .odbc.ini ÀïÁгöµÄÇý¶¯£®¼ì²éÉèÖã®
Server: Broken Pipe
Çý¶¯½ø³ÌÒòΪÆäËûÔ­Òò½áÊøµÄ£®Äã¿ÉÄÜÄõIJ»ÊÇ×îеĠPostgres ODBC Èí¼þ°ü£®

 
setuid to 256: failed to launch gateway
¾ÅÔ·¢²¼µÄ ApplixWare v4.4.1£¨µÚÒ»¸öÓÐ Linux Ϲٷ½Ö§³ÖµÄ ODBC£©ÔÚÓû§Ãû³¬¹ý°Ë(8)×Ö·û³¤Ê±ÓÐÎÊÌ⣮Õâ¸öÎÊÌâÊÇ Steve Campbell ·¢Ïֵģ®
×÷ÕߣºÓÉ Steve Campbell ÔÚ 1998-10-20 Ìá½»£®
axnet ³ÌÐòµÄ°²È«ÏµÍ³¿´ÆðÀ´ÓÐÒ»µãÆæ¹Ö£®axnet ´úÀíÓû§µÄÊÂÎñ£¬Òò¶øÔÚÒ»¸öÕæÕýµÄ¶àÓû§ÏµÍ³ËüÓ¦¸ÃÒÔ root ȨÏÞ£¨ÕâÑùËü¿ÉÒÔ¶Á/дÿ¸öÓû§µÄĿ¼£©£®ÎÒ¶Ô½¨ÒéÕâÑù×öÓÐЩÓÌÔ¥£¬ÒòΪÎÒÃDz»ÖªµÀÕâÑù»áÒýÆðʲôÑùµÄ°²È«Â©¶´£®

µ÷ÊÔ ApplixWare ODBC Áª½Ó

Ò»¸öµ÷ÊÔÁª½ÓÎÊÌâµÄºÜºÃµÄ Unix ϵͳ¹¤¾ßÊÇ strace£®
Óà strace µ÷ÊÔ
    Æô¶¯ applixware£®

    ÔÚ axnet ½ø³ÌÉÏÔËÐÐÒ»¸ö strace£®ÀýÈ磬Èç¹û

    % ps -aucx | grep ax
    ÏÔʾ
    cary   10432  0.0  2.6  1740   392  ?  S  Oct  9  0:00 axnet
    cary   27883  0.9 31.0 12692  4596  ?  S   10:24  0:04 axmain
    ÄÇôÔËÐÐ
    % strace -f -s 1024 -p 10432
    ¼ì²é strace Êä³ö£®
    À´×Ô Cary £ºÐí¶à´Ó ApplixWare À´µÄ´íÎóÐÅÏ¢Êä³öµ½ stderr£¬µ«ÊÇÎÒ²»ÄÜÈ·¶¨ stderr ·¢Ë͵½ÄÄÀËùÒÔ strace ÊÇ°ÑËüÃÇÕÒ³öÀ´µÄ·½·¨£®
ÀýÈ磬Ôڵõ½Ò»¸ö ¡°Cannot launch gateway on server¡±£¬ÎÒÔÚ axnet ÉÏÔËÐÐ strace ²¢Çҵõ½
[pid 27947] open("/usr/lib/libodbc.so", O_RDONLY) = -1 ENOENT
(No such file or directory)
[pid 27947] open("/lib/libodbc.so", O_RDONLY) = -1 ENOENT
(No such file or directory)
[pid 27947] write(2, "/usr2/applix/axdata/elfodbc:
can't load library 'libodbc.so'\n", 61) = -1 EIO (I/O error)
ËùÒÔ·¢ÉúµÄ´íÎóÊÇ applix elfodbc ÔÚ²éÕÒ libodbc.so£¬µ«ÊÇÕÒ²»µ½£®Õâ¾ÍÊÇΪʲô axnet.cnf ÐèÒªÐ޸ĵÄÔ­Òò£®

ÔËÐÐ the ApplixWare ÑÝʾ

ΪÁËͨ¹ý ApplixWare Êý¾Ý½Ì³Ì£¬ÄãÐèÒª´´½¨½Ì³ÌÌáµ½µÄÑùÀý±í£®ËùÓõĴ´½¨±íµÄ ELF ºêÊÔͼÔÚÐí¶àÊý¾Ý¿â×Ö¶ÎÉÏʹÓÃÒ»¸ö NULL Ìõ¼þ£¬¶øÄ¿Ç° Postgres ²»ÔÊÐíÕâЩѡÏ
 
ÒªÈÆ¿ªÕâЩÎÊÌ⣬Äã¿ÉÒÔ°´ÏÂÃæ·½·¨×ö£º
ÐÞ¸Ä ApplixWare ÑÝʾ
    ¿½±´ /opt/applix/axdata/eng/Demos/sqldemo.am µ½Ò»¸ö±¾µØĿ¼£®

    ±à¼­±¾µØ sqldemo.am µÄ¿½±´£º

      ²éÕÒ 'null_clause = "NULL"

      ÐÞ¸ÄÕâЩ³ÉΪ null_clause = ""

    ÔËÐРApplix Macro Editor£®

    ´Ó Macro Editor Àï´ò¿ª sqldemo.am Îļþ£®

    Ñ¡Ôñ File->Compile and Save£®

    Í˳ö Macro Editor£®

    ÔËÐРApplix Data£®

    Ñ¡Ôñ *->Run Macro

    ÊäÈëÖµ ¡°sqldemo¡±£¬È»ºóÇû÷ OK£®

    ÄãÓ¦¸Ã¿´µ½Êý¾Ý´°¿Ú״̬À¸µÄµÄ½ø¶È£¨ÔÚ×óϽǣ©£®

    ÄãÏÖÔÚÓ¦¸Ã¿ÉÒÔ·ÃÎÊ demo ±í£®

ÓÐÓõĺê

Äã¿ÉÒÔÏòÄãµÄ±ê×¼ Applix Æô¶¯ºêÎļþÀïÔö¼Ó¹ØÓÚÄãµÄÊý¾Ý¿âµÇ¼ºÍ¿ÚÁîµÄÐÅÏ¢£®ÕâÊÇÒ»¸öÀý×ÓÎļþ ~/axhome/macros/login.am£º
macro login
set_set_system_var@("sql_username@","tgl")
set_system_var@("sql_passwd@","no$way")
endmacro
 
×¢Òâ
¶ÔÈκκ¬ÓÐÓû§ÃûºÍ¿ÚÁîÐÅÏ¢µÄÎļþÄ㶼Ҫ×Ðϸ±£»¤£®

Ö§³ÖµÄƽ̨

psqlODBC ÒѾ­ÔÚ Linux ÖÆ×÷ºÍ²âÊÔ¹ýÁË£®Ò²ÓÐÔÚ FreeBSD ºÍ Solaris Éϳɹ¦µÄ±¨¸æ£®ÔÚ´úÂëÀïûÓÐÏÞÖÆËüÔÚÒѾ­Ö§³Ö Postgres µÄƽ̨ÉÏÔËÐеĶ«Î÷¡££¨Òë×¢£ºÕâÀï´ó²¿·ÖÄÚÈÝÊÇApplixWareµÄÌص㣬ÄÇλÅóÓÑÓо­Ñ飬ÄÜ·ñÏêϸ½éÉÜһϣ¿£©
×