Lets suppose we have two databases opened in Read Only mode.
1. DB1
2. DB2
and on DB1, we have a DBLINK on DB2 named DB2.
Now, if we try to execute following query on DB1
SELECT EMPNO, ENAME, DNAME, SAL
FROM scott.emp EMP, scott.DEPT@DB2 DEPT
WHERE EMP.DEPTNO=DEPT.DEPTNO
it will throw following error
ORA-16000: database open for read-only access
to avoid this we must set our transaction as read only using follwoing command
set transaction read only;
Example:
Related Posts:
- ORA-01157: cannot identify/lock data file string - see DBWR trace file
- ORA-00849: SGA_TARGET cannot be set to more than MEMORY_MAX_TARGET
- ORA-27101: shared memory realm does not exist
- ORA-00604: error occurred at recursive SQL level string
- ORA-00600: internal error code
- ORA-00257: archiver error. Connect internal only, until freed
1. DB1
2. DB2
and on DB1, we have a DBLINK on DB2 named DB2.
Now, if we try to execute following query on DB1
SELECT EMPNO, ENAME, DNAME, SAL
FROM scott.emp EMP, scott.DEPT@DB2 DEPT
WHERE EMP.DEPTNO=DEPT.DEPTNO
it will throw following error
ORA-16000: database open for read-only access
to avoid this we must set our transaction as read only using follwoing command
set transaction read only;
Example:
Related Posts:
- ORA-01157: cannot identify/lock data file string - see DBWR trace file
- ORA-00849: SGA_TARGET cannot be set to more than MEMORY_MAX_TARGET
- ORA-27101: shared memory realm does not exist
- ORA-00604: error occurred at recursive SQL level string
- ORA-00600: internal error code
- ORA-00257: archiver error. Connect internal only, until freed
well, but usually we want to transfer data insert into select * from db@db2. Which is not read only.
ReplyDeleteAnd this does not help when calling procedure via link:
SELECT PA.IDDocument, PA.ValidFrom, PA.ValidTo, PA.Valid
FROM rt_pado@schstb pa
WHERE PA.IDPADORelationType = 1 AND
( RT_CLISRV_UTIL_PKG.IS_VALID@schstb(SYSDATE, PA.ValidFrom, PA.ValidTo, PA.Valid) = 'Y' )