--- title: Microsoft SQL Server sidebar_label: Microsoft SQL Server description: "Microsoft SQL Server is a relational database management system." hide_title: true --- {/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */} import { DatabasePage } from '@site/src/components/databases'; export const databaseInfo = {"engine":"microsoft_sql_server","engine_name":"Microsoft SQL Server","module":"mssql","documentation":{"description":"Microsoft SQL Server is a relational database management system.","logo":"msql.png","homepage_url":"https://www.microsoft.com/en-us/sql-server","categories":["TRADITIONAL_RDBMS","PROPRIETARY"],"pypi_packages":["pymssql"],"connection_string":"mssql+pymssql://{username}:{password}@{host}:{port}/{database}","default_port":1433,"drivers":[{"name":"pymssql","pypi_package":"pymssql","connection_string":"mssql+pymssql://{username}:{password}@{host}:{port}/{database}","is_recommended":true},{"name":"pyodbc","pypi_package":"pyodbc","connection_string":"mssql+pyodbc:///?odbc_connect=Driver%3D%7BODBC+Driver+17+for+SQL+Server%7D%3BServer%3Dtcp%3A%3C{host}%3E%2C1433%3BDatabase%3D{database}%3BUid%3D{username}%3BPwd%3D{password}%3BEncrypt%3Dyes%3BConnection+Timeout%3D30","is_recommended":false,"notes":"Connection string must be URL-encoded. Special characters like @ need encoding."}],"docs_url":"https://docs.sqlalchemy.org/en/20/core/engines.html#escaping-special-characters-such-as-signs-in-passwords","custom_errors":[{"regex_name":"CONNECTION_ACCESS_DENIED_REGEX","message_template":"Either the username \"%(username)s\", password, or database name \"%(database)s\" is incorrect.","error_type":"CONNECTION_ACCESS_DENIED_ERROR","category":"Authentication","description":"Access denied","issue_codes":[1014,1015]},{"regex_name":"CONNECTION_INVALID_HOSTNAME_REGEX","message_template":"The hostname \"%(hostname)s\" cannot be resolved.","error_type":"CONNECTION_INVALID_HOSTNAME_ERROR","category":"Connection","description":"Invalid hostname","issue_codes":[1007]},{"regex_name":"CONNECTION_PORT_CLOSED_REGEX","message_template":"Port %(port)s on hostname \"%(hostname)s\" refused the connection.","error_type":"CONNECTION_PORT_CLOSED_ERROR","category":"Connection","description":"Port closed or refused","issue_codes":[1008]},{"regex_name":"CONNECTION_HOST_DOWN_REGEX","message_template":"The host \"%(hostname)s\" might be down, and can't be reached on port %(port)s.","error_type":"CONNECTION_HOST_DOWN_ERROR","category":"Connection","description":"Host unreachable","issue_codes":[1009]}]},"time_grains":{"SECOND":true,"FIVE_SECONDS":false,"THIRTY_SECONDS":false,"MINUTE":true,"FIVE_MINUTES":true,"TEN_MINUTES":true,"FIFTEEN_MINUTES":true,"THIRTY_MINUTES":true,"HALF_HOUR":false,"HOUR":true,"SIX_HOURS":false,"DAY":true,"WEEK":true,"WEEK_STARTING_SUNDAY":true,"WEEK_STARTING_MONDAY":true,"WEEK_ENDING_SATURDAY":false,"WEEK_ENDING_SUNDAY":false,"MONTH":true,"QUARTER":true,"QUARTER_YEAR":false,"YEAR":true},"score":44,"max_score":201,"joins":true,"subqueries":true,"supports_dynamic_schema":false,"supports_catalog":false,"supports_dynamic_catalog":false,"ssh_tunneling":true,"query_cancelation":false,"supports_file_upload":true,"user_impersonation":false,"query_cost_estimation":false,"sql_validation":false};