In *.sqljsp problem whit SQL st. execution
Executed statement doesn't chanege when i change SQL statemen. Every time the first one is executed.
I have to restart Apachie every time to be possible chnges to take an effect
What do i have to change in my setings?
Thanks in advance
Executed statement doesn't chanege when i change SQL statemen. Every time the first one is executed.
I have to restart Apachie every time to be possible chnges to take an effect
What do i have to change in my setings?
Thanks in advance
Similar Messages
-
Problem in SQL Query Execution
Hi,
I have tried to Insert Data in Table (Using MySQL) , and as far as i know there is no error in my program and it's executing well with out showing any error and throwing exception. Database connected successfully. I have given the full code here. Help me to execute this program as soon as possible .Thanks in advance.
Code:_
public class MysqlConnect{
public static void main(String[] args) {
System.out.println("MySQL Connect Example.");
Connection conn = null;
String url = "jdbc:mysql://localhost:3306/";
String dbName = "demo";
String driver = "com.mysql.jdbc.Driver";
String userName = "root";
String password = "root";
try {
Class.forName(driver);
conn= DriverManager.getConnection(url+dbName,userName,password);
try{
Statement st = conn.createStatement();
System.out.println("Connection Established");
int value = st.executeUpdate("INSERT INTO demo.login VALUES("+17+","+"'G'"+","+"'GG'"+","+70+")");
System.out.println("1 Row Inserted"+ value);
conn.close();
System.out.println("Disconnected from database");
catch(SQLException Se)
System.out.println("Exception::SQL Statement Not Executed");
} catch (Exception e) {
e.printStackTrace();
Regards,
Prabu
Edited by: [email protected] on Apr 17, 2008 11:10 AM
Edited by: [email protected] on Apr 17, 2008 11:13 AMI think there is some problem in sql statement u have written code as shown bollow
st.executeUpdate("INSERT INTO demo.login VALUES("17",""'G'"",""'GG'"","70")");
i think the proper statement is as shown bellow
st.executeUpdate("INSERT INTO demo.login VALUES('17','G','GG','70')");
(if all u have 4 columns in u r table of type varchar)
and if this is not solution for ur problem let me know the table structure , i mean columns and datatype of columns. -
Database Link Problem-Peculiar SQL stmt execution.. Please help
Hi all,
This is a strange problem i'm facing while running the following query.
This query is run on the local machine which is fetching data from another remote database. All the functions included also are fetching data from the remote database through db links.
I know lot of db links are into picture, but the requirement is like this only.
SQL :SELECT billing_extract_subscriber.get_external_id_types_descr
(ciem.external_id_type,
'ra_delhi'
) AS "EXTERNAL_ID_TYPE",
ciem.external_id, ciem.subscr_no customer_equip_map_subscr_no,
ciem.subscr_no_resets, s.subscr_no servive_subscriber_no,
s.service_active_dt, s.service_inactive_dt, s.is_prepaid,
billing_extract_subscriber.get_status_values_descr
(ss.status_id,
'ra_delhi'
) AS "STATUS_VALUES",
billing_extract_subscriber.get_status_type_values_descr
(ss.status_type_id,
'ra_delhi'
) AS "STATUS_TYPE_VALUES",
ss.subscr_no service_status_subscr_no, NULL "point_target",
NULL "customer_corridors_subscr_no", cmc.component_id, cmc.package_id,
billing_extract_subscriber.get_component_name_descr
(cmc.component_id,
'ra_delhi'
) AS "COMPONENT_NAME",
billing_extract_subscriber.get_package_def_values_descr
(cmc.package_id,
'ra_delhi'
) AS "PACKAGE_NAME",
cmc.component_status,
billing_extract_subscriber.get_mkt_code_values_descr
(cf.mkt_code,
'ra_delhi'
) AS "MKT_CODE",
cf.account_no,
billing_extract_subscriber.get_bill_period_descr
(cf.bill_period,
'ra_delhi'
) AS "BILL_PERIOD",
cf.account_type,
billing_extract_subscriber.get_account_category_descr
(cf.account_category,
'ra_delhi'
) AS "ACCOUNT_CATEGORY",
billing_extract_subscriber.get_gender_descr (cf.gender,
'ra_delhi'
) AS "GENDER"
FROM customer_id_equip_map@ra_delhi ciem,
service@ra_delhi s,
service_status@ra_delhi ss,
cmf_package_component@ra_delhi cmc,
cmf@ra_delhi cf
WHERE ciem.subscr_no = s.subscr_no
AND s.subscr_no = ss.subscr_no
AND s.parent_account_no = cf.account_no
AND s.service_active_dt >= cf.date_active
AND NVL (s.service_inactive_dt, '31-dec-9999') <=NVL (cf.date_inactive, '31-dec-9999')
AND s.service_active_dt <= ciem.active_date
AND NVL (s.service_inactive_dt, '31-dec-9999') >=NVL (ciem.inactive_date, '31-dec-9999')
AND cmc.parent_account_no = cf.account_no
AND ciem.active_date <= cmc.active_dt
AND NVL (ciem.inactive_date, '31-dec-9999') >=NVL (cmc.inactive_dt, '31-dec-9999');
*1. Now when i'm running this sql all as a whole I'm getting the error:*
ORA-00904: "S"."SERVICE_INACTIVE_DT": invalid identifier
ORA-02063: preceding line from RA_DELHI
Sometimes Invalid Identifier, sometimes invalid table etc. is coming.
*2. Now when i'm running the above query after breaking into two parts is :*
a. first part .. WHERE clause is removed -
SELECT billing_extract_subscriber.get_external_id_types_descr
(ciem.external_id_type,
'ra_delhi'
) AS "EXTERNAL_ID_TYPE",
ciem.external_id, ciem.subscr_no customer_equip_map_subscr_no,
ciem.subscr_no_resets, s.subscr_no servive_subscriber_no,
s.service_active_dt, s.service_inactive_dt, s.is_prepaid,
billing_extract_subscriber.get_status_values_descr
(ss.status_id,
'ra_delhi'
) AS "STATUS_VALUES",
billing_extract_subscriber.get_status_type_values_descr
(ss.status_type_id,
'ra_delhi'
) AS "STATUS_TYPE_VALUES",
ss.subscr_no service_status_subscr_no, NULL "point_target",
NULL "customer_corridors_subscr_no", cmc.component_id, cmc.package_id,
billing_extract_subscriber.get_component_name_descr
(cmc.component_id,
'ra_delhi'
) AS "COMPONENT_NAME",
billing_extract_subscriber.get_package_def_values_descr
(cmc.package_id,
'ra_delhi'
) AS "PACKAGE_NAME",
cmc.component_status,
billing_extract_subscriber.get_mkt_code_values_descr
(cf.mkt_code,
'ra_delhi'
) AS "MKT_CODE",
cf.account_no,
billing_extract_subscriber.get_bill_period_descr
(cf.bill_period,
'ra_delhi'
) AS "BILL_PERIOD",
cf.account_type,
billing_extract_subscriber.get_account_category_descr
(cf.account_category,
'ra_delhi'
) AS "ACCOUNT_CATEGORY",
billing_extract_subscriber.get_gender_descr (cf.gender,
'ra_delhi'
) AS "GENDER"
FROM customer_id_equip_map@ra_delhi ciem,
service@ra_delhi s,
service_status@ra_delhi ss,
cmf_package_component@ra_delhi cmc,
cmf@ra_delhi cf
The query is running fine.
b. when i'm running the another part where i'm removing the functions and replacing with then also it is running fine. e.g*
SELECT *
FROM customer_id_equip_map@ra_delhi ciem,
service@ra_delhi s,
service_status@ra_delhi ss,
cmf_package_component@ra_delhi cmc,
cmf@ra_delhi cf
WHERE ciem.subscr_no = s.subscr_no
AND s.subscr_no = ss.subscr_no
AND s.parent_account_no = cf.account_no
AND s.service_active_dt >= cf.date_active
AND NVL (s.service_inactive_dt, '31-dec-9999') <=NVL (cf.date_inactive, '31-dec-9999')
AND s.service_active_dt <= ciem.active_date
AND NVL (s.service_inactive_dt, '31-dec-9999') >=NVL (ciem.inactive_date, '31-dec-9999')
AND cmc.parent_account_no = cf.account_no
AND ciem.active_date <= cmc.active_dt
AND NVL (ciem.inactive_date, '31-dec-9999') >=NVL (cmc.inactive_dt, '31-dec-9999');
*3. I can trace out there is some problem related to the concurrent db links getting opened.*
i've done resizing the following parameters as well but isn't working :
NAME TYPE VALUE
open_cursors integer 3000
open_links integer 100
open_links_per_instance integer 100
read_only_open_delayed boolean FALSE
session_max_open_files integer 10
NAME TYPE VALUE
open_cursors integer 3000
open_links integer 100
open_links_per_instance integer 100
read_only_open_delayed boolean FALSE
session_max_open_files integer 10
SQL>
SQL> sho parameter distributed
NAME TYPE VALUE
distributed_lock_timeout integer 300
I've tried breaking up the query but in any case i'm opening same no. of dblinks. So it din't help me.
Kindly Suggset what to do? Is there any more parameter which govern maximum db links opened at a time? or is this problem due to someother reasons?
Database Details :
Version : 10.2.0.3.0
Platform : HP UXHi all,
NO RESPONSE AT ALL???
Well not a PROBLEM....
I got my solution so thought of writing it here for everybody's reference.
SQL> alter session set events '10176 trace name context forever';
Session altered.
SQL> alter system flush shared_pool;
System altered.
And then I have execute original query given by Prabhat, it's running fine.
Applies to:
Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.1.0.7
This problem can occur on any platform.
Symptoms
-- Problem Statement:
Following query over dblink having Local database 9iR2 and remote 10gR2 works..
select *
from ctps3.institutions@ctps3 i,
ctps3.state_types@ctps3 s,ods.institutions oi
where s.stt_state_type_id (+) = i.stt_state_type_id
and oi.ctps_insttn_id = i.inst_insttn_id
and i.inst_modifd_dt = trunc(sysdate)
and (nvl (oi.inst_state_txt, 'x') <> nvl (s.stt_state_type_nm, 'x'))
and (nvl (oi.inst_phone_txt, 17) <> nvl (i.inst_phone_txt, 17));
The same query fails when both local and remote databases are 10g R2, with following errors:
ERROR at line 2:
ORA-00904: "OI"."INST_STATE_TXT": invalid identifier
ORA-02063: preceding line from CTPS3
Cause
Outer join query over dblink can fail with ORA-904, as referenced in:
Bug 6620988 QUERY OVER DBLINK FAILS WITH ORA-904 SELECTING DATE
Predicates are not checked to verify if they belong to same network node when we attempt to colocate the remote tables. This results in wrongly generating remote query and ORA-904
REDISCOVERY INFORMATION:
1. ORA-904
2. DB link
3. OJ predicates across network nodes
4. predicates wrongly pushed network nodes
Solution
-- To implement the solution, please execute the following steps::
Use the workaround of disabling colocated joins via event 10176 and force a hard parse to happen
(ie by flushing the shared pool), ie:
SQL> alter session set events '10176 trace name context forever';
SQL> alter system flush shared_pool;
or
For a permanent fix, request a One-Off Backport of 6620988 for the appropiate platform.
References
Bug 6620988 - QUERY OVER DBLINK FAILS WITH ORA-904 SELECTING DATE -
Hi, I have a problem whit this error code when I execute my form from Forms Builder. Im using Forms 6i. First, i open my form, then i connect to compile, and execute my form, but when the system open the forms runtime i get this error code.
In SQL Developer i connect whitout any problem, and whit forms 6i too, Why not whit Forms Runtime???
Regards!!Unfortunitely, that doesn't help.
To anyone reading this thread, "6i", "10g", "11i", "12i"" are all product marketing references. They do not represent a product version. Knowing the exact product version is very important when trying to troubleshoot a problem. In this case for example, telling us that you are using a 10g db could potentially mean that you are using one many different releases (i.e. 10.1.x, 10.2.x). And of course, this does not take in to account any patches which may have been applied.
All I can offer is this, Forms 6.0.8.x is not certified or supported for use with 10.2.x databases. However, with Forms 6.0.8.25 or newer you can use 10.1.x databases.
I would recommend that you start with this information. If this doesn't help, please consider responding to the remaining questions in my previous posting. -
Problem whit Update Operation, Error UPDATE_ROW_CONFLICT with Oracle DB
Hello friends!, I have a problem whit UPDATE Operation with a Oracle DataBase, but it is rare because it works in "Java Sun Application Server" and not in Tomcat (5.5.12) , displaying the following error:
"Error :Number of conflicts while synchronizing: 1 SyncResolver.UPDATE_ROW_CONFLICT row 5 values changed in database"
part of the file log:
"SEVERE: Error Description
java.lang.RuntimeException: Number of conflicts while synchronizing: 1 SyncResolver.UPDATE_ROW_CONFLICT row 5 values changed in database
at com.sun.data.provider.impl.CachedRowSetDataProvider.commitChanges(CachedRowSetDataProvider.java:878)
at ido02004.EditPerson.saveButton_action(EditPerson.java:519)
For any change of columns for table in Data Base.
The code used in the page (EditPerson.jsp) is:
public void init() {
Object pid = getSessionBean1().getCurrentPersonId();
RowKey personRowKey = ido_personsDataProvider.findFirst("PERSON_ID", pid);
ido_personsDataProvider.setCursorRow(personRowKey);
public String saveButton_action() {
try {
ido_personsDataProvider.setValue("USER_ID", userDD.getSelected());
ido_personsDataProvider.setValue("STATUS", statusDD.getSelected());
ido_personsDataProvider.setValue("NAME", name.getValue());
ido_personsDataProvider.setValue("FUNCTION", function.getValue());
ido_personsDataProvider.setValue("ADDRESS", address.getValue());
ido_personsDataProvider.setValue("EMAIL", email.getValue());
ido_personsDataProvider.setValue("PHONE", phone.getValue());
ido_personsDataProvider.setValue("VALUATION", valuation.getValue());
ido_personsDataProvider.commitChanges();
catch (Exception ex) {
log("Error Description", ex);
error("Error :"+ex.getMessage());
return null;
Please, Some idea of why gives the error? Help!
Thanks in advance!
Ren�
P.D. Excuse my English.Hi All!
New Info:
System.out.println(" date created : "+ido_personsDataProvider.getValue("DATE_CREATED"));
System.out.println(ido_personsDataProvider.getCachedRowSet().getMetaData().getColumnClassName(13));When these lines are printed in Java Sun Application Server for JSC show this:
[#|2006-05-05T17:12:50.264-0500|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=15;|
date created : 2006-04-24 00:00:00.0|#]
[#|2006-05-05T17:12:50.264-0500|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=15;|
java.sql.Timestamp|#]
When these lines are printed in Tomcat show this:
date created : 2006-04-24
java.sql.Timestamp
Why? the values of this date is different in one or another server. Problem of driver JDBC? I use driver: to ojdbc14.jar, in Tomcat for the connection to the BD Oracle. Maybe this originates error UPDATE_ROW_CONFLICT...
Please, any idea?
Thanks! -
Local Network Connection Problem with SQL Server 2008 R2
Hi,
I have CRM application which uses SQL server 2008. Weird thing is that I have no problems connecting from client machines to the server when using a particular router (via LAN) and when I upgrade the firmware of the same router (A common open source firmware
which is used by many also works perfect apart from mentioned problem) and restart the server, the connection cannot be established. I get Error 40.
When i downgrade the firmware and restart the server, the connection works again.
Please note that I am absolutely not touching any configuration of the server. Also the CRM software allows remote connections from public IPs which this feature works fine with both downgraded and upgraded firmwares.
As for my understanding, the routers do not block ports in LAN connections. So how can I diagnose the reason for this connection problem?Hi Leony83,
Please also help to check Windows Event Log information regarding this issue, so that we can do further investigation. In additin, here is the general steps to troubleshoot SQL Server Error 40 issue. Please see:
SQL SERVER – Fix : Error : 40 – could not open a connection to SQL server – Fix Connection Problems of SQL Server:
http://blog.sqlauthority.com/2008/08/24/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server-fix-connection-problems-of-sql-server/
Hope this helps.
Regards,
Elvis Long
TechNet Community Support -
Dear All,
I am having some problem in SQL query. I am trying to get total sum of one inventory using the following query it works fine:
sum(case when mt.transaction_quantity > 0 then (mt.transaction_quantity) else 0 end) "TOT_IN"
,sum(case when mt.transaction_quantity >= 0 then 0 else (abs(mt.transaction_quantity)) end) "TOT_OUT"
But when I breakup the total sum into monthly breakup it fails to return the correct some could any one help what is wrong in the following query which is returning incorrect monthly sum. Following is that query. Your help in this regard would highly be appreciated.
sum(case when mt.transaction_quantity > 0 then (decode (floor (floor (to_date('17-MAR-2009')- mt.transaction_date) / 30), 0, mt.transaction_quantity, null)) else 0 end) "MONTH1_IN"
,sum(case when mt.transaction_quantity >= 0 then 0 else (decode (floor (floor (to_date('17-MAR-2009')- mt.transaction_date) / 30), 0, abs(mt.transaction_quantity), null)) end) "MONTH1_OUT"
ThanksHi,
Sorry, I don't really understand what you want.
Whenever you have a question, it helps to post:
(1) The version of Oracle (and any other relevant software) you're using
(2) A little sample data (just enough to show what the problem is) from all the relevant tables
(3) The results you want from that data
(4) Your best attempt so far (formatted)
(5) The full error message (if any), including line number
Executable SQL statements (like "CREATE TABLE AS ..." or "INSERT ..." statements) are best for (2).
If you can present your problem using commonly available tables (for example, tables in scott schema, or views in the data dictionary), then you can omit (2).
Formatted tabular output is okay for (3). Type these 6 characters
{code}
(small letters only, inside curly brackets) before and after the tabular text, to preserve spacing.
What exactly do you mean by "monthly breakup"?
If you want separate figures for each calendar month, Blushadow's suggestion (TRUNC (mt.transaction_date, 'MM')) is what you want.
If you want separate figures for the last 30 days before today, then something like what you posted ("FLOOR ((:target_date - mt.transaction_date) / 30)": the extra FLOOR doesn't help any) should work, so if you ran the query on March 17, 2009, the first "month" would be February 16 through March 17.
In a CASE statement, there's rarely any need to use DECODE. The following is equivalent to the last line of code you posted:
, SUM ( CASE
WHEN mt.transaction_quantity >= 0
THEN 0
WHEN TO_DATE ('17-MAR-2009', 'DD-MON-YYYY') - mt.transaction_date
BETWEEN 0
AND 29.99999 -- 30 days minus a fraction of a second
THEN ABS (mt.transaction_quantity)
END
) AS month1_outDon't you find this easier to understand (and debug)? -
Problem in SQL with CURSOR( ) ,Why the CURSOR did not work?
hi All:
I have a problem in SQL with CURSOR.
The data is as the attachments.
Here is the SQL statement as follow:
SELECT A.WADCTO,A.WADOCO,B.IGCOST,CURSOR (SELECT X.IGLITM
FROM F3102 X
WHERE X.IGDOCO=A.WADOCO
AND X.IGCOST IN ('B1','D1','C3')) AS DETAIL
FROM F4801 A INNER JOIN F3102 B ON A.WADOCO=B.IGDOCO AND A.WADCTO=B.IGDCTO AND B.IGCOST>' '
WHERE A.WADOCO='10004'
The statement above returns records as follow:
WADC WADOCO IGCOST DETAIL
WO 10004 A1 CURSOR STATEMENT : 4
CURSOR STATEMENT : 4
IGLITM
1KV90CPG2
1KV90CPG2
1KV90CPG2
But, after I add one statement in the subquery, there is no record returned from CURSOR.
Here is the SQL statement:
SELECT A.WADCTO,A.WADOCO,B.IGCOST,CURSOR (SELECT X.IGLITM
FROM F3102 X
WHERE X.IGDOCO=A.WADOCO
AND X.IGCOST=B.IGCOST
AND X.IGCOST IN ('B1','D1','C3')) AS DETAIL
FROM F4801 A INNER JOIN F3102 B ON A.WADOCO=B.IGDOCO AND A.WADCTO=B.IGDCTO AND B.IGCOST>' '
WHERE A.WADOCO='10004'
The statement above returns records as follow:
WADC WADOCO IGCOST DETAIL
WO 10004 A1 CURSOR STATEMENT : 4
CURSOR STATEMENT : 4
no rows selected
Why the CURSOR did not work?
The database version is Oracle Database 10g Release 10.2.0.4.0 - 64bit Production.
F3102 DATA:
IGDOCO IGDCTO IGLITM IGCOST
10004 WO 1KV90CPG2 A1
10004 WO 1KV90CPG2 B1
10004 WO 1KV90CPG2 C3
10004 WO 1KV90CPG2 D1
F4801 DATA:
WADCTO WADOCO
WO 10004
Edited by: user2319139 on 2010/3/2 上午 1:17
Edited by: user2319139 on 2010/3/2 上午 1:20Why this structure and not a join?
The cursor() function returns a cursor handle that needs to be processed - in other words, the client needs to fetch data from it. The Oracle® Database SQL Reference+ (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/expressions005.htm#i1035107) describes it as being equivalent to a ref cursor handle.
Thus why are you creating ref cursor handles as a column in a SQL projection - where each row will have a "+nested+" ref cursor handle to process. What problem are you attempting to hack solve this way? -
Cr52-A2 problem whit the new firmware(1.80D)
hello all
i having a problem whit my cd-rw
maybe one of you guys can help me cuse i'm breaking my had hear
i flashed the firmware from 1.60D to 1.80D
and my cd-rw stop working
the chiki boaster doesn't want me to open him also
i want the old version
give me back my 1.60D
p.s.
maybe ther's a way to reset the cd-rw
ha
what are you fox thinkingHi
There is a note at the bottom of the page:
Note: You should not update your firmware unless you have
have flash experience with your optical drive.
But, I will try to download firmware from my girlsfriend's drive. That is the same type. And think that is 160D.
Tsibi -
Problem whit audiobooks.
Problem whit audiobooks. when im putting in audiobooks in Itunes the hole contents dosent apper in Itunes just a few files. say that is arund 24 files just 10 appers in Itunes whats wrong?
I, too had this problem and spent a lot of time with AppleCare. After having me take my phone back to factory presets and finding no improvement to my audio files, the solution turned out to be quite simple: customer service re-loaded my iTunes audiobook purchases so the files were up to date. Just wish they'd come up with this solution before I had to completely reconfigure my phone.......
-
Problem with SQL connection and a Collection
hi all,
I have two problems with sql...
1. how can I assign the values of a resultset to a collection?
2. how can I close the sql connection, because when I close the statement and connection error shows me in the resultset
thanks!Hello Pablo,
RetrivingResults In Collection:
1) use getObject method, and assign it to collection.
Collection c_obj=new ArrayList();
while(rs.next())
c_obj.add(rs.getInt(Project_ID), rs.getString(Project_Name));
Closing ResultSet
2) The close() methos of ResultSet closes the ResultSet object, like bellow
ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
rs.close(); //Closes the result set -
Current running SQL stms execution plan?
Hi,
Is it any ways to findout the current running SQL stms execution plan?
without using Explain plan & autotrace.
Thanks in advance,
Thomas.I'm using this code. You just have to give the Session Identifier (&SID ):SELECT '| Operation | Objet | Lignes| Bytes| Cout | Pstart| Pstop |' as "Plan Table" FROM DUAL
UNION ALL
SELECT '----------------------------------------------------------------------------------------------------' FROM DUAL
UNION ALL
SELECT * FROM
(SELECT /*+ NO_MERGE */
RPAD('| '||
SUBSTR(
LPAD(' ',1*(LEVEL-1)) || OPERATION || DECODE(OPTIONS, NULL,'',' '||OPTIONS), 1, 47
), 48, ' '
)||'|'||
RPAD(
SUBSTR(OBJECT_NAME||' ',1, 9), 10, ' '
)||'|'||
LPAD(
DECODE(CARDINALITY,
NULL,' ',
DECODE(SIGN(CARDINALITY-1000),
-1, CARDINALITY||' ',
DECODE(SIGN(CARDINALITY-1000000),
-1,TRUNC(CARDINALITY/1000)||'K',
DECODE(SIGN(CARDINALITY-1000000000),
-1,TRUNC(CARDINALITY/1000000)||'M',
TRUNC(CARDINALITY/1000000000)||'G')
), 7, ' '
)||'|'||
LPAD(
DECODE(BYTES,
NULL,' ',
DECODE(SIGN(BYTES-1024),
-1, BYTES||' ',
DECODE(SIGN(BYTES-1048576),
-1, TRUNC(BYTES/1024)||'K',
DECODE(SIGN(BYTES-1073741824),
-1,TRUNC(BYTES/1048576)||'M',
TRUNC(BYTES/1073741824)||'G')
), 6, ' '
)||'|'||
LPAD(
DECODE(COST,
NULL,' ',
DECODE(SIGN(COST-10000000),
-1, COST||' ',
DECODE(SIGN(COST-1000000000),
-1, TRUNC(COST/1000000)||'M',
TRUNC(COST/1000000000)||'G')
), 8, ' '
)||'|'||
LPAD(
DECODE(PARTITION_START,
'ROW LOCATION', 'ROWID',
DECODE(PARTITION_START,
'KEY', 'KEY',
DECODE(PARTITION_START,
'KEY(INLIST)', 'KEY(I)',
DECODE(SUBSTR(PARTITION_START, 1, 6),
'NUMBER', SUBSTR(SUBSTR(PARTITION_START, 8, 10), 1,LENGTH(SUBSTR(PARTITION_START, 8, 10))-1),
DECODE(PARTITION_START,
NULL,' ',
PARTITION_START)
)||' ', 7, ' '
)||'|'||
LPAD(
DECODE(PARTITION_STOP,
'ROW LOCATION', 'ROW L',
DECODE(PARTITION_STOP,
'KEY', 'KEY',
DECODE(PARTITION_STOP,
'KEY(INLIST)', 'KEY(I)',
DECODE(SUBSTR(PARTITION_STOP, 1, 6),
'NUMBER', SUBSTR(SUBSTR(PARTITION_STOP, 8, 10), 1,LENGTH(SUBSTR(PARTITION_STOP, 8, 10))-1),
DECODE(PARTITION_STOP,
NULL,' ',
PARTITION_STOP)
)||' ', 7, ' '
)||'|' AS "Explain plan"
FROM V$SQL_PLAN
START WITH (ADDRESS = (SELECT SQL_ADDRESS FROM V$SESSION WHERE SID=&SID)
AND HASH_VALUE = (SELECT SQL_HASH_VALUE FROM V$SESSION WHERE SID=&SID)
AND CHILD_NUMBER = 0
AND ID=0 )
CONNECT BY PRIOR ID = PARENT_ID
AND PRIOR ADDRESS = ADDRESS
AND PRIOR HASH_VALUE = HASH_VALUE
AND PRIOR CHILD_NUMBER = CHILD_NUMBER
ORDER BY ID, POSITION)
UNION ALL
SELECT '----------------------------------------------------------------------------------------------------' FROM DUAL;Regards,
Yoann. -
Problem using SQL Loader with ODI
Hi,
I am having problems using SQL Loader with ODI. I am trying to fill an oracle table with data from a txt file. At first I had used "File to SQL" LKM, but due to the size of the source txt file (700MB), I decided to use "File to Oracle (SQLLDR)" LKM.
The error that appears in myFile.txt.log is: "SQL*Loader-101: Invalid argument for username/password"
I think that the problem could be in the definition of the data server (Physical architecutre in topology), because I have left blank Host, user and password.
Is this the problem? What host and user should I use? With "File to SQL" works fine living this blank, but takes to much time.
Thanks in advanceI tried to use your code, but I couldn´t make it work (I don´t know Jython). I think the problem could be with the use of quotes
Here is what I wrote:
import os
retVal = os.system(r'sqlldr control=E:\Public\TXTODI\PROFITA2/Profita2Final.txt.ctl log=E:\Public\TXTODI\PROFITA2/Profita2Final.txt.log userid=MYUSER/myPassword @ mySID')
if retVal == 1 or retVal > 2:
raise 'SQLLDR failed. Please check the for details '
And the error message is:
org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 5, in ?
SQLLDR failed. Please check the for details
at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.h.y(h.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source) -
Problem accessing Sql server Procedure from Crystal with JDBC driver
I have some Crystal reports using SQL Server procedures, most of them are working very well; however, I have 2 that have problems accessing sql server procedures. These reports are working using OLE DB connection without problem, but when I try to relocate the connection to JDBC Crystal generates an error like that the procedure not return records.
The procedure is working with other products including OLE DB connections from crystal.
What can I do?
Thanks in Advance,
JaimeCI am using:
Crystal report 11 - 11.0.0.1282 and Crystal 2008 = 12.0.0.683
SQL Server 2005 - Microsoft SQL Server Management Studio Express 9.00.4035.00
Windows XP
I have discovered that the procedures create and work temporary tables. In other cases when is working ok, the procedures have not working temporary tables.
Thanks,
Jaime Carrillo -
Problem connecting sql developer with a remote database MAc OSX Snow Leopar
Hi everyone, sorry for my poor english but i don 't speak this language.
I'm trying to connect Sql develper to a remote database and it does not work, showing this error: The Network Adapter could not establish the connection.
Before running sql developer i install the oracle instant client and sql plus, i use the same tnsnames.ora file as my windows machine and sqlplus (in snow leopard) connect perfect.
i set the path of my tnsnames in the setup of sql developer but i can't do it work.
Anyone can help me please? thanks a lot.Duplicate thread Problem running Sql developer in Mac OSX Snow Leopard.
Maybe you are looking for
-
How to create a job card and how to add waranty card in sales order
I have one scenario for CS.the scenario is realted to automotive industry. Basically its a trading industry of HCV,MCV,LCV apart from that they will do servicing also. First the customer comes for a service.he is having free services. he will have wa
-
Error while creating Manual Service PO in Extended Classic Scenario
Hi Experts, Extended Classic scenario (SRM 7.0 with ECC 6.0) While Creating Manual Service PO in SRM i am getting the below mentioned error messages. Can any one suggest what could be the problem. Error Msgs: 1. Backend Error:In case of account assi
-
Migrating app from 9.0.5.1 to 10.1.2.0 findAll problem
Hi, we are migrating our J2EE 1.3 applications from OAS 9.0.4 to 10.1.2.0.2. Thus, we've upgraded JDeveloper from 9.0.5.1 to 10.1.2.0.2 version. Now, an EJB 2.0, CMP and CMR, application that worked perfectly with version 9.0.5.1 is showing a very st
-
Advanced Ad-Hoc Query and formulas
Hi experts, I need to track new hire HR data on a report but am struggling to do this without some excel style formulas... Can you use excel style formulas in Ad-hoc query?? E.g. today(). I have run some tests and don't think it is possible... So if
-
UIImageView crashing with many Image Files
I am building an iPhone magazine with 150+ pages the app is randomly crashing as i scroll through the pages. I thought it was the CAAnimation but is clearly the UIImage view... Any ideas what I am doing wrong. -(void)setPage:(int)_p { @try { transiti