Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix | Fixing issue for SQL named Instances in Managed SNI using named pipes. #2142

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
56a19de
Implement support for NamePiped Instance in Managed SNI.
arellegue Aug 31, 2023
730e0c5
Removed path sepator prefix for default pipe name.
arellegue Aug 31, 2023
731048a
Added ReadOnlySpan to access string array.
arellegue Sep 1, 2023
4dbd383
Enhance InstanceNameTest to get NormalizedPipePath using either m_nor…
arellegue Sep 25, 2023
c948a59
Removed nuget package source from Nuget.config.
arellegue Sep 25, 2023
370aa8c
Removed SkipOnTargetFramework from NamedPipeInstanceNormalizedPipePa…
arellegue Sep 27, 2023
6d3e7c4
Added TCPInstanceConnectionString and NPInstanceConnectionString to c…
arellegue Sep 27, 2023
db07788
Include newly added config properties to SqlDbManager class.
arellegue Oct 4, 2023
b3660e4
Add condition to create Northwind database in named instance sql server.
arellegue Oct 4, 2023
6e7e24b
Use more meaningful name in third command line argument.
arellegue Oct 5, 2023
21d8eaf
Remove third command line argument. Control the Northwind creation in…
arellegue Oct 5, 2023
fc4f20e
Add ConditionalFact to test if NP Instance connection string is setup…
arellegue Oct 12, 2023
7a5297d
Revert all changes for newly added NamedInstance unit test. There is …
arellegue Oct 13, 2023
0d5a1e2
Revert config.default.json.
arellegue Oct 13, 2023
56903a9
Added 500ms delay after creating a user in SqlCredentialTest.
arellegue Oct 20, 2023
3bee9cf
Fixed Login exception error in OldCredentialsShouldFail unit test.
arellegue Oct 21, 2023
ee1d035
Add 5 seconds delay in createTestUser.
arellegue Oct 23, 2023
3724a46
Revert OldCredentialsShouldFail.
arellegue Oct 23, 2023
102e5b2
Removed unecessary comment.
arellegue Oct 23, 2023
b3a91cc
Removed blank line.
arellegue Oct 23, 2023
81f5f73
Removed blank line in SqlCredentialTest.
arellegue Oct 24, 2023
b5a581f
Removed using System.Data from InstanceNameTest class.
arellegue Oct 25, 2023
a96a5b9
Delete commented out InferLocalServerName();
arellegue Oct 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use more meaningful name in third command line argument.
  • Loading branch information
arellegue committed Oct 5, 2023
commit 6e7e24b48ba79f34d55bd67250faf3e00c983d9a
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"profiles": {
"Microsoft.Data.SqlClient.ExtUtilities": {
"commandName": "Project",
"commandLineArgs": "CreateDatabase NORTHWIND"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static class SqlDbManager
private const string TCPConnectionStringAASVBS = "TCPConnectionStringAASVBS";
private const string TCPConnectionStringHGSVBS = "TCPConnectionStringHGSVBS";

private static bool CreateNamedInstance = false;
private static bool CreateTestDbInNamedInstance = false;

/// <summary>
/// Creates/ drops database as requested.
Expand All @@ -40,15 +40,14 @@ public static class SqlDbManager
/// </param>
public static void Run(string[] args)
{
Console.WriteLine($"Current directory = {Environment.CurrentDirectory}");
if (!args.Any() || args.Length < 2)
{
throw new InvalidArgumentException("Incomplete arguments provided.");
}

if (args.Length > 2)
if (args.Length > 2 && args[2] == "UsingNamedInstance")
{
CreateNamedInstance = true;
CreateTestDbInNamedInstance = true;
}

try
Expand Down Expand Up @@ -128,12 +127,12 @@ private static void LoadActiveConnectionStrings()
{
s_activeConnectionStrings.Add(NPConnectionString, s_configJson.NPConnectionString);
}
if (!string.IsNullOrEmpty(s_configJson.TCPInstanceConnectionString) && CreateNamedInstance)
if (!string.IsNullOrEmpty(s_configJson.TCPInstanceConnectionString) && CreateTestDbInNamedInstance)
{
Console.WriteLine($"Loading {s_configJson.TCPInstanceConnectionString}");
s_activeConnectionStrings.Add(TCPInstanceConnectionString, s_configJson.TCPInstanceConnectionString);
}
if (!string.IsNullOrEmpty(s_configJson.NPInstanceConnectionString) && CreateNamedInstance)
if (!string.IsNullOrEmpty(s_configJson.NPInstanceConnectionString) && CreateTestDbInNamedInstance)
{
Console.WriteLine($"Loading {s_configJson.NPInstanceConnectionString}");
s_activeConnectionStrings.Add(NPInstanceConnectionString, s_configJson.NPInstanceConnectionString);
Expand Down Expand Up @@ -166,10 +165,10 @@ private static void UpdateConfig(string key, SqlConnectionStringBuilder builder)
s_configJson.NPConnectionString = builder.ConnectionString;
break;
case TCPInstanceConnectionString:
if (CreateNamedInstance) s_configJson.TCPInstanceConnectionString = builder.ConnectionString;
if (CreateTestDbInNamedInstance) s_configJson.TCPInstanceConnectionString = builder.ConnectionString;
break;
case NPInstanceConnectionString:
if (CreateNamedInstance) s_configJson.NPInstanceConnectionString = builder.ConnectionString;
if (CreateTestDbInNamedInstance) s_configJson.NPInstanceConnectionString = builder.ConnectionString;
break;
case TCPConnectionStringAASSGX:
s_configJson.TCPConnectionStringAASSGX = builder.ConnectionString;
Expand Down