Max database name length in SQL Server -


i trying ui validation on database name. told different places sql server database name stored sysname inside sql server. verified checking sys.databases.

so, make textbox in ui have maxlength 128 characters long. max length of sysname type.

however, found in sql server 2005 express edition, if enter database name 128 characters long, complains

could not create default log file because name long

to make sure can create database, found need set max limit 124 characters.

my question whether 124 characters limit true versions of sql server on different windows os?

the log file name not need include database name.

this works fine me example.

create database [aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] on  primary  (  name = n'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',  filename = n'c:\program files\microsoft sql server\mssql10.mssqlserver\mssql\data\a128.mdf')  log on  (  name = n'a128_log',  filename = n'c:\program files\microsoft sql server\mssql10.mssqlserver\mssql\data\a128_log.ldf') 

Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -