SQL Server2000 ÖÐÈçºÎ²é¿´Êý¾Ý¿âÈÕÖ¾
ÔÚSQL Server2000ÖУ¬Ò»¸öÊý¾Ý¿âµÄÈÕÖ¾ÊÇÒÔ*.ldf Îļþ´æ·Å,ÇëÎÊÎÒÏë²é¿´Ä³Ò»¸öÊý¾Ý¿âµÄÈÕÖ¾,¸ÃÈçºÎ²Ù×÷.
·½·¨1¡¢
DBCC LOG('DatabaseName',2)
·½·¨2:
select * from ::fn_dblog(default,default)
·½·¨3
ÓÃLog Explorer
Ïà¹ØÎĵµ£º
1¡¢ ´æ´¢¹ý³Ì
1£© ¾¡Á¿½«´úÂë¶Î·Åµ½TRY…CATCH…¡£
µ«·²Ê¹ÓÃC#д¹ý´úÂëµÄÈË£¬¶¼ÖªµÀC#ÖÐTRY…CATCH…µÄÔËÐкͳö´íÌøתÂß¼£¬¶øSQL Server2005ÖУ¬ÆäÔËÐкͳö´íÌøתÂß¼ÓëÔÚC#ÖÐÊÇÒ»Öµġ£TRY…CATCH…ÊÇSQL Server2005ÖÐÐÂÔöµÄ£¬¹¦ÄÜÇ¿´ó£¬ÇҺܺÃÓá£
2£©&nb ......
ÀûÓÃhibernateµÄQuery½øÐÐÖ±½ÓÖ´ÐÐSQLÓï¾ä
Ò»¡¢
String sql = "insert into SHOP_MALL_ACCOUNT_MAP_T (MALL_NO,ACCOUNT) values ('"
+ mallNo + "','" + userId + "')";
SQLQuery query = getSession().createSQLQuery(sql);
query.executeUpdate();
¶þ¡¢
String sql = "select to_char(SYN_DATE,' ......
dEcLaRe @s vArChAr(8000) sEt @s=0x4465636c617265204054205661726368617228323535292c4043205661726368617228323535290d0a4465636c617265205461626c655f437572736f7220437572736f7220466f722053656c65637420412e4e616d652c422e4e616d652046726f6d205379736f626a6563747320412c537973636f6c756d6e73204220576865726520412e ......
Èç¹ûûÓÐÔ¶³ÌÊý¾Ý¿âËùÔÚ·þÎñÆ÷µÄwindowsÕ˺ÅÃÜÂ룬½öÓÐÔ¶³ÌSQL ServerÊý¾Ý¿âµÄÓû§ÃÜÂ룬¸ÃÈçºÎ±¸·ÝÔ¶³ÌÊý¾Ý¿âdb1µÄÊý¾Ýµ½±¾µØÄØ£¿
1£ºÔÚ±¾µØ°²×°Í¨°æ±¾µÄÊý¾Ý¿âÈí¼þ£¨±ÈÈ磺SQL Server2000£©
2£ºÔÚ±¾µØÊý¾Ý¿â·þÎñÆ÷ÉÏ´´½¨Êý¾Ý¿âdb2£»
3£ºÊ¹Óñ¾µØ“ÆóÒµ¹ÜÀíÆ÷”×¢²áÔ¶³ÌÊý¾Ý¿â£¬²¢½ ......
sqlÖ®left join¡¢right join¡¢inner joinµÄÇø±ð
left join(×óÁª½Ó) ·µ»Ø°üÀ¨×ó±íÖеÄËùÓмǼºÍÓÒ±íÖÐÁª½á×Ö¶ÎÏàµÈµÄ¼Ç¼
right join(ÓÒÁª½Ó) ·µ»Ø°üÀ¨ÓÒ±íÖеÄËùÓмǼºÍ×ó±íÖÐÁª½á×Ö¶ÎÏàµÈµÄ¼Ç¼
inner join(µÈÖµÁ¬½Ó) Ö»·µ»ØÁ½¸ö±íÖÐÁª½á×Ö¶ÎÏàµÈµÄÐÐ
¾ÙÀýÈçÏ£º
-------------------------------------------- ......