Requires Ubuntu 22.04
- Install dotnet sdk 8.0
- Install pwsh
dotnet build -p:OSGroup=Unix -t:BuildNetCore
dotnet build -p:OSGroup=Unix -t:BuildTestsNetCore
Requires Ubuntu 22.04
dotnet build -p:OSGroup=Unix -t:BuildNetCore
dotnet build -p:OSGroup=Unix -t:BuildTestsNetCore
Nothing to see here.
Any datatype support in SqlClient depends on System.Data.SqlDbType
being enhanced to provide the enum for the datatype being added.
At the same time, a SqlType needs to be exposed which will allows the clients to represent the internals of the JSON datatype.
SqlDbType
is an enum which is shipped as part of System.Data.Common.dll in dotnet/runtime and in netfx, the type is shipped from System.Data.dll
Typically all the drivers like Npgsql and Oracle's data provider for ADO.Net have their own Types enum, which ships with the driver. NpgSqlDbType
and OracleDbType
However there are implementations in dotnet/runtime which depend on SqlDbType. These implementations were ported from .Net framework and to light up the implementation, the SqlDbType had to be shipped with dotnet/runtime.
Find the process id for which the environment variables need to be found
ps faux | grep 'your_process'
Result
saurabh 11654 0.6 3.0 3773360 243208 pts/1 Sl 10:33 0:47 /usr/lib/jvm/java-8-openjdk-amd64/bin/java
Get the PID of the process which is 11654
in the case above
cat /proc/11654/environ
When an error occurs on the connection in case of MARS, during the execution of a reader, it forces the connection to be closed. While closing the connection the TdsParserSessionPool is Disposed
During this process of tearing down the connection, the underlying packet is released at https://github.com/dotnet/corefx/blob/e89d17a0a97d5de707f24587118acc8072667b78/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParserStateObject.cs#L2530 when the SNI error is read by TdsParserStateObject
In case of the Native SNI, the packet release also tears down any callbacks that are associated with the packet, and hence the ReadAsyncCallback is never triggered.
In case of managed SNI, the packet release sets the private SNIAsyncCallback _completionCallback
to null.
My fix is to check if the _completionCallBack is null and if it is, then the upstream TdsParserStateobject is not notified of the error via the callback.
The following steps should be followed to run the Entity Framework tests and how to run the tests with modified SqlClient.
https://github.com/aspnet/EntityFrameworkCore/
build.cmd
or build.sh
depending on the OS you are on.Make a note of the dotnet path that the build is using. This will be needed to execute specific tests
E.g. In the following the path is C:\Users\sausing.dotnet\x64\dotnet.exe
D:\aspnet\EntityFrameworkCore>build --help
I am outlining the steps for setting up Kerberos on Ubuntu for Integrated Authentication. The Kerberos packages are installed by default on macOS, and the configuration on macOS is the same as Ubuntu. I have tested these steps with Integrated Auth of our development version of SqlClient on Ubuntu1404, 1604 and macOS.
Joining the domain on linux doesn’t guarantee a Kerberos ticket will be generated for use by GSSAPI. The following are the minimum steps necessary to test Integrated Auth on Linux. For further automation where the tickets may need to be renewed on a regular basis or without human intervention, the users can use the KeyTab file.
For Integrated Authentication setup on Linux
Install krb5-user package using apt-get. This would provide the kinit command the configurations needed to interact with Active Directory.
Configure the KDC in krb5.conf file. You could also get the KDC details from the domain controller admin of the organization.