ORA-02074 in oracle 8 Worked fine in 7.x
Executing a plsql string from msaccess
via an odbc passthrough query..
for some reason the oracle8 odbc driver is
enforcing a transaction
is there a known work around?????
ORA-02074 cannot string in a distributed transaction
Cause: A commit or rollback was attempted from session other than the parent
of a distributed transaction.
Action: Only commit or roll back from the parent session.
HELP!!... Okay here goes..
I am using an passthrough query to Oracle
It worked in Oracle 7.4,
but is not working in 8i
**This is the error
[Oracle][ODBC][Ora]
ORA-02074: cannot SET SAVEPOINT in a distributed transaction
ORA-06512: at "FuncName", line 1391
ORA-06512: at "FuncName", line 1995
ORA-06512: at "FuncName", line 2016
ORA-06512: at line 1
(#2074)
**This is the PL/SQL
begin call_isrconpick('36719288', 0, 0, 1, 'DPR'); end;
**This is the VB code..
Function CommitOnePick(strtask_id As String, _
intpicked_q As Integer, _
intoverflow As Integer, _
intshort As Integer, _
strperf_by As String)
'On Error GoTo eTrap
Dim strConn As String
Dim qdf As QueryDef
'If MsgBox("Are you sure you want execute the PLSQL statement?", _
vbOKCancel + vbQuestion + vbDefaultButton2) = vbOK Then
DoCmd.Hourglass True
strConn = CurrentDb.TableDefs("MOVE_TABLE_DATA").Connect
Set qdf = CurrentDb.CreateQueryDef("")
qdf.Connect = strConn
qdf.SQL = "begin call_isrconpick('" & _
strtask_id & "', " & _
intpicked_q & ", " & _
intoverflow & ", " & _
intshort & ", '" & _
strperf_by & "'); end;"
Debug.Print qdf.SQL 'sanity check
qdf.ReturnsRecords = False
DoCmd.Hourglass False
qdf.Execute dbSQLPassThrough
DoCmd.Hourglass False
'End If
Exit Function
eTrap:
DoCmd.Hourglass False
MsgBox "An unexpected error occured:" & vbCrLf & vbCrLf & Err & " - " & Error, vbExclamation, "Error"
End Function
null
Similar Messages
-
Ora-01722 invalid number error in oracle 11g working fine in 9i
Problem : I am getting ora-01722 invalid number i below mention code.Some times the procedure runs successfully but sometimes it gives error for the same parameters.The code runs fine in 9i Database.Help needed ASAP.
CODE :
PROCEDURE Get_HQ_for_Manager(p_person_id IN NUMBER
,p_maximum_level IN NUMBER
,io_cursor OUT dynamic_cursor) IS
v_session_id NUMBER;
BEGIN
/* Create the Employee hierarchy */
v_session_id := AMHR_GENIE_APIS.GET_SESSION_ID(p_person_id);
OPEN io_cursor FOR
SELECT decode(t.org_information3, 402, 'India - DVCI HR HQ', ou.NAME) HQ_Name,
t1.org_information2 HQ_Email
FROM hr.hr_organization_information t,
hr_all_organization_units ou,
hr_organization_information t1,
(SELECT *
FROM AMDOCS.AMHR_EMP_HIERARCHY_TMP B
WHERE B.MNG_PERSON_ID = P_PERSON_ID
AND B.SESSION_ID = V_SESSION_ID
AND b.hier_level <= p_maximum_level) hier,
per_all_people_f p_emp,
hr_locations_all l
WHERE t.organization_id = 342
AND t.org_information_context = 'AMHR_COUNTRY_BY_HQ'
AND t.org_information2 + 0 = ou.organization_id
AND t.org_information1 = l.country
AND t.org_information2 = t1.organization_id
AND t1.org_information_context = 'AMHR_HQ_EMAIL_LIST'
AND t1.org_information1 = 'HQ'
AND p_emp.person_id = hier.person_id
AND trunc(SYSDATE) + 0 BETWEEN p_emp.effective_start_date AND
p_emp.effective_end_date
AND p_emp.business_group_id <> 0
AND (hier.ASSIGNMENT_TYPE = 'C' OR hier.ASSIGNMENT_TYPE = 'E')
AND hier.location_id = l.location_id(+)
AND hier.person_id <> p_person_id
UNION
SELECT 'India - ABSI HR HQ' HQ_Name, '[email protected]' HQ_Email
FROM hr.hr_organization_information t,
hr_all_organization_units ou,
(SELECT *
FROM amdocs.AMHR_EMP_HIERARCHY_TMP a
WHERE a.mng_person_id = p_person_id
AND a.session_id = v_session_id
AND a.hier_level <= p_maximum_level) hier,
per_all_people_f p_emp,
hr_locations_all l
WHERE t.organization_id = 342
AND t.org_information_context = 'AMHR_COUNTRY_BY_HQ'
AND t.org_information2 = ou.organization_id
AND t.org_information1 = l.country
AND p_emp.person_id = hier.person_id
AND trunc(SYSDATE) + 0 BETWEEN p_emp.effective_start_date AND
p_emp.effective_end_date
AND p_emp.business_group_id <> 0
AND (hier.ASSIGNMENT_TYPE = 'C' OR hier.ASSIGNMENT_TYPE = 'E')
AND hier.location_id = l.location_id(+)
AND t.org_information3 = 402
AND hier.person_id <> p_person_id;
END Get_HQ_for_Manager;Hi There,
I'm having trouble seeing anything spatial in your procedure. Since this forum is for "Discussions related to Oracle Spatial, Locator, GeoRaster, Topology, Network Data Model, GeoCoder, Router, Spatial Web Services and 3D Data Model. Recommended reading: Pro Oracle Spatial" you might have better luck asking your question on one of the other forums:
http://forums.oracle.com/forums/category.jspa?categoryID=18
A line number for the error would help too.
Best of luck,
Matt -
Why does this snippet produce ORA-01002 in 10g, but works fine in 9i.
While migrating from 9i to 10g, we found that one of our processes failed with ORA-01002: fetch out of sequence. Debugging produced the following example:
DECLARE
CURSOR A IS SELECT Dummy FROM Dual FOR UPDATE;
BEGIN
FOR B IN A LOOP COMMIT; END LOOP;
END;This code works in 9i, but produces an EXCEPTION in 10g:
SQL> SELECT Banner FROM V$Version;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
PL/SQL Release 9.2.0.8.0 - Production
CORE 9.2.0.8.0 Production
TNS for Linux: Version 9.2.0.8.0 - Production
NLSRTL Version 9.2.0.8.0 - Production
SQL> DECLARE
2 CURSOR A IS SELECT Dummy FROM Dual FOR UPDATE;
3 BEGIN
4 FOR B IN A LOOP COMMIT; END LOOP;
5 END;
6 /
PL/SQL procedure successfully completed.
SQL> SELECT Banner FROM V$Version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> DECLARE
2 CURSOR A IS SELECT Dummy FROM Dual FOR UPDATE;
3 BEGIN
4 FOR B IN A LOOP COMMIT; END LOOP;
5 END;
6 /
DECLARE
ERROR at line 1:
ORA-01002: fetch out of sequence
ORA-06512: at line 4The documentation on the error explains this case in both 9i and more explicitly 10g. Should this have produced the EXCEPTION in 9i as well? Or, is there something else about 10g?e.g. a FOR row IN cursor LOOP is now implicit using a bulk fetch operation (100 rows or so).This was also my first guess, but said optimization does not take place when the cursor is defined FOR UPDATE:
SQL> exec dbms_application_info.set_client_info(0)
PL/SQL procedure successfully completed.
SQL> declare
cursor a is select last_name, set_client_info(rownum) from employees;
begin
for b in a loop
exit;
end loop;
end;
PL/SQL procedure successfully completed.
SQL> select sys_context('userenv','client_info') from dual
SYS_CONTEXT('USERENV','CLIENT_INFO')
100
1 row selected.
Now with FOR UPDATE:
SQL> exec dbms_application_info.set_client_info(0)
PL/SQL procedure successfully completed.
SQL> declare
cursor a is select last_name, set_client_info(rownum) from employees for update;
begin
for b in a loop
exit;
end loop;
end;
PL/SQL procedure successfully completed.
SQL> select sys_context('userenv','client_info') from dual
SYS_CONTEXT('USERENV','CLIENT_INFO')
1
1 row selected. -
ORA-12154 as oracle user, whit the root account it works fine
Hello there,
I've a problem with a client installation if I try to connect to the database. I've the following configuration:
1. Database: Running on a Ubuntu Jeos VM, Oracle 11g (Release 11.1.0.6.0 64 bit)
2. Client: Running on a CentOS 5.2 VM, Oracle Client 10g Linux 32bit
I've configured the tnsnames.ora and stored it in the $ORACLE_HOME/network/admin directory. The content of the tnsnames.ora file is the following:
ORCL64=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.12.128)(PORT=1521)))(CONNECT_DATA=(SID=orcl)))
If I try to connect to the database as the oracle user with the following command sqlplus SYS@ORCL64 AS SYSDBA, I'll get the ORA-12154 TNS:could not resolve the connect identifier specified error message. If I try the same as the root user it works fine and I can establish the connection. The same result I've got if I try the command tnsping ORCL64. As the root user the tnsnames adapter can resolve the alias, as the oracle user this is'nt possible and I'll get the error message: TNS-03505: Failed to resolve name. In both he uses the paramter file /u01/app/oracle/network/admin/sqlnet.ora. The content of the sqlnet.ora file is the following:
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT).
Have you any suggestions how can I resolve this problem to get a connection with the oracle user.
Thank you in advance
SvenHello,
thanks for your answers. On the CentOS maschine, where the client is installed, there are no directory's $ORACLE_HOME/bin/oracle and $ORACLE_HOME/bin/lsnrctl. The output from the $ORACLE_HOME/network/admin/*ora is:
-rw-r----- 1 oracle oinstall 171 28. Apr 21:25 /u01/app/oracle/network/admin/sqlnet.ora
wx---- 1 root root 118 5. Mai 11:33 /u01/app/oracle/network/admin/tnsnames.ora
The post-install script $ORACLE_HOME/root.sh I've started.
On the Ubuntu Jeos VM, where the database is installed, the output from the 3 directories are:
ls -l $ORACLE_HOME/bin/oracle
-rwsr-s--x 1 oracle oinstall 188459338 2009-02-23 09:21 /u01/app/oracle/product/11.1.0/db_1/bin/oracle
ls -l $ORACLE_HOME/bin/lsnrctl
-rwxr-x--x 1 oracle oinstall 143599 2009-02-23 09:48 /u01/app/oracle/product/11.1.0/db_1/bin/lsnrctl
ls -l $ORACLE_HOME/network/admin/*ora
-rw-rw-r-- 1 oracle oinstall 542 2009-03-25 19:08 /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
-rw-rw-r-- 1 oracle oinstall 191 2009-02-23 09:57 /u01/app/oracle/product/11.1.0/db_1/network/admin/sqlnet.ora
-rw-rw-r-- 1 oracle oinstall 324 2009-03-25 19:12 /u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
Kind regards
Sven -
Hi,
on a windows 2008 machine that has the Oracle instant client 11_1 installed (11.01.00.06) i am calling SQLDriverConnect in the following way:
std::string str = "Driver={Oracle in instantclient11_1};Dbq=//10.10.101.66:1521/orcl;;Uid=myUser;pwd=a;b";
odbcRc = SQLDriverConnect(hdbc, NULL, (SQLTCHAR*)str.c_str(), str.size(), (SQLTCHAR*)szConnStrOut, 1024, &cbConnStrOut, SQL_DRIVER_NOPROMPT)) == SQL_ERROR);
as long as the password contains no special chars (namely semicolon) it works fine. but when I try to use special chars in the password It stops working, with an invalid username/password error.
State: 28000 Native error: 1017 Message: [Oracle][ODBC][Ora]ORA-01017: invalid username/password; logon denied
i tried different variations of adding " (\") over the password, over the entire pwd=a;b or braces { but nothing seems to work.
the thing is that using ODBC works! what I did was:
open ODBC, go to System DSN tab, add "Oracle in instantclient11_1", then fill the following information:
Data source name: Anything
TNS Service Name: //10.10.101.66:1521/orcl
User ID: myUser
then i press test connection, enter the password "a;b"
and it works!
I cannot figure out what's my problem.
Thanks,
Roy.I've created your test table in my Oracle database using this extra character and I'm able to describe it properly.
SQL> desc test;
Name Null? Type
ATTIVITÀ VARCHAR2(40)
My character set being used is:
SQL> select * from v$nls_parameters;
NLS_CHARACTERSET
WE8ISO8859P15
NLS_NCHAR_CHARACTERSET
AL16UTF16
NLS_LENGTH_SEMANTICS
BYTE
So as long as it doesn't work for you in your native Oracle database I don't think it would work with DG4ODBC. So yes, it would be best to log a service request so that the Oracle database support can check out the NLS issue.
Edited by: kgronau on Sep 28, 2011 9:21 AM
To be complete here the describe of the MySQL table native and using DG4ODBC:
mysql> create table TEST (attività Varchar(40));
Query OK, 0 rows affected (0.00 sec)
mysql> desc TEST;
---------------------------------------------------+
| Field | Type | Null | Key | Default | Extra |
---------------------------------------------------+
| attività | varchar(40) | YES | | NULL | |
---------------------------------------------------+
1 row in set (0.00 sec)
SQL*Plus: Release 11.2.0.2.0 Production on Wed Sep 28 09:20:17 2011
SQL> desc "gateway"."TEST"@MYSQL_DG4ODBC_EMGTW_1122_DB;
Name Null? Type
attività VARCHAR2(80)
So in general it should work. -
Query working fine in 9i but throwing an error in Oracle 10g
Hi All,
I am having a query which contains large number of When clauses inside a case statement.
The Same SQL is working fine in 9i, but not working in 10G.
If we try to remove one of the When clause in the query, its working fine else it is giving the error ORA-00939 Too many arguments for functions.
Can any one tell me the solution for this and what is the maximum number of when clauses allowed inside case statemen in oracle 10g.
Thanks in advance
Regards
Karthikit should not have worked in 9iR2... it is correct according to the doc to return an error message when using more than 255 expressions...
SQL> select version from v$instance;
VERSION
9.2.0.7.0
SQL> select case 1
2 when 2 then 3
3 when 4 then 5
4 when 6 then 7
5 when 8 then 9
6 when 10 then 11
7 when 12 then 13
8 when 14 then 15
9 when 16 then 17
10 when 18 then 19
11 when 20 then 21
12 when 22 then 23
13 when 24 then 25
14 when 26 then 27
15 when 28 then 29
16 when 30 then 31
17 when 32 then 33
18 when 34 then 35
19 when 36 then 37
20 when 38 then 39
21 when 40 then 41
22 when 42 then 43
23 when 44 then 45
24 when 46 then 47
25 when 48 then 49
26 when 50 then 51
27 when 52 then 53
28 when 54 then 55
29 when 56 then 57
30 when 58 then 59
31 when 60 then 61
32 when 62 then 63
33 when 64 then 65
34 when 66 then 67
35 when 68 then 69
36 when 70 then 71
37 when 72 then 73
38 when 74 then 75
39 when 76 then 77
40 when 78 then 79
41 when 80 then 81
42 when 82 then 83
43 when 84 then 85
44 when 86 then 87
45 when 88 then 89
46 when 90 then 91
47 when 92 then 93
48 when 94 then 95
49 when 96 then 97
50 when 98 then 99
51 when 100 then 101
52 when 102 then 103
53 when 104 then 105
54 when 106 then 107
55 when 108 then 109
56 when 110 then 111
57 when 112 then 113
58 when 114 then 115
59 when 116 then 117
60 when 118 then 119
61 when 120 then 121
62 when 122 then 123
63 when 124 then 125
64 when 126 then 127
65 when 128 then 129
66 when 130 then 131
67 when 132 then 133
68 when 134 then 135
69 when 136 then 137
70 when 138 then 139
71 when 140 then 141
72 when 142 then 143
73 when 144 then 145
74 when 146 then 147
75 when 148 then 149
76 when 150 then 151
77 when 152 then 153
78 when 154 then 155
79 when 156 then 157
80 when 158 then 159
81 when 160 then 161
82 when 162 then 163
83 when 164 then 165
84 when 166 then 167
85 when 168 then 169
86 when 170 then 171
87 when 172 then 173
88 when 174 then 175
89 when 176 then 177
90 when 178 then 179
91 when 180 then 181
92 when 182 then 183
93 when 184 then 185
94 when 186 then 187
95 when 188 then 189
96 when 190 then 191
97 when 192 then 193
98 when 194 then 195
99 when 196 then 197
100 when 198 then 199
101 when 200 then 201
102 when 202 then 203
103 when 204 then 205
104 when 206 then 207
105 when 208 then 209
106 when 210 then 211
107 when 212 then 213
108 when 214 then 215
109 when 216 then 217
110 when 218 then 219
111 when 220 then 221
112 when 222 then 223
113 when 224 then 225
114 when 226 then 227
115 when 228 then 229
116 when 230 then 231
117 when 232 then 233
118 when 234 then 235
119 when 236 then 237
120 when 238 then 239
121 when 240 then 241
122 when 242 then 243
123 when 244 then 245
124 when 246 then 247
125 when 248 then 249
126 when 250 then 251
127 when 252 then 253
128 when 254 then 255
129 when 256 then 257
130 end x from dual;
X
SQL> select version from v$instance;
VERSION
10.2.0.2.0
SQL> select case 1
2 when 2 then 3
3 when 4 then 5
4 when 6 then 7
5 when 8 then 9
6 when 10 then 11
7 when 12 then 13
8 when 14 then 15
9 when 16 then 17
10 when 18 then 19
11 when 20 then 21
12 when 22 then 23
13 when 24 then 25
14 when 26 then 27
15 when 28 then 29
16 when 30 then 31
17 when 32 then 33
18 when 34 then 35
19 when 36 then 37
20 when 38 then 39
21 when 40 then 41
22 when 42 then 43
23 when 44 then 45
24 when 46 then 47
25 when 48 then 49
26 when 50 then 51
27 when 52 then 53
28 when 54 then 55
29 when 56 then 57
30 when 58 then 59
31 when 60 then 61
32 when 62 then 63
33 when 64 then 65
34 when 66 then 67
35 when 68 then 69
36 when 70 then 71
37 when 72 then 73
38 when 74 then 75
39 when 76 then 77
40 when 78 then 79
41 when 80 then 81
42 when 82 then 83
43 when 84 then 85
44 when 86 then 87
45 when 88 then 89
46 when 90 then 91
47 when 92 then 93
48 when 94 then 95
49 when 96 then 97
50 when 98 then 99
51 when 100 then 101
52 when 102 then 103
53 when 104 then 105
54 when 106 then 107
55 when 108 then 109
56 when 110 then 111
57 when 112 then 113
58 when 114 then 115
59 when 116 then 117
60 when 118 then 119
61 when 120 then 121
62 when 122 then 123
63 when 124 then 125
64 when 126 then 127
65 when 128 then 129
66 when 130 then 131
67 when 132 then 133
68 when 134 then 135
69 when 136 then 137
70 when 138 then 139
71 when 140 then 141
72 when 142 then 143
73 when 144 then 145
74 when 146 then 147
75 when 148 then 149
76 when 150 then 151
77 when 152 then 153
78 when 154 then 155
79 when 156 then 157
80 when 158 then 159
81 when 160 then 161
82 when 162 then 163
83 when 164 then 165
84 when 166 then 167
85 when 168 then 169
86 when 170 then 171
87 when 172 then 173
88 when 174 then 175
89 when 176 then 177
90 when 178 then 179
91 when 180 then 181
92 when 182 then 183
93 when 184 then 185
94 when 186 then 187
95 when 188 then 189
96 when 190 then 191
97 when 192 then 193
98 when 194 then 195
99 when 196 then 197
100 when 198 then 199
101 when 200 then 201
102 when 202 then 203
103 when 204 then 205
104 when 206 then 207
105 when 208 then 209
106 when 210 then 211
107 when 212 then 213
108 when 214 then 215
109 when 216 then 217
110 when 218 then 219
111 when 220 then 221
112 when 222 then 223
113 when 224 then 225
114 when 226 then 227
115 when 228 then 229
116 when 230 then 231
117 when 232 then 233
118 when 234 then 235
119 when 236 then 237
120 when 238 then 239
121 when 240 then 241
122 when 242 then 243
123 when 244 then 245
124 when 246 then 247
125 when 248 then 249
126 when 250 then 251
127 when 252 then 253
128 when 254 then 255
129 when 256 then 257
130 end x from dual;
when 16 then 17
ERROR at line 9:
ORA-00939: too many arguments for function
SQL> del 129
SQL> /
X
---------- -
Poduct query working fine on MS SQL & not on ORACLE
Hi All,
Till this moment I always feel oracle is more powerful DB tool, but recently I fail to run some queries on oracle 10g & same working fine on MS SQL2005. Thanks in advance
--On oracle 10g
select ((EXP(SUM(LN(id))) - 1) * 100) from twrr
--Answer
ORA-01426: numeric overflow
--MS SQL 2005
select(EXP (SUM (log (id))) - 1) * 100 from twrr
--Answer
5.085882
--Table
create table twrr(id numeric(18,2))
--Data
INSERT INTO twrr VALUES(8.61);
INSERT INTO twrr VALUES(35.64);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(37.40);
INSERT INTO twrr VALUES(36.62);
INSERT INTO twrr VALUES(36.90);
INSERT INTO twrr VALUES(42.87);
INSERT INTO twrr VALUES(19.40);
INSERT INTO twrr VALUES(8.40);
INSERT INTO twrr VALUES(8.64);
INSERT INTO twrr VALUES(8.64);
INSERT INTO twrr VALUES(8.57);
INSERT INTO twrr VALUES(8.62);
INSERT INTO twrr VALUES(37.15);
INSERT INTO twrr VALUES(8.67);
INSERT INTO twrr VALUES(8.67);
INSERT INTO twrr VALUES(37.18);
INSERT INTO twrr VALUES(8.62);
INSERT INTO twrr VALUES(8.60);
INSERT INTO twrr VALUES(8.62);
INSERT INTO twrr VALUES(8.61);
INSERT INTO twrr VALUES(8.59);
INSERT INTO twrr VALUES(8.63);
INSERT INTO twrr VALUES(8.62);
INSERT INTO twrr VALUES(37.22);
INSERT INTO twrr VALUES(8.62);
INSERT INTO twrr VALUES(8.63);
INSERT INTO twrr VALUES(8.66);
INSERT INTO twrr VALUES(8.64);
INSERT INTO twrr VALUES(43.42);
INSERT INTO twrr VALUES(8.68);
INSERT INTO twrr VALUES(8.64);
INSERT INTO twrr VALUES(8.64);
INSERT INTO twrr VALUES(8.59);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(8.17);
INSERT INTO twrr VALUES(37.61);
INSERT INTO twrr VALUES(8.32);
INSERT INTO twrr VALUES(8.27);
INSERT INTO twrr VALUES(8.25);
INSERT INTO twrr VALUES(8.25);
INSERT INTO twrr VALUES(36.90);
INSERT INTO twrr VALUES(34.89);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(37.25);
INSERT INTO twrr VALUES(37.25);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(35.25);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(37.25);
INSERT INTO twrr VALUES(37.25);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(35.24);
INSERT INTO twrr VALUES(35.24);
INSERT INTO twrr VALUES(35.24);
INSERT INTO twrr VALUES(8.37);
INSERT INTO twrr VALUES(8.11);
INSERT INTO twrr VALUES(8.11);
INSERT INTO twrr VALUES(8.11);
INSERT INTO twrr VALUES(42.81);
INSERT INTO twrr VALUES(7.72);
INSERT INTO twrr VALUES(7.72);
INSERT INTO twrr VALUES(42.81);
INSERT INTO twrr VALUES(43.02);
INSERT INTO twrr VALUES(8.08);
INSERT INTO twrr VALUES(19.56);
INSERT INTO twrr VALUES(28.00);
INSERT INTO twrr VALUES(18.55);
INSERT INTO twrr VALUES(18.55);
INSERT INTO twrr VALUES(18.49);
INSERT INTO twrr VALUES(18.60);
INSERT INTO twrr VALUES(8.16);
INSERT INTO twrr VALUES(42.96);
INSERT INTO twrr VALUES(17.89);
INSERT INTO twrr VALUES(8.20);
INSERT INTO twrr VALUES(19.14);
INSERT INTO twrr VALUES(19.14);
INSERT INTO twrr VALUES(19.13);
INSERT INTO twrr VALUES(8.05);
INSERT INTO twrr VALUES(41.64);
INSERT INTO twrr VALUES(42.93);
INSERT INTO twrr VALUES(33.84);
INSERT INTO twrr VALUES(19.87);
INSERT INTO twrr VALUES(17.96);
INSERT INTO twrr VALUES(40.95);
INSERT INTO twrr VALUES(40.57);
INSERT INTO twrr VALUES(40.22);
INSERT INTO twrr VALUES(39.97);
INSERT INTO twrr VALUES(40.05);
INSERT INTO twrr VALUES(40.05);
INSERT INTO twrr VALUES(8.33);
INSERT INTO twrr VALUES(36.67);
INSERT INTO twrr VALUES(17.43);
INSERT INTO twrr VALUES(17.42);
INSERT INTO twrr VALUES(42.51);
INSERT INTO twrr VALUES(17.49);
INSERT INTO twrr VALUES(8.27);
INSERT INTO twrr VALUES(42.78);
INSERT INTO twrr VALUES(17.56);
INSERT INTO twrr VALUES(17.56);
INSERT INTO twrr VALUES(42.61);
INSERT INTO twrr VALUES(8.19);
INSERT INTO twrr VALUES(17.67);
INSERT INTO twrr VALUES(43.61);
INSERT INTO twrr VALUES(7.67);
INSERT INTO twrr VALUES(7.72);
INSERT INTO twrr VALUES(19.10);
INSERT INTO twrr VALUES(8.12);
INSERT INTO twrr VALUES(8.12);
INSERT INTO twrr VALUES(35.77);
INSERT INTO twrr VALUES(42.76);
INSERT INTO twrr VALUES(8.13);
INSERT INTO twrr VALUES(8.11);
INSERT INTO twrr VALUES(37.03);
INSERT INTO twrr VALUES(37.03);
INSERT INTO twrr VALUES(37.03);
INSERT INTO twrr VALUES(35.48);
INSERT INTO twrr VALUES(36.86);
INSERT INTO twrr VALUES(42.67);
INSERT INTO twrr VALUES(8.61);
INSERT INTO twrr VALUES(37.18);
INSERT INTO twrr VALUES(37.18);
INSERT INTO twrr VALUES(41.17);
INSERT INTO twrr VALUES(8.61);
INSERT INTO twrr VALUES(8.61);
INSERT INTO twrr VALUES(8.95);
INSERT INTO twrr VALUES(8.19);
INSERT INTO twrr VALUES(35.43);
INSERT INTO twrr VALUES(8.21);
INSERT INTO twrr VALUES(35.02);
INSERT INTO twrr VALUES(8.24);
INSERT INTO twrr VALUES(42.82);
INSERT INTO twrr VALUES(27.06);
INSERT INTO twrr VALUES(8.13);
INSERT INTO twrr VALUES(8.21);
INSERT INTO twrr VALUES(8.19);
INSERT INTO twrr VALUES(35.31);
INSERT INTO twrr VALUES(8.59);
INSERT INTO twrr VALUES(36.67);
INSERT INTO twrr VALUES(8.59);
INSERT INTO twrr VALUES(8.59);
INSERT INTO twrr VALUES(42.46);
INSERT INTO twrr VALUES(42.04);
INSERT INTO twrr VALUES(42.04);
INSERT INTO twrr VALUES(8.75);
INSERT INTO twrr VALUES(8.75);
INSERT INTO twrr VALUES(41.61);
INSERT INTO twrr VALUES(8.75);
INSERT INTO twrr VALUES(8.78);
INSERT INTO twrr VALUES(8.86);
INSERT INTO twrr VALUES(37.70);
INSERT INTO twrr VALUES(8.78);
INSERT INTO twrr VALUES(37.70);
INSERT INTO twrr VALUES(8.80);
INSERT INTO twrr VALUES(8.77);
INSERT INTO twrr VALUES(37.54);
INSERT INTO twrr VALUES(37.48);
INSERT INTO twrr VALUES(8.61);
INSERT INTO twrr VALUES(8.61);
INSERT INTO twrr VALUES(41.17);
INSERT INTO twrr VALUES(8.61);I suppose this thread should've gone in {forum:id=75} instead.
868119 wrote:
Till this moment I always feel oracle is more powerful DB tool, but recently I fail to run some queries on oracle 10g & same working fine on MS SQL2005. So you concluded that's a flaw in the "tool"?
--Table
create table twrr(id numeric(18,2))And what's the actual resulting data types in respective rdbms?
I think the key here is not reading the docs (for data types and functions) - e.g. from BOL:
+"Trigonometric and other functions, including EXP, LOG, LOG10, SQUARE, and SQRT, cast their input values to float and return a float value. "+
In Oracle I believe this means you should have used BINARY_DOUBLE datatype. Try it and come back. -
Select query hangs on Oracle 9i but works fine in Oracle 8i
Hi Guys,
For a recap of what happened:
Migrated from Oracle 8i to 9i for a customer, all queries and statements are working fine, except for this particular query. If i run the same query on 8i it works like a charm.
In 9i, if i remove even one field from the query, it works else it just hangs.
Any idea, any one???
**Added 2:09PM: When i removed some ltrim and rtrim that i believe not necessary, the query works fine, is there any field length limitation in Oracle 9i???
Below is the query:
set pagesize 100;
set linesize 1024;
set heading off;
set echo off;
spool scb_xfer_hdr_npsx;
select ltrim(rtrim(to_char(hdr_srl_no,'99'))) || ';' ||
'P' || ';' || rtrim(ltrim(payment_type))|| ';'|| ';' ||
ltrim(rtrim(our_ref_no))|| ';'|| 'MY;KUL;' ||
rtrim(ltrim(debit_account_no))||';'||
rtrim(ltrim(to_char(scb_batch_date,'YYYY/MM/DD'))) || ';'|| ';' ||
rtrim(ltrim(payee_name_1))|| ';'|| ';' ||
rtrim(ltrim(address_1))|| ';'||
rtrim(ltrim(address_2))|| ';'||
rtrim(ltrim(address_3))|| ';'|| ';' ||
rtrim(ltrim(payee_name_11))|| ';' ||
rtrim(ltrim(address_11))|| ';'||
rtrim(ltrim(address_21))|| ';'||
rtrim(ltrim(address_31))|| ';'|| ';' ||
rtrim(ltrim(payee_bank_code)) || ';' || ';' ||
rtrim(ltrim(payee_account_no)) || ';' ||
rtrim(ltrim(our_ref_no2)) || ';' || ';' ||
rtrim(ltrim(our_ref_no2)) || ';' || ';' || ';' || ';' ||
rtrim(ltrim(payment_currency))|| ';'||
rtrim(ltrim(to_char(payment_amount,'9999999999.99')))|| ';'||
'C;P;;' || rtrim(ltrim(payee_bank_name))|| ';' ||
'KL;;' ||
rtrim(ltrim(delivery_method)) || ';' ||
rtrim(ltrim(delivery_by)) || ';' ||
rtrim(ltrim(counter_pickup_location))
from scb_xfer_hdr_npsx
order by hdr_srl_no;
select distinct 'T;' || ltrim(rtrim(to_char(total_payments))) || ';' ||
ltrim(rtrim(to_char(total_pay_amount,'9999999999.99')))
from scb_xfer_hdr_npsx;
spool off;
spool scb_xfer_dtl_npsx;
select ltrim(rtrim(to_char(srl_no,'99'))) || ';' || 'I' || ';' ||
ltrim(rtrim(doc_no)) || ';' || ltrim(rtrim(to_char(doc_date,'yyyy/mm/dd'))) || ';' ||
ltrim(rtrim(doc_description)) || ';' ||
ltrim(rtrim(to_char(doc_amount,'9999999999.99')))
from scb_xfer_dtl_npsx
order by srl_no;
spool off;
set echo on;
exit;
Message was edited by:
LogeshHi,
are you still on a 32bit kernel on AIX?
How are the Form4.5 connected, are they on the same box, or are they using the forms GUI?
What about the statistics, how do you collect them? Is the database set to the COST based optimizer?
Do you use dbms_utility.analyze_schema, or this:
exec dbms_stats.gather_schema_stats( -
ownname => '$OWNER', -
estimate_percent => 10, -
granularity => 'ALL', -
method_opt => 'FOR ALL COLUMNS SIZE 75', -
degree => NULL , -
options => 'GATHER $GATH', -
cascade => TRUE -
What does it mean the SQL hangs? Can you cancel the query? Do you have to kill the session? Do you use any diagnostic tools like TOAD to trace the session, see what it is doing? Usually if this is a performance/tuning issue, you will see the session is not dead, but you will see advancing reads.
Regards,
Richard. -
We are using Oracle ERP in our company which is a web based ERP system. I am using firefox to work in ERP for convinieince pf working and using internet at the same time. This requires a plugin provided by oracle oajinit.exe to be installed in Plugins it is a JAVA plugin which opens the ERP Screens. This works fine in versions prior to 3.6 version of firefox. However, after upgrading to 3.6 version the forms do not open and firefox crashes. Due to this i am not able to upgrade to the latest version else i'll have to operate the ERP in internet explorer and using firefox for browsing which i do not want. The plugin used for the ERP is "* JInitiator 1.3.1.18 for Netscape Navigator (DLL Helper)"
Firefox 3.6 needs the Java Second Generation Plugin which comes with newer versions than 1.6.0_03 - update Java, the latest version is 1.6.0_22
-
ColdFusion 4.5 & Oracle 8.1.6 - Both work fine but not together!
Hi everyone,
We installed Oracle 8.1.6 and ColdFusion 4.5 on RedHat 6.2. Both individually work fine, but we cannot get the combination to work.
SqlPlus gets a connection to a remote server, so the tnslistener configuration works. We tried both the ODBC and native drivers, but the connections never verify O.K.
The only thing we worry about is that the script that CF provides for relinking of the libclntsh.so stops with an error:
(...)/8.1.6/lib naldflgds not found
ld: cannot find -lsql
We already tried the suggestion of Borren Jeng (run gennaflg from $ORACLE_HOME/bin). Regretfully this gennaflg also doesn't exist, so this didn't work for us...
We really got stuck here, so any suggestions are greatly appreciated!
- Richard.The naldflgds is only exist in V8.0.5.
Here is what yo can try:
you only need to do the folling things.
1. copy $ORACLE_HOME/lib/libclntsh.so to CFUSN/lib
2. you need to chmod for your $ORACLE_HOME directory to allow the Coldfusion owner execute the file under $ORACLE_HOME. I don't remeber what the exaclty number need for chmod on $ORACLE_HOME, but you can try
"chmod -R 8.1.6" (if you $ORACLE_HOME=/home/oracle/app/product/8.1.6 you should cd to =/home/oracle/app/product)This should work. but this cause another seurity issue.
The only thing we worry about is that the script that CF provides for relinking of the libclntsh.so stops with an error:
(...)/8.1.6/lib naldflgds not found
ld: cannot find -lsql
We already tried the suggestion of Borren Jeng (run gennaflg from $ORACLE_HOME/bin). Regretfully this gennaflg also doesn't exist, so this didn't work for us...
We really got stuck here, so any suggestions are greatly appreciated!
- Richard.
Originally posted by Richard ([email protected]):
Hi everyone,
We installed Oracle 8.1.6 and ColdFusion 4.5 on RedHat 6.2. Both individually work fine, but we cannot get the combination to work.
SqlPlus gets a connection to a remote server, so the tnslistener configuration works. We tried both the ODBC and native drivers, but the connections never verify O.K.
null -
Ora-3113 when running sql in sqlplus mts. dedicated works fine
when i try to execute a simple query (return 1 row), from sqlplus (in the server database) by shared connection, i recive ora-3113. by dedicated conection it works fine. environment datas : server side (windows 2003 server; 10.2.0.1).
part of my trace file :
nsprecv: normal exit
nsrdr: got NSPTDA packet
nsrdr: NSPTDA flags: 0x40
nsrdr: normal exit
nsdo: entry
nsdo: cid=0, opcode=85, bl=2001, what=0, uflgs=0x0, cflgs=0x1
nsdo: nsctx: state=6, flg=0x620d, mvd=0
nsdo: gtn=127, gtc=127, ptn=10, ptc=2011
nserror: entry
nsdo: error exit
nsdo: nsctxrnk=0
nsdo: error exit
nioqer: entry
nioqer: incoming err = 12151
nioqce: entry
nioqce: exit
nioqer: returning err = 3113
nioqer: exit
nioqrc: exit
nioqbr: entry
nioqbr: state = normal (0)
nioqsm: entry
nioqsm: Sending break packet (1)...
nsdo: entry
nsdo: cid=0, opcode=67, bl=1, what=17, uflgs=0x100, cflgs=0x3
nsdo: rank=64, nsctxrnk=0
nsdo: nsctx: state=3, flg=0x420d, mvd=0
nsdo: nsctxrnk=0
nsdo: error exit
nioqsm: send-break: failed to send break...
nioqper: error from send-marker
nioqper: nr err code: 0
nioqper: ns main err code: 12583
nioqper: ns (2) err code: 0
nioqper: nt main err code: 0
nioqper: nt (2) err code: 0
nioqper: nt OS err code: 0
nioqsm: exit
nioqer: entry
nioqer: incoming err = 12152
nioqce: entry
nioqce: exit
nioqer: returning err = 3113
nioqer: exit
nioqbr: returning 3113
nioqbr: exit
nioqds: entry
nioqds: disconnecting...
thanksThread continued at -->
ora-3113 when running sql in sqlplus mts. dedicated works fine -
ORA-02074 when calling proc from VB
Anyone have any idea why a stored procedure that sets a savepoint will fail with
[Oracle][ODBC][Ora]ORA-02074: cannot ROLLBACK in a distributed transaction
ORA-02074: cannot SET SAVEPOINT in a distributed transaction
ORA-06512: at "PIPS_ADMIN.PKG_ACAS_COMMON", line 1098
ORA-06512: at line 1
when called from Visual Basic via an ADO connection through ODBC BUT
will succeed when called from SQL*Plus or TOAD or other tool.
Any ideas appreciated.
MikeThe change was only made to a local variable in a function that was called from the original function that got the parameters from the java client.
I changed it from localtimestamp to systimestamp and it works fine.
Do i have to make any settings about the time zone in the jdbc thin client ? -
[b]Java Stored Procedure generating ora-932 in Oracle 9i [/b]
Hi ,
I have written a Java Stored procedure. And I have written a wrapper function as bellow
FUNCTION "GENERATE_AC_EXCEL_REPORT_FN"
( refCursorCall VARCHAR2, fromDate Date, ToDate Date,
nsn VARCHAR2, period varchar2, site VARCHAR2,
vendor VARCHAR2, spotbuyType VARCHAR2, dataType, VARCHAR2 )
return number
as LANGUAGE java
NAME 'accountingExcelReports.excelPrinter( java.lang.String, java.sql.Date, java.sql.Date, java.lang.String,java.lang.String , java.lang.String,
java.lang.String, java.lang.String , java.lang.String) return int';
This function returns 1000 upon successful execution.
This used to execute fine in Oracle 8.1.7.
We installed Oracle 9i recently.
Server version is 9.2.0.2.1.
Jserver version is 9.2.0.2.0 .
Now The function call works fine for the first time. And When execute it for sencond time in the same Session,
The program is erring out saying inconsistent data typpes.
This is happening during passing parameters.
SQL> select
2 generate_ac_EXCEL_report_fn('Period', to_date('7-1-2002','MM-DD-YYYY'),
3 to_date('7-31-2002','MM-DD-YYYY'), NULL,
4 NULL, NULL, NULL, 'ALL' ,'SPOTBUY') from dual;
GENERATE_AC_EXCEL_REPORT_FN('PERIOD',TO_DATE('7-1-2002','MM-DD-YYYY'),TO_DATE('7-31-2002','MM-DD-YYY
1000
SQL> select
2 generate_ac_EXCEL_report_fn('Period', to_date('7-1-2002','MM-DD-YYYY'),
3 to_date('7-31-2002','MM-DD-YYYY'), NULL,
4 NULL, NULL, NULL, 'ALL' ,'SPOTBUY') from dual;
select
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected IN Conversion failed
And upon further testing, i noticed this happens when the dates are passed. If date parameters are nulled out, Then the program executes perfectly any number of times.
The same program worked fine in Oracle 8.1.6
Any ideas?
Please help.
Thanks,
SrinivasHi Srinivas,
you shouldn't be calling conn.close() and its not needed when using Server Side Internal driver. If you are calling conn.close, then .....
extract from JDBC user guide
If you do call the close() method, be aware of the following:
All connection instances obtained through the defaultConnection() method, which actually all reference the same connection object, will be closed and
unavailable for further use, with state and resource cleanup as appropriate. Executing defaultConnection() afterward would result in a new connection
object.
Even though the connection object is closed, the implicit connection to the database will not be closed.
http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/advanc.htm#1001042
Elango. -
Text Index works fine consistently with Table, but not on underlying View
Hi,
We are facing weird issue relating to Oracle Text Indexes. Search using Oracle Text Index
works fine on a Table, but when running query on View it gives sometimes (not consistently)
ORA-20000: Oracle Text error:
DRG-10849: catsearch does not support functional invocation
DRG-10599: column is not indexed
Sometimes it works.
All of the below steps are run using User IR2OWNER:
STEP 1: Table CPF_CUSTOMER created as follows (3 Non Text Indexes defined at time of creation )
**Please note no Public Synonym is created for this Table**
** There is already another Table by same name CPF_CUSTOMER under different Owner (CDROWNER)
and that Table has Public Synonym CPF_CUSTOMER created. Other Table CPF_CUSTOMER does not
have any Views **
create table CPF_CUSTOMER
CPF_CUSTOMER_UUID NUMBER(20) not null,
SAP_ID VARCHAR2(10 CHAR) not null,
IRIS2_ID VARCHAR2(7 CHAR),
NAME VARCHAR2(70 CHAR) not null,
DRAFT_IND NUMBER(1) not null,
ACTIVE_IND NUMBER(1) not null,
REPLACED_BY_CUST VARCHAR2(10 CHAR),
CRE_DT_GMT DATE,
CRE_DT_LOC DATE,
TIME_ZONE VARCHAR2(3 CHAR),
CRE_USR VARCHAR2(8 CHAR),
CHG_DT_GMT DATE,
CHG_DT_LOC DATE,
CHG_TIME_ZONE VARCHAR2(3 CHAR),
CHG_USR VARCHAR2(8 CHAR),
VFY_DT_GMT DATE,
VFY_DT_LOC DATE,
VFY_USR VARCHAR2(8 CHAR),
DIVISION VARCHAR2(20 CHAR),
SALES_ADMIN VARCHAR2(3 CHAR),
MF_CUST_CDE VARCHAR2(14 CHAR),
CR_CTRL_OFCE VARCHAR2(3 CHAR),
DEFAULT_INV_CCY VARCHAR2(3 CHAR),
AUTOBILL_OVRRD_IND NUMBER(1) not null,
AUTOBILL NUMBER(1) not null,
AUTOPRT_OVRRD_IND NUMBER(1) not null,
AUTOPRT NUMBER(1) not null,
AVE_PYMT_DAY NUMBER(3),
TTL_INV_VAL NUMBER(12,2),
INHERIT_CR_TERM_ASSGMT NUMBER(1) not null,
NORMALIZED_NME VARCHAR2(70 CHAR),
OB_PYMT_OFCE VARCHAR2(3 CHAR),
IB_PYMT_OFCE VARCHAR2(3 CHAR),
CGO_SMART_ID VARCHAR2(20 CHAR),
REC_UPD_DT TIMESTAMP(6),
NCPF_CUST_ID VARCHAR2(7) not null,
CPF_CUST_LEVEL_UUID NUMBER(20) not null
tablespace DBCPFP1_LG_DATA LOGGING;
CREATE UNIQUE INDEX CPF_CUSTOMERI1 ON CPF_CUSTOMER
(SAP_ID ASC) TABLESPACE DBCPFP1_LG_INDX;
ALTER TABLE CPF_CUSTOMER
ADD CONSTRAINT CPF_CUSTOMERI1 UNIQUE (SAP_ID);
CREATE UNIQUE INDEX CPF_CUSTOMERI2 ON CPF_CUSTOMER
(CPF_CUSTOMER_UUID ASC) TABLESPACE DBCPFP1_LG_INDX;
ALTER TABLE CPF_CUSTOMER
ADD CONSTRAINT CPF_CUSTOMERI2 UNIQUE (CPF_CUSTOMER_UUID);
CREATE INDEX CPF_CUSTOMER_IDX2 ON CPF_CUSTOMER (UPPER(NAME))
TABLESPACE DBCPFP1_LG_INDX;
STEP 2: Create View CPF_CUSTOMER_RVW on above Table (and Public Synonym on View)
This View is created under same OWNER as Table created in STEP 1 (IR2OWNER)
create or replace view cpf_customer_rvw as
select
CPF_CUSTOMER_UUID,
SAP_ID,
IRIS2_ID,
NAME,
DRAFT_IND,
ACTIVE_IND,
REPLACED_BY_CUST,
CRE_DT_GMT,
CRE_DT_LOC,
TIME_ZONE,
CRE_USR,
CHG_DT_GMT,
CHG_DT_LOC,
CHG_TIME_ZONE,
CHG_USR,
VFY_DT_GMT,
VFY_DT_LOC,
VFY_USR,
DIVISION,
SALES_ADMIN,
MF_CUST_CDE,
CR_CTRL_OFCE,
DEFAULT_INV_CCY,
AUTOBILL_OVRRD_IND,
AUTOBILL,
AUTOPRT_OVRRD_IND,
AUTOPRT,
AVE_PYMT_DAY,
TTL_INV_VAL,
INHERIT_CR_TERM_ASSGMT,
NORMALIZED_NME,
OB_PYMT_OFCE,
IB_PYMT_OFCE,
CGO_SMART_ID,
NCPF_CUST_ID,
CPF_CUST_LEVEL_UUID,
REC_UPD_DT
from CPF_CUSTOMER;
CREATE OR REPLACE PUBLIC SYNONYM CPF_CUSTOMER_RVW FOR CPF_CUSTOMER_RVW;
STEP 3: Insert Test row
insert into cpf_customer (CPF_CUSTOMER_UUID, SAP_ID, IRIS2_ID, NAME, DRAFT_IND, ACTIVE_IND, REPLACED_BY_CUST, CRE_DT_GMT, CRE_DT_LOC, TIME_ZONE, CRE_USR, CHG_DT_GMT, CHG_DT_LOC, CHG_TIME_ZONE, CHG_USR, VFY_DT_GMT, VFY_DT_LOC, VFY_USR, DIVISION, SALES_ADMIN, MF_CUST_CDE, CR_CTRL_OFCE, DEFAULT_INV_CCY, AUTOBILL_OVRRD_IND, AUTOBILL, AUTOPRT_OVRRD_IND, AUTOPRT, AVE_PYMT_DAY, TTL_INV_VAL, INHERIT_CR_TERM_ASSGMT, NORMALIZED_NME, OB_PYMT_OFCE, IB_PYMT_OFCE, CGO_SMART_ID, NCPF_CUST_ID, CPF_CUST_LEVEL_UUID, REC_UPD_DT)
values (2.26283572796028E15, '6588125000', '6588125', 'S M Mooseen And Sons(PVT) Limited', 0, 1, '', to_date('15-03-2005 08:55:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('15-03-2005 14:25:00', 'dd-mm-yyyy hh24:mi:ss'), 'IST', 'licr2', to_date('19-02-2007 00:33:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('19-02-2007 06:03:00', 'dd-mm-yyyy hh24:mi:ss'), 'IST', 'BaseAdmi', to_date('15-03-2005 09:03:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('15-03-2005 14:33:00', 'dd-mm-yyyy hh24:mi:ss'), 'ninwasa', '', '', 'SRI06588125000', '463', '', 0, 0, 0, 0, null, null, 0, 'SMMOOSEENANDSONSPVTLIMITED', '', '', '', '6588125', 109966195050333, '14-JAN-09 02.49.28.325774 PM');
commit;
STEP 4: Create Oracle Text Index on Table CPF_CUSTOMER
EXEC CTX_DDL.DROP_PREFERENCE('CTXCAT_IR2_STORAGE');
EXEC CTX_DDL.CREATE_PREFERENCE('CTXCAT_IR2_STORAGE', 'BASIC_STORAGE');
EXEC CTX_DDL.SET_ATTRIBUTE('CTXCAT_IR2_STORAGE', 'I_INDEX_CLAUSE', 'TABLESPACE COMMON_SM_INDX COMPRESS 2');
EXEC CTX_DDL.SET_ATTRIBUTE('CTXCAT_IR2_STORAGE', 'I_INDEX_CLAUSE', 'TABLESPACE COMMON_SM_INDX COMPRESS 2');
EXEC CTX_DDL.SET_ATTRIBUTE('CTXCAT_IR2_STORAGE', 'K_TABLE_CLAUSE', 'TABLESPACE COMMON_SM_INDX COMPRESS 2');
EXEC CTX_DDL.SET_ATTRIBUTE('CTXCAT_IR2_STORAGE', 'R_TABLE_CLAUSE', 'TABLESPACE COMMON_SM_INDX COMPRESS 2');
EXEC CTX_DDL.SET_ATTRIBUTE('CTXCAT_IR2_STORAGE', 'I_ROWID_INDEX_CLAUSE', 'TABLESPACE COMMON_SM_INDX storage (INITIAL 5M)');
-- Define IR2_AB_LEXER to handle Special Characters.
EXEC ctx_ddl.drop_preference('IR2_AB_LEXER');
EXEC ctx_ddl.create_preference('IR2_AB_LEXER', 'BASIC_LEXER');
EXEC ctx_ddl.set_attribute ('IR2_AB_LEXER', 'printjoins', ',_!$~%?=({;|&+-:/)}.@`^');
--Drop Indexes
drop index CPF_CUSTOMER_DIDX1;
-- CATSEARCH INDEX on CPF_CUSTOMER.NAME
CREATE INDEX CPF_CUSTOMER_DIDX1 ON CPF_CUSTOMER(NAME) INDEXTYPE IS CTXSYS.CTXCAT PARAMETERS ('STORAGE CTXCAT_IR2_STORAGE STOPLIST CTXSYS.EMPTY_STOPLIST LEXER IR2_AB_LEXER');
commit;
STEP 5: Run Query to use Oracle Text Index on Base Table (works fine always. No issues seen so far)
SELECT a.sap_id||'|'||a.name||'|' CUSTOMER_STR
FROM cpf_customer a
WHERE (catsearch(a.name, 'Mooseen'||'*', '')>0);
CUSTOMER_STR
6588125000|S M Mooseen And Sons(PVT) Limited|
STEP 6: Run Query to use Oracle Text Index on View created under Table (get below error periodically)
ORA-20000: Oracle Text error:
DRG-10849: catsearch does not support functional invocation
DRG-10599: column is not indexed
But it works sometimes as in STEP 5 and returns 1 row. It is never consistent. We would like to
provide access to this Table using View only. That is why we would like to get this query working consistently
using View.
Any help or tips would be greatly appreciated
Thanks
AuroThis is a known issue with CTXCAT indexes. Sometimes the optimizer will "drive" the query off another index, and request results from the CTXCAT index on a row-by-row basis ("does the row with rowid NNNN satisfy this CATSEARCH condition?"). That's known as a functional lookup, and is not supported by the CTXCAT indextype.
The only solution is to try to persuade the optimizer to use a different plan which does not use a functional lookup. This can be achieved by the use of hints, or sometimes by collecting or deleting statistics on the table. -
ORA-04030 On ORACLE 10g RAC database with two nodes as active
OS-HP-AIX 5L(5.3)----IBM
DATABASE-10.2.0.2(10G)
I am getting error "ORA-04030" while executing a query
I have already set the ulimits for oracle account to UNLIMITED
1)STACK----UNLIMITED(BOTH SOFT/HARD LIMITs)
2)DATA----UNLIMITED(BOTH SOFT/HARD LIMITs)
3)MEMORY----UNLIMITED(BOTH SOFT/HARD LIMITs)
4)TIME----UNLIMITED(BOTH SOFT/HARD LIMITs)
step 1:-When I skip the listener then query executes very fine.But when
i go through the listener the "ORA-04030" errors come.
step 2:-Then when i stop and start listener on both the nodes the all
the query works fine.
This thing happens every time the system reboots
Can anyone tell me the solution for this
and why this thing happensThanks for ur immediate response
ORA-04030: out of process memory when trying to allocate 127000 bytes (QERHJ
hash-joi,kllcqas:kllsltba)
ORA-04030: out of process memory when trying to allocate 66184 bytes (pga
heap,kco buffer)
ORA-04030: out of process memory when trying to allocate 127000 bytes (QERHJ
hash-joi,kllcqas:kllsltba)
sql qurry
SELECT
WRK_PERF_ID, WRK_ID, PTY_NA_ID, PTY_ID PTY_ID,
PTY_TYP_CDE, PTY_ROL_TYP_CDE, SOC_CDE2 SOC_CDE,
DECODE(SOC_CDE2,'10','Y',NULL,'N',
NVL(( SELECT NVL(AFL_IND, 'N') FROM pty y WHERE y. IPI_BAS_NR = SOC_CDE2 AND NVL(DEL_FL,'N') = 'N'
AND ROWNUM < 2 ),'N')) AFL_IND,
pDate,
ENTMT_ID, ROL_TYP_CDE, IP_STA_IND_CDE, UNID_ID_FST_NA,
UNID_IP_NA, IP_PAY_STA, REASON, SHR_OWN_PTY_NA_ID,
PGM_STT_DT, PAY DIRIND,
ACTV_OWN_SHR, ACTV_COPY_SHR, CLM_OWN_SHR, CLM_COPY_SHR,
FNC_PTY_RESIGNED_ON_DIS_DT ( PTY_ID,
TO_DATE( DECODE(PTY_TYP_CDE,'WRTMB',
'2004-04-10' ,'AFMBR', '2004-05-10' , '2004-03-10'),'YYYY-MM-DD')) TF
FROM
SELECT WRK_PERF_ID, WRK_ID, PTY_NA_ID, PTY_ID PTY_ID,
PTY_TYP_CDE, PTY_ROL_TYP_CDE, NVL(SOC_CDE2,'0') SOC_CDE2,
DECODE(PTY_TYP_CDE,'WRTMB', '2004-04-10' ,'AFMBR', '2004-05-10' , '2004-03-10') pDATE,
ENTMT_ID, ROL_TYP_CDE, IP_STA_IND_CDE, UNID_ID_FST_NA,
UNID_IP_NA, IP_PAY_STA, REASON, SHR_OWN_PTY_NA_ID,
PGM_STT_DT, PAY_DIR_IND,
SUM(NVL(ACTV_OWN_SHR,0)) ACTV_OWN_SHR,
SUM(NVL(ACTV_COPY_SHR,0)) ACTV_COPY_SHR,
NVL( SUM(NVL(CLM_OWN_SHR,0)),0) CLM_OWN_SHR,
NVL(SUM(NVL(CLM_COPY_SHR,0)),0) CLM_COPY_SHR
FROM
SELECT B.WRK_PERF_ID, B.WRK_ID, B.PTY_NA_ID,
D.PTY_ID , D.PTY_TYP_CDE, D.PTY_ROL_TYP_CDE,
CASE
WHEN D.PTY_ROL_TYP_CDE ='W' OR D.PTY_ROL_TYP_CDE ='P'
THEN
SELECT MIN(soc_cde)
FROM MBRSH_AGR_TER A
WHERE A.pty_id = D.PTY_ID
AND A.STT_DT <= TO_DATE( DECODE(D.PTY_TYP_CDE,'WRTMB', '2004-04-10' ,'AFMBR', '2004-
05-10' , '2004-03-10' ),'YYYY-MM-DD')
AND ( A.END_DT >= TO_DATE( DECODE(D.PTY_TYP_CDE,'WRTMB', '2004-04-10' ,'AFMBR', '2004-05-10' , '2004-03-1
0' ),'YYYY-MM-DD') OR A.END_DT IS NULL)
AND A.INCL_EXCL_IND = 'I'
AND ( A.TIS_CDE = 840 OR
EXISTS (
SELECT 1
FROM CPST_TERR C
WHERE C.CHILD_TIS_CDE = 840
AND C.PARENT_TIS_CDE = A.TIS_CDE
AND NVL(C.DEL_FL, 'N') = 'N'
AND NVL(A.DEL_FL,'N') = 'N'
AND soc_cde NOT IN
SELECT soc_cde
FROM MBRSH_AGR_TER B
WHERE B.pty_id = D.PTY_ID
-- b.soc_cde = a.soc_cde
AND B.STT_DT <= TO_DATE( DECODE(D.PTY_TYP_CDE,'WRTMB', '2004-04-10' ,'AFMBR', '2004-0
5-10' , '2004-03-10' ),'YYYY-MM-DD')
AND (B.END_DT >= TO_DATE( DECODE(D.PTY_TYP_CDE,'WRTMB', '2004-04-10' ,'AFMBR', '2004-05-10' , '2004-03-10'
),'YYYY-MM-DD') OR B.END_DT IS NULL)
AND B.INCL_EXCL_IND = 'E'
AND NVL(B.DEL_FL,'N') = 'N'
AND ( B.TIS_CDE = 840 OR
EXISTS ( SELECT 1
FROM CPST_TERR D2
WHERE D2.CHILD_TIS_CDE = 840
AND D2.PARENT_TIS_CDE = B.TIS_CDE
AND NVL(D2.DEL_FL, 'N') = 'N'
)-- NOT IN
) --w,p end
WHEN D.PTY_TYP_CDE='SOC' THEN D.IPI_BAS_NR
END
) SOC_CDE2,
B.ENTMT_ID, B.ROL_TYP_CDE,
B.IP_STA_IND_CDE, B.UNID_ID_FST_NA, B.UNID_IP_NA, B.IP_PAY_STA, B.REASON, B.SHR_OWN_PTY_NA_ID,
A.PGM_STT_DT, D.PAY_DIR_IND,
ACTV_OWN_SHR, ACTV_COPY_SHR, CLM_OWN_SHR, CLM_COPY_SHR
FROM STG_ACIP_DIST_MODE1 B, STAGING_USAGE_SELECTION_MODE1 A, PTY_NA C, PTY D
WHERE B.WRK_PERF_ID = A.WRK_PERF_ID
AND B.PTY_NA_ID = C.PTY_NA_ID
AND C.PTY_ID = D.PTY_ID
AND A.CALC_RUN_CTL_ID = 279
AND A.DIS_ID = 241
GROUP BY WRK_PERF_ID, WRK_ID, PTY_NA_ID, PTY_ID, PTY_TYP_CDE, PTY_ROL_TYP_CDE,
SOC_CDE2, ENTMT_ID, ROL_TYP_CDE, IP_STA_IND_CDE, UNID_ID_FST_NA,
UNID_IP_NA, IP_PAY_STA, REASON, SHR_OWN_PTY_NA_ID,
PGM_STT_DT, PAY_DIR_IND
order by WRK_PERF_ID, WRK_ID, PTY_NA_ID, PTY_ID
It is just a simple query with group by which i ran by sqlplus but it is geting more then million records.
Maybe you are looking for
-
Utterly and totally LOST and CONFUSED getting IE10 in Server 2012 x64 to work
I am at my wits end, I believe I posted in here before but am still having tons of problems with IE10 and Server 2012 x64. Can someone shed some light on ANY of the following: 1)Is IE10 embedded with flash player by default or not? If so what version
-
Does it worth to move from macbook pro to macbook pro retina?
Hey I have macbook pro with Processor 2.66 GHz Intel Core i7 Memory 8 GB 1067 MHz DDR3 Graphics NVIDIA GeForce GT 330M 512 MB and its good but many people are saying macbook pro 2013 with retina display is the best laptop and has many features so
-
4010_850 EDI file Generation issue.
Hi All, We are facing issue in converting 850 EDI XML to EDI file. We could generate a simple EDI based on mandatory elements. But when we try to provide DTM and AMT values , We are hitting below issues.. I am missing some basic stuff. Please find th
-
Error 2032 when installing Widget browser
How do Install Widget browser with the error message error 2032 when installing Widget browser
-
Ive done something to my icloud. Every time I click on a bookmark it updates and deletes everything. Everything in that bookmark is lost on my iphone and my laptop. How do I retrieve my deleted bookmarks?