thanks guys,
I was hoping to be able to get the info from some method on oracle's own
jdbc implementation classes,
as both suggestion to use these view imply another trip to the db from
the application - just to know if there was uncommitted work.
thanks,
Edo
mcstock wrote:
exception handled:
'or by a user that has privileges granted by SYS'
yes, there are risks, which i should have mentioned, but it is sometimes
necessary to do things in SYS -- just like it's sometimes necessary to
actually edit the windows registry
not all users have privileges on the V_$ views, which are owned by SYS --
so, how do you grant selective privileges on V$ stuff? grant
SELECT_CATALOG_ROLE and let the user have access to all V$'s and DBA views?
so, for a more carefully advised approach (assuming there isn't some other
mechanism to accomplish the task, i.e., that i'm not overlooking some
normally available stat, v$, or function)
[_] create a user name something like SYS_EXTENSIONS with basic privileges
(create session, create view, create public synonym)
[_] connect as SYS
[_] grant select on v_$session to sys_extensions;
[_] grant select on v_$transaction to sys_extensions;
[_] connect as SYS_EXTENSIONS
[_] create the view based on the sys V_$ views
[_] create a public synonym for the view
[_] grant select on the view to public
-- mcs
"Daniel Morgan" <da******@x.washington.eduwrote in message
news:1067613108.215966@yasure...
>>mcstock wrote:
>>>i can't think of any default way to find out about open transactions, but you could create a view (either owned by SYS or by a user that has privileges granted by SYS like this:
CREATE OR REPLACE VIEW MY_TRANSACTION ( SID, START_SCNB, START_SCNW ) AS select s.sid , t.start_scnb , t.start_scnw from v$session s , v$transaction t where s.saddr = t.ses_addr and s.AUDSID = USERENV('SESSIONID')
then create a public synonym and grant select to public -- selecting from the view will then show if there is an open transaction.
-- mcs
"Edoardo" <e.*************@no.spam.btinternet.comwrote in message news:bn**********@hercules.btinternet.com... Hi
is there a way, using Oracle's JDBC drivers to find out if a given java.sql.Connection has uncommitted work pending on it ???
the reason is, close() will commit work if there is any - while if the close happens as a cleanup action after an error, it would be desirable to rollback (but I don't want to rollback always before close).
TIA. Edoardo Comar www.choreology.com I take exception to any advice telling someone to create an object as SYS.
If all someone wants is open transactions there are a boatload of V_$ magic views that provide all of that information.
-- Daniel Morgan http://www.outreach.washington.edu/e...ad/oad_crs.asp http://www.outreach.washington.edu/e...oa/aoa_crs.asp da******@x.washington.edu (replace 'x' with a 'u' to reply)
0 2358 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: JShurmatz |
last post by:
If anyone can shed some light on this problem I would greatly
appreciate it.
I am unsuccessfully trying to use a database connnection retrieved
from a pool configured using Java System Web...
|
by: David |
last post by:
Hello all,
I have been trying to use the OCI driver to connect to Oracle 9i, but
have been getting the following error:
java.sql.SQLException: Closed Connection
at...
|
by: CM |
last post by:
Hi,
when i want connect me in my BD with a JSP (with this simple code),
this exception is throw.
Thank's for ur help
Mathieu
CODE of my JSP
---------------------
|
by: JWM |
last post by:
I am trying to implement Oracle connection pooling for the following code,
which was written by someone else. Here is my main question -- this java
file creates code that is executed every hour,...
|
by: neo |
last post by:
Hi,
I have a problem to set a JDBC connection as READ UNCOMMITED.
setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED)
This is causing lots of blocking on tables
and update or...
|
by: ʹÃûÑï |
last post by:
ORA-03114: not connected to ORACLE && MS's Bug??
DataBase:Oracle 817
using OracleClient,net framework 1.1
I'm using ADO.Net in C# with Oracle 817.
and following is my public data access...
|
by: Gregor =?UTF-8?B?S292YcSN?= |
last post by:
Hi!
I'm using DB2 database on one server and ORACLE database on the second one.
I want to move some data from ORACLE database to DB2 database and update
some columns on ORACLE database so I know...
|
by: Vinod Sadanandan |
last post by:
All,
Below listed are the new features in Oracle 11g ,please join me in this discussion to generate a testcase and analyze each of the listed features .
Precompilers:...
|
by: Rauf Sarwar |
last post by:
Originally posted by Nelson Broat
Have you included Oracle jdbc driver in your classpath? Depending on
your Oracle version, it would be ORACLE_HOME/jdbc/lib/classesXXX.zip or
classesXXX.jar...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |