ºìÁªLinuxÃÅ»§
Linux°ïÖú

ÔÚLinuxÏ·ÃÎÊMSSQLServerÊý¾Ý¿â

·¢²¼Ê±¼ä:2006-10-17 22:44:14À´Ô´:ºìÁª×÷Õß:linuxcms
Linux×÷Ϊһ¸öÃâ·ÑµÄUnixÀà²Ù×÷ϵͳ£¬ÒÔÆ俪·ÅÐÔÔ´´úÂë¡¢¶àÈÎÎñ¡¢X?windowµÈÌصãΪÖÚ¶àµÄÓû§Ëù²ÉÓ㬲¢ÓкܶàÆóÒµ²ÉÓÃLinuxÀ´×÷ΪÆäÄÚ²¿ÍøµÄÈ«¹¦ÄÜ·þÎñÆ÷(WWW£¬FTP£¬Email¡¢DNS)¡£ÆóÒµµÄÄÚ²¿Íø²»½öÒªÌṩÎı¾ÐÅÏ¢µÄ·ÃÎÊ£¬»¹ÒªÄÜÌṩ¶ÔÆóÒµ¹ØϵÊý¾Ý¿âÖеÄÐÅÏ¢µÄ·ÃÎÊ¡£SQLServerÒÔÆäµÍ³É±¾¡¢ÐÔÄܸßÒÔ¼°ÓëNTµÄÓÐЧ¼¯³ÉµÈÌØÐÔΪÐí¶àÆóÒµËù²ÉÓ㬵«Microsoft²»ÌṩÆäUnixϵĿͻ§¶Ë£¬ÎªÕâÀàÓ¦ÓôøÀ´ÁËÀ§ÄÑ¡£±¾ÎÄÔòÌá³öÁËÕâÒ»ÎÊÌâµÄ½â¾ö·½°¸¡£
°²×°Sybase¿Í»§¶Ë
----Ê×ÏÈ´ÓMicrosoftSQLServerºÍSybaseSQLServerµÄ¹Øϵ˵Æð¡£Á½¹«Ë¾Ôø¹²Í¬¿ª·¢OS/2ÉϵÄÊý¾Ý¿âSQLServerforOS/2£¬´ËºóÁ½¹«Ë¾ÓÖ¶ÀÁ¢¿ª·¢Éý¼¶ÏµÍ³£¬SybaseµÄ¿Í»§¶Ë¿ÉÒÔ·ÃÎÊMicrosoftSQLServer¡£
----ºÍÆäËûÊý¾Ý¿â¹«Ë¾Ïà±È£¬¿ÉÒÔ˵Sybase¹«Ë¾¶ÔLinuxÊÇ×îÓÐÉÆÒâµÄ£¬ËüËä²»ÌṩLinuxϵÄSQLServer£¬µ«ÌṩÁËÃâ·ÑµÄCT£­LIBµÄ¿Í»§¶Ë£¬ÕâÒ²¿ÉÄÜÊÇÐí¶àIT¹ÜÀíÈËÔ±ÔÚΪ¹«Ë¾Êý¾Ý¿âÑ¡ÐÍʱ²»ÔÙ¿¼ÂÇOracle»òInformixµÄÀíÓÉÖ®Ò»¡£µ±È»ÏÖÔÚÇé¿öÓÐËù¸Ä±ä¡£

----Sybase¹«Ë¾·¢²¼µÄOpenClientforLinuxÊÇa.out¸ñʽµÄ£¬ÔÚ»¥ÁªÍøÉÏÓÐÈ˽«Æäת»¯ÎªELFºÍ¶¯Ì¬Á´½ÓµÄELF¸ñʽ£¬¿É´ÓÏÂÁеØÖ·ÉÏÑ°ÕÒÏÂÔØ£ºhttp://www.mbay.net/¡«mpeppler¡£×îºÃͬʱÏÂÔØÁ½¸ö°æ±¾£¬Õý³£Ê¹ÓÃʱ²ÉÓö¯Ì¬Á´½ÓµÄ°æ±¾£¬µ«ÓеijÌÐòÔÚ±àÒëʱ¿ÉÄÜÐèÒªÒ»¸ö¿â(libblk.a)£¬Ö»ÔÚELFÀïÃæ°üº¬¡£

----ÏÂÔØÒԺ󣬼üÈëÈçÏÂÃüÁîÕ¹¿ª(¼ÙÉ赱ǰĿ¼ÊÇ/usr/tmp)£º

----tarzxvflinux?elf?dynamic?tar.gz

----È»ºó½«ÆäÒÆÖÁ/usr/localĿ¼£º

----mvsybase/usr/local

----±àÒëºÍʹÓÃSybase¿Í»§¶ËÐèÒª½øÐÐÈçϵÄÉèÖãº

----1£®InterfaceÎļþ¾ÙÀýÈçÏ£º

----MSSQL

----querytcpethermysql1433

----ÆäÖУº


MSSQLÊÇ¿Í»§¶ËʹÓõķþÎñÆ÷Ãû£¬ÒÔºóÒýÓÃMSSQL¼´¿É£»

mysqlÊÇ·þÎñÆ÷µÄµØÖ·»òÃû×Ö£¬Èç¹ûÊÇÃû×Ö£¬ÔòϵͳÄܹ»²éµ½ÆäIPµØÖ·£»

1433ÊÇSQLServerµÄ¶Ë¿ÚºÅ£¬MicrosoftSQLServerµÄȱʡֵÊÇ1433£¬SybaseÊÇ5000¡£
----2£®SYBASE»·¾³±äÁ¿£¬ÄÚÈÝÊÇSybase¿Í»§¶ËËùÔÚµÄĿ¼£º

----ExportSYBASE=/usr/local/sybase

----3£®Èç¹û±àÒëSybase¿Í»§¶ËÖеÄÀý×Ó£¬Ôò»¹ÒªÉèÖû·¾³±äÁ¿SYBPLATFORM£º

----exportSYBPLATFORM=Linux

----²¢ÇÒÐÞ¸ÄÆäÍ·ÎļþÖйØÓÚ·þÎñÆ÷Ãû³Æ¼°Óû§ÃûºÍ¿ÚÁîµÄÃèÊö¡£

ʹÓÃSQSH½çÃæ·ÃÎÊSQLServer
----Sybase¿Í»§¶ËÌṩÁËxisql¹¤¾ß£¬µ«¸ü¶àµÄÈËʹÓõÄÊÇSQSH£¬SQSHÊÇSQshellµÄËõд£¬ÊǸĽøÁ˵Äisql£¬¿É´ÓÏÂÁеØÖ·ÏÂÔØ£ºhttp://www.voicenet.com/¡«gray/¡£µ±Ç°µÄ×îа汾ÊÇ1.6.0¡£¼ÙÉèÏÂÔغóµÄÎļþ·ÅÔÚ/usr/tmpĿ¼Ï£º
----tarzxvfsqsq?1.6.0?tar.gz

----cdsqsh?1.6.0

----./configure

----make;makeinstall

----È»ºó£¬½«Éú³ÉµÄ¿ÉÖ´ÐÐÎļþsqsh°²×°µ½/usr/local/bin/Ŀ¼Ï¡£

----SqshµÄʹÓÃÈçÏ£º

----££sqsh£­£­Uusername£­£­Ppassword£­£­Sservername

----ÆäÖÐusernameºÍpasswordÊÇÓû§ÃûºÍ¿ÚÁservernameÊÇÔÚinterfaceÎļþÖж¨ÒåµÄ·þÎñÆ÷Ãû(ÈçÀý×ÓÖеÄMSSQL)¡£

----SqshÊǽ»»¥Ê½µÄÃüÁîÐнçÃ棬ÃüÁîÓÃÊäÈëgoÀ´Ö´ÐУ¬ÃüÁîÈç¹û½Ï³¤¿ÉÖ±½Ó·Ö³É¼¸ÐÐÊéд£¬ÒԻسµ»»Ðм´¿É¡£

----ÈçÏÂÊÇÒ»¸öÀý×Ó£º

----1>usepubs

----2>go

----1>select£ªfromauthors

----2>go²ÉÓÃCT£­LIB±àдӦÓóÌÐò

----ÓÉÓÚSybaseµÄLinux¿Í»§¶Ë²»ÌṩDB£­Library£¬ËùÒÔÓ¦²ÉÓÃCT£­LibraryÀ´±àдӦÓóÌÐò£¬²ÉÓÃCT£­Library±àдӦÓóÌÐò¿É²Î¿¼Àý×Ó£¬ÏêϸµÄ±à³Ì˵Ã÷¿ÉÒԲο¼SybaseµÄ˵Ã÷¡£ÀûÓÃSybperl±àдӦÓóÌÐò

----SybperlÊÇSybaseµÄPerlÀ©Õ¹£¬¿ÉÀûÓÃPerlÓïÑÔÀ´·ÃÎÊSQLServer£¬»òÕß±àдCGI³ÌÐò¡£

----Sybperl¿É´ÓÏÂÁеØÖ·È¡µÃhttp://www.mbay.net/¡«mpeppler¡£µ±Ç°µÄ×îа汾ÊÇ2.9.5¡£

----È¡µÃSybperlµÄÔ´´úÂëÕ¹¿ªÒÔºó£¬ÐèÒªÐÞ¸ÄÒ»ÏÂCONFIGÎļþ£¬ÒÔÏÂÊǼ¸¸ö²ÎÊý£º

----ÏÂÒ»¸öÒªÐ޸ĵÄÎļþÊÇPWD£¬ÕâÊÇÓÃÀ´½øÐвâÊԵģ¬½«ÆäÖеķþÎñÆ÷Ãû¡¢Óû§Ãû¡¢Óû§¿ÚÁîÉèÖóÉ×Ô¼ºµÄÅäÖü´¿É¡£È»ºó½øÐбàÒ룺

----perlMakefile.PL

----make;maketest;makeinstall

----°²×°³É¹¦ÒԺ󣬼´¿ÉʹÓÃSybperl½øÐбà³Ì¡£ÏÂÃæÊÇÒ»¸ö¼òµ¥µÄÀý×Ó¡£

¡¡¡¡££!/usr/bin/perl
¡¡¡¡useSybase::CTlib;
¡¡¡¡¡çdbh=newSybase::CTlib'sa','','MSSQL';
¡¡¡¡¡çdbh£­>ct_execute("selectau_id,au_lname£¬
au_fnamefrompubs.dbo.authors");
¡¡¡¡while(¡çdbh£­>ct_results(¡çrestype)==CS_SUCCEED){
¡¡¡¡nextunless¡çdbh£­>ct_fetchable(¡çrestype);
while((¡çau_id,¡çau_lname,¡çau_fname)=¡çdbh£­>ct_fetch){
¡¡¡¡print"¡çau_id£­¡çau_lnameau_fname\n";
¡¡¡¡}
¡¡¡¡}

----¿ÉÒÔ¿´³ö£¬¶Ì¶Ì¼¸ÐÐÓï¾ä£¬¾Í¿ÉÒÔÍê³É¶ÔÊý¾Ý¿âµÄ²Ù×÷¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ