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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't update. Database or object is read only...

Status
Not open for further replies.

msmy

Technical User
May 12, 2002
11
MY
What should I do at database side ??? when this error appeared.
 
I think you need to grant a read permission to your database user.

grant select to username.

 
Hi

You problely need to grant update permission to your user

"GRANT UPPDATE ON tablename TO username".
If you want the username to hava all privilige on table, can be useful when debugging, you can use
"GRANT ALL ON tablename TO username"

thorkild
 
Only informix user can grant a permission to database user. U can also try to use root to grant permission.

 
I have tried it but still the same results. And also i'm using grant DBA to username and login as informix.

thanks
 
msmy:

Would you please post the error message that you are getting along with the the output of onstat -

I just want to make it sure that you are not accessing a secondary server paired with a primary server.(Replication)

Regards,
shriyan
 
as requested,

(3027) Can't update. Database or object is read-only.


$ onstat -

Informix Dynamic Server Version 7.31.UC2 -- On-Line -- Up 01:00:32 -- 297104 K
bytes

$ onstat -l

Informix Dynamic Server Version 7.31.UC2 -- On-Line -- Up 01:00:54 -- 297104 K
bytes

Physical Logging
Buffer bufused bufsize numpages numwrits pages/io
P-1 0 1000 0 0 0.00
phybegin physize phypos phyused %used
10003f 10000 2778 0 0.00

Logical Logging
Buffer bufused bufsize numrecs numpages numwrits recs/pages pages/io
L-2 0 500 26 10 10 2.6 1.0
Subsystem numrecs Log Space used
OLDRSAM 26 1128

address number flags uniqid begin size used %used
c2e547a0 1 U-B---- 10326 10274f 5000 5000 100.00
c2e547bc 2 U-B---- 10327 103ad7 5000 5000 100.00
c2e547d8 3 U-B---- 10328 104e5f 5000 5000 100.00
c2e547f4 4 U-B---- 10329 200035 5000 5000 100.00
c2e54810 5 U-B---- 10330 2013bd 5000 5000 100.00
c2e5482c 6 U-B---- 10331 202745 5000 5000 100.00
c2e54848 7 U-B---- 10332 203acd 5000 5000 100.00
c2e54864 8 U---C-L 10333 204e55 5000 4841 96.82
c2e54880 9 U-B---- 10309 2061dd 5000 5000 100.00
c2e5489c 10 U-B---- 10310 207565 5000 5000 100.00
c2e548b8 11 U-B---- 10311 2088ed 5000 5000 100.00
c2e548d4 12 U-B---- 10312 209c75 5000 5000 100.00
c2e548f0 13 U-B---- 10313 20affd 5000 5000 100.00
c2e5490c 14 U-B---- 10314 20c385 5000 5000 100.00
c2e54928 15 U-B---- 10315 20d70d 5000 5000 100.00
c2e54944 16 U-B---- 10316 20ea95 5000 5000 100.00
c2e54960 17 U-B---- 10317 20fe1d 5000 5000 100.00
c2e5497c 18 U-B---- 10318 2111a5 5000 5000 100.00
c2e54998 19 U-B---- 10319 21252d 5000 5000 100.00
c2e549b4 20 U-B---- 10320 2138b5 5000 5000 100.00
c2e549d0 21 U-B---- 10321 214c3d 5000 5000 100.00
c2e549ec 22 U-B---- 10322 215fc5 5000 5000 100.00
c2e54a08 23 U-B---- 10323 21734d 5000 5000 100.00
c2e54a24 24 U-B---- 10324 2186d5 5000 5000 100.00
c2e54a40 25 U-B---- 10325 219a5d 5000 5000 100.00
 
error details:

08-14-2003 14:32:00 FATAL Error : Text [(3027) Can't update. Database or object is read-only.] Location [DGEN.BAS/dg_Db_DirectWrite] Nearest line Number [Not specified]


 
try to create a test table on the database and run some update/insert on the said table. Remember to use back the same login ID that facing the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top