SQL Server实例名称的最大长度? [英] Max length of SQL Server instance name?

查看:123
本文介绍了SQL Server实例名称的最大长度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于以下版本,我需要知道SQL Server实例名称的最大字符长度(如果它们之间存在差异).

I need to know the maximum character length for the name of an instance of a SQL Server for the following versions (if there is a difference between them.)

  • SQL Server 2000
  • SQL Server 2005
  • SQL Server 2008
  • SQL Server 2008 R2

(我正在开发一个将通过DMO/SMO API与SQL Server通信并且需要验证用户输入的应用程序.)

(I am working on an application that will communicate with SQL Server via the DMO/SMO APIs and need to validate user input.)

经过大量Google搜索和BOL搜索后,我无法找到确定的答案.我发现了论坛的问题和回复(在其他较小的站点上),但是这些回复中的值介于16到128个字符之间,没有一个提供支持的文档或链接.

After much Googling and BOL searching I have not been able to find a definitive answer. I have found forum questions and responses (on other, lesser sites) but the values in those responses have ranged from 16 to 128 characters and none provided supporting documentation or links.

这似乎应该很容易找到,但是它使我望而却步.任何帮助将不胜感激.

It seems that this should be an easy find but it has eluded me. Any help would be much appreciated.

推荐答案

SQL Server的实例名称限制为16个字符

Instance names for SQL Server are limited to 16 characters

http://msdn.microsoft.com /en-us/library/ms143531(v=SQL.105).aspx

它没有在线列出SQL Server 2000,但查看我为SQL Server 2000安装的BOL,它也限制为16个字符.

It doesn't list SQL Server 2000 online but looking at the BOL that I have installed for SQL Server 2000 it is also limited to 16 characters.

编辑

使用此屏幕可以添加和维护Microsoft®SQL Server™2000实例.

Use this screen to add and maintain instances of Microsoft® SQL Server™ 2000.

选项

默认

  • 选中后,将安装SQL Server 2000的默认实例.单击下一步"继续安装过程.

  • When selected, a default instance of SQL Server 2000 is installed. Click Next to proceed with the install process.

清除后,您可以安装或维护SQL Server 2000的命名实例.

When cleared, you can install or maintain a named instance of SQL Server 2000.

注意:如果未启用此复选框,则安装程序已在此计算机上检测到SQL Server的默认实例.默认实例可以是SQL Server 6.5,SQL Server 7.0版的安装,也可以是已安装的SQL Server 2000的默认实例.任何时候,只有一个安装的任何版本的SQL Server都可以成为默认实例.有关更多信息,请参见SQL Server的多个实例.

Note If this check box is not enabled, Setup has detected a default instance of SQL Server on this computer. The default instance could be an installation of SQL Server 6.5, SQL Server version 7.0, or it could be the default instance of SQL Server 2000, already installed. Only one installation of SQL Server, any version, can be the default instance at any one time. For more information, see Multiple Instances of SQL Server.

实例名称

输入新的实例名称或要维护的实例名称.查看并遵守实例名称的规则.

Enter a new instance name, or the name of the instance to maintain. Review and follow the rules for instance names.

重要:建议实例名称的字符数不能超过10个.实例名称可以出现在各种SQL Server和系统工具的用户界面中.较短的名称更易读.

Important It is recommended that instance names be kept to less than 10 characters. Instance names can appear in the user interface of various SQL Server and system tools; shorter names are more readable.

**实例命名规则**

**Instance Naming Rules **

  • 实例名称不区分大小写.

  • An instance name is not case-sensitive.

实例名称不能是术语Default或MSSQLServer.

An instance name cannot be the terms Default or MSSQLServer.

实例名称必须遵循SQL Server标识符的规则,并且不能为保留关键字.

Instance names must follow the rules for SQL Server identifiers and cannot be reserved keywords.

实例名称限制为16个字符.

Instance names are limited to 16 characters.

实例名称中的第一个字符必须是字母,&"号,下划线(_)或数字符号(#).可接受的字母是Unicode标准2.0定义的字母,除了来自其他语言的字母字符外,还包括拉丁字符a-z和A-Z.

The first character in the instance name must be a letter, an ampersand (&), an underscore (_), or a number sign (#). Acceptable letters are those defined by the Unicode Standard 2.0, which includes Latin characters a-z and A-Z, in addition to letter characters from other languages.

后续字符可以是:

  • Unicode标准2.0中定义的字母.

  • Letters as defined in the Unicode Standard 2.0.

基本拉丁文或其他国家文字的十进制数字.

Decimal numbers from either Basic Latin or other national scripts.

美元符号($),数字符号(#)或下划线(_).

The dollar sign ($), a number sign (#), or an underscore (_).

实例名称中不允许包含空格或特殊字符.反斜杠(),逗号(,),冒号(:)或at符号(@)都不是.

Embedded spaces or special characters are not allowed in instance names. Neither is the backslash (), a comma (,), a colon (:), or the at sign (@).

警告只有在当前MicrosoftWindows®代码页中有效的字符才能用于SQL Server 2000中的实例名称.如果使用了当前代码页下不支持的Unicode字符,错误发生.

Warning Only characters that are valid in the current Microsoft Windows® code page can be used in instance names in SQL Server 2000. If a Unicode character not supported under the current code page is used, an error occurs.

这篇关于SQL Server实例名称的最大长度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆