When using sql2008 to create a database, if the creation fails, as follows:
Create failed for Database "test123.(Microsoft. sqlserver. SMO)
Collation '<default server value>' is not valid. (Microsoft. sqlserver. SMO)
This is because the correct collation (that is,"Option"In"Sorting rules"). Generally, the default attribute can be used, but the problem may not be ruled out. Therefore, if the above problem occurs, please make the correct sorting rules by yourself:Chinese_prc_ci_as.
The following is a brief introduction to the meaning of the sorting rule: MS is described as follows:
"In Microsoft SQL Server 2000, the physical storage of strings is controlled by sorting rules. The sorting rule specifies the bit mode of each character and the rules used to store and compare characters. "
Run the following statement in the query analyzer to obtain all the sorting rules supported by SQL Server.
Select * From: fn_helpcollations ()
The name of a sorting rule consists of two parts. The first half is the character set supported by this sorting rule. For example:
The first half of chinese_prc_cs_ai_ws indicates the Unicode Character Set and the chinese_prc _ pointer sorts Unicode in simplified Chinese characters.
The second half of the sorting rule is the suffix meaning:
_ Bin binary sorting
_ Ci (CS) is case sensitive, CI is case insensitive, and CS is case sensitive
_ Whether AI (AS) distinguishes stress, AI does not distinguish,
_ KI (KS) indicates whether Kana is distinguished. Ki is not distinguished, and KS is distinguished.
_ Whether wi (WS) is differentiated by width WI and WS
Case Sensitive: select this option if you want to make the comparison between uppercase and lowercase letters different.
Accent differentiation: select this option if you want to treat the comparison as different from the accent and non-accent letters. If this option is selected, the comparison also treats letters with different accents as unequal. Kana differentiation: select this option if you want to treat Katakana and katakana as different Japanese syllables. Width differentiation: select this option if you want to make the comparison between halfwidth and fullwidth characters.