Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit b6f8157

Browse files
Merge pull request #19750 from markingmyname/ghjuly2021
[Issues] July 2021 git issues cont.
2 parents 3175c8d + 90d10f8 commit b6f8157

4 files changed

Lines changed: 127 additions & 109 deletions

File tree

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,51 @@
11
---
2-
title: "Create or Delete a Server Alias for Use by a Client | Microsoft Docs"
2+
title: Create or delete a server alias for use by a client
33
description: Find out how to create and delete an alias, an alternate name you can use when you connect to an instance of SQL Server. Learn about the benefits of aliases.
4-
ms.custom: ""
5-
ms.date: "03/14/2017"
64
ms.prod: sql
75
ms.prod_service: high-availability
8-
ms.reviewer: ""
96
ms.technology: configuration
107
ms.topic: conceptual
118
f1_keywords:
129
- "server alias"
1310
helpviewer_keywords:
1411
- "aliases [SQL Server], deleting"
1512
- "aliases [SQL Server], creating"
16-
ms.assetid: b687e376-ee33-470d-b65a-87246bfefe6f
1713
author: markingmyname
1814
ms.author: maghan
15+
ms.reviewer: ""
16+
ms.custom: ""
17+
ms.date: "07/14/2021"
1918
---
20-
# Create or Delete a Server Alias for Use by a Client
21-
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
22-
This topic describes how to create or delete a server alias in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] by using SQL Server Configuration Manager. An alias is an alternate name that can be used to make a connection. The alias encapsulates the required elements of a connection string, and exposes them with a name chosen by the user. Aliases can be used with any client application. By creating server aliases, your client computer can connect to multiple servers using different network protocols, without having to specify the protocol and connection details for each one. In addition, you can also have different network protocols enabled all the time, even if you only need to use them occasionally. If you have configured the server to listen on a non-default port number or named pipe, and you have disabled the SQL Server Browser service, create an alias that specifies the new port number or named pipe.
23-
24-
## <a name="SSMSProcedure"></a> Using SQL Server Configuration Manager
25-
26-
#### To create an alias
27-
28-
1. In SQL Server Configuration Manager, expand **SQL Server Native Client Configuration**, right-click **Aliases**, and then click **New Alias**.
29-
30-
2. In the **Alias Name** box, type the name of the alias. Client applications use this name when they connect.
31-
32-
3. In the **Server** box, type the name or IP address of a server. For a named instance append the instance name.
33-
34-
4. In the **Protocol** box, select the protocol used for this alias. Selecting a protocol, changes the title of the optional properties box to Port No, Pipe Name, or Connection String.
35-
36-
The connection strings described in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Configuration Manager Help can be useful for programmers who create their own connection strings. To access this information, in the **New Alias** dialog box, press F1, or click **Help**.
37-
38-
> [!NOTE]
39-
> If a configured alias is connecting to the wrong server or instance, disable and then reenable the associated network protocol. Doing this clears any cached connection information and allows the client to connect correctly.
40-
41-
#### To delete an alias
42-
43-
1. In [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Configuration Manager, expand **SQL Server Native Client Configuration**, and then click **Aliases**.
44-
45-
2. In the details pane, right-click the alias that you want to delete, and then click **Delete**.
46-
47-
19+
20+
# Create or delete a server alias for use by a client
21+
22+
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
23+
24+
This topic describes how to create or delete a server alias in SQL Server by using SQL Server Configuration Manager. An alias is an alternate name that can be used to make a connection. The alias encapsulates the required elements of a connection string, and exposes them with a name chosen by the user. Aliases can be used with any client application. By creating server aliases, your client computer can connect to multiple servers using different network protocols, without having to specify the protocol and connection details for each one. In addition, you can also have different network protocols enabled all the time, even if you only need to use them occasionally. If you have configured the server to listen on a non-default port number or named pipe, and you have disabled the SQL Server Browser service, create an alias that specifies the new port number or named pipe.
25+
26+
## <a name="SSMSProcedure"></a> Using SQL Server Configuration Manager
27+
28+
### To create an alias
29+
30+
1. In [SQL Server Configuration Manager](../../relational-databases/sql-server-configuration-manager.md), expand **SQL Server Native Client Configuration**, right-click **Aliases**, and then select **New Alias**.
31+
32+
2. In the **Alias Name** box, type the name of the alias. Client applications use this name when they connect.
33+
34+
3. In the **Server** box, type the name or IP address of a server. For a named instance append the instance name.
35+
36+
4. In the **Protocol** box, select the protocol used for this alias. Selecting a protocol, changes the title of the optional properties box to Port No, Pipe Name, or Connection String.
37+
38+
The connection strings described in SQL Server Configuration Manager Help can be useful for programmers who create their own connection strings. To access this information, in the **New Alias** dialog box, press F1, or select **Help**.
39+
40+
> [!NOTE]
41+
> If a configured alias is connecting to the wrong server or instance, disable and then reenable the associated network protocol. Doing this clears any cached connection information and allows the client to connect correctly.
42+
43+
### To delete an alias
44+
45+
1. In SQL Server Configuration Manager, expand **SQL Server Native Client Configuration**, and then select **Aliases**.
46+
47+
2. In the details pane, right-click the alias that you want to delete, and then select **Delete**.
48+
49+
## Next steps
50+
51+
- [SQL Server Config Manager](../../relational-databases/sql-server-configuration-manager.md)
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
11
---
2-
title: "optimize for ad hoc workloads Server Configuration Option | Microsoft Docs"
2+
title: optimize for ad hoc workloads Server Configuration Option
33
description: 'Learn about the "optimize for ad hoc workloads" option. Use it to improve SQL Server plan cache efficiency when workloads contain many single-use ad hoc batches.'
4-
ms.custom: ""
5-
ms.date: "11/17/2017"
64
ms.prod: sql
75
ms.prod_service: high-availability
86
ms.reviewer: ""
97
ms.technology: configuration
108
ms.topic: conceptual
119
helpviewer_keywords:
1210
- "optimize for ad hoc workloads option"
13-
ms.assetid: 0972e028-3a8e-454b-a186-e814a1d431f2
1411
author: markingmyname
1512
ms.author: maghan
13+
ms.custom: ""
14+
ms.date: "11/17/2017"
1615
---
16+
1717
# optimize for ad hoc workloads Server Configuration Option
18-
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
19-
20-
The **optimize for ad hoc workloads** option is used to improve the efficiency of the plan cache for workloads that contain many single use ad hoc batches. When this option is set to 1, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] stores a small compiled plan stub in the plan cache when a batch is compiled for the first time, instead of the full compiled plan. This helps to relieve memory pressure by not allowing the plan cache to become filled with compiled plans that are not reused.
21-
22-
The compiled plan stub allows the [!INCLUDE[ssDE](../../includes/ssde-md.md)] to recognize that this ad hoc batch has been compiled before but has only stored a compiled plan stub, so when this batch is invoked (compiled or executed) again, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] compiles the batch, removes the compiled plan stub from the plan cache, and adds the full compiled plan to the plan cache.
23-
24-
The compiled plan stub is one of the cacheobjtypes displayed by the sys.dm_exec_cached_plans catalog view. It has a unique sql handle and plan handle. The compiled plan stub does not have an execution plan associated with it and querying for the plan handle will not return an XML Showplan.
25-
26-
[Trace flag 8032](../../t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql.md) reverts the cache limit parameters to the [!INCLUDE[ssVersion2005](../../includes/ssversion2005-md.md)] RTM setting which in general allows caches to be larger. Use this setting when frequently reused cache entries do not fit into the cache and when the optimize for ad hoc workloads Server Configuration Option has failed to resolve the problem with plan cache.
27-
28-
> [!WARNING]
29-
> Trace flag 8032 can cause poor performance if large caches make less memory available for other memory consumers, such as the buffer pool.
18+
19+
[!INCLUDE [SQL Server Azure SQL Database](../../includes/applies-to-version/sql-asdb-asdbmi-pdw.md)]
20+
21+
The **optimize for ad hoc workloads** option is used to improve the efficiency of the plan cache for workloads that contain many single use ad hoc batches. When this option is set to 1, the Database Engine stores a small compiled plan stub in the plan cache when a batch is compiled for the first time, instead of the full compiled plan. This helps to relieve memory pressure by not allowing the plan cache to become filled with compiled plans that aren't reused.
22+
23+
The compiled plan stub allows the [!INCLUDE[ssDE](../../includes/ssde-md.md)] to recognize that this ad hoc batch has been compiled before but has only stored a compiled plan stub, so when this batch is invoked (compiled or executed) again, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] compiles the batch, removes the compiled plan stub from the plan cache, and adds the full compiled plan to the plan cache.
24+
25+
The compiled plan stub is one of the cacheobjtypes displayed by the sys.dm_exec_cached_plans catalog view. It has a unique sql handle and plan handle. The compiled plan stub doesn't have an execution plan associated with it and querying for the plan handle doesn't return an XML Showplan.
26+
27+
[Trace flag 8032](../../t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql.md) reverts the cache limit parameters to the [!INCLUDE[ssVersion2005](../../includes/ssversion2005-md.md)] RTM setting, which in general allows caches to be larger. Use this setting when frequently reused cache entries do not fit into the cache and when the `optimize for ad hoc workloads Server Configuration Option` has failed to resolve the problem with plan cache.
28+
29+
> [!WARNING]
30+
> Trace flag 8032 can cause poor performance if large caches make less memory available for other memory consumers, such as the buffer pool.
3031
3132
## Recommendations
32-
Avoid having a large number of single-use plans in the plan cache. A common cause of this problem is when the data types of query parameters is not consistently defined. This particularly applies to the length of strings but can apply to any data type that has a maxlength, a precision, or a scale. For example, if a parameter named @Greeting is passed as an nvarchar(10) on one call and an nvarchar(20) on the next call, separate plans are created for each parameter size. If a query has several parameters and they are not consistently defined when called, a large number of query plans could exist for each query. Plans could exist for each combination of query parameter data types and lengths that have been used.
3333

34-
If the number of single-use plans take a significant portion of [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] memory in an OLTP server, and these plans are Ad-hoc plans, use this server option to decrease memory usage with these objects.
34+
Avoid having a large number of single-use plans in the plan cache. A common cause of this problem is when the data types of query parameters aren't consistently defined. This particularly applies to the length of strings but can apply to any data type that has a maxlength, a precision, or a scale. For example, if a parameter named @Greeting is passed as a nvarchar(10) on one call and a nvarchar(20) on the next call, separate plans are created for each parameter size. If a query has several parameters and they aren't consistently defined when called, a large number of query plans could exist for each query. Plans could exist for each combination of query parameter data types and lengths that have been used.
35+
36+
If the number of single-use plans take a significant portion of [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] memory in an OLTP server, and these plans are Ad hoc plans, use this server option to decrease memory usage with these objects.
3537
To find the number of single-use cached plans, run the following query:
3638

3739
```sql
@@ -48,8 +50,6 @@ GROUP BY objtype, cacheobjtype;
4850
> Setting the **optimize for ad hoc workloads** to 1 affects only new plans; plans that are already in the plan cache are unaffected.
4951
> To affect already cached query plans immediately, the plan cache needs to be cleared using [ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE](../../t-sql/statements/alter-database-scoped-configuration-transact-sql.md), or [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] has to restart.
5052
51-
## See Also
52-
[sys.dm_exec_cached_plans &#40;Transact-SQL&#41;](../../relational-databases/system-dynamic-management-views/sys-dm-exec-cached-plans-transact-sql.md)
53-
[Server Configuration Options &#40;SQL Server&#41;](../../database-engine/configure-windows/server-configuration-options-sql-server.md)
54-
55-
53+
## See Also
54+
- [sys.dm_exec_cached_plans &#40;Transact-SQL&#41;](../../relational-databases/system-dynamic-management-views/sys-dm-exec-cached-plans-transact-sql.md)
55+
- [Server Configuration Options &#40;SQL Server&#41;](../../database-engine/configure-windows/server-configuration-options-sql-server.md)

docs/relational-databases/sql-server-configuration-manager.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
---
2-
title: "SQL Server Configuration Manager | Microsoft Docs"
2+
title: SQL Server Configuration Manager
33
description: Utilizing the SQL Server Configuration Manager client
4-
ms.custom: ""
5-
ms.date: "12/31/2019"
64
ms.prod: sql
7-
ms.prod_service: "database-engine"
8-
ms.reviewer: "vanto"
5+
ms.prod_service: database-engine
96
ms.technology:
107
ms.topic: conceptual
118
helpviewer_keywords:
@@ -19,15 +16,19 @@ helpviewer_keywords:
1916
- "services [SQL Server], managing"
2017
- "tools [SQL Server], SQL Server Configuration Manager"
2118
- "configuration manager [SQL Server]"
22-
ms.assetid: e6beaea4-164c-4078-95ae-b9e28b0aefe8
23-
author: "rothja"
24-
ms.author: "jroth"
19+
author: "markingmyname"
20+
ms.author: "maghan"
21+
ms.reviewer:
22+
ms.custom: ""
23+
ms.date: "12/31/2019"
2524
---
25+
2626
# SQL Server Configuration Manager
27+
2728
[!INCLUDE[sqlserver](../includes/applies-to-version/sqlserver.md)]
2829

2930

30-
[!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] Configuration Manager is a tool to manage the services associated with [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)], to configure the network protocols used by [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)], and to manage the network connectivity configuration from [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] client computers. [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] Configuration Manager is installed with your SQL Server installation. [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] Configuration Manager is a [!INCLUDE[msCoName](../includes/msconame-md.md)] Management Console snap-in that is available from the Start menu, or can be added to any other [!INCLUDE[msCoName](../includes/msconame-md.md)] Management Console display. [!INCLUDE[msCoName](../includes/msconame-md.md)] Management Console (**mmc.exe**) uses the **SQLServerManager\<version>.msc** file (such as **SQLServerManager13.msc** for [!INCLUDE[sssql15-md](../includes/sssql16-md.md)]) to open Configuration Manager. You will need the corresponding [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] Configuration Manager version to manage that particular version of [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)]. Here are the paths to the last five versions when Windows is installed on the C drive.
31+
[!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] Configuration Manager is a tool to manage the services associated with [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)], to configure the network protocols used by [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)], and to manage the network connectivity configuration from [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] client computers. [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] Configuration Manager is installed with your SQL Server installation. [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] Configuration Manager is a [!INCLUDE[msCoName](../includes/msconame-md.md)] Management Console snap-in that is available from the Start menu, or can be added to any other [!INCLUDE[msCoName](../includes/msconame-md.md)] Management Console display. [!INCLUDE[msCoName](../includes/msconame-md.md)] Management Console (**mmc.exe**) uses the **SQLServerManager\<version>.msc** file (such as **SQLServerManager13.msc** for [!INCLUDE[sssql15-md](../includes/sssql16-md.md)]) to open Configuration Manager. You will need the corresponding [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] Configuration Manager version to manage that particular version of [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)]. Here are the paths to the last five versions when Windows is installed on the C drive.
3132

3233
|Version|Path|
3334
|-|-|

0 commit comments

Comments
 (0)