Bug in getUpdateCount using Oracle
getUpdateCount() dos not return the right value (-1) when invoked for the second time.
I wrote the following piece of code to "dynamically execute an unknown SQL string".
According to the documentation the code is OK.
I use a stmt that does either an insert, update or delete.
When I run it with Sybase it works fine, the second time I invoke getUpdateCount() it returns -1, indicating there are no more updates counts (nor resultsets).
In the case of Oracle, the getUpdateCount keeps returning the original value and the program enters an infinite loop.
Can anybody help me with this?
Maybe is the version of the Oracle interface I am using (java12.zip as it comes with the package).
The code is:
String sqlStmt = "delete from table...";
// con was already created and is ok, because all selects
// work fine
// DRIVER = oracle.jdbc.driver.OracleDriver
// URL = jdbc:oracle:thin:@xx.xx.xx.xx:3521:orasd99
stmt = con.createStatement();
int guc = 0;
boolean esResult = stmt.execute(sqlStmt);
try {
while (true) {
if (esResult) {
ResultSet rs = stmt.getResultSet();
procesarResultSet(rs); // just process the rs
else {
guc = stmt.getUpdateCount();
if (!esResult && (guc == -1)) break;
esResult = stmt.getMoreResults();
Thanks in advance for any tip.
Ag~
"delete from table" doesn't return a result set.
From the documentation for getUpdateCount()
"if the result is a ResultSet object or there are no more results, -1 is returned."
Presumably you are using this because the SQL you are using could have more than one result set. -1 is returned in two cases:
-No more results
-The result is a ResultSet (a query.)
Personally I wouldn't rely on 'update counts' from JDBC for anything. The methods are not vital to the functioning of the interface and consequently they simply might not return the correct value. If you want an accurate count use a stored procedure.
Similar Messages
-
Hi!
I am trying to compile the above packets but am running into massive problems.
PHP3 compiles well, if i try to use the "normal" static module for Apache, but the Apache configure script says that it needs an ANSI C compiler and stops.
I am using GCC 2.7.2.3 with the bugfixes from SuSe.
Since that did not work I tried the configuration as a Dynamic Module. The Apache "Readme.config" explains two ways to do so, but the first has the same problem with GCC and the second (via APXS) compiles Apache without problems, but PHP3 wont compile since it does not find a library. The exact error is: "/usr/i486-linux/bin/ld: cannot open -lclntsh: No such file or directory"
I found a libclntsh.so.8.0 in the oracle/lib directory, but since i fumbled around with this library (i tried ln -s libclntsh.so.8.0 libclntsh.so) sqlplus says libclntsh.so.8.0: cannot find file data: no such file or directory (even now that the link is deleted again).
And PHP still wont compile. Any ideas would be welcome.
P.S.: Is it normal that Oracle has to be told NOT to create a database during install, TO create a database???
We worked for 3 days on the Oracle installation and that was the only way to install Oracle without errors.
thx
Uwe SchurigLee Bennett (guest) wrote:
:Hi
:I have successfully installed Oracle 8.1.5 Enterprise edition
on
:Suse 6.2 and applied the 8.1.5.0.1 patch set,
NO!
SuSe 6.2 have a patch file for Oracle made from their developers.
Never use Oracle 8.1.5.0.1 patch file that doesn't work because
us bugged.
Use SuSe 6.2 Oracle patch set.
(don't remember the web page where you can download it but a
search with word "oracle" from SuSe homepage will lead you to
it)
-Stefano
null -
Using Oracle Hints in Selects......
Hello,
Are there any after effects/side effects by using Oracle Hints in a SQL select ??? (hints such as Cache, NOCache, all_rows)
Can anyone let me know whether there are any good documentation or site on Oracel SQL hints..
thanks
KanchiHi!
There is an exception, that I think is a bug in Oracle, but I4m not sure. If you use the PARALLEL HINT in a select that will be use in a Cursor, in order to insert the results in other table, and the results come in groups built following a group by sentence, there are possibilities that two childs (a child is a parallel process) take portions of this whole group, and built each one one group.
If the new table use certain number of columns as a primary key, this may cause an duplicated primary key trigger.
I4m going to write and document this case, in order to show it to oracle support.
I hope this help. Bye.
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by kanchana Hettiarachchi ([email protected]):
Hello,
Are there any after effects/side effects by using Oracle Hints in a SQL select ??? (hints such as Cache, NOCache, all_rows)
Can anyone let me know whether there are any good documentation or site on Oracel SQL hints..
thanks
Kanchi<HR></BLOCKQUOTE>
null -
Nested Table having more than 1 column comparison using ORACLE MULTISET
Dear ALL,
I am using ORACLE 10gR2 Database.
I am currently trying to compare two sets of data that I get from two queries in PL/SQL. I want to use Oracle MULTISET UNION, MULTISET INTERSECT, MULTISET EXCEP for those operations.
But When I am executing the below given code I am getting the error.
PLS-00306: wrong number or types of arguments in call to 'MULTISET_EXCEPT_ALL'
My Code
declare
type wh_unique_record is record (cpy_key number(22),cnc_id varchar2(22),cust_type_id number,
device_info_id number,scope_id number,excep_id number,
config_date date);
type wh_previous_data_table is table of wh_unique_record;
wh_previous_data wh_previous_data_table;
wh_current_data wh_previous_data_table;
wh_union_data wh_previous_data_table;
wh_intersect_data wh_previous_data_table;
-- This cursor I am using to populate the data into the nested tables
cursor c_previous_data is select cpy_key,cnc_id,cust_type_id,device_info_id,scope_id,excep_id,config_date
from r_cfg_wh_excep
where cpy_key=17278
and trunc(config_date)=trunc(to_date('06-jul-2009','dd-mon-yyyy'));
cursor c_current_data is select cpy_key,cnc_id,cust_type_id,device_info_id,scope_id,excep_id,config_date
from r_cfg_wh_excep
where cpy_key=17278
and trunc(config_date)=trunc(to_date('16-jul-2009','dd-mon-yyyy'));
begin
open c_previous_data;
fetch c_previous_data bulk collect into wh_previous_data;
close c_previous_data;
open c_current_data;
fetch c_current_data bulk collect into wh_current_data;
close c_current_data;
dbms_output.put_line('Previous count '||wh_previous_data.count);
dbms_output.put_line('Current count '||wh_current_data.count);
--FYI: MULTISET UNION IS WORKING.*
wh_union_data := wh_current_data multiset union wh_previous_data;
dbms_output.put_line('New count '||wh_union_data.count);
wh_intersect_data:=wh_current_data MULTISET EXCEPT wh_previous_data;
dbms_output.put_line('The records that are repeating are '||wh_intersect_data.count);
end;
Previous count 74062
Current count 74508
New count 148570
PL/SQL procedure successfully completed.
FYI: If I comment the MULTISET EXCEPT conditin then I am getting the output for MULTISET UNION.
IS THERE ANY WAY ORACLE IS PROVIDING A FUNCTIONALITY WHERE WE CAN HAVE A NESTED TABLE WITH MULTIPLE COLUMNS AND THAT CAN BE USED IN PL/SQL AND USE BULK OPERATION TO POPULATE THE NESTED TABLE WITH MULTIPLE COLUMNS AND USE THE SAME IN MULTISET EXCEPT, MULTISET EXCEPT ETC.
Appreciate your help on this.
Thanks,
Madhu K.Madhu,
I am totally amazed. I didn't think any of the MULTISET operations would work with NTs of records. Lucky you!
As for the EXCEPT, well, clearly it is a restriction or bug in PL/SQL.
You may want to report it to Oracle Support.
Regards,SF
At 11:45 AM 10/1/2009, you wrote:
Dear Steven,
I am using ORACLE 10gR2 Database.
I am currently trying to compare two sets of data that I get from two queries in PL/SQL. I want to use Oracle MULTISET UNION, MULTISET INTERSECT, MULTISET EXCEP for those operations.
But When I am executing the below given code I am getting the error.
PLS-00306: wrong number or types of arguments in call to 'MULTISET_EXCEPT_ALL'
My Code
declare
type wh_unique_record is record (cpy_key number(22),cnc_id varchar2(22),cust_type_id number,
device_info_id number,scope_id number,excep_id number,
config_date date);
type wh_previous_data_table is table of wh_unique_record;
wh_previous_data wh_previous_data_table;
wh_current_data wh_previous_data_table;
wh_union_data wh_previous_data_table;
wh_intersect_data wh_previous_data_table;
-- This cursor I am using to populate the data into the nested tables
cursor c_previous_data is select cpy_key,cnc_id,cust_type_id,device_info_id,scope_id,excep_id,config_date
from r_cfg_wh_excep
where cpy_key=17278
and trunc(config_date)=trunc(to_date('06-jul-2009','dd-mon-yyyy'));
cursor c_current_data is select cpy_key,cnc_id,cust_type_id,device_info_id,scope_id,excep_id,config_date
from r_cfg_wh_excep
where cpy_key=17278
and trunc(config_date)=trunc(to_date('16-jul-2009','dd-mon-yyyy'));
begin
open c_previous_data;
fetch c_previous_data bulk collect into wh_previous_data;
close c_previous_data;
open c_current_data;
fetch c_current_data bulk collect into wh_current_data;
close c_current_data;
dbms_output.put_line('Previous count '||wh_previous_data.count);
dbms_output.put_line('Current count '||wh_current_data.count);
--FYI: MULTISET UNION IS WORKING.
wh_union_data := wh_current_data multiset union wh_previous_data;
dbms_output.put_line('New count '||wh_union_data.count);
wh_intersect_data:=wh_current_data MULTISET EXCEPT wh_previous_data;
dbms_output.put_line('The records that are repeating are '||wh_intersect_data.count);
end;
Previous count 74062
Current count 74508
New count 148570
PL/SQL procedure successfully completed.
FYI: If I comment the MULTISET EXCEPT conditin then I am getting the output for MULTISET UNION.
IS THERE ANY WAY ORACLE IS PROVIDING A FUNCTIONALITY WHERE WE CAN HAVE A NESTED TABLE WITH MULTIPLE COLUMNS AND THAT CAN BE USED IN PL/SQL AND USE BULK OPERATION TO POPULATE THE NESTED TABLE WITH MULTIPLE COLUMNS AND USE THE SAME IN MULTISET EXCEPT, MULTISET EXCEPT ETC.
Appreciate your help on this.
Thanks,
Madhu K. -
Workaround for using Oracle JDBC extension with WLS pooling
Reading the newsgroup I saw that many of us encountered the problems
with ClassCastException when tried to use Oracle JDBC extension
with WLS pooling. I also had.
In this case BEA recommends to use dangerous
method getVendorConnection() which exposes
the physical connection object to your code.
Yes it's really dangerous because of unsafe usage may breaks
WLS pooled connection(s).
Moreover, this practice will make your JDBC code
unportable (your JDBC code in addition to Oracle dependence
became Weblogic dependent):
void doSmth() {
Connection con = ...;
Connection vCon = ((WLConnection)con).getVendorConnection();
// + mess of usage con in one places and vCon in others
// (where Oracle extensions are needed)
// !Don't forget to don't close vCon!
Sux.
I found the workaround.
Introduction
============
Yes the real cause of ClassCastException is that
in depth of Oracle driver the casting
to class oracle.jdbc.driver.OracleConnection
(not to interface oracle.jdbc.OracleConnection)
is performed.
Someone can say that this is bug or pure desing.
Weblogic pooled connection provide dynamic
implementation for all public interfaces
which real physical (wrapped) connection object implements.
Great feature!
But I guess that all interface methods implemented
by simple call-delegation to physical (wrapped) connection object.
In case of oracle.jdbc.OracleConnection interface
this approach doesn't work for at least one its method:
public OracleConnection unwrap()
WLS pooled connection shoudn't implement this method by
delegation to physical connection object BUT should
return physical connection object itself!
// Wrong implementation of unwrap()
// delegation is used
public OracleConnection unwrap() {
return physicalConnection.unwrap();
// Right implementation of unwrap()
// physical connection returned
public OracleConnection unwrap() {
return physicalConnection;
Workaround
==========
1. Develop your own OracleConnection wrapper class:
import oracle.jdbc.OracleConnection;
import weblogic.jdbc.extensions.WLConnection;
public class MyOracleConnectionImpl implements OracleConnection {
private OracleConnection con;
public MyOracleConnectionImpl(OracleConnection connection)
throws SQLException
this.con = connection;
public OracleConnection unwrap() {
return (OracleConnection)
((WLConnection)con).getVendorConnection();
/* Implement all other methods by delegation to con object */
2. Don't get Connections directly from DataSource --
develop your own simple (may be static) utility
class which retrives Connections from dataSource
and returns them wrapped into your MyOracleConnectionImpl
to your code from some method:
puclic abstract class MyConnectionSource {
public static Connection getConnection() {
Connection con = // get it from DataSource
return new MyOracleConnectionImpl((OracleConnection)con);
3. Add attribute RemoveInfectedConnectionsEnabled="false"
to definition of your JDBCConnectionPool within config.xml
You may do it because of you `safely` use vendorConnection --
you don't expose it to application code.
4. Enjoy the Oracle JDBC extensions in your code!
Example:
Connection con = MyConnectionSource.getConnection;
ArrayDescriptor add =
ArrayDescriptor.createDescriptor("your_type", con);
Hope it helps to someone.
Best regards,
Eugene VoytitskyHello Eugene Voytitsky,
Thanks Eugene Voytitsky for your idea
I have tried the solution suggested by You, but it did not work.
It still throws ClassCastException.
I am sorry for posting the whole code of two classes below.
I did this to give you more clarity.
I am also indicating the place where the exception was thrown..
Please let me know if I am doing something wrong.
OracleConnection Wrapper class
package ejbTesting;
// sql imports
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;
// util imports
import java.util.Map;
import java.util.Properties;
// imports from Oracle Driver Classes
import oracle.jdbc.OracleConnection;
import oracle.jdbc.OracleOCIFailover;
import oracle.jdbc.OracleSavepoint;
// import from Weblogic extensions
import weblogic.jdbc.extensions.WLConnection;
public class WeblogicConnectionWrapper implements OracleConnection
// oracle connection object
private OracleConnection connection;
public WeblogicConnectionWrapper (OracleConnection orclConnection)
try
this.connection = orclConnection;
catch(Exception unexpected )
unexpected.printStackTrace();
public OracleConnection unwrap()
try
// The datasource returns a weblogic.jdbc.pool.Connection
// This needs to be type casted to weblogic.jdbc.extensions.WLConnection
// Only this weblogic.jdbc.extensions.WLConnection CAN BE type casted
// to OracleConnection
return (OracleConnection) ((WLConnection) connection).getVendorConnection();
catch(Exception sqlException )
sqlException.printStackTrace ();
return null;
/* Implement all other methods by delegation to connection object */
public Connection _getPC()
return connection._getPC();
public void archive(int i, int j, String s)
throws SQLException
connection.archive(i, j, s);
public void assertComplete()
throws SQLException
connection.assertComplete();
public void clearWarnings()
throws SQLException
connection.clearWarnings();
public void close()
throws SQLException
connection.close();
public void commit()
throws SQLException
connection.commit();
public Statement createStatement()
throws SQLException
return connection.createStatement();
public Statement createStatement(int i, int j)
throws SQLException
return connection.createStatement(i, j);
public boolean getAutoClose()
throws SQLException
return connection.getAutoClose();
public boolean getAutoCommit()
throws SQLException
return connection.getAutoCommit();
public CallableStatement getCallWithKey(String s)
throws SQLException
return connection.getCallWithKey(s);
public String getCatalog()
throws SQLException
return connection.getCatalog();
public boolean getCreateStatementAsRefCursor()
return connection.getCreateStatementAsRefCursor();
public int getDefaultExecuteBatch()
return connection.getDefaultExecuteBatch();
public int getDefaultRowPrefetch()
return connection.getDefaultRowPrefetch();
public Object getDescriptor(String s)
return connection.getDescriptor(s);
public boolean getExplicitCachingEnabled()
throws SQLException
return connection.getExplicitCachingEnabled();
public boolean getImplicitCachingEnabled()
throws SQLException
return connection.getImplicitCachingEnabled();
public boolean getIncludeSynonyms()
return connection.getIncludeSynonyms();
public Object getJavaObject(String s)
throws SQLException
return connection.getJavaObject(s);
public DatabaseMetaData getMetaData()
throws SQLException
return connection.getMetaData();
public Properties getProperties()
return connection.getProperties();
public boolean getRemarksReporting()
return connection.getRemarksReporting();
public boolean getRestrictGetTables()
return connection.getRestrictGetTables();
public String getSQLType(Object obj)
throws SQLException
return connection.getSQLType(obj);
public String getSessionTimeZone()
return connection.getSessionTimeZone();
public int getStatementCacheSize()
throws SQLException
return connection.getStatementCacheSize();
public PreparedStatement getStatementWithKey(String s)
throws SQLException
return connection.getStatementWithKey(s);
public int getStmtCacheSize()
return connection.getStmtCacheSize();
public short getStructAttrCsId()
throws SQLException
return connection.getStructAttrCsId();
public boolean getSynchronousMode()
return connection.getSynchronousMode();
public int getTransactionIsolation()
throws SQLException
return connection.getTransactionIsolation();
public Map getTypeMap()
throws SQLException
return connection.getTypeMap();
public String getUserName()
throws SQLException
return connection.getUserName();
public boolean getUsingXAFlag()
return connection.getUsingXAFlag();
public SQLWarning getWarnings()
throws SQLException
return connection.getWarnings();
public boolean getXAErrorFlag()
return connection.getXAErrorFlag();
public boolean isClosed()
throws SQLException
return connection.isClosed();
public boolean isLogicalConnection()
return connection.isLogicalConnection();
public boolean isReadOnly()
throws SQLException
return connection.isReadOnly();
public String nativeSQL(String s)
throws SQLException
return connection.nativeSQL(s);
public Object openJoltConnection(String s, short word0, short word1)
return connection.openJoltConnection(s, word0, word1);
public void oracleReleaseSavepoint(OracleSavepoint oraclesavepoint)
throws SQLException
connection.oracleReleaseSavepoint(oraclesavepoint);
public void oracleRollback(OracleSavepoint oraclesavepoint)
throws SQLException
connection.oracleRollback(oraclesavepoint);
public OracleSavepoint oracleSetSavepoint()
throws SQLException
return connection.oracleSetSavepoint();
public OracleSavepoint oracleSetSavepoint(String s)
throws SQLException
return connection.oracleSetSavepoint(s);
public int pingDatabase(int i)
throws SQLException
return connection.pingDatabase(i);
public CallableStatement prepareCall(String s)
throws SQLException
return connection.prepareCall(s);
public CallableStatement prepareCall(String s, int i, int j)
throws SQLException
return connection.prepareCall(s, i, j);
public CallableStatement prepareCallWithKey(String s)
throws SQLException
return connection.prepareCallWithKey(s);
public PreparedStatement prepareStatement(String s)
throws SQLException
return connection.prepareStatement(s);
public PreparedStatement prepareStatement(String s, int i, int j)
throws SQLException
return connection.prepareStatement(s, i, j);
public PreparedStatement prepareStatementWithKey(String s)
throws SQLException
return connection.prepareStatementWithKey(s);
public void purgeExplicitCache()
throws SQLException
connection.purgeExplicitCache();
public void purgeImplicitCache()
throws SQLException
connection.purgeImplicitCache();
public void putDescriptor(String s, Object obj)
throws SQLException
connection.putDescriptor(s, obj);
public void registerApiDescription(String s, short word0, short word1, String
s1)
connection.registerApiDescription(s, word0, word1, s1);
public void registerSQLType(String s, Class class1)
throws SQLException
connection.registerSQLType(s, class1);
public void registerSQLType(String s, String s1)
throws SQLException
connection.registerSQLType(s, s1);
public void registerTAFCallback(OracleOCIFailover oracleocifailover, Object
obj)
throws SQLException
connection.registerTAFCallback(oracleocifailover, obj);
public void rollback()
throws SQLException
connection.rollback();
public void setAutoClose(boolean flag)
throws SQLException
connection.setAutoClose(flag);
public void setAutoCommit(boolean flag)
throws SQLException
connection.setAutoCommit(flag);
public void setCatalog(String s)
throws SQLException
connection.setCatalog(s);
public void setCreateStatementAsRefCursor(boolean flag)
connection.setCreateStatementAsRefCursor(flag);
public void setDefaultExecuteBatch(int i)
throws SQLException
connection.setDefaultExecuteBatch(i);
public void setDefaultRowPrefetch(int i)
throws SQLException
connection.setDefaultRowPrefetch(i);
public void setExplicitCachingEnabled(boolean flag)
throws SQLException
connection.setExplicitCachingEnabled(flag);
public void setImplicitCachingEnabled(boolean flag)
throws SQLException
connection.setImplicitCachingEnabled(flag);
public void setIncludeSynonyms(boolean flag)
connection.setIncludeSynonyms(flag);
public void setReadOnly(boolean flag)
throws SQLException
connection.setReadOnly(flag);
public void setRemarksReporting(boolean flag)
connection.setRemarksReporting(flag);
public void setRestrictGetTables(boolean flag)
connection.setRestrictGetTables(flag);
public void setSessionTimeZone(String s)
throws SQLException
connection.setSessionTimeZone(s);
public void setStatementCacheSize(int i)
throws SQLException
connection.setStatementCacheSize(i);
public void setStmtCacheSize(int i)
throws SQLException
connection.setStmtCacheSize(i);
public void setStmtCacheSize(int i, boolean flag)
throws SQLException
connection.setStmtCacheSize(i, flag);
public void setSynchronousMode(boolean flag)
connection.setSynchronousMode(flag);
public void setTransactionIsolation(int i)
throws SQLException
connection.setTransactionIsolation(i);
public void setTypeMap(Map map)
throws SQLException
connection.setTypeMap(map);
public void setUsingXAFlag(boolean flag)
connection.setUsingXAFlag(flag);
public void setWrapper(OracleConnection oracleconnection)
connection.setWrapper(oracleconnection);
public void setXAErrorFlag(boolean flag)
connection.setXAErrorFlag(flag);
public void shutdown(int i)
throws SQLException
connection.shutdown(i);
public void startup(String s, int i)
throws SQLException
connection.startup(s, i);
Util class to get Wrapped Connections from
datasource
package ejbTesting;
// j2ee imports
import javax.naming.InitialContext;
import javax.sql.DataSource;
// sql imports
import java.sql.Connection;
// imports from Oracle Driver Classes
import oracle.jdbc.OracleConnection;
* Wrapper class for the DataSource Connection from Weblogic pool
public class DataSourceConnectionWrapper
// datasource variable
private static transient DataSource datasource = null;
private static String dbName = "jdbc/workbench";
* Method that returns the database connection
public static Connection getConnection()
try
// initialsing the datasource object
initialiseDataSource ();
// Getting a connection from the datasource
Connection con = datasource.getConnection( );
// wrapping it custom wrapper class and
// returning the connection object
return new WeblogicConnectionWrapper((OracleConnection)con);
catch(Exception exception )
exception.printStackTrace();
return null;
private static void initialiseDataSource( ) throws Exception
if ( datasource == null )
try
InitialContext ic = new InitialContext( );
datasource = (DataSource) ic.lookup( dbName );
catch (Exception ne )
throw new Exception( "NamingException while looking up DataSource with
JNDI name" +
dbName + ": \n" + ne.getMessage( ) );
Exception Stack Trace
The line 46 in DataSourceConnectionWrapper
corresponds to
return new WeblogicConnectionWrapper((OracleConnection)con);
Which I feel is logical as the connection which we get from Weblogic
datasource cannot be type casted to OracleConnection
java.lang.ClassCastException: weblogic.jdbc.pool.Connection
at ejbTesting.DataSourceConnectionWrapper.getConnection(DataSourceConnectionWrapper.java:46) -
Better keep on using Oracle or the new PostgreSQL?
Hi,
I hope this is the right Oracle Forum for my question.
In the the company I work in, we've been using Oracle for many years. For a new project the company would like to use the open source PostgreSQL (that I've never used it).
For going on using Oracle, we were asked to give a list of reasons for not using PostgreSQL
Can you help me to gather a few good reasons for not changing DB and keep on using Oracle? Is there some particular bug or other things in PostgreSQL (security, pl/sql, ...) for which it would be better using Oracle?
Thanks in advance!Consider what happens N years down the road, when you've discovered postgres doesn't quite scale as well, all the original developers are gone and all you can find is newbie graduates as maintenance programmers, who quickly leave for more interesting pastures in the paradigm of the day. You've saved X dollars in licensing fees, but are now in a hole where you have to develop it all over again and spend the fees anyways, and pay to keep the old one limping along for the years to replace it - or worse, just be stuck in a deteriorating situation forever.
What I've seen even more often is there are COTS packages available that are an order of magnitude cheaper than developing with either. Is there a business case for the particular bespoke development? Does it need to be on the bleeding edge? Is the business willing to give all needed support, financial, logistical, cheerleading and patience?
That said, if it is a small project that could easily be converted to another engine, the experience alone may be worthwhile. -
Using Oracle XE trying to get Change notification to work
I saw the other thread, and I followed the links etc.
select * from user_change_notification_regs
Shows that my notification is there, I change the values in the table and then the query shows the notification is no longer pending.
I took the example from [http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/changenotification/ChangeNotification.htm] and made the changes, though I did change the table to be a table created under my user id.
The sample app gets all the data fine, etc. But no change is ever fired.
There is no trace file with errors or anything.
Any help would be appreciated.For Oracle XE 11.2 with ODP.NET 11.2 R2 and higher, run the following command with SYSDBA privileges:
alter system set events '10867 trace name context forever, level 1';
Bug 10065474 in DCN required changes in both the DB and client versions. Oracle XE 11.2, and newer versions of the client will be mismatched and vice-versa. This ALTER statement will allow older and newer DB and client version to use DCN. You have to re-run this command after every DB server re-start.
Another alternative is to use an earlier ODP.NET version than 11.2 R2 with XE 11.2. And yet another alternative is to use Oracle DB 11.2.0.3 or higher with ODP.NET 11.2 R2 or higher. -
Using Oracle BI EE Web Services
hi all,
When I use Oracle BIEE 10.1.3.4 ,CHART MISSING WHEN DRILL DOWN FROM A WEB SERVICE INTEGRATED REPORT(Bug 10102579 is unresolved)
When I use OBIEE 11G, Can show the report list and report content,but Don't show the Style and pictures.
I troubled for a long time.
Thank you for your help!which installation options did you choose?
Some of the options don't install the services, so make sure you selected the complete installation. -
Experience using Oracle Forms 10g w IBM Rational Clear Case & Build Forge
Does anyone have experience using Oracle Forms 10g w IBM Rational Clear Case & Build Forge for configuration mgmt?
JaniceHi,
We had also different Installation (Win2k3 R2 32Bit and 64Bit.).
1.) For me personally I didn't recognize benefits with 64 bit
2.) when using Itanium you defenitely have to recompile. We had one Itanium at one of our customers; As Itanium is not x86 compatible you need to recompile on Itanium. it got kicked out and used for another purpose in cause of this and as mentioned the performance weren't so much higher (or in other words not noticeable). Another reason for getting rid of the damn Itanium was that Forms/Reports on Itanium Platform had some annoying bugs; but this was 10.1.2.0.2 maybe in 10.1.2.3 they're fixed.
3.) If you want to use Itanium you simply have to transfer your fmb/mmb/pll to your Itanium IAS, and use forms and reports compiler which comes with it to recompile them.
Generally at the moment we suggest our customers to use 32bit.
just my 10 cents ;)
regards -
RMAN Backup to tape using Oracle Secure Backup
I am trying to take 11g R2 (11.2.0.3) database backup using RMAN. I am using Oracle Secure Backup for configuring virtual tape library and virtual tape drive.
Whenever, I am running the RMAN backup script it simply hangs. While checking the backup job status from Oracle Secure Backup web interface, the job status are displaying 'pending resource availability'.
On, furthur investigating the job, the following error message are displayed,
" Dispatching job to run on oradb. Drive or volume on which mount attempted is unusable".
Library and Tape Creation:
mkdev -t library -o -S 4 -a oradb:/vlib -v vlib
mkdev -t tape -o -a ora11:/vt -v -l vlib -d 1 vt
Not able to fix this error. Need help
Message was edited by: 799814There is a VTL: http://mhvtl-linux-virtual-tape-library-community-forums.966029.n3.nabble.com/
really work well with OSB 10.3.0.3 64bit, the version of it, fully tested by me , is 1.2
The installation guide of it here:
mh virtual tape & library system.
Instructions assume reader is familiar with the kernel build process.
There are two sections of code to build.
- The kernel module
- The user-space daemons.
Kernel module mhvtl:
==================
1) Make sure the kernel-devel package to match your running kernel is installed.
e.g.
RedHat AS 4 & 5:
# rpm -qa|grep kernel
kernel-2.6.9-34.0.1.EL
kernel-devel-2.6.9-34.0.1.EL
kernel-2.6.9-5.EL
kernel-devel-2.6.9-5.EL
kernel-utils-2.4-13.1.80
SLES 9 & 10:
# rpm -qa|grep kernel
2) Extract the mhvtl source code.
# tar xvfz mhvtl-2012-04-04.tgz
3) Change directory into the kernel driver source.
# cd mhvtl-1.2/kernel/
# make
# make install
User space daemons:
===================
Pre-req for a running mhvtl
- sg3_utils (http://sg.danny.cz/sg/sg3_utils.html)
Pre-req to build/compile userspace:
- zlib-devel
* To build an RPM
===============
cp mhvtl-YYYY-MM-DD.tar.gz /usr/src/packages/SOURCE/
cd /usr/src/packages/SOURCE
rpmbuild -tb mhvtl-YYYY-MM-DD.tar.gz
<wait for rpm build to complete>
rpm -Uvh /usr/src/packages/RPMS/<cpu type>/mhvtl-1.2-z.<cpu type>.rpm
(The rpm install will create system group & accounts vtl)
- Note: For RedHat, replace 'packages' with 'redhat'
* To build from tar archive (Debian / Ubuntu):
============================================
apt-get install lsscsi
apt-get install sg3_utils
To limit damage that may occur by wayward daemons, I highly recommend creating
a group and user called 'vtl'
# /usr/sbin/groupadd --system vtl
# /usr/sbin/useradd --system -c "Vitrual Tape Library" -d /opt/vtl -g vtl -m vtl
Now build user space daemons:
From the parent directory where you extracted the source.
# cd mhvtl-1.2
Build the binaries
# make
Install the rc script into /etc/init.d/ and binaries to /usr/local/bin/
# make install
Start daemons:
/etc/init.d/mhvtl start
Test:
Note: Make sure the 'mtx' & 'lsscsi' utilities are installed
The virtual devices are attached to HBA #5 in this example.
e.g.
# lsscsi -g
[0:0:0:0] disk ATA WDC WD1200BEVS-0 02.0 /dev/sda /dev/sg0
[3:0:0:0] cd/dvd Optiarc DVD RW AD-7910A 1.D1 /dev/sr0 /dev/sg1
[5:0:0:0] mediumx SPECTRA PYTHON 5500 /dev/sch0 /dev/sg6
[5:0:1:0] tape QUANTUM SDLT600 5500 /dev/st0 /dev/sg2
[5:0:2:0] tape QUANTUM SDLT600 5500 /dev/st1 /dev/sg3
[5:0:3:0] tape IBM ULT3580-TD4 5500 /dev/st2 /dev/sg4
[5:0:4:0] tape IBM ULT3580-TD4 5500 /dev/st3 /dev/sg5
# mtx -f /dev/sg6 status
Storage Changer /dev/sg6:4 Drives, 37 Slots ( 4 Import/Export )
Data Transfer Element 0:Empty
Data Transfer Element 1:Empty
Data Transfer Element 2:Empty
Data Transfer Element 3:Empty
Storage Element 1:Full :VolumeTag=SDLT01S3
Storage Element 2:Full :VolumeTag=SDLT02S3
Storage Element 3:Full :VolumeTag=SDLT03S3
Storage Element 4:Full :VolumeTag=SDLT04S3
Storage Element 5:Full :VolumeTag=SDLT05S3
Storage Element 6:Full :VolumeTag=SDLT06S3
Storage Element 7:Full :VolumeTag=SDLT07S3
Storage Element 8:Full :VolumeTag=SDLT08S3
Storage Element 9:Full :VolumeTag=SDLT09S3
Storage Element 10:Empty
Storage Element 11:Full :VolumeTag=ULT001L1
Storage Element 12:Full :VolumeTag=ULT002L2
Storage Element 13:Full :VolumeTag=ULT003L3
Storage Element 14:Full :VolumeTag=ULT004L4
Storage Element 15:Full :VolumeTag=ULT005L1
Storage Element 16:Full :VolumeTag=ULT006L2
Storage Element 17:Full :VolumeTag=ULT007L3
Storage Element 18:Full :VolumeTag=ULT008L4
Storage Element 19:Full :VolumeTag=ULT009L1
Storage Element 20:Empty
Storage Element 21:Full :VolumeTag=8MM001X4
Storage Element 22:Full :VolumeTag=8MM002X4
Storage Element 23:Full :VolumeTag=8MM003X4
Storage Element 24:Full :VolumeTag=8MM004X4
Storage Element 25:Empty
Storage Element 26:Empty
Storage Element 27:Empty
Storage Element 28:Empty
Storage Element 29:Empty
Storage Element 30:Empty
Storage Element 31:Full :VolumeTag=CLN001L1
Storage Element 32:Full :VolumeTag=CLN002L1
Storage Element 33:Full :VolumeTag=CLN003L1
Storage Element 34 IMPORT/EXPORT:Empty
Storage Element 35 IMPORT/EXPORT:Empty
Storage Element 36 IMPORT/EXPORT:Empty
Storage Element 37 IMPORT/EXPORT:Empty
Enjoy.
Please feel free in letting me know if this works for you.
Bug fixes and suggestions always welcome.
[email protected]
[email protected] -
Error while creating a report that uses Oracle OCI JDBC connectivity
Please let me know why my CR and LF characters are removed from my forum posting *****
Hi,
I was trying to create a report that uses Oracle OCI JDBC connectivity. I am using Eclipse3.4 download from "cr4e-all-in-one-win_2.0.2.zip". I have successfully created a JDBC OCI connection.
The connection parameters are given below:
URL: jdbc:oracle:oci8:@xe
Database: xe
username: <userName>
password: <password>
I have tested the above connection in Data source Explorer and it works fine!!!
But I am getting the following error when I drag-and-drop a table from the list of tables. Not sure what I am missing here? Any help is highly appreciated.
com.businessobjects.reports.jdbinterface.common.DBException: InvalidURLOrClassName
at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1771)
at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:491)
at com.crystaldecisions.reports.queryengine.Connection.t1(SourceFile:2979)
at com.crystaldecisions.reports.queryengine.Table.u7(SourceFile:2408)
at com.crystaldecisions.reports.dataengine.datafoundation.AddDatabaseTableCommand.new(SourceFile:529)
at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
at com.businessobjects.reports.sdk.requesthandler.f.a(SourceFile:175)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(SourceFile:1079)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1163)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:657)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:163)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:525)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:523)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$3.doWork(ExecutorWithIdleProcessing.java:182)
at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
at com.businessobjects.crystalreports.designer.core.util.thread.PriorityTask.run(PriorityTask.java:75)
at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.runSubtask(PriorityCompoundCancellableRunnable.java:187)
at com.businessobjects.crystalreports.designer.core.util.thread.PriorityProgressAwareRunnable.runSubtask(PriorityProgressAwareRunnable.java:90)
at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.doWork(PriorityCompoundCancellableRunnable.java:144)
at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$IdleTask.run(ExecutorWithIdleProcessing.java:320)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Thanks
Karthik
Edited by: KARTHIK1 on Oct 14, 2009 9:38 PMHi Ted,
Thanks for the feedback. I was able to create a report in Creystal Reports Designer 2008 using OCI. It is not allowing only in the Eclipse plugin. In our environment we are not allowed to user Oracle thin connections and ONLY OCI is allowed.
1) Can you please let me know if there is a way to do this?
2) Will it allow data sources using native database driver?
3) If so, can I use JRC to create these reports from a desktop java program?
Thanks & Regards
Karthik
Edited by: KARTHIK1 on Oct 15, 2009 4:38 PM -
Help needed in using oracle rules SDK
Hi,
For testing my rulesets using oracle rules SDK I doing the following:
1. Creation of dictionary, ruleSet.
2. Declared two kinds of globalVariable variables in my datamodel :
Final and non-Final.(Type of these varaibles are String and Double only)
3. Final globalVaraibles are used in creating rule's patterns.
4. Non-Final globalVariables are used in creating rule's action.
5. Functions are created for asserting globalVariables values and
returning non-final varaibles, since those are required as action
results.
6. In java code I am testing my ruleset (dict.testRuleSet()). Before
testing i am populating my final global variables (since these are used
in rule's patterns),
and updating datamodel.
The above procedure is working fine and I rules are successfully working.
Now, first of all i want to know if the above mentioned approach is correct or it needs to be reframed??
secondly, when i update datamodel with values (in java code itself) it
takes 4-5 seconds in updating it. This is the main issue that why it is
taking this much time??
any comment would be of great help.
Thanks in advance.I will send up an alert for you, Colin. Even though I use iTunes for Mac, troubleshooting it isn't my forté.
-
SSO and how to Managing User Roles/Privileges with Forms using Oracle db
We are in the process of implementing Oracle Application Server SSO with our custom Forms application using Oracle database -- all 10.2.0.1.0 version.
In our Forms Applications, we have about a dozen roles we have assigned to various users. We need to identify each user using our Forms because we are using the GLOBAL USER throughout the application.
Questions:
-- Do we have to create users/passwords in both OID and application database?
-- Is there a way to easily manage the user and passwords between SSO and Forms App/database in one place? For example, how does a user change their password once, but actually change it in both the database and SSO?
Any advice and/or direction would be greatly appreciated.
Thank you,
Mika
Edited by: user11846198 on Sep 1, 2009 1:41 PM
Edited by: user11846198 on Sep 1, 2009 1:53 PMYes, you can have global roles in the DB and assign this roles to specific OID users, and the will heritage the privilages, you can do this using Oracle Identity Management Web Tool http://hostname:7777/oiddas is not complicated.
Greetings. -
Does sun Cluster 3.0/3.1 HA Oracle agent support to use Oracle spfile?
When defining the resource, the 'parameter_file' properties is usually sets to the Oracle pfile. Is it possible to use Oracle spfile?
It is said if leaving 'parameter_file' NULL, it will be default to Oracle default. Suppose leaving it NULL and with Oracle spfile created in default location, will it use the spfile?You did not specify which Sun Cluster version and Oracle version you are running.
Within SC 3.1 my understanding is that beginning with Oracle 9i it is possible to use the spfile.
If you leave the "parameter_file" property empty (NULL) then the default behaviour for 9i should work:
search under $ORACLE_HOME/dbs in the order:
1. spfile$(ORACLE_SID}.ora
2. spfile.ora
3. init${ORACLE_SID}.ora
Greets
Thorsten -
Unable to connect to Oracle Database using Oracle Sql developer 2.1.1.64
Hi Everyone,
I am searching for some help regarding my problem with Oracle connectivity. I have installed Oracle 11g release 2 on my Windows XP Professional Laptop. For a few days after installation i could connect to the Oracle database with the SYSTEM account using Oracle SQL developer ( installed on the same Laptop) but now i am unable to do so.It gives me this annoying message:
An error was encountered performing the required operation Got a minus one from read call .Vendor code 0
However i am able to connect using Sql Plus by supplying the username SYSTEM and the corresponding password.
My TNSNAMES .ora file is as follows:
ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORACLE)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
My Listener.ora file is as follows:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\product\11.2.0\dbhome_1\bin\oraclr11.dll")
(SID_DESC =
(GLOBAL_DBNAME = Oracle)
(ORACLE_HOME = D:\app\product\11.2.0\dbhome_1)
(SID_NAME = Oracle)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(PROTOCOL_STACK =
(PRESENTATION = GIOP)
(SESSION = RAW)
ADR_BASE_LISTENER = D:\app
My Sqlnet.ora file is as follows:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
I am new to Oracle and so i need someone in this forum who can help me resolve this problem. Also i even tried connecting to the database using Toad 10.5.0.41. It give me the following error:
ORA 12537 : TNS Connection closed
Thanks for your patience and help in advance.
---PrashantHello Irian and Sue,
I can connect to the Oracle database using SQL Plus. Now when i TNSPING ORACLE from command line i get the following message :
Used parameter files:
D:\app\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =localhost
*)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORACLE)))*
TNS-12537: TNS:connection closed
Thanks for your response to my initial post.Do u have any other methods to resolve this?
Maybe you are looking for
-
Error while transporting - Source RSDS 8ZRF_O01 LOGDBQ151 does not exist
Hi, I am getting following error while transporting export DataSource to quality system. Start of the after-import method RS_TRFN_AFTER_IMPORT for object type(s) TRFN (Activation Mode) No rule exists Source RSDS 8ZRF_O01 LOGDBQ151 does not exist
-
"This accessory is not made to work with iPhone"
I have a first generation iphone. It recently started showing a message that reads: This accessory is not made to work with iPhone Would you like to turn on Airplane Mode to reduce audio interference? You will not be able to make call during this mod
-
RUN_PRODUCT error while running in oracle apps11.0.3
declare cursor c1 is select SALESREP_NUMBER,EMAIL_ADDRESS email_address from ra_salesreps_all where salesrep_number in (100245,100447); pl_id ParamList; sales varchar2(10); p_email varchar2(100); p_month varchar2(3); p_year varchar2(4); begin p_month
-
Changing the FaceTime phone number
I've read many of the threads on this board containing this question, and none of them seem to get a good answer. So I'm going to try again: I have a new iPhone with a different phone number than my previous iPhone. I no longer own the previous phone
-
Hi, What are the Adaptors used for a B2B scenario to send an IDOC from R3 system to an Oracle database. Thank You!