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

How to set Application Name for the connection requests initiated? #25

Closed
SaloniSonpal opened this issue Sep 14, 2016 · 3 comments
Closed

Comments

@SaloniSonpal
Copy link

Hi @TimelordUK ,
I'm using the Microsoft's driver node-sqlserver for connecting to Azure SQL Database from lower versions of Node. But to connect from newer versions of Node.js I was trying to use this module. How can I set the Application Name to identify that the connection request coming from node-sqlserver-v8?

@SaloniSonpal SaloniSonpal changed the title Application Name How to set Application Name for the connection requests initiated? Sep 14, 2016
@TimelordUK
Copy link
Owner

Driver={SQL Server Native Client 11.0}; Server=np:.\pipe\LOCALDB#8704E301\tsql\query; Database={scratch}; Trusted_Connection=Yes; APP=msnodesqlv8

will this help? i..e APP=

@SaloniSonpal
Copy link
Author

Got it, @TimelordUK . It will have to be specified by user, and hence it won't be standardized. What are your thoughts on changing the default value for the driver? That way users can easily filter on that app name to distinguish it.

@TimelordUK
Copy link
Owner

can you not try something that creates an app from say the username

var app = 'sqlv8-' + process.env.USERNAME;

var driver = '.......; APP=' + app;

there is no reason you have to use the example given it was just for illustration. Simply use any suitable value that is probably dependent on a user of your system like login.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants