Max length of SQL Server instance name?

后端 未结 4 1002
死守一世寂寞
死守一世寂寞 2021-02-05 13:18

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 Ser
4条回答
  •  甜味超标
    2021-02-05 13:40

    My experience in SQL 2008 R2 is:

    Windows Server 2008 R2 NetBIOS has a 15 character limit.

    If you want a SQL Server default instance name beyond this (@@SERVERNAME) then you will have to do the following:

    sp_dropserver 'oldname' go sp_addserver 'newname_greater_than_15_characters','local' go

    Restart the MSSQLService and your new name takes effect. Sysname is the datatype in play with the function and system stored procedures.

提交回复
热议问题