473,398 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Finding the 'Client login ID' aka 'Execution ID': DB2 AIX

ARK
Database: DB2 AIX V8.*

Question: I want to be able to get the 'Client login ID' aka 'Execution
ID' (as opposed to the authid or application_id) for the current
connection within a stored procedure and without requiring SYSADM,
SYSCTRL, SYSMAINT, or SYSMON authority. This would be for audit
purposes as several different people can share an authid.

Obviously I can create a stored procedure to do the SQL below and then
grant execute to the users authid but I don't want to give them SYSADM,
SYSCTRL, SYSMAINT, or SYSMON authority which means the call will fail
for security reasons. <==tested

************************************************** ************************************************
I figured out how to do it using the snapshot (see below) but I don't
want to give the prod id sysmon authority.

Explanation: This query returns the Client login ID aka Execution ID
for the current connection to database dbname

Query:
SELECT EXECUTION_ID FROM TABLE(SNAPSHOT_APPL_INFO('dbname',-1))
AS SNAPSHOT_APPL_INFO
WHERE APPL_ID = application_id();

Authorized users can capture snapshots of monitor information for a DB2
instance by using snapshot table functions in SQL queries.

Prerequisites
You must have SYSADM, SYSCTRL, SYSMAINT, or SYSMON authority to capture
a database snapshot.

May 5 '06 #1
2 2330
ARK wrote:
Database: DB2 AIX V8.*

Question: I want to be able to get the 'Client login ID' aka 'Execution
ID' (as opposed to the authid or application_id) for the current
connection within a stored procedure and without requiring SYSADM,
SYSCTRL, SYSMAINT, or SYSMON authority. This would be for audit
purposes as several different people can share an authid.


Does the CURRENT CLIENT_USERID special register give you what you want?

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
May 8 '06 #2
ARK
Indeed it does but it has to be set at the client level. I was hoping
to be able to use something without a the client special registers
being set.

May 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: nao921 | last post by:
Hi everyone, I am currently involved in a project that involves a windows client program written in delphi and a web application written in php. I have made several php pages for the delphi...
4
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed quite a few times and can fail a few other times....
2
by: Robert Wagner | last post by:
I've created a page using VS.NET and page validator controls. The client side validation works fine on IE, but does not even activate under "alternate" browsers like Mozilla, Opera, etc. Why is...
9
by: Laurent Bugnion | last post by:
Hi, I am wondering what is the best way to find out which ASP.NET sessions are still active. Here is the reason: I have a custom control which can upload files. It saves the files in a folder...
2
by: Ronald | last post by:
I just started with dotnetnuke, and with a wrong login (wrong password on a clean install i can crash the application pool from IIS. (when i login with the right username/password information the...
0
bartonc
by: bartonc | last post by:
With one small change to the view/control: self.staticText3 = wx.StaticText(id=wxID_DBCONNECTDIALOGSTATICTEXT3, label='ODBC Data Source Name', name='staticText3',...
0
by: sandari | last post by:
The following code (web.config in Visual Studio 2005) is supposed to redirect a user to the appropriate Form depending on their role. However, regardless of the user's role, the only page...
3
by: dm3281 | last post by:
Hello -- I need to write an ASP.NET 2.0 application for our clients to use to login and verify file transmissions. Each client will need their own logon, in addition to a way to assign each...
2
by: nja2222 | last post by:
I would like to create a page for my clients to login and check for updates on their accounts. Then I would like to create a page where my employees can login and make updates, specifically new file...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.