Note: we reuse single connection.
************************************************
public Connection connection() {
try {
if ((connection == null) || (connection.isClosed()))
{
if (connection!=null) log.severe("Connection was closed !");
connection = DriverManager.getConn...
Hi.
I'm using sql plus to execute a query (a select) and dump the result into a file, using spool option.
I have about 14 millions lines, and it takes about 12 minutes to do the dump.
I was wondering if there is something to make the dump faster?
Here below my sql plus options:
whenever sqlerror exit sql.sqlcode
set pagesize 0...
I need execute an sql query in ORACLE it takes a certain amount of time.
so i wrote this function
CREATE OR REPLACE FUNCTION MYSCHEMA.TEST_SLEEP
(
TIME_ IN NUMBER
)
RETURN INTEGER IS
BEGIN
DBMS_LOCK.sleep(seconds => TIME_);
RETURN 1;
EXCEPTION
WHEN OTHERS THEN
RAISE;
RETURN 1;
END TEST_SLEEP;
and i call in this way
...
I'm having a hard time wrapping my head around this query. it is taking almost 200+ seconds to execute. I've pasted the execution plan as well.
SELECT
user_id ,
ROLE_ID ,
effective_from_date ,
effective_to_date ,
participant_code ,
ACTIVE
FROM
CMP_USER_ROLE E
...
Hi, I'm using VS 2008 SP1. I want to create an edmx file using my existing database in Oracle 10g. I tried to add ADO.Net Entity Data Model item, but in the Entity Data Model Wizard, .NET Provider for Oracle does not show up. Can someone suggest a way to connect to existing Oracle database to generate the edmx file? Thanks.
...
OK, so say I have a table with 500K rows, then I ad-hoc query with unsupported indexing which requires a full table scan. I would like to immediately view the first rows returned while the full table scan continues. Then I want to scroll thru the next results. In the meantime, I would like to display the progress of the table scan, examp...
The company I work for currently uses some basic functions to abstract the OCI libraries as a means for DB connectivity. We're considering switching to PHP's PDO object, but from some quick searches, it looks like the Oracle driver is a bit less mature than the other PDO drivers. I would appreciate some pro/cons for PDO/Oracle from any...
After creating a db using Database Configuration Assistant, I go to Enterprise Manager, log into it, and it tells me, that java.lang.Exception: Exception in sending Request :: null. OracleDBConsole for this db, and iSQLPlus services are started. When I run %ORACLE_HOME%\bin\emctl status dbconsole, it says, EM Daemon is not running. How d...
While attempting to transfer data from Salesforce using Apex Data Loader to Oracle Keep getting the following error:
26937 [databaseAccountExtract] FATAL com.salesforce.dataloader.dao.database.Data
baseContext - Error getting value for SQL parameter: nkey__c. Please make sure
that the value exists in the configuration file or is ...
hi all friends
I meet a problem yesterday. Maybe it's because it is April 1st...
but it did exist.
I have 3 PCs in remote area, two clients and one oracle server.
My app is running separately in the two clients, connecting hourly to the oracle database. My clients worked well before April 1st, but suddenly my app in the client machine...
A situation has arisen where I need to perform a base 36 to base 10 conversion, in the context of a SQL statement. There doesn't appear to be anything built into Oracle 9, or Oracle 10 to address this sort of thing. My Google-Fu, and AskTom suggest creating a pl/sql function to deal with the task. That is not an option for me at this...
Hello everyone. Asking for your help on this Oracle query. It's giving me the error 2 "ORA-00905: missing keyword". It was working fine before I added the LEFT JOIN statement. Obviously it won't deliver the information as we need it without the LEFT JOIN statement.
Please provide any help to know which keyword is missing in this query
...
If the database is not Oracle, it is MS SQl 2008.
My task: if Oracle, add two more parameters when calling a stored proc.
Oracle and MSFT stored procs are generated; Oracle ones have 3 extra parameters:
Vret_val out number,
Vparam2 in out number,
Vparam3 in out number,
... the rest
(The are not actually named Vparam2 and Vparam3, but...
I am trying to declare g_num ,number data type with size it gives an error but in case of varchar2,char it does not.
variable g_name varchar2(5);//correct accept size for varchar 2
variable g_num number(23);//Gives an error
" VAR[IABLE] [ <variable> [ NUMBER | CHAR | CHAR (n [CHAR|BYTE]) |
VARCHAR2 (n [CHAR|BYTE])...
This has taken many hours of mine. I have to get this .Net app to run on an XP system. Someone seems to have messed up some files so conn.Open() in the C# is causing this error:
Connection Error:Oracle.DataAccess.Client.OracleException ORA-12170:
TNS:Connect timeout occurred at Oracle.DataAccess.Client.OracleException.HandleErrorHe...
My friend has described a scenario and challenged me to find solution. He is using Oracle database and JDBC connection with read committed as transaction isolation level. In one of the transactions, he updates a record, executes a select statement and commits the transaction. When everything happens within a single thread, things are fin...
CREATE OR REPLACE PROCEDURE p_createLocaltable
IS
table_already_exist EXCEPTION;
PRAGMA EXCEPTION_INIT (table_already_exist, -00955);
BEGIN
create table local_table as
select * from supplied_table
where rownum < 1;
EXCEPTION
when table_already_exist then
DBMS_OUTPUT.put_line('Table already exists , does not need to recr...
Hello,
I'm using Oracle. I'm trying to compose something like this:
SELECT trans_type,
(SELECT parameter_value FROM transaction_details WHERE id = MAX(t.trans_id))
FROM
(SELECT trans_id, trans_type FROM transactions) t
GROUP BY trans_type
So, I am trying to use a result of grouping inside an inner query. But I am getting the error th...
I was trying to reverse a number in PL/SQL. It's working fine, but when my number contains any 0, the output is unexpected. For example:
1234 output 4321
1000 output 1
1203 ouput 3021
10001 output 1
DECLARE
r number(9);
num number(9):=&p_num;
BEGIN
WHILE num>=1 LOOP
IF mod(num,10)=0 THEN -- extracting last digit of a nu...
I have a function that returns a SYS_REFCURSOR that has a single row but multiple columns. What I'm looking to do is to be able to have a SQL query that has nested sub-queries using the column values returned in the SYS_REFCURSOR. Alternative ideas such as types, etc would be appreciated. Code below is me writing on-the-fly and hasn't be...