We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b0804f commit a4bf27bCopy full SHA for a4bf27b
1 file changed
src/SmoFacade/Login.cs
@@ -104,11 +104,15 @@ private static Microsoft.SqlServer.Management.Smo.Login ConstructLogin(LoginProp
104
{
105
var login = new Microsoft.SqlServer.Management.Smo.Login(server._server, loginProperties.Name) {
106
LoginType = loginProperties.LoginType,
107
- Sid = loginProperties.Sid,
108
DefaultDatabase = loginProperties.DefaultDatabase
109
};
110
111
- if(loginProperties.LoginType == LoginType.SqlLogin) {
+ if (loginProperties.Sid != null)
+ {
112
+ login.Sid = loginProperties.Sid;
113
+ }
114
+
115
+ if (loginProperties.LoginType == LoginType.SqlLogin) {
116
if(loginProperties.PasswordHash != null)
117
login.Create(loginProperties.PasswordHash, LoginCreateOptions.IsHashed);
118
else if(loginProperties.Password != null)
0 commit comments