Oracle procedure through dblink ora-3113
The architecture of my service as follows: Windows Service connects to database (DB1) through the OCI protocol. After a successful connection it calls the alias of the procedure which is dblinked from another database server(DB2). Next it gets some data from dblinked tables and finally closes connection.
My oracle version is 9.2.0 on both databases.
Sometimes the sistem administrator make dump of the databases. And when my service makes the first "lifecicle" after the dump is done i got ora-3113.
so, when i connecting there is no errors, but when i am calling the procedure, i got this error. And when i start my service again, there is no errors and everythig is going fine!
Sounds like some kind of connection pooling is used - which means that when your service runs, it attempts to use a previously successful pooled connection to the database. But as the database dump resulted in a db reset, the server process that serviced that connection no longer exists.
The connection is used, attempts to communicate with the server process no longer there, and gets a eof on that communication in return as the IP stack tears up that invalid tcp connection.
Similar Messages
-
Error in Executing Procedure through DBLink
Hi,
I am facing some problems in executing a procedure through DBLink.
I have two schema A and B in two different database.
In schema A I am having one procedure X in package Y and my requirement is that I want to execute this procedure in schema B. So in schema B i have created one DBLink ABC and trying to execute procedure X using this DB link.
begin
A.Y.X@ABC;
end;
But I am getting below error:
ORA-06550: line 2, column 1:
PLS-00201: identifier 'A.Y.X@ABC' must be declared
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
Any help would be greatly appreciated!
Thanks In Advance..
Regards,
Sachin BansalHi,
Yes, I am connecting to user A of DB1 and in this user I am having procedure X in Package Y. My DBLink in Schema B of DB2 is pointing to user A of DB1.
I have created DBLINK using below script:
create public database link abc
connect to A
identified by A
using '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=XXX)(PORT=1521)))(CONNECT_DATA=(service_name=XXX)))';
Above DBLInk is working fine..I am able to access all the table of schema A in schema B using this DBLink. But when I trying to execute any procedre of schema A in schema B then i am getting error.
Regards,
Sachin -
Unable to pass parameter in oracle procedure through unix shell script
Hi Experts,
I have oracle procedure where in I have to pass the value of procedure parameter through unix script.
Follwoing is the sample procedure which i tried to exceute from the unix.
Procedure:
create or replace procedure OWNER.PRC_TESTING_OWNER(OWNER IN VARCHAR2) AS
sql_stmt varchar2(1000) := NULL;
v_count number := 0;
v_owner varchar2(100) := owner;
begin
sql_stmt:='select count(1) from '||v_owner||'.EMP@infodb where rownum<=10';
execute immediate sql_stmt into v_count;
DBMS_OUTPUT.PUT_LINE(sql_stmt);
DBMS_OUTPUT.PUT_LINE(v_count);
END;The script which I used is:
Unix
#!/bin/ksh
parm=$1
echo start
sqlplus -s scott@DEV/tiger <<EOF >>result_1.txt
set serveroutput on;
select '$parm' from dual;
exec owner.PRC_TESTING_OWNER('$parm');
EOFThe script is working fine that is i am able to pass to parameter value through unix shell script. :)
But if I want to pass the value of the owner in cursor , I am unable to pass this value through unix.
Following the procedure which i am trying to implement.
create or replace procedure OWNER.PRC_TESTING_OWNER(OWNER IN VARCHAR2) IS
v_owner varchar2(100) := owner;
CURSOR main_cur IS
select
i.ROWID rid ,
emp_name,
deptid
from v_owner.employee;
CURSOR subset_cur(c_deptid NUMBER ) IS
SELECT *
FROM v_owner.DEPT d
where d.dept_id=c_deptid;
--##main loop
FOR i IN main_cur LOOP
FOR j IN subset_cur(i.deptid) LOOP
BEGIN
insert into v_owner.RESULT_TABLE
END;
END LOOP;
END LOOP;How can i pass parameter value of the stored procedure through unix script(that is "owner" in this case), when these parameter value is
used in cursor? :(
Can anybody help me regarding the same?
Thanks in Advance !! :DIt's not the parameter in the cursor that is the problem, it's that you are trying to use static SQL for something that won't be known until run time (the owner of the table).
You would need to use something like ...
declare
l_owner varchar2(30) := 'SCOTT';
l_ref_cursor sys_refcursor;
type l_ename_tab is table of scott.emp.ename%type;
l_ename_array l_ename_tab;
begin
open l_ref_cursor for
'select ename
from ' || l_owner || '.emp';
loop
fetch l_ref_cursor bulk collect into l_ename_array limit 10;
exit when l_ename_array.COUNT = 0;
for x in 1 .. l_ename_array.count
loop
dbms_output.put_line(l_ename_array(x));
end loop;
end loop;
close l_ref_cursor;
end;
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.01 -
How to compile Oracle procedure throught ODI procedure
Hi
Can any one help me how to compile oracle procedure through ODI11g
I am awar of that, how to call oracle procedure in ODI and execute it.
Please help me
Regards,
PhanikanthYou want to know how to compile, or how to call, or both ?
I don't know for compilation, but call a procedure is simple.
You juste have to create an ODI Procedure and write the SQL statement like you do in a query editor. -
Insert / update data to a table through DBLINK (oracle)
I try to insert / update a table from one instance of oracle database to another one through oracle dblink, get following error:
java.sql.SQLException: ORA-01008: not all variables bound
ORA-02063: preceding line from MYLINK
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
The same code to insert / update the exact same table in local instance works fine.No any binding problem. So i am pretty sure all ? mark in SQL are set with some value before sending to Oracle.
Someone please advise what is possible problem. Db link is not set correctly? or we can not update remote table by dblink.
By the way i can do insert / update from TOAD to the remote table through DBLINK. Problem happens only in Java code.
thanks!
Garydblink links from one database instance to another.
So it is certainly a source of possible problems when it works on one database and not another.
You should start by looking at the dblink and it possible testing it in the database not via java.
Note as well that that error suggests that it is coming from the Oracle database. I believe if you had a bind parameter problem in your java code that the error would come from the driver. But that is a guess on my part. -
Update Yes/No field in access table through oracle procedure
Hi,
How to update Yes/No field in access table through oracle procedure. all other fields like AutoNumber, Text I can update it. Yes/No field how to update? Please, any one can help me?
Thanks and Regards,
Sudha.Sudha Teki wrote:
select "fldPost" from tblPHd@ODBCLNKNot quite sure what you mean, but the way you select the column would indicate a case sensitive column name
Look at this example
SQL> create table t
2 ("this" varchar2(10))
3 /
Table created.
SQL> insert into t values ('hello')
2 /
1 row created.
SQL> select *
2 from t
3 /
this
hello
SQL> select this
2 from t
3 /
select this
ERROR at line 1:
ORA-00904: "THIS": invalid identifier
SQL> select "this"
2 from t
3 /
this
helloIs your column name also case sensitive? -
Calling Oracle Stored Procedure through COBOL
I am calling a Oracle Stored Procedure through COBOL program. Here is the procedure that is in Oracle.
PROCEDURE sp_sel_m_event_subs_profile (
eventID IN EventIDTyp,
subscribed IN NUMBER,
v_profileRef OUT profileRefWithDSID_cv
IS
BEGIN
sp_check_event_id(eventID);
OPEN v_profileRef FOR
SELECT
sub.profile_i,
ref.datasource_i,
ref.primary_key_x
FROM
ccf_event_subscribe sub,
ccf_profile_reference ref
WHERE
sub.event_i = eventID
AND
sub.is_subscribed_i = subscribed
AND
sub.profile_i = ref.profile_i;
END sp_sel_m_event_subs_profile ;
So while trying to call this procedure in COBOL program I am getting error as wrong number or types of arguments in call to 'SP_SEL_M_EVENT_SUBS_PROFILE'
Here is the call statement in COBOL. I tried with many other options by adding some more fields but did not work.
EXEC SQL EXECUTE
BEGIN
TWSUSER_OWN.PKG_CCF.SP_SEL_M_EVENT_SUBS_PROFILE
(:EVENT-I, :SUBSCRIBED);
END;
END-EXEC
Please someone let me know how should I pass arguments EVENT-I and SUBSCRIBED to this Procedure so that I will get PROFILE-I, DATASOURCE-I and PRIMARY-KEY-X
Note: The above procedure is working good by other software. But there is no example as How to use Call statement through COBOL.
ThanksHere is the cobol declaration of each variable.
01 EVENT-I PIC X(06) VALUE SPACES.
01 SUBSCRIBED PIC 9(01) VALUE ZEROS.
01 PROFILE-I PIC X(08) VALUE SPACES.
01 DATA-SRC-I PIC X(08) VALUE SPACES.
01 PRIMARY-KEY-X PIC X(08) VALUE SPACES.
I tried with this layout, but still not working
01 EVENT-I PIC 9(06) VALUE ZEROS.
01 SUBSCRIBED PIC 9(01) VALUE ZEROS.
01 PROFILE-I PIC 9(08) VALUE ZEROS.
01 DATA-SRC-I PIC 9(08) VALUE ZEROS.
01 PRIMARY-KEY-X PIC 9(08) VALUE ZEROS.
Here are some of them I tried.
EXEC SQL EXECUTE
BEGIN
TWSUSER_OWN.PKG_CCF.SP_SEL_M_EVENT_SUBS_PROFILE
( :EVENT-I
, :SUBSCRIBED
, :PROFILE-I);
END;
END-EXEC
EXEC SQL EXECUTE
BEGIN
TWSUSER_OWN.PKG_CCF.SP_SEL_M_EVENT_SUBS_PROFILE
( :EVENT-I
, :SUBSCRIBED
, :PROFILE-I
, :DATA-SRC-I
, :PRIMARY-KEY-X);
END;
END-EXEC
EXEC SQL EXECUTE
BEGIN
TWSUSER_OWN.PKG_CCF.SP_SEL_M_EVENT_SUBS_PROFILE
( :EVENT-I
, :SUBSCRIBED );
END;
END-EXEC
EXEC SQL EXECUTE
BEGIN
TWSUSER_OWN.PKG_CCF.SP_SEL_M_EVENT_SUBS_PROFILE
( :PROFILE-I
, :DATA-SRC-I
, :PRIMARY-KEY-X);
END;
END-EXEC -
How to execute oracle stored procedure through php as externally?
hi...
i am searching for the way that how to execute oracle stored procedure through web service, i am using php and mysql, i have some stored procedures in oracale database, i want to execute them, from php, means the database will be remain mysql, and the stored procedures of oracle will be executed externally...
Kind regards,
Wilayat.Ok, so first of all this is a kind of strange question. Since Oracle and MYSQL can happily live side by side.
Make sure you have the oracle client (instant or regular ) installed and OCI_8 is set up and working correctly in PHP. If it is, when you run the phpinfo() routine you will see oci_8 on there. IF PHP connects just fine from the command line yet apache wont connect check permissions and things like the LD_Library Path.
Then in php, right along with your MySQL statements run Oracle Statements eg:
<?php
$OraDB = oci_connect(name,pass,tnsname);
$MySQLdb = mysql_connect([parms]);
$oraQueryText = "begin sp_some_proc([some parms]); end;" ;
$mysqlQuery = " Some mysql Query";
$oraQuery = oci_parse($OraDB,$oraQueryText );
oci_execute($oraQuery);
mysql_execute([parms]);
?>
Use the standard fetch code to get data from either of them.
If you cannot and I mean absolutely cannot get an admin to link in OCI_8 then you still have recourse although it will be tedious as hell. PHP allows you to exec calls to the OS. You still MUST make sure the Oracle Client is installed and that sqlplus runs from the command line. You will more then likely have to have a shell script written to do this as well, but maybe not as I have never tried it with the exception of capturing the return value of sqlplus and you will have to dig into sqlplus to get it to send its results to a file you can then parse with php.
Good Luck! -
Calling Function in SQL Server through DBLINK
Hello
I need to call a function that exists in other database (*SQL Server*) through DBLINK
Is It possible? If yes, please give me the syntax
ThanksHi,
You can call remote functions on SQL*Server if you create the database link using the Database Gateway for SQL*Server (DG4MSQL).
You need to install and configure DG4MSQL then you can call remote functions as follows -
SELECT function1@Remote_DB(7782) FROM dual;
You need to set the parameter -
HS_CALL_NAME
in the DG4MSQL init<sid>.ora file with the owner and name of the function, for example -
HS_CALL_NAME = "owner1.function1, owner2.function2 "
and if you want to return values using the function you need to set the parameter in the gateway init file -
HS_FDS_PROC_IS_FUNC=TRUE
For full details you need to refer to the documentation -
Oracle® Database Gateway for SQL Server User’s Guide, 11g Release 2 (11.2)
Oracle® Database Heterogeneous Connectivity User’s Guide 11g Release 2 (11.2)
which is available from -
http://www.oracle.com/pls/db112/homepage
and click on the 'Integration Information' option on the left.
The documentation has further details on how to call and use remote functions.
For information about installing and configuring the gateway and links to further information have a look at the following note -
Note.1083703.1 Master Note for Oracle Gateway Products
available in My Oracle Support
You cannot use the Database Gateway for ODBC (DG4ODBC) to create the database link as it does not supported stored procedures or remote functions.
Regards,
Mike
Edited by: mkirtley on Sep 2, 2011 11:09 AM -
ORA-3113 while running export (first run ok, second run fails)
Hi,
I'm running 10g (10.1.0.2.0) on gentoo Linux.
After a restart of the database I can do an EXP for any user without errors. But when I repeat the same command after the export I get the following error:
. . exporting table WEB_SESSION_DATA 0 rows exported
. exporting synonyms
EXP-00008: ORACLE error 3113 encountered
ORA-03113: end-of-file on communication channel
EXP-00000: Export terminated unsuccessfully
It's always the same error on the same task (exporting synonyms) but always just for the second and any later export, while the first one is ok.
I read through some forums and found, that ORA-3113 is a standard error which just hides the real error. So I look into the trace files and found:
ksedmp: internal or fatal error
ORA-07445: exception encountered: core dump [jox_lookup_known_object()+413] [SIGSEGV] [Address not mapped to object] [0x1AD14034] [] []
Current SQL statement for this session:
SELECT SYNNAM, DBMS_JAVA.LONGNAME(SYNNAM), DBMS_JAVA.LONGNAME(SYNTAB), TABOWN, TABNODE, PUBLIC$, SYNOWN, SYNOWNID, TABOWNID, SYNOBJNO FROM SYS.EXU9SYN WHERE SYNOWNID = :1 ORDER BY SYNTIME
If I call this SQL from sqlplus I get the same ORA-3113, so this seems to be the cause for the export failure.
When I remove the DBMS_JAVA.LONGNAME calls from the statement, it runs fine. It also runs fine, when I add a "and 1=0" to the EXU9SYN view. But this will not really solve the problem, because then all synonyms don't get exported.
I also checked all the synonyms and they are valid, the referenced tables exist and can be queried.
Because we use JavaStoredProcedures I cannot remove the Java Features in Oracle. But I reinstalled it (rmjvm.sql and initjvm.sql) but this did not help.
Does anyone have an idea what's happening here?
Especially the "first run ok, second run fails" seems to be very strange, because DB objects including DBMS_JAVA should be ok, if the first export can be done. So what changes in the database during or after the first run?Maybe description for bug 3953108 (ORA-7445 AND ORA-3113 DURING DIRECT FULL DATABASE EXPORT OF PUBLIC SYNONYMS) is helpful.
Werner -
Using oracle procedural gateway to connect to mq series
Hi,
I am working on setting up my connection to export data from oracle database to db2 using mq-series.
MQ-Series client software and oracle procedural gateway v9 are installed on HP-UX .
initsid.ora & initsid.gtwboot file for the gateway are configured. listener.ora and tnsnames.ora are also configured and running.
I created a dblink and then tried to test my connection using the test scripts given by IBM.
I got the following error,
ORA-04052: error occurred when looking up remote object [email protected]
ORA-00604: error occurred at recursive SQL level 1
ORA-28509: unable to establish a connection to non-Oracle system
ORA-02063: preceding line from DCY3
I generated a trace and I got the following information from listener.trc
nsopen: opening transport...
nttcnp: Validnode Table IN use; err 0x0
nttcnp: getting sockname
nttcnr: waiting to accept a connection.
nttcnr: getting sockname
nttvlser: valid node check on incoming node 172.25.228.7
nttvlser: Accepted Entry: 172.25.228.7
nttcon: set TCP_NODELAY on 11
nsopen: transport is open
nsnainit: inf->nsinfflg[0]: 0xd inf->nsinfflg[1]: 0xd
nsopen: global context check-in (to slot 4) complete
nsanswer: deferring connect attempt; at stage 5
nscon: doing connect handshake...
nscon: got NSPTCN packet
nsevdansw: exit
nsbeqaddr: connecting...
sntpcall: About to exec /u46/oracle/app/oracle/product/bin/pg4mqc90drv
sntpcall: detaching from parent with additional fork
sntpcall: only 0 bytes read
sntpcall: Can't read from pipe; err[1] = 32
nserror: nsres: id=4, op=72, ns=12547, ns2=12560; nt[0]=517, nt[1]=32, nt[2]=0;
ora[0]=0, ora[1]=0, ora[2]=0
nscon: sending NSPTRF packet
nstimarmed: no timer allocated
nsclose: closing transport
nsclose: global context check-out (from slot 4) complete
nsglecmd: Deallocating cxd 0x40045ef0.
Listener.log gave me the following information,
12-JAN-2010 14:47:34 * (CONNECT_DATA=(SID=dcy3)) * (ADDRESS=(PROTOCOL=tcp)(HOST=
172.25.228.7)(PORT=59501)) * establish * dcy3 * 12500
TNS-12500: TNS:listener failed to start a dedicated server process
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
HPUX Error: 32: Broken pipe
I researched online and made sure that I have enough swap,memory on my OS.I increased the value for processes in init.ora file.
My log files have not exceeded the maximum limit.
The trace shows that my listener is loosing contact when it is trying to read the driver from /u46/oracle/app/oracle/product/bin/pg4mqc90drv.
I am not sure how to proceed from this point,though I have a thought of relinking my libraries in oracle.
Can anyone give any information on this.Hi,
listener.ora,
DCY3LSNR =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL=IPC)
(KEY=ORAIPC)
(ADDRESS =
(PROTOCOL=TCP)
(HOST=fngtest)
(PORT=1414)
SID_LIST_DCY3LSNR =
(SID_LIST =
(SID_DESC =
(SID_NAME=DCY3)
(ORACLE_HOME=/u46/oracle/app/oracle/product)
(PROGRAM=pg4mqc90drv)
STARTUP_WAIT_TIME_DCY3LSNR=0
CONNECT_TIMEOUT_DCY3LSNR=1000
TRACE_LEVEL_DCY3LSNR=4
TRACE_DIRECTORY_DCY3LSNR=/u46/oracle/app/oracle/product/network/trace
TRACE_FILE_DCY3LSNR=listener
LOG_DIRECTORY_DCY3LSNR=/u46/oracle/app/oracle/product/network/log
LOG_FILE_DCY3LSNR=listener
$ cat initDCY3.ora
#===========================================================================
# GATEWAY INITIALIZATION FILE:
# Oracle Procedural Gateway for IBM MQSeries Client (pg4mqc90).
#===========================================================================
SET HS_DB_NAME=
SET HS_DB_DOMAIN=
SET LOG_DESTINATION=/u46/oracle/app/oracle/product/pg4mqseries/log/DCY3.log
SET QUEUE_MANAGER=DCY3
SET AUTHORIZATION_MODEL=RELAXED
SET TRANSACTION_MODEL=SINGLE_SITE
SET TRANSACTION_LOG_QUEUE=tx_queue_name
SET TRANSACTION_RECOVERY_USER=rec_user
SET TRANSACTION_RECOVERY_PASSWORD=rec_password
SET TRACE_LEVEL=0
$ cat initDCY3.gtwboot
#============================================================================
# GATEWAY BOOT FILE:
# Oracle Procedural Gateway for IBM MQSeries Client (pg4mqc90).
#============================================================================
GATEWAY_SID=DCY3
SERVER_PATH=/u46/oracle/app/oracle/product/bin/pg4mqc90
LOG_DESTINATION=/u46/oracle/app/oracle/product/pg4mqseries/log/DCY3boot.log
LD_LIBRARY_PATH=/usr/lib:/opt/mqm/lib:/u46/oracle/app/oracle/product/lib
MQSERVER=FNGTEST.DCY3/TCP/TCPIP03
#MQCCSID=850
#MODE=DEBUG
I have pasted my listener.ora and init files.
Can anyone pls give me more information on this. -
PLS-00201: Not able to execute Oracle Package through Java app
Hi,
My struts application is trying to execute an oracle procedure (in a package) and is getting following error.
I have granted execute priveledge to the user using "Grant execute on <package name> to <user>"
Also, I am able to execute the procedure through this user in sqlplus.
I am using Oracle thin driver for JDBC.
Please guide.
+06:36:17,500 ERROR [STDERR] java.sql.SQLException: ORA-06550: line 1, column 7:+
PLS-00201: identifier 'uhbvn_public.GENSYSLOGIN' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)+
+06:36:17,500 ERROR [STDERR] at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)+
+06:36:17,500 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:209)+
+06:36:17,500 ERROR [STDERR] at wenrgise.ejb.common.utility.DBUtilitiesBean.callProc(DBUtilitiesBean.java:390)+
+06:36:17,500 ERROR [STDERR] at wenrgise.sysadmin.ejb.business.SysLoginBO.getSysLoginUserInfo(SysLoginBO.java:57)+
+06:36:17,500 ERROR [STDERR] at wenrgise.sysadmin.ejb.facade.SysLoginFacadeBean.getLoginInfo(SysLoginFacadeBean.java:37)+
+06:36:17,500 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)+
+06:36:17,500 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)+
+06:36:17,500 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
+06:36:17,500 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:592)+
+06:36:17,500 ERROR [STDERR] at org.jboss.invocation.Invocation.performCall(Invocation.java:359)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)+
+06:36:17,500 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)+
+06:36:17,500 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:960)+
+06:36:17,500 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)+
+06:36:17,500 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)+
+06:36:17,500 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
+06:36:17,500 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:592)+
+06:36:17,500 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)+
+06:36:17,500 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)+
+06:36:17,500 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)+
+06:36:17,500 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)+
+06:36:17,500 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)+
+06:36:17,500 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)+
+06:36:17,500 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)+
+06:36:17,500 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)+
+06:36:17,500 ERROR [STDER+What part of
identifier 'uhbvn_public.GENSYSLOGIN' must be declareddon't you understand? -
Unable to run spatial operations through dblinks
Hello All,
I am trying to run spatial operations through dblinks. Please see the example query below
select a.OGC_GEOMETRY.sdo_gtype from <table>@dblink a where sdo_nn(a.OGC_GEOMETRY,mdsys.sdo_geometry(2001,null,mdsys.sdo_point_type(0,0,null),null,null),'sdo_num_res=1')='TRUE'.
Query fails with the following error
ORA-13249:
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.PRVT_IDX", line 9
*13249. 00000 - "%s"*
**Cause: An internal error was encountered in the extensible spatial index*
component. The text of the message is obtained from some
other server component.
**Action: Contact Oracle Support Services with the exact error text.*
Same Query runs fine in the original database but fails with dblinks. Is it possible to run spatial operations through dblink?
Thanks & Regards,
JastiI've never used spatial myself but this other user had issues with it and dblinks. They ended up using the dblink to create a local materialized view with local indexes and used those.
MapBuilder does not work with DB-link in a spatial view
Found this as well. Does it mean anything to you?
4.2 Querying Spatial Data
This section describes how the structures of a Spatial layer are used to resolve spatial queries and spatial joins.
Spatial uses a two-tier query model with primary and secondary filter operations to resolve spatial queries and spatial joins, as explained in Section 1.6. The term two-tier indicates that two distinct operations are performed to resolve queries. If both operations are performed, the exact result set is returned.
You cannot append a database link (dblink) name to the name of a spatial table in a query if a spatial index is defined on that table.
If a spatial index is created in a database that was created using the UTF8 character set, spatial queries that use the spatial index will fail if the system parameter NLS_LENGTH_SEMANTICS is set to CHAR. For spatial queries to succeed in this case, the NLS_LENGTH_SEMANTICS parameter must be set to BYTE (its default value).
http://docs.oracle.com/cd/B13789_01/appdev.101/b10826/sdo_index_query.htmEdited by: Gaff on Aug 16, 2012 4:46 PM -
Issu for running insert statement in oracle procedure.
Hi expert,
I ran a oracle procedure with a insert statement inside as:
insert into table1 select....
but I got error message related to this insert statement as "SQLERRM= ORA-08103: object no longer exists"
I ran this statement separately in toad, no error message, but no data result from this execute.
please tell how to fix this issue.
Many Thanks,
Edited by: 918440 on 27-Jun-2012 8:04 AMHi friend,
my insert statement is as follows:
INSERT INTO HIROC_RU_FACT_S
select
pp.policy_fk,
pp.transaction_log_fk,
p.policy_no,
p.policy_type_code,
hiroc_rpt_user.hiroc_get_entity_name(pp.policy_fk,'POLHOLDER') policy_holder,
pp.risk_fk,
r.risk_base_record_fk,
r.entity_fk,
hiroc_sel_entity_risk_name2 (pp.risk_fk,r.entity_fk) risk_name,
substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2) rating_state_code,
hiroc_get_province_name(substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2), 'PROVINCE_CODE', 'L') rating_state_name,
hiroc_get_provicne_pol_prefix(substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2),p.policy_type_code) rating_prov_pol_prefix,
nvl(r.risk_cls_used_to_rate,pth.peer_groups_code) rating_peer_group_code,
hiroc_get_lookup_desc('PEER_GROUP',nvl(r.risk_cls_used_to_rate,pth.peer_groups_code),'L') rating_peer_group_name,
pth.policy_term_history_pk,
pth.term_base_record_fk,
to_char(pth.effective_from_date,'yyyy') term_effective_year,
c.coverage_pk,
c.coverage_base_record_fk,
pc.coverage_code,
c.product_coverage_code,
pc.long_description,
pp.coverage_component_code,
c.effective_from_date,
c.effective_to_date,
cls.coverage_code coverage_class_code,
cls.coverage_long_desc coverage_class_long_desc,
decode(pp.coverage_component_code ,'GROSS',cls.exposure_unit,null) exposure_unit, --hiroc_get_expos_units_by_cov(c.coverage_pk,pc.coverage_code,c.effective_from_date,c.effective_to_date) exposure_unit,
decode(pp.coverage_component_code ,'GROSS',cls.number_of_patient_day,null) number_of_patient_day,
pth.effective_from_date term_eff_from_date,
pth.effective_to_date term_eff_to_date,
pp.premium_amount premium_amount,
(case when (pc.coverage_code in ('CP','MC1','MC2','MC3','MC4','HR','F') or pc.coverage_code like 'ST%') and
pp.coverage_component_code != 'RISKMGMT' then
(nvl(pp.premium_amount,0))
else
0
end) primary_premium,
(hiroc_get_risk_units(hiroc_get_provicne_pol_prefix(substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2),p.policy_type_code)-- rating_prov_pol_prefix
,nvl(r.risk_cls_used_to_rate,pth.peer_groups_code) -- rating_peer_group_code
,cls.coverage_code --coverage_class_code
,decode(pp.coverage_component_code ,'GROSS',cls.exposure_unit,null)
,pp.premium_amount
,(case when (pc.coverage_code in ('CP','MC1','MC2','MC3','MC4','HR','F') or pc.coverage_code like 'ST%') and
pp.coverage_component_code != 'RISKMGMT' then
(nvl(pp.premium_amount,0))
else
0
end) -- primary_premium
,p.policy_type_code
,trunc(pth.effective_to_date))) risk_units
from proddw_mart.rmv_territory_makeup tm,
proddw_mart.rmv_premium_class_makeup pcm,
proddw_mart.rmv_product_coverage pc,
proddw_mart.rmv_coverage c,
proddw_mart.rmv_risk r,
proddw_mart.rmv_policy_term_history pth,
proddw_mart.rmv_policy p,
proddw_mart.rmv_transaction_log tl,
proddw_mart.rmv_policy_premium pp,
(select /* +rule */
p.policy_no,
p.policy_start_date,
p.policy_end_date,
r.risk_pk,
r.risk_description,
c.coverage_pk,
c.parent_coverage_base_record_fk,
pc.parent_product_covg_code,
pc.coverage_code,
pc.short_description coverage_short_desc,
pc.long_description coverage_long_desc,
c.exposure_unit,
pc.exposure_basis_code,
c.number_of_patient_day,
p.policy_start_date policy_effective_date,
p.policy_end_date policy_expiry_date,
c.effective_from_date,
c.effective_to_date,
to_char(c.effective_from_date,'YYYY') class_eff_year
from proddw_mart.odwr_coverage_only c
,proddw_mart.odwr_product_coverage pc
,proddw_mart.odwr_risk r
,proddw_mart.odwr_policy p
where pc.code = c.product_coverage_code
and pc.parent_product_covg_code is not null -- coverage classes only
and r.risk_pk = c.risk_base_record_fk
and c.accounting_to_date = to_date('1/1/3000','mm/dd/yyyy') -- only open records
and c.base_record_b = 'N'
and p.base_record_b = 'N'
and p.policy_pk = r.policy_fk
and p.accounting_to_date = to_date('1/1/3000','mm/dd/yyyy') -- only open records
group by p.policy_no,
p.policy_start_date,
p.policy_end_date,
r.risk_pk,
r.risk_description,
c.coverage_pk,
c.parent_coverage_base_record_fk,
pc.parent_product_covg_code,
pc.coverage_code,
pc.short_description, -- coverage_short_desc,
pc.long_description, -- coverage_long_desc,
c.exposure_unit,
pc.exposure_basis_code,
c.number_of_patient_day,
p.policy_start_date, -- policy_effective_date,
p.policy_end_date, -- policy_expiry_date,
c.effective_from_date,
c.effective_to_date,
to_char(c.effective_from_date,'YYYY')-- class_eff_year
) cls
where tm.risk_type_code = r.risk_type_code
and tm.county_code = r.county_code_used_to_rate
and tm.effective_from_date <= pp.rate_period_from_date
and tm.effective_to_date > pp.rate_period_from_date
and pcm.practice_state_code (+) = r.practice_state_code
and pcm.risk_class_code (+) = r.risk_cls_used_to_rate
and nvl(pcm.effective_from_date, pp.rate_period_from_date) <= pp.rate_period_from_date
and nvl(pcm.effective_to_date, to_date('01/01/3000','mm/dd/yyyy')) > pp.rate_period_from_date
and pc.code = c.product_coverage_code
and c.base_record_b = 'N'
and ( c.record_mode_code = 'OFFICIAL'
and (c.closing_trans_log_fk is null or
c.closing_trans_log_fk != tl.transaction_log_pk)
or c.record_mode_code = 'TEMP'
and c.transaction_log_fk = tl.transaction_log_pk )
and c.parent_coverage_base_record_fk is null
and c.effective_from_date < c.effective_to_date
and c.effective_from_date <= pp.rate_period_from_date
and c.effective_to_date > pp.rate_period_from_date
and c.accounting_from_date <= tl.accounting_date
and c.accounting_to_date > tl.accounting_date
and c.coverage_base_record_fk=pp.coverage_fk
and r.base_record_b = 'N'
and ( r.record_mode_code = 'OFFICIAL'
and (r.closing_trans_log_fk is null or
r.closing_trans_log_fk != tl.transaction_log_pk)
or r.record_mode_code = 'TEMP'
and r.transaction_log_fk = tl.transaction_log_pk )
and r.effective_from_date < r.effective_to_date
and r.effective_from_date <= pp.rate_period_from_date
and r.effective_to_date > pp.rate_period_from_date
and r.accounting_from_date <= tl.accounting_date
and r.accounting_to_date > tl.accounting_date
and r.risk_base_record_fk = pp.risk_fk
and pth.base_record_b = 'N'
and ( pth.record_mode_code = 'OFFICIAL'
and (pth.closing_trans_log_fk is null or
pth.closing_trans_log_fk != tl.transaction_log_pk)
or pth.record_mode_code = 'TEMP'
and pth.transaction_log_fk = tl.transaction_log_pk )
and pth.accounting_from_date <= tl.accounting_date
and pth.accounting_to_date > tl.accounting_date
and pth.term_base_record_fk = pp.policy_term_fk
and p.policy_pk = pp.policy_fk
and tl.transaction_log_pk = pp.transaction_log_fk
and pp.active_premium_b = 'Y'
and pp.rate_period_type_code in ('CS_PERIOD','SR_PERIOD')
and pp.rate_period_to_date > pp.rate_period_from_date
and tl.accounting_date <= sysdate
and p.policy_cycle_code = 'POLICY'
and substr(p.policy_no,1,1) <> 'Q'
and tl.transaction_log_pk = (select max(pp.transaction_log_fk)
from proddw_mart.rmv_policy_premium pp,proddw_mart.rmv_transaction_log tl2
where pth.term_base_record_fk = pp.policy_term_fk
and pp.transaction_log_fk = tl2.transaction_log_pk
and tl2.accounting_date <= sysdate )
and p.policy_type_code in ('LIABCRIME','MIDWIFE')
and pth.accounting_to_date = to_date('01/01/3000','mm/dd/yyyy') --<<<******* eliminates duplicates
and p.policy_no = cls.policy_no
-- and r.risk_pk = cls.risk_pk
and c.coverage_base_record_fk = cls.parent_coverage_base_record_fk(+)
and cls.effective_from_date < pth.effective_to_date -- from date less than period end date
and cls.effective_to_date > pth.effective_from_date -- to date greater than period start date
and cls.policy_effective_date < pth.effective_to_date -- from date less than period end date
and cls.policy_expiry_date > pth.effective_from_date -- to date greater than period start date
group by pp.policy_fk,
pp.transaction_log_fk,
p.policy_no,
p.policy_type_code,
pp.risk_fk,
r.risk_base_record_fk,
r.entity_fk,
substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2), -- rating_state_code,
r.county_code_used_to_rate,
pth.issue_state_code,
nvl(r.risk_cls_used_to_rate,pth.peer_groups_code) , -- rating_peer_group_code,
r.risk_cls_used_to_rate,
pth.peer_groups_code,
pth.policy_term_history_pk,
pth.term_base_record_fk,
to_char(pth.effective_from_date,'yyyy'), --term_effective_year,
c.coverage_pk,
c.coverage_base_record_fk,
pc.coverage_code,
c.product_coverage_code,
pc.long_description,
pp.coverage_component_code,
c.effective_from_date,
c.effective_to_date,
cls.coverage_code, -- coverage_class_code,
cls.coverage_long_desc, -- coverage_class_long_desc,
decode(pp.coverage_component_code ,'GROSS',cls.exposure_unit,null),-- exposure_unit,
decode(pp.coverage_component_code ,'GROSS',cls.number_of_patient_day,null), -- number_of_patient_day,
pth.effective_from_date, --term_eff_from_date,
pth.effective_to_date, --, --term_eff_to_date,
pp.premium_amount ;Edited by: BluShadow on 27-Jun-2012 16:12
added {noformat}{noformat} tags for readability. PLEASE READ {message:id=9360002} AS PREVIOUSLY REQUESTED! & -
How to call an Oracle Procedure and get a return value in Php
Hi Everyone,
Has anyone tried calling an Oracle procedure from Php using the ora functions and getting the return value ? I need to use the ora funtions (no oci)because of compatibility and oracle 7.x as the database.
The reason why I post this here is because the ora_exec funtion is returning FALSE but the error code displayes is good. Is this a bug in the ora_exec funtion ?
My code after the connection call is as follows:
$cur = ora_open($this->conn);
ora_commitoff($this->conn);
$requestid = '144937';
echo $requestid;
$rc = ora_parse($cur, "begin p_ins_gsdata2
(:requestid, :returnval); end;");
if ($rc == true) {
echo " Parse was successful ";
$rc2 = ora_bind ($cur, "requestid", ":requestid", 32, 1);
if ($rc2 == true) echo " Requestid Bind Successful ";
$rc3 = ora_bind ($cur, "returnval", ":returnval", 32, 2);
if ($rc3 == true) echo " Returnval Bind Successful ";
$returnval = "0";
$rc4 = ora_exec($cur);
echo " Result = ".$returnval." ";
if ($rc4 == false) {
echo " Exec Returned FALSE ";
echo " Error = ".ora_error($cur);
echo " ";
echo "ErrorCode = ".ora_errorcode($cur);
echo "Error Executing";
ora_close ($cur);
The Oracle procedure has a select count from a table and it returns the number of records in that table. It's defined as:
CREATE OR REPLACE procedure p_ins_gsdata2 (
p_requestid IN varchar2 default null,
p_retcode OUT varchar2)
as
BEGIN
SELECT COUNT (*) INTO p_retcode
FROM S_GSMRY_DATA_SURVEY
WHERE request_id = p_requestid ;
COMMIT;
RETURN;
END;
Nothing much there. I want to do an insert into a table,
from the procedure later, but I figured that I start with a select count since it's simpler.
When I ran the Php code, I get the following:
144937
Parse was successful
Requestid Bind Successful
Returnval Bind Successful
Result = 0
Exec Returned FALSE
Error = ORA-00000: normal, successful completion -- while
processing OCI function OBNDRA
ErrorCode = 0
Error Executing
I listed the messages on separate lines for clarity. I don't understand why it parses and binds o.k. but the exec returns false.
Thanks again in advance for your help. Have a great day.
Regards,
Rudiretcode=`echo $?`is a bit convoluted. Just use:
retcode=$?I see no EOF line terminating your input. Your flavour of Unix might not like that - it might ignore the command, though I'd be surprised (AIX doesn't).
replace the EXEC line with :
select 'hello' from dual;
and see if you get some output - then you know if sqlplus commands are being called from your script. You didn't mentioned whether you see the banner for sqlplus. Copy/paste the output that you get, it will give us much more of an idea.
Maybe you are looking for
-
How to keep alive a session with a timeout
my session have a timeout of 20 minutes (it's a system setting i cannot change) i run a program that generates a file excel that need 60 minutes to end. i cannot run the program in background because OLE and creating excel is not supported is there
-
The contestants will demo their application/web site on a machine with 128 Meg RAM only. You will build an application/web site that helps Hollywood movie fans do research on the data available at the Internet Movie Database. Two kinds of users can a
-
Hello all, I am really new in Java and need to learn it pretty quick. I created a class that implements the Swing File Chooser with an image file filter. It is working fine from Sun One Studio 4, even though I don't know yet how to really open the se
-
All About the HP 50G Graphing calc
Product name: HP 50G Graphing Calculator Question: All about calcs graphing capabilities, in general Hey forum! I'm kinda new to this forum, so sorry if this post is in the wrong place... I just need some questions answered about the 50G's graphing a
-
My photo shop 10 program has stopped working. Is there a telephone number that I can call for support to find out how to fix the problem???Jenny