-
Notifications
You must be signed in to change notification settings - Fork 440
fix: include instance name in Login7
message and traceID in prelogin
#1668
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
base: master
Are you sure you want to change the base?
fix: include instance name in Login7
message and traceID in prelogin
#1668
Conversation
Hi @arthurschreiber , are there any other things I need to do get this incorporated into the library? |
Login7
message
@TPVallancourt This seems to break the appveyor build on Windows 🤔 |
src/connection.ts
Outdated
@@ -2484,7 +2485,7 @@ class Connection extends EventEmitter { | |||
} | |||
|
|||
payload.hostname = this.config.options.workstationId || os.hostname(); | |||
payload.serverName = this.routingData ? this.routingData.server : this.config.server; | |||
payload.serverName = this.routingData ? `${this.routingData.server}\\${this.routingData.instance}` : this.config.server; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is instance
here guaranteed to always be a non-empty string? What happens if it's empty?
Login7
messageLogin7
message and traceID in prelogin
@TPVallancourt Hi, just curious if this is planned to be merged and released soon? I am currently relying on this PR for Fabric Warehouse connections |
Hi @arthurschreiber ! Finally found some time to think about this PR some more. Microsoft appears to have pushed out an update this week which has made Fabric a lot faster and more reliable, so it seemed like a good time to revisit this. The big change since you last reviewed is that I added an Additionally, I think it would be good to add integration testing to a Fabric warehouse - not sure what the protocol is for setting something like that up for this repo. Any ideas? Thank you! |
@@ -2442,7 +2449,8 @@ class Connection extends EventEmitter { | |||
clientPid: process.pid, | |||
connectionId: 0, | |||
clientTimeZone: new Date().getTimezoneOffset(), | |||
clientLcid: 0x00000409 | |||
clientLcid: 0x00000409, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is one hell of an opaque magic number…
Hey to everyone, Really looking forward to use the official tedious implementation to connect to Microsoft Fabric. Thanks! (: |
Fix for #1563
isFabric
option toConnectionConfiguration
which controls which Login7 packet is created. It appears that the packet which is required for Fabric does not work for SQLServerisFabric
, write FeatureExtensions to the end of the Login7 Packet matching the behavior of the go-mssqldb library. The header must still be written in the same place as it was previously. The value in the header is adjusted to reflect that FeatureExtensions now appear at the end of the packetinstance
. Previously we just savedserver
which removes the instance name from the redirect URL. This is the proper string for TLS negotiation, but Login7 needs theserver
and theinstance
together.prelogin
payload, include a randomly generated traceID, Starting with TDS37.0 it seems that traceID is no longer optional for Fabric.