on 2011 Dec 14 4:07 AM
Is it possible, within events triggered by "Connect, Disconnect and ConnectFailed" to determine more than the User name? The application we use login with a general userid but we would like to register OsUser and AppInfo.
Selecting the @@spid within the events does not result in a "normal" @@spid but in a large number, (1000490334) that increases for every login attempt.
The Database runs on 11.0.1 so I cannot use the ParentConnection property introduced in version 12.0
Request clarification before answering.
Have a look at the EVENT_PARAMETER function. It notes all these context information available within the different system events.
For example, all these connection events you're interested in should give you the APPINFO information of the triggering connection when you query
SELECT EVENT_PARAMETER('APPINFO');
within your event handlers.
Also...
SELECT CONNECTION_PROPERTY ( 'whatever-property-you-want', EVENT_PARAMETER ( 'ConnectionID' ) );
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Breck: Great enhancement!
User | Count |
---|---|
61 | |
8 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.