Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle 9i - Query mode

Status
Not open for further replies.

csunix

Programmer
Mar 23, 2004
129
GB
We have an application running on oracle 8i. We have set up a test system to test our move to 9i. When we try running the application on 9i databse it will not allow us to update any records. The following error message is returned FRM-40501. I know in 8i this means record is held by another user but this is not the case in the test system as there is only one user signed on. Is there a 'Query only ' mode in 9i that has to be switched on/off
 
Have you tried to see if you can update the records just using sqlplus at the command line
 
check daabase is open in read write:-

SQLWKS> select open_mode from v$database
2>
OPEN_MODE
----------
READ WRITE
1 row selected.

you could also check tablespaces are in read write :-

select name, enabled from v$datafile ; this will tell you weather datafile is read write enabled, if is is not you can set the tablespace to read write via:-

ALTER TABLESPACE <tablesace name> READ WRITE;





Sy UK
 
CS,

You can also use this script to determine if there are any locks active on your data:
Code:
ttitle "Lock Listing"
set linesize 150
set echo off
col oruser format a16 heading "Oracle Username"
col osuser format a13 heading "O/S Username"
col obj format a20 heading "Locked Object"
col ss heading "SID/Ser#" format a12
col time heading "Logon Date/Time" format a19
col rs heading "RBS|Name" format a4
col unix heading "Unix|Process" format a9
col computer heading "Machine name|of Locker" format a20
set linesize 120
select     owner||'.'||object_name obj
   ,oracle_username||' ('||s.status||')' oruser
   ,os_user_name osuser
   ,machine computer
   ,l.process unix
   ,''''||s.sid||','||s.serial#||'''' ss
   ,r.name rs
   ,to_char(s.logon_time,'yyyy/mm/dd hh24:mi:ss') time
from       v$locked_object l
   ,dba_objects o
   ,v$session s
   ,v$transaction t
   ,v$rollname r
where l.object_id = o.object_id
  and s.sid=l.session_id
  and s.taddr=t.addr
  and t.xidusn=r.usn
order by osuser, ss, obj
/
ttitle off
set linesize 132
Let us know if this is helpful.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top