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

sql_map_config.xml(SQL Map»·¾³Îļþ)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
 "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
 <!-- ÅäÖúÍÓÅ»¯SQL Map½âÎöʵÀýµÄÉ趨 -->
 <settings cacheModelsEnabled="true" //SQL MapÔËÐÐʱʵÀýµÄ»º´æModelÊÇ·ñ¿ªÆô
     enhancementEnabled="true" //È«¾ÖÐÔµÄÆôÓûò½ûÓÃ×Ö½ÚÂëÔöÇ¿£¬ÒÔÓÅ»¯·ÃÎÊPOJO±äÁ¿ÊôÐԵŦÄÜ
        lazyLoadingEnabled="true" //³Ö¾Ã»¯Êý¾ÝÊÇ·ñÑÓ³Ù¼ÓÔØ
     maxRequests="32" //ͬʱִÐÐsqlÓï¾äµÄ×î´óÐÐÊý
     maxSessions="10" //ͬһʱ¼äÄڻµÄ×î´óSessionÊý¡£ËùνµÄSession¾ÍÊÇÒ»¸öÇëÇó»òÒ»¸öSQL MapÔËÐÐʱʵÀý×Ô¶¯»ñµÃµÄ»á»°
        maxTransactions="5" //Öƶ¨ÁË×î´óÊÂÎñ´¦ÀíµÄÏß³ÌÊý
     useStatementNamespaces="true" />//Öƶ¨ÁËÔÚSQL MapÓ³ÉäÎļþÖÐÊÇ·ñÓÃÈ«ÏÞ¶¨ÃûÀ´ÒýÓÃÓ³ÉäÉùÃ÷
 <!-- ÅäÖÃÁ¬½Ó -->
 <transactionManager type="JDBC" >
  <dataSource type="SIMPLE">
   <property name="JDBC.Driver" value="oracle.jdbc.OracleDriver"/>
   <property name="JDBC.ConnectionURL"
    value="jdbc:oracle:thin:@localhost:1521:orcl"/>
   <property name="JDBC.Username" value="system"/>
   <property name="JDBC.Password" value="abcd"/>
   <!-- ×î´óÁ¬½ÓÊý -->
   <property name="Pool.MaximumActiveConnections" value="10"/>
  </dataSource>
 </transactionManager>
 <!-- SQL MapÓ³ÉäÎļþµÄÈ¡µÃ… -->
 <sqlMap resource="fw_student_SqlMap.xml" />
</sqlMapConfig>


Ïà¹ØÎĵµ£º

SQL ServerµÄ¶¨Ðò(Collation)

ʹÓÃSQL ServerµÄÅóÓÑ們應該¶¼ÖªµÀSQL ServerµÄ資ÁÏ庫ÓÐÒ»個設¶¨½Ð×ö¶¨Ðò(Collation)£¬½ñÌìÎÒ們¾Í來¿´¿´¶¨Ðò這東Î÷ÊÇʲ麼£¬Ê×ÏÈÎÒ們¿´Ò»ÏÂWikiÉÏ對¶¨ÐòµÄ說Ã÷£º
Collation is the assembly of written information into a sta ......

SQLÖÐCaseµÄʹÓ÷½·¨(ÉÏƪ)


Case¾ßÓÐÁ½ÖÖ¸ñʽ¡£¼òµ¥Caseº¯ÊýºÍCaseËÑË÷º¯Êý¡£
--¼òµ¥Caseº¯Êý
CASE sex
WHEN '1' THEN 'ÄÐ'
WHEN '2' THEN 'Å®'
ELSE 'ÆäËû' END
--CaseËÑË÷º¯Êý
CASE WHEN sex = '1' THEN 'ÄÐ'
WHEN sex = '2' THEN 'Å®'
ELSE 'ÆäËû' END
ÕâÁ½ÖÖ·½Ê½£¬¿ÉÒÔʵÏÖÏàͬµÄ¹¦ÄÜ¡£¼òµ¥Caseº¯ÊýµÄд·¨ ......

SQL server2005ÖÐÎļþ±¸·ÝÓë»Ö¸´

±¸·Ý
BACKUP DATABASE mydb
TO DISK='c:\olddb.bak'
WITH INIT
--ΪÁ˲âÊÔ£¬°Ñ±¸·ÝºÃµÄÎļþ´ÓCÅÌÒƶ¯µ½D:\tempdb Îļþ¼Ð
--»¹Ô­
--1.ÓôËÓï¾äµÃµ½±¸·ÝÎļþµÄÂß¼­ÎļþÃû£º
RESTORE FILELISTONLY from DISK = N'd:\tempdb\olddb.bak' --±¸·ÝÎļþ´æ·Å·¾¶
--¿´LogicalName£¬Ò»°ã»áÓÐÁ½¸öÎļþ,È磺
--olddb &nbs ......

[SQL Server] ÈÕÖ¾¹ÜÀí(´ýÐø)

 --±¸·ÝÊÂÎñÈÕÖ¾ (×ÔÉÏÒ»´Î±¸·ÝÒÔÀ´£¬ÖÁµ±Ç°µÄÒÑÍê³ÉµÄÊÂÎñµÄÈÕÖ¾)
backup log MyDBName to disk='F:\dbbak\GamePoint\MyDBName_log_2010052709.bak';
 
--½Ø¶ÏÈÕÖ¾(½Ø¶Ïµôµ±Ç°µÄÒÑÍê³ÉµÄÊÂÎñµÄÈÕÖ¾), SQL Server 2005, 2008ûÓÐÕâ¸öÑ¡Ïî.
backup log MyDBName with no_Log;
 
--ÊÕËõÈÕÖ¾(ÖÁ1M,µ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ