You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/relational-databases/server-management-objects-smo/create-program/connecting-to-an-instance-of-sql-server.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ You can create an instance of the <xref:Microsoft.SqlServer.Management.Smo.Serve
24
24
25
25
**Using a ServerConnection object**
26
26
27
-
The advantage of using the <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object variable is that the connection information can be reused. Declare a <xref:Microsoft.SqlServer.Management.Smo.Server> object variable. Then, declare a <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object and set properties with connection information such as the name of the instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)], and the authentication mode. Then, pass the <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object variable as a parameter to the <xref:Microsoft.SqlServer.Management.Smo.Server> object constructor. It is not recommended to share connections between different server objects at the same time. Use the <xref:Microsoft.SqlServer.Management.Common.ServerConnection.Copy%2A> method to get a copy of the existing connection settings.
27
+
The advantage of using the <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object variable is that the connection information can be reused. Declare a <xref:Microsoft.SqlServer.Management.Smo.Server> object variable. Then, declare a <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object and set properties with connection information such as the name of the instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)], and the authentication mode. Then, pass the <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object variable as a parameter to the <xref:Microsoft.SqlServer.Management.Smo.Server> object constructor. It isn't recommended to share connections between different server objects at the same time. Use the <xref:Microsoft.SqlServer.Management.Common.ServerConnection.Copy%2A> method to get a copy of the existing connection settings.
28
28
29
29
**Setting Server object properties explicitly**
30
30
@@ -36,7 +36,7 @@ Declare the <xref:Microsoft.SqlServer.Management.Smo.Server> object variable and
36
36
37
37
## Connection Pooling
38
38
39
-
Calling the <xref:Microsoft.SqlServer.Management.Common.ConnectionManager.Connect%2A> method of the <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object is generally unnecessary. After operations are completed, SMO automatically establishes connections when needed and return them to the connection pool. If you call the <xref:Microsoft.SqlServer.Management.Common.ConnectionManager.Connect%2A> method, the connection won't be released to the pool. To achieve that, you need to use the <xref:Microsoft.SqlServer.Management.Common.ConnectionManager.Disconnect%2A> method explicitly. Furthermore, you can acquire a non-pooled connection by adjusting the <xref:Microsoft.SqlServer.Management.Common.ConnectionSettings.NonPooledConnection%2A> property of the <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object.
39
+
Calling the <xref:Microsoft.SqlServer.Management.Common.ConnectionManager.Connect%2A> method of the <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object is unnecessary. After operations are completed, SMO automatically establishes connections when needed and return them to the connection pool. If you call the <xref:Microsoft.SqlServer.Management.Common.ConnectionManager.Connect%2A> method, the connection won't be released to the pool. To achieve that, you need to use the <xref:Microsoft.SqlServer.Management.Common.ConnectionManager.Disconnect%2A> method explicitly. Furthermore, you can acquire a nonpooled connection by adjusting the <xref:Microsoft.SqlServer.Management.Common.ConnectionSettings.NonPooledConnection%2A> property of the <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object.
40
40
41
41
## Multithreaded Applications
42
42
@@ -46,25 +46,25 @@ For multithreaded applications, a separate <xref:Microsoft.SqlServer.Management.
46
46
47
47
Replication Management Objects (RMO) uses a slightly different method from SMO to connect to a replication server.
48
48
49
-
RMO programming objects require that a connection to an instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] is made by using the <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object implemented by the **Microsoft.SqlServer.Management.Common** namespace. This connection to the server is made independently of an RMO programming object. It is then it is passed to the RMO object either during instance creation or by assignment to the <xref:Microsoft.SqlServer.Replication.ReplicationObject.ConnectionContext%2A> property of the object. In this manner, an RMO programming object and the connection object instances can be created and managed separately, and a single connection object can be reused with multiple RMO programming objects. The following rules apply for connections to a replication server:
49
+
RMO programming objects require that a connection to an instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] is made by using the <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object implemented by the **Microsoft.SqlServer.Management.Common** namespace. This connection to the server is made independently of an RMO programming object. It's then it's passed to the RMO object either during instance creation or by assignment to the <xref:Microsoft.SqlServer.Replication.ReplicationObject.ConnectionContext%2A> property of the object. In this manner, an RMO programming object and the connection object instances can be created and managed separately, and a single connection object can be reused with multiple RMO programming objects. The following rules apply for connections to a replication server:
50
50
51
51
- All properties for the connection are defined for a specified <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object.
52
52
53
53
- Each connection to an instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] must have its own <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object.
54
54
55
-
- All authentication information to make the connection and successfully log on to the server is supplied in the <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object.
55
+
- All authentication information to make the connection and successfully sign in the server is supplied in the <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object.
56
56
57
-
- By default, connections are made by using Microsoft Windows Authentication. To use [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] Authentication, <xref:Microsoft.SqlServer.Management.Common.ConnectionSettings.LoginSecure%2A> must be set to False and <xref:Microsoft.SqlServer.Management.Common.ConnectionSettings.Login%2A> and <xref:Microsoft.SqlServer.Management.Common.ConnectionSettings.Password%2A> must be set to a valid [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)]logon and password. Security credentials must always be stored and handled securely, and supplied at run time whenever possible.
57
+
- By default, connections are made by using Microsoft Windows Authentication. To use [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] Authentication, <xref:Microsoft.SqlServer.Management.Common.ConnectionSettings.LoginSecure%2A> must be set to False and <xref:Microsoft.SqlServer.Management.Common.ConnectionSettings.Login%2A> and <xref:Microsoft.SqlServer.Management.Common.ConnectionSettings.Password%2A> must be set to a valid [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)]sign-in and password. Security credentials must always be stored and handled securely, and supplied at run time whenever possible.
58
58
59
59
- The <xref:Microsoft.SqlServer.Management.Common.ConnectionManager.Connect%2A> method must be called before passing the connection to any RMO programming object.
60
60
61
61
## Examples
62
62
63
-
To use any code example that is provided, you will have to choose the programming environment, the programming template, and the programming language in which to create your application. For more information, see [Create a Visual C# SMO Project in Visual Studio .NET](../../../relational-databases/server-management-objects-smo/how-to-create-a-visual-csharp-smo-project-in-visual-studio-net.md).
63
+
To use any code example that is provided, you'll have to choose the programming environment, the programming template, and the programming language in which to create your application. For more information, see [Create a Visual C# SMO Project in Visual Studio .NET](../../../relational-databases/server-management-objects-smo/how-to-create-a-visual-csharp-smo-project-in-visual-studio-net.md).
64
64
65
65
## Connect to the Local Instance of SQL Server by Using Windows Authentication in Visual Basic
66
66
67
-
Connecting to the local instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)]does not require much code. Instead, it relies on default settings for authentication method and server. The first operation that requires data to be retrieved will cause a connection to be created.
67
+
Connecting to the local instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)]doesn't require much code. Instead, it relies on default settings for authentication method and server. The first operation that requires data to be retrieved causes a connection to be created.
68
68
69
69
This example is Visual Basic .NET code that connects to the local instance of SQL Server by using Windows Authentication.
## Connect to the Local Instance of SQL Server by Using Windows Authentication in Visual C#
81
81
82
-
Connecting to the local instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)]does not require much code. Instead, it relies on default settings for authentication method and server. The first operation that requires data to be retrieved will cause a connection to be created.
82
+
Connecting to the local instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)]doesn't require much code. Instead, it relies on default settings for authentication method and server. The first operation that requires data to be retrieved causes a connection to be created.
83
83
84
84
This example is Visual C# .NET code that connects to the local instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] by using Windows Authentication.
## Connect to a Remote Instance of SQL Server by Using Windows Authentication in Visual Basic
98
98
99
-
When you connect to an instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] by using Windows Authentication, you do not have to specify the authentication type. Windows Authentication is the default.
99
+
When you connect to an instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] by using Windows Authentication, you don't have to specify the authentication type. Windows Authentication is the default.
100
100
101
101
This example is [!INCLUDE[vbprvb](../../../includes/vbprvb-md.md)] .NET code that connects to the remote instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] by using Windows Authentication. The string variable *strServer* contains the name of the remote instance.
## Connect to a Remote Instance of SQL Server by Using Windows Authentication in Visual C#
114
114
115
-
When you connect to an instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] by using Windows Authentication, you do not have to specify the authentication type. Windows Authentication is the default.
115
+
When you connect to an instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] by using Windows Authentication, you don't have to specify the authentication type. Windows Authentication is the default.
116
116
117
117
This example is Visual C# .NET code that connects to the remote instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] by using Windows Authentication. The string variable *strServer* contains the name of the remote instance.
When you connect to an instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] Authentication, you must specify the authentication type. This example demonstrates the alternative method of declaring a <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object variable, which enables the connection information to be reused.
134
134
135
-
The example is [!INCLUDE[vbprvb](../../../includes/vbprvb-md.md)] .NET code that demonstrates how to connect to the remote and *vPassword* contain the logon and password.
135
+
The example is [!INCLUDE[vbprvb](../../../includes/vbprvb-md.md)] .NET code that demonstrates how to connect to the remote and *vPassword* contain the sign-in and password.
136
136
137
137
```VBNET
138
138
' compile with:
@@ -181,7 +181,7 @@ End Class
181
181
182
182
When you connect to an instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] Authentication, you must specify the authentication type. This example demonstrates the alternative method of declaring a <xref:Microsoft.SqlServer.Management.Common.ServerConnection> object variable, which enables the connection information to be reused.
183
183
184
-
The example is Visual C# .NET code that demonstrates how to connect to the remote and *vPassword* contain the logon and password.
184
+
The example is Visual C# .NET code that demonstrates how to connect to the remote and *vPassword* contain the sign-in and password.
Copy file name to clipboardExpand all lines: docs/tools/configuration-manager/protocols-for-mssqlserver-properties-advanced-tab.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,11 +30,11 @@ For more information about how to configure other [!INCLUDE[ssNoVersion](../../i
30
30
31
31
There are three possible values:
32
32
33
-
-**Off**: Means **Extended Protection** is disabled. The instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]will accept connections from any client regardless of whether the client is protected or not. **Off** is compatible with older and unpatched operating systems, but is less secure. Only use this setting when you know that the client operating systems do not support extended protection.
33
+
-**Off**: Means **Extended Protection** is disabled. The instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]accepts connections from any client regardless of whether the client is protected or not. **Off** is compatible with older and unpatched operating systems, but is less secure. Only use this setting when you know that the client operating systems don't support extended protection.
34
34
35
-
-**Allowed**: Means **Extended Protection** is required for connections from operating systems that support **Extended Protection**. Connections from unprotected client applications that are running on protected client operating systems are rejected. **Extended Protection** is ignored for connections from unprotected operating systems. This setting is more secure than **Off**, but is not the most secure setting. Use this setting in mixed environments, where some operating systems or applications support **Extended Protection** and some do not.
35
+
-**Allowed**: Means **Extended Protection** is required for connections from operating systems that support **Extended Protection**. Connections from unprotected client applications that are running on protected client operating systems are rejected. **Extended Protection** is ignored for connections from unprotected operating systems. This setting is more secure than **Off**, but isn't the most secure setting. Use this setting in mixed environments, where some operating systems or applications support **Extended Protection** and some don't.
36
36
37
-
-**Required**: Means that for a connection to be accepted, it must come from a protected application on a protected operating system. This setting is the most secure of the three options. But connections from operating systems that do not support **Extended Protection**will not be able to connect to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
37
+
-**Required**: Means that for a connection to be accepted, it must come from a protected application on a protected operating system. This setting is the most secure of the three options. But connections from operating systems that don't support **Extended Protection**won't be able to connect to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
0 commit comments