您可以修改系统库的字符集排序规则和时区。系统库包括master、msdb、tempdb和model。
- 默认的字符集排序规则:Chinese_PRC_CI_AS
- 默认的时区:China Standard Time
- 关于可选择的字符集排序规则和时区,请根据本文的操作步骤,在控制台上进行查看。
说明 修改自建数据库的字符集排序规则使用
alter database <自建数据库名称> collate <字符集排序规则>命令即可。
前提条件
- 实例版本如下:
- SQL Server 2019
- SQL Server 2017
- SQL Server 2016
- SQL Server 2014
- SQL Server 2012
- SQL Server 2008 R2(云盘)
- 实例规格不能为共享规格或专属集群规格。更多信息,请参见实例规格族。
- 实例中没有任何用户数据库(即您创建的数据库,非系统数据库)。
说明 如果是刚删除实例中的数据库,删除任务可能还在备实例中等待执行,为避免冲突,请确定主备实例均没有数据库后再修改字符集排序规则与时区。
注意事项
修改期间,实例将处于不可用状态。修改时区需要大约1分钟,修改字符集排序规则需要2到10分钟。
操作步骤
时区与UTC偏移量对照表
| 时区 | 标准时间偏移 | 备注 |
|---|---|---|
| Afghanistan Standard Time | (UTC+04:30) | Kabul |
| Alaskan Standard Time | (UTC–09:00) | Alaska |
| Arabian Standard Time | (UTC+04:00) | Abu Dhabi, Muscat |
| Atlantic Standard Time | (UTC–04:00) | Atlantic Time (Canada) |
| AUS Central Standard Time | (UTC+09:30) | Darwin |
| AUS Eastern Standard Time | (UTC+10:00) | Canberra, Melbourne, Sydney |
| Belarus Standard Time | (UTC+03:00) | Minsk |
| Canada Central Standard Time | (UTC–06:00) | Saskatchewan |
| Cape Verde Standard Time | (UTC–01:00) | Cabo Verde Is. |
| Cen. Australia Standard Time | (UTC+09:30) | Adelaide |
| Central America Standard Time | (UTC–06:00) | Central America |
| Central Asia Standard Time | (UTC+06:00) | Astana |
| Central Brazilian Standard Time | (UTC–04:00) | Cuiaba |
| Central Europe Standard Time | (UTC+01:00) | Belgrade, Bratislava, Budapest, Ljubljana, Prague |
| Central European Standard Time | (UTC+01:00) | Sarajevo, Skopje, Warsaw, Zagreb |
| Central Pacific Standard Time | (UTC+11:00) | Solomon Islands, New Caledonia |
| Central Standard Time | (UTC–06:00) | Central Time (US and Canada) |
| Central Standard Time (Mexico) | (UTC–06:00) | Guadalajara, Mexico City, Monterrey |
| China Standard Time | (UTC+08:00) | Beijing, Chongqing, Hong Kong, Urumqi |
| E. Africa Standard Time | (UTC+03:00) | Nairobi |
| E. Australia Standard Time | (UTC+10:00) | Brisbane |
| E. Europe Standard Time | (UTC+02:00) | Chisinau |
| E. South America Standard Time | (UTC–03:00) | Brasilia |
| Eastern Standard Time | (UTC–05:00) | Eastern Time (US and Canada) |
| Georgian Standard Time | (UTC+04:00) | Tbilisi |
| GMT Standard Time | (UTC) | Dublin, Edinburgh, Lisbon, London |
| Greenland Standard Time | (UTC–03:00) | Greenland |
| Greenwich Standard Time | (UTC) | Monrovia, Reykjavik |
| GTB Standard Time | (UTC+02:00) | Athens, Bucharest |
| Hawaiian Standard Time | (UTC–10:00) | Hawaii |
| India Standard Time | (UTC+05:30) | Chennai, Kolkata, Mumbai, New Delhi |
| Jordan Standard Time | (UTC+02:00) | Amman |
| Korea Standard Time | (UTC+09:00) | Seoul |
| Middle East Standard Time | (UTC+02:00) | Beirut |
| Mountain Standard Time | (UTC–07:00) | Mountain Time (US and Canada) |
| Mountain Standard Time (Mexico) | (UTC–07:00) | Chihuahua, La Paz, Mazatlan |
| US Mountain Standard Time | (UTC–07:00) | Arizona |
| New Zealand Standard Time | (UTC+12:00) | Auckland, Wellington |
| Newfoundland Standard Time | (UTC–03:30) | Newfoundland |
| Pacific SA Standard Time | (UTC–03:00) | Santiago |
| Pacific Standard Time | (UTC–08:00) | Pacific Time (US and Canada) |
| Pacific Standard Time (Mexico) | (UTC–08:00) | Baja California |
| Russian Standard Time | (UTC+03:00) | Moscow, St. Petersburg, Volgograd |
| SA Pacific Standard Time | (UTC–05:00) | Bogota, Lima, Quito, Rio Branco |
| SE Asia Standard Time | (UTC+07:00) | Bangkok, Hanoi, Jakarta |
| China Standard Time | (UTC+08:00) | Kuala Lumpur, Singapore |
| Tokyo Standard Time | (UTC+09:00) | Osaka, Sapporo, Tokyo |
| US Eastern Standard Time | (UTC–05:00) | Indiana (East) |
| UTC | UTC | Coordinated Universal Time |
| UTC–02 | (UTC–02:00) | Coordinated Universal Time–02 |
| UTC–08 | (UTC–08:00) | Coordinated Universal Time–08 |
| UTC–09 | (UTC–09:00) | Coordinated Universal Time–09 |
| UTC–11 | (UTC–11:00) | Coordinated Universal Time–11 |
| UTC+12 | (UTC+12:00) | Coordinated Universal Time+12 |
| W. Australia Standard Time | (UTC+08:00) | Perth |
| W. Central Africa Standard Time | (UTC+01:00) | West Central Africa |
| W. Europe Standard Time | (UTC+01:00) | Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna |



