Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

轉SQL Server Ô¶³ÌÁ´½Ó·þÎñÆ÷ÏêϸÅäÖÃ

 Ô¶³ÌÁ´½Ó·þÎñÆ÷ÏêϸÅäÖÃ
--
½¨Á¢Á¬½Ó·þÎñÆ÷
EXEC
sp_addlinkedserver
'
Ô¶³Ì·þÎñÆ÷IP
'
,
'
SQL Server
'
--
±ê×¢´æ´¢
EXEC
sp_addlinkedserver
@server

=

'
server
'
,
--
Á´½Ó·þÎñÆ÷µÄ±¾µØÃû³Æ¡£Ò²ÔÊÐíʹÓÃʵÀýÃû³Æ£¬ÀýÈçMYSERVER\SQL1
@srvproduct

=

'
product_name
'

--
OLE DBÊý¾ÝÔ´µÄ²úÆ·Ãû¡£¶ÔÓÚSQL ServerʵÀýÀ´Ëµ£¬product_nameÊÇ'SQL Server'
,
@provider

=

'
provider_name
'

--
ÕâÊÇOLE DB·ÃÎʽӿڵÄΨһ¿É±à³Ì±êʶ¡£µ±Ã»ÓÐÖ¸¶¨Ëüʱ£¬·ÃÎʽӿÚÃû³ÆÊÇ SQL ServerÊý¾ÝÔ´¡£SQL ServerÏÔʽµÄprovider_nameÊÇ SQLNCLI£¨Microsoft SQL Native Client OLE DB Provider£©¡£OraclerµÄÊÇ MSDAORA£¬Oracle 8»ò¸ü¸ß°æ±¾µÄÊÇOraOLEDB.Oracle¡£MS AccessºÍMS ExcelµÄÊÇ Microsoft.Jet.OLEDB.4.0¡£IBM DB2µÄÊÇDB2OLEDB£¬ÒÔ¼°ODBCÊý¾ÝÔ´µÄÊÇMSDASQL
,
@datasrc

=

'
data_source
'

--
ÕâÊÇÌض¨OLE DB·ÃÎʽӿڽâÊ͵ÄÊý¾ÝÔ´¡£¶ÔÓÚSQL Server£¬ÕâÊÇ SQL Server£¨servername»òservername\instancename£©µÄÍøÂçÃû³Æ¡£¶ÔÓÚOracle£¬ÕâÊÇSQL*Net±ðÃû¡£¶ÔÓÚ MS AccessºÍMSExcel£¬ÕâÊÇÎļþµÄÍêÕû·¾¶ºÍÃû³Æ¡£¶ÔÓÚODBCÊý¾ÝÔ´£¬ÕâÊÇϵͳDSNÃû³Æ
,
@location

=

'
location
'

--
ÓÉÌض¨OLE DB·ÃÎʽӿڽâÊ͵ÄλÖÃ
,
@provstr

=

'
provider_string
'

--
OLE DB ·ÃÎʽӿÚÌض¨µÄÁ¬½Ó×Ö·û´®¡£¶ÔÓÚODBCÁ¬½Ó£¬ÕâÊÇODBCÁ¬½Ó×Ö·û´®¡£¶ÔÓÚMS Excel£¬ÕâÊÇExcel 5.0
,
@catalog

=

'
catalog
'

--
catalogµÄ¶¨Òå±ä»¯»ùÓÚOLE DB·ÃÎʽӿڵÄʵÏÖ¡£¶ÔÓÚSQL Server£¬ÕâÊÇ¿ÉÑ¡µÄÊý¾Ý¿âÃû³Æ£¬¶ÔÓÚDB2£¬Õâ¸öĿ¼ÊÇÊý¾Ý¿âµÄÃû³Æ
--
´´½¨Á´½Ó·þÎñÆ÷ÉÏÔ¶³ÌµÇ¼֮¼äµÄÓ³Éä
EXEC
sp_addlinkedsrvlogin
'
Ô¶³Ì·þÎñÆ÷IP
'
,
'
false
'
,
'
sa
'
,
'
¼Ü¹¹Ãû
'
,
'
·ÃÎÊÃÜÂë
'
--
±ê×¢´æ´¢
EXEC
sp_addlinkedsrvlogin
@rmtsrvname

=

'
Ô¶³Ì·þÎñÆ÷IP
'
,
--
ÒªÌí¼ÓµÇ¼ÃûÓ³ÉäµÄ±¾µØÁ´½Ó·þÎñÆ÷
@useself

=
false,
--
µ±Ê¹ÓÃtrueֵʱ£¬Ê¹Óñ¾µØSQL»òWindowsµÇ¼ÃûÁ¬½Óµ½Ô¶³Ì·þÎñÆ÷Ãû¡£Èç¹ûÉèΪfalse£¬´æ´¢¹ý³Ì sp_addlinkedsrvloginµÄlocallogin¡¢rmtuserºÍrmtpassword²ÎÊý½«Ó¦Óõ½ÐµÄÓ³ÉäÖÐ
@locallogin

=

NULL
,
--
ÕâÊÇÓ³Éäµ½Ô¶³ÌµÇ¼ÃûµÄSQL ServerµÇ¼»òWindowsÓû§µÄÃû


Ïà¹ØÎĵµ£º

Oracle ѧϰ£ºPL/SQLÑ­Ðò½¥½øÈ«Ãæѧϰ½Ì³Ì

 ×îºóÒ»¿Î Òì³£´¦Àí±¾ÕÂÖص㣺
¡¡¡¡
¡¡¡¡1¡¢¶¨ÒåPLSQLÒì³£
¡¡¡¡2¡¢Áоٲ»Í¬µÄÒì³£´¦Àí·½·¨
¡¡¡¡3¡¢²¶»ñ·ÇÔ¤ÆڵĴíÎó
¡¡¡¡4¡¢ÃèÊöÒì³£µÄÓ°Ïì
¡¡¡¡5¡¢¶¨ÖÆÒì³£µÄ·µ»ØÐÅÏ¢¡¡¡¡Ò»¡¢PLSQLÒì³£´¦Àí
¡¡¡¡Òì³£ÊÇÓÉORACLE´íÎó»òÏÔʽµÄÅ׳öÒ»¸ö´íÎó²úÉúµÄ¡£
¡¡¡¡ÈçºÎ´¦Àí£º
¡¡¡¡ÓÃÒ»¸ö´¦Àí³ÌÐòÀ´²¶»ñËü£»
¡¡¡¡½«Ëü´«µÝ ......

SQL SERVER ÖÐdatetime ºÍ smalldatetimeÀàÐÍ


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......

SQL ServerÃæÊÔÌâÕûºÏ

3¡£±íÄÚÈÝÈçÏÂ
-----------------------------
ID            LogTime
1            2008/10/10 10:00:00
1            2008/10/10 10:03:00
1            2008/10/10 10:09:00
2 ¡ ......

½ÓÉÏһƪÎÄÕ£¬µ¼³öÒ»¸ö±í£¬»òÕßÕû¸öÊý¾Ý¿âµ½SQLÐÎʽ

 <?php
 require_once '../../smartyConfig/smartyConfig.class.php';
 require_once '../../game/include/function.php';
 require_once '../../game/include/config.php';
 require_once '../../game/server/server.class.php';
 require_once '../../game/include/db.class.php'; ......

perlÀûÓÃÄÚ´æʹÓÃsqlÓï¾ä

 ´ó¼ÒºÃ£¡×î½üÓÖÓÐÁËһЩģ¿éÓ÷¨µÄÐĵã¬ÄǾÍÊÇÀûÓÃÄ£¿éʹÄãµÄÄÚ´æ±ä³ÉÒ»¸öÐéÄâµÄÊý¾Ý¿âģʽ£¬Ê¹Äã¿ÉÒÔÔÚûÓÐÊý¾Ý¿âµÄÇé¿öÏ£¬½«txtÎļþµÄÊý¾Ý½øÐÐ sqlÓï¾ä´¦Àí£¬¸Ð¾õºÜÐÂÏÊ°É£¬²»¹ýÕâ¸ö²»Óøе½¾ªÑÈ£¬PerlÒ»Ö±ÊǺÜÍêÃÀµÄ£¬¹þ¹þ£¬ÄÇÎÒÃǾÍÀ´¿´¿´Õâ¸öÉñÆæ°É£¡
ÐèÒª°²×° Ä£¿é£º
SQl::Library;
DBI 
ÏÂÃæÊdzÌÐò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ