In this quickstart, you use Docker to pull and run the SQL Server 2017 container image, mssql-server-linux. Then connect with sqlcmd to create your first database and run queries. In this quickstart, you use Docker to pull and run the SQL Server 2019 container image, mssql-server. Then connect with. Publisher's Description From Microsoft: See how in-memory processing built into SQL Server 2014 delivers breakthrough performance to accelerate your business and enable new, transformational scenarios that make you more competitive. Microsoft offers comprehensive in-memory technologies for OLTP, data warehousing.
- Microsoft Sql Server 2014 For Mac Pro
- Microsoft Sql Server 2014 For Mac Free
- Ms Sql Server 2014 Express For Mac
This topic describes how to configure the max worker threads server configuration option in SQL Server by using SQL Server Management Studio or Transact-SQL. The max worker threads option configures the number of worker threads that are available to SQL Server processes. SQL Server uses the native thread services of the operating systems so that one or more threads support each network that SQL Server supports simultaneously, another thread handles database checkpoints, and a pool of threads handles all users. The default value for max worker threads is 0. This enables SQL Server to automatically configure the number of worker threads at startup. The default setting is best for most systems. However, depending on your system configuration, setting max worker threads to a specific value sometimes improves performance.
In This Topic
Before you begin:
To configure the max worker threads option, using:
Follow Up:After you configure the max worker threads option
Before You Begin
Limitations and Restrictions
- When the actual number of query requests is less than the amount set in max worker threads, one thread handles each query request. However, if the actual number of query request exceeds the amount set in max worker threads, SQL Server pools the worker threads so that the next available worker thread can handle the request.
Recommendations
This option is an advanced option and should be changed only by an experienced database administrator or certified SQL Server professional. If you suspect that there is a performance problem, it is probably not the availability of worker threads. The cause is more likely something like I/O that is causing the worker threads to wait. It is best to find the root cause of a performance issue before you change the max worker threads setting.
Thread pooling helps optimize performance when large numbers of clients are connected to the server. Usually, a separate operating system thread is created for each query request. However, with hundreds of connections to the server, using one thread per query request can consume large amounts of system resources. The max worker threads option enables SQL Server to create a pool of worker threads to service a larger number of query requests, which improves performance.
The following table shows the automatically configured number of max worker threads for various combinations of CPUs and versions of SQL Server.
Number of CPUs 32-bit computer 64-bit computer <= 4 processors 256 512 8 processors 288 576 16 processors 352 704 32 processors 480 960 64 processors 736 1472 128 processors 4224 4480 256 processors 8320 8576 Using the following formula:
Number of CPUs 32-bit computer 64-bit computer <= 4 processors 256 512 > 4 processors and <= 64 processors 256 + ((logical CPU's - 4) * 8) 512 + ((logical CPU's - 4) * 16) > 64 processors 256 + ((logical CPU's - 4) * 32) 512 + ((logical CPU's - 4) * 32) Note
SQL Server can no longer be installed on a 32-bit operating system. 32-bit computer values are listed for the assistance of customers running SQL Server 2014 (12.x) and earlier. We recommend 1,024 as the maximum number of worker threads for an instance of SQL Server that is running on a 32-bit computer.
Note
For recommendations on using more than 64 CPUs, refer to Best Practices for Running SQL Server on Computers That Have More Than 64 CPUs.
When all worker threads are active with long running queries, SQL Server might appear unresponsive until a worker thread completes and becomes available. Although this is not a defect, it can sometimes be undesirable. If a process appears to be unresponsive and no new queries can be processed, then connect to SQL Server using the dedicated administrator connection (DAC), and kill the process. To prevent this, increase the number of max worker threads.
The max worker threads server configuration option does not limit all threads that may be spanwed in the system. Threads required for tasks such as Availibility Groups, Service Broker, Lock Manager, or others are spawned outside this limit. If the number of threads configured is being exceeded, the following query will provide information about the system tasks that have spawned the additional threads.
Security
Permissions
Execute permissions on sp_configure with no parameters or with only the first parameter are granted to all users by default. To execute sp_configure with both parameters to change a configuration option or to run the RECONFIGURE
statement, a user must be granted the ALTER SETTINGS
server-level permission. The ALTER SETTINGS
permission is implicitly held by the sysadmin and serveradmin fixed server roles.
Using SQL Server Management Studio
To configure the max worker threads option
In Object Explorer, right-click a server and select Properties.
Click the Processors node.
In the Max worker threads box, type or select a value from 128 through 32,767.
Microsoft Sql Server 2014 For Mac Pro
Tip
Use the max worker threads option to configure the number of worker threads available to SQL Server processes. The default setting for max worker threads is best for most systems.However, depending on your system configuration, setting max worker threads to a smaller value sometimes improves performance.See Recommendations in this page for more information.
Using Transact-SQL
To configure the max worker threads option
Connect to the Database Engine.
From the Standard bar, click New Query.
Copy and paste the following example into the query window and click Execute. This example shows how to use sp_configure to configure the
max worker threads
option to900
.
Follow Up: After you configure the max worker threads option
The change will take effect immediately after executing RECONFIGURE, without requiring the Database Engine to restart.
See Also
Server Configuration Options (SQL Server)
RECONFIGURE (Transact-SQL)
sp_configure (Transact-SQL)
Diagnostic Connection for Database Administrators
This article explains how to install the Microsoft ODBC Driver for SQL Server on Linux. It also includes instructions for the optional command-line tools for SQL Server (bcp
and sqlcmd
) and the unixODBC development headers.
This article provides commands for installing the ODBC driver from the bash shell. If you want to download the packages directly, see Download ODBC Driver for SQL Server.
Microsoft ODBC 17
The following sections explain how to install the Microsoft ODBC driver 17 from the bash shell for different Linux distributions.
Important
If you installed the v17 msodbcsql
package that was briefly available, you should remove it before installing the msodbcsql17
package. This will avoid conflicts. The msodbcsql17
package can be installed side by side with the msodbcsql
v13 package.
Alpine Linux
Note
Driver version 17.5 or higher is required for Alpine support.
Debian
Note
You can substitute setting the environment variable 'ACCEPT_EULA' with setting the debconf variable 'msodbcsql/ACCEPT_EULA' instead: echo msodbcsql17 msodbcsql/ACCEPT_EULA boolean true | sudo debconf-set-selections
Red Hat Enterprise Server and Oracle Linux
SUSE Linux Enterprise Server
Ubuntu
Note
- Driver version 17.2 or higher is required for Ubuntu 18.04 support.
- Driver version 17.3 or higher is required for Ubuntu 18.10 support.
Note
You can substitute setting the environment variable 'ACCEPT_EULA' with setting the debconf variable 'msodbcsql/ACCEPT_EULA' instead: echo msodbcsql17 msodbcsql/ACCEPT_EULA boolean true | sudo debconf-set-selections
Previous versions
The following sections provide instructions for installing previous versions of the Microsoft ODBC driver on Linux. The following driver versions are covered:
ODBC 13.1
The following sections explain how to install the Microsoft ODBC driver 13.1 from the bash shell for different Linux distributions.
Debian 8
RedHat Enterprise Server 6
RedHat Enterprise Server 7
SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 12
Ubuntu 15.10
Ubuntu 16.04
Ubuntu 16.10
ODBC 13
The following sections explain how to install the Microsoft ODBC driver 13 from the bash shell for different Linux distributions.
RedHat Enterprise Server 6
RedHat Enterprise Server 7
Ubuntu 15.10
Ubuntu 16.04
SUSE Linux Enterprise Server 12
Offline installation
If you prefer/require the Microsoft ODBC Driver 13 to be installed on a computer with no internet connection, you will need to resolve package dependencies manually. The Microsoft ODBC Driver 13 has the following direct dependencies:
Microsoft Sql Server 2014 For Mac Free
- Ubuntu: libc6 (>= 2.21), libstdc++6 (>= 4.9), libkrb5-3, libcurl3, openssl, debconf (>= 0.5), unixodbc (>= 2.3.1-1)
- Red Hat:
glibc, e2fsprogs, krb5-libs, openssl, unixODBC
- SUSE:
glibc, libuuid1, krb5, openssl, unixODBC
Each of these packages in turn has their own dependencies, which may or may not be present on the system. For a general solution to this issue, refer to your distribution's package manager documentation: Redhat, Ubuntu, and SUSE
It is also common to manually download all the dependent packages and place them together on the installation computer, then manually install each package in turn, finishing with the Microsoft ODBC Driver 13 package.
Redhat Linux Enterprise Server 7
- Download the latest
msodbcsql
.rpm
from https://packages.microsoft.com/rhel/7/prod/. - Install dependencies and the driver.
Ubuntu 16.04
- Download the latest
msodbcsql
.deb
from https://packages.microsoft.com/ubuntu/16.04/prod/pool/main/m/msodbcsql/. - Install dependencies and the driver.
SUSE Linux Enterprise Server 12
- Download the latest
msodbcsql
.rpm
from https://packages.microsoft.com/sles/12/prod/. - Install the dependencies and the driver.
After you have completed the package installation, you can verify that the Microsoft ODBC Driver 13 can find all its dependencies by running ldd and inspecting its output for missing libraries:
ODBC 11
The following sections explain how to install the Microsoft ODBC driver 11 on Linux. Before you can use the driver, install the unixODBC driver manager. For more information, see Installing the Driver Manager.
Installation Steps
Important
These instructions refer to msodbcsql-11.0.2270.0.tar.gz
, which is installation file for Red Hat Linux. If you are installing the Preview for SUSE Linux, the file name is msodbcsql-11.0.2260.0.tar.gz
.
To install the driver:
Make sure that you have root permission.
Change to the directory where the download placed the file
msodbcsql-11.0.2270.0.tar.gz
. Make sure that you have the *.tar.gz file that matches your version of Linux. To extract the files, execute the following command,tar xvzf msodbcsql-11.0.2270.0.tar.gz
.Change to the
msodbcsql-11.0.2270.0
directory and there you should see a file called install.sh.To see a list of the available installation options, execute the following command: ./install.sh.
Make a backup of odbcinst.ini. The driver installation updates odbcinst.ini. odbcinst.ini contains the list of drivers that are registered with the unixODBC Driver Manager. To discover the location of odbcinst.ini on your computer, execute the following command:
odbc_config --odbcinstini
.Before you install the driver, execute the following command:
./install.sh verify
. The output of./install.sh verify
reports if your computer has the required software to support the ODBC driver on Linux.When you are ready to install the ODBC driver on Linux, execute the command:
./install.sh install
. If you need to specify an install command (bin-dir
orlib-dir
), specify the command after the install option.After reviewing the license agreement, type YES to continue with the installation.
Installation puts the driver in /opt/microsoft/msodbcsql/11.0.2270.0
. The driver and its support files must be in /opt/microsoft/msodbcsql/11.0.2270.0
.
To verify that the Microsoft ODBC driver on Linux was registered successfully, execute the following command: odbcinst -q -d -n 'ODBC Driver 11 for SQL Server'
.
Uninstall
You can uninstall the ODBC driver 11 on Linux by executing the following commands:
rm -f /usr/bin/sqlcmd
rm -f /usr/bin/bcp
rm -rf /opt/microsoft/msodbcsql
odbcinst -u -d -n 'ODBC Driver 11 for SQL Server'
Driver files
The ODBC driver on Linux consists of the following components:
Component | Description |
---|---|
libmsodbcsql-17.X.so.X.X or libmsodbcsql-13.X.so.X.X | The shared object (so ) dynamic library file that contains all of the driver's functionality. This file is installed in /opt/microsoft/msodbcsql17/lib64/ for the Driver 17 and in /opt/microsoft/msodbcsql/lib64/ for Driver 13. |
msodbcsqlr17.rll or msodbcsqlr13.rll | The accompanying resource file for the driver library. This file is installed in [driver .so directory]../share/resources/en_US/ |
msodbcsql.h | The header file that contains all of the new definitions needed to use the driver. Note: You cannot reference msodbcsql.h and odbcss.h in the same program. msodbcsql.h is installed in /opt/microsoft/msodbcsql17/include/ for Driver 17 and in /opt/microsoft/msodbcsql/include/ for Driver 13. |
LICENSE.txt | The text file that contains the terms of the End-User License Agreement. This file is placed in /usr/share/doc/msodbcsql17/ for Driver 17 and in /usr/share/doc/msodbcsql/ for Driver 13. |
RELEASE_NOTES | The text file that contains release notes. This file is placed in /usr/share/doc/msodbcsql17/ for Driver 17 and in /usr/share/doc/msodbcsql/ for Driver 13. |
Resource file loading
The driver needs to load the resource file in order to function. This file is called msodbcsqlr17.rll
or msodbcsqlr13.rll
depending on the driver version. The location of the .rll
file is relative to the location of the driver itself (so
or dylib
), as noted in the table above. As of version 17.1 the driver will also attempt to load the .rll
from the default directory if loading from the relative path fails. The default resource file path on Linux is /opt/microsoft/msodbcsql17/share/resources/en_US/
.
Troubleshooting
If you are unable to make a connection to SQL Server using the ODBC driver, see the known issues article on troubleshooting connection problems.
Next steps
After installing the driver, you can try the C++ ODBC example application. For more information about developing ODBC applications, see Developing Applications.
Ms Sql Server 2014 Express For Mac
For more information, see the ODBC driver release notes and system requirements.