SQL Server (MS SQL) URI format

URI definition for MSSQL follows this standard:

Identifier fragments:

  • Namespace: sqlserver://{host}:{port}
    • Scheme = sqlserver
    • Authority = {host}:{port}
  • Unique name: {database}.{schema}.{table}

URI format:

  • sqlserver://{host}:{port}/{database}.{schema}.{table}

Parameters limitations:

  • host identifier must start with a lowercase letter and include only lowercase letters, numbers, dash and dot (regex: [a-z][a-z0-9-.]+)
  • port identifier must include only numbers
  • database, schema and table can have two format, following Microsoft SQL Server naming standards: quoted and unquoted
    • unquoted identifier must start with a character belonging to the unicode category L (letter), _, @ or #. The following characters must belong to the to the unicode category L (letter), unicode category N (number), or be _, @, # or $.
    • quoted identifier needs to be wrapped using brackets [ and ] and must include only characters included in the unicode range U+0001 to U+FFFF. If a right bracket character ] is included inside the name it needs to be doubled. (Ex: my]]name is a valid name if put inside brackets and my]name is not valid)

Examples:

  • sqlserver://sifflet-dev-mssql.cfbuquha2ngc.eu-west-1.rds.amazonaws.com:1433/test_database.test_schema.test_table
  • sqlserver://testing-mssql.cfbu.us-west-1.rds:8080/prod_database.[MY-SCHEMA].테스트_데이터1