ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[¤À¨É] ­×§ïSQL©w§Ç

[¤À¨É] ­×§ïSQL©w§Ç

¥»©«³Ì«á¥Ñ ³Ê»h»i ©ó 2011-11-28 13:34 ½s¿è

½Ð¨Ï¥Î¦p¤Uªº ALTER DATABASE ³¯­z¦¡¨ÓÅܧó¡G
ALTER DATABASE §Úªº¸ê®Æ®w
COLLATE SQL_Latin1_General_Cp850_BIN;
¤W­zªº«ü¥O¬O°w¹ï³æ¤@¸ê®Æ®w©Ò°µªº³]©w¡A­Y±z±ý±N¾ã­Ó SQL Server ªº©w§Ç¥þ³¡§ï¦¨ SQL_Latin1_General_Cp850_BIN¡A«h¥i¨Ì·Ó¤U¦C¨BÆJ¶i¦æ¡G
¥ý³Æ¥÷¸ê®Æ®w¡C
¨Ï¥Î¤u¨ã¶×¥X©Ò¦³¸ê®Æ¡]¨Ò¦p¡A¨Ï¥Î bcp.exe ³oÃþ¤u¨ã¨Ó¤j¶q¶×¥X¸ê®Æ¡^¡C
¨ø°£©Ò¦³¨Ï¥ÎªÌ¸ê®Æ®w¡C
¦b©R¥O´£¥Ü¦r¤¸¼Ò¦¡¤¤¡A©ó SQL Server 2005 ¥úºÐ¾÷©Ò¦b¥Ø¿ý¡A¨Ï¥Î setup.exe ©R¥O·f°tSQLCOLLATION °Ñ¼Æ¨Ó­««Ø master ¨t²Î¸ê®Æ®w¡A¥H«ü©w·sªº©w§Ç¡C¨Ò¦p¡A¤U­±ªºµ{¦¡½X·|­««Ø SQL Server ¹w³]°õ¦æ­ÓÅé MSSQLSERVER ªº master ¨t²Î¸ê®Æ®w¡A¨Ã±N©w§Ç§ï¬°SQL_Latin1_General_Cp850_BIN¡G

setup.exe INSTANCENAME=MSSQLSERVER REINSTALL=SQL_Engine REBUILDDATABASE=1 SQLCOLLATION=SQL_Latin1_General_Cp850_BIN

¨ä¤¤ªº INSTANCENAME «Y«ü©w±zªº SQL Server °õ¦æ­ÓÅé¦WºÙ

­«·s«Ø¥ß©Ò¦³¨Ï¥ÎªÌ¸ê®Æ®w¥H¤Î¨ä¤º§tªº¸ê®Æ®wª«¥ó¡C
¶×¤J¥ý«e¶×¥Xªº©Ò¦³¸ê®Æ¡C


¸ê®Æ¨Ó·½¡Ghttp://cp0501.blogspot.com/2007/11/sql-server.html

§ó§ï¸ê®Æ®wªº©w§Ç¦WºÙ
¤§«e¦b¬d¸ß¤¤¤å¸ê®Æ®É,³£¬Oª½±µ¨Ï¥Î¤U¦Cªº»yªk

select * from tablename where fieldname like '%¤¤¤å%'

¦ý¬O¤µ¤Ñ¦b¬d¸ê®Æ®É«o¬d¤£¥X¥ô¦óªF¦è,¦Ó¥B¸ê®ÆÄæ¦ì¤¤½T¹ê¦³"¤¤¤å"ªº¦r¼Ë,
¬d¤F¤@¤U,¤~µo²{¥u­n¦b¬d¸ßªº¸ê®Æ«e¥[­ÓN´N¥i¥H¤F,»yªk¦p¤U :

select * from tablename where fieldname like N'%¤¤¤å%'

¦Ó³o¥D­n¬O¦]¬°¸ê®Æ®wªº©w§Ç¦WºÙ©Ò¤Þ°_,
³q±`§Ú­Ì¦b«Ø¥ß¸ê®Æ®w®É,©w§Ç¦WºÙ³£¬O¨Ï¥Î"¦øªA¾¹¹w³]­È",
©Ò¥H¤]«Ü¤Ö¥hª`·N¥¦.

ÁöµM»¡¥u­n¬d¸ß»yªk§ï¤@¤U´N¥i¥H¤F,
¦ý¬O¬°¤F¥H«áºûÅ@¤Wªº¤è«K,
©Ò¥H¥´ºâ±N¸ê®Æ®wªº©w§Ç¦WºÙ§ï¦¨"Chinese_Taiwan_Stroke_CI_AS",
¥i¬O,±qSQL Server Enterprise Manager¨Ã¤£¯àª½±µ¥h°µ­×§ï,
©Ò¥H­n¤U»yªk¥h²§°Ê,
¦Ó»yªk¦p¤U :

ALTER DATABASE DatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE DatabaseName COLLATE Chinese_Taiwan_Stroke_CI_AS
ALTER DATABASE DatabaseName SET MULTI_USER WITH ROLLBACK IMMEDIATE

¦]¬°¦b§ï©w§Ç¦WºÙ®É,¥²¶·¥ýÂê©w¸ê®Æ®w,
©Ò¥H²Ä¤@¦æ­n¥ý±N¸ê®Æ®w³]©w¬°SINGLE_USER,¨C¦¸¥u¯à¤@­Ó¨Ï¥ÎªÌ¦s¨ú¸ê®Æ®w,
µM«á¦A­×§ï©w§Ç¦WºÙ,
­×§ï§¹«á¦A±N¸ê®Æ®w§ï¦^ MULTI_USER §Y¥i,
¥t¥~­n°õ¦æ³o¨Ç«ü¥O­È¶·¥ý±N©Ò¦bªº¸ê®Æ®w¤Á´«¨ìmaster¤U.


¸ê®Æ¨Ó·½¡Ghttp://cp0501.blogspot.com/2007/11/sql-server.html

TOP

        ÀR«ä¦Û¦b : ¦¨¥\¬OÀuÂIªºµo´§¡A¥¢±Ñ¬O¯ÊÂIªº²Ö¿n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD