cancel
Showing results for 
Search instead for 
Did you mean: 

how to track the report calling from powerbuilder?

Former Member
0 Kudos

Suppose I have a powerbuilder application myapp. there are many reports created with pb. There are 2 possible for pb report:

datawindow get data from stored procedure

datawindow get date with sql.

myapp use a specific login mylogin to connect to sybase ase.

then I want to track who and when the report running. how to implement it? any way without modify myapp code?

I tried with sybase audit, but myapp connect with mylogin. So anyone run myapp will be same login.

what's the solution for this case?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I guess there's no other solution than to  modify your code and create a log every time the report is run.

Former Member
0 Kudos

Modify sp code is fine. But not sure if possible to get client ID(for example, IP address) in the SP?  modify pb app has many problem, need to redeploy the app.

Former Member
0 Kudos

You'll have to redeploy the app eventually anyway to add new features & make bug fixes.

You can find your IP address in the sysprocesses table:

master.dbo.sysprocesses.ipaddr

Answers (2)

Answers (2)

Former Member
0 Kudos

We did this with Proxy Authorization.  That's where you connect to the database with one user, but you can assume the authorization rights of another user for specific purposes.

So your app would have to connect with a user's individual ID, but then you'd issue 'set proxy myLogin' to give them rights to run the reports and access those database tables.  If they ever connect outside your application (with Crystal Reports or some other 3rd party tool), they'd be connecting as their unique login and wouldn't have rights to the underlying database tables unless they also knew to issue the 'set proxy myLogin' command.

Former Member
0 Kudos

Hi Kent;

Here is what I do in my Transaction Object to associate the time in ASE to the application & user ...

SQLCA.LogId = "Chris.Pollach"

SQLCA.DBParm = "AppName='<myapp>',Host='<mypc>'"

HTH

Regards ... Chris