Import err: ORA-20001,ORA-02047,alter session set nls_numeric_characters...
Hi APEX development team,
I get mad about an APEX import error which occurs maybe one time every second month.
ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful.
ORA-02047: cannot join the distributed transaction in progress <pre>
begin execute immediate 'alter session set nls_numeric_characters='''||wwv_flow_api.g_nls_numeric_chars||''''; end; </pre>I described the error really detailed inside my APEX blog. The following links will help you understanding what I tried to find a solution for it:
[APEX error ORA-20001 and ORA-02047 during application import (1)|http://apex-at-work.blogspot.com/2008/11/apex-error-ora-20001-and-ora-02047.html]
[Again import error ORA-02047: cannot join the distributed... (2)|http://apex-at-work.blogspot.com/2008/11/again-import-error-ora-02047-cannot.html]
[Solution for APEX import error ORA-20001, ORA-02047 (3)|http://apex-at-work.blogspot.com/2008/11/solution-for-apex-import-error-ora.html]
Write now I have two options to solve the error:
1. Restart Oracle Application Server
2. Wait a couple of days with the import (restart of my client computer) and it works for a while again
Apex Version: 3.1.2
DB Version: Oracle XE database under Windows
Hope there is a chance to get some help about this annoying error.
King regards,
Tobias
Hi Joel, Scott and the rest of the community.
I went on determine the import problem. It occurred two more times since the last post.
First time:
This time was a bit different. I wanted to create a new workspace and got the error "ORA-02047: cannot join the distributed transaction in progress" when I clicked on the button to create a new workspace after I entered all information to it.
I restarted the OAS and worked again
Second time:
During an application import the error occurred again and I tried the following things:
As data owner (only one db link exist)
ALTER SESSION CLOSE DATABASE LINK DBMS_CLRDBLINK;Result no open database links to close
As sys (all database links)
-- The following script queries the DBA_DB_LINKS view to access link information:
SELECT * FROM DBA_DB_LINKS;
-- close of all database links
ALTER SESSION CLOSE DATABASE LINK username.db_link_name;
...Result no database links open. Try of import ended with same error.
Check of apex_public_user no (open) db_links. No objects locked.
I had to restart the OAS again.
Any ideas?
Regards,
Tobias
Similar Messages
-
APEX Maps - ALTER SESSION set nls_numeric_characters
How alter session only for nls_numeric_characters in one page. I found problem in apex maps. Not working (marker and Bubles) if I use Polish Application Primary Language
I'm tryied it, but without success
begin
EXECUTE IMMEDIATE 'ALTER SESSION set nls_numeric_characters=". "';
end;
Can you help me ?I do an execute immediate but it doesn't work. Is it something like that?
EXECUTE IMMEDIATE ('alter session set nls_numeric_characters=",."') -
I have a page that has a form to my issue table and on the same page, in a different region, I have a tabular report that shows the issue_activity for the specified issue. The primary key on the issue table is the issue_no which is a sequence and the primary key on the issue_activity table is (issue_no,line_no), where issue_no comes from the issue table. A parent-child relationship between issue and issue_activity.
When I add a row to my tabular form and type in some data, I get a (Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process.) error. When I look at the data, everything looks fine.
The issue_no and line_no are correctly set. My Issue_no and line_no fields on my report are hidden fields.I rebuild the report using a tabular form and populated the primary key with a PL/SQL expression and now it appears to be working. P1_ISSUE_NO is the primary key on the issue table and I could not figure how to get it in the issue_no field of the tabular report when a new line was entered I ended up putting the following code in for the default for
issue_no on the report:
Begin
return :P1_ISSUE_NO;
end
It works great. -
ORA-20001: ORA-29902: error in executing ODCIIndexStart() routine
Hi, everyone!
I have an error as follow:
ORA-20001: ORA-29902: error in executing ODCIIndexStart() routine
ORA-06553: PLS-123: program too large
I can get the sql where the procedure through the error, and execute the sql in sqlplus, no error. Does anyone have experience with the error? or have some direction to solve problem? thank you!
My oracle version is 9.2.0.8.0 and sdo version is 9.2.0.8.0, too.I agree with Omar, However if you want to search using special character, you may want to look into the following example. I am not saying this may be a solution for you, however this may give you a start on how to deal with special character in you search.
In our enviroment we have "N" number of Science & Pharmacy & Chemical clients. They need the ability to search using special character for that we have done the following..
begin
select user into v_username from dual;
ctx_ddl.create_preference('orc_CTX_WLPREF', 'BASIC_WORDLIST');
ctx_ddl.set_attribute('orc_CTX_WLPREF','SUBSTRING_INDEX','TRUE');
ctx_ddl.set_attribute('orc_CTX_WLPREF','WILDCARD_MAXTERMS','2559');
ctx_ddl.Create_Preference('orc_LEXER','BASIC_LEXER');
ctx_ddl.Set_Attribute('orc_LEXER', 'index_themes', 'FALSE');
ctx_ddl.set_attribute('orc_LEXER','printjoins','0123456789%,./?;:<>[]{}\|+=-_()*&^$#@!''"%');
end;
And then siply create the index as follow..
create index index_name on activitylog(columnname)
indextype is ctxsys.context
parameters ('Wordlist CYBERLAB_CTX_WLPREF lexer CYBERLAB_LEXER memory 48M');
then I am able to do something like the following..
select count(*) from ACTIVITYLOG where contains (DESCRIPTION, '<%.htm@') > 0;
hope this helps.. -
USER UPDATE가 안되는 문제 ORA-20001 ORA-06512
제품 : AOL
작성날짜 : 2002-11-29
USER UPDATE가 안되는 문제 ORA-20001 ORA-06512
=======================================
PURPOSE
Problem Description
SQL> exec fnd_user_pkg.UpdateUser('LGESSO','SEED', 'lgesso2');
BEGIN fnd_user_pkg.UpdateUser('LGESSO','SEED', 'lgesso2'); END;
ERROR at line 1:
ORA-20001: Unabled to change password for user LGESSO for this following
reason:
Password was not changed.
ORA-06512: at "APPS.APP_EXCEPTION", line 51
ORA-06512: at "APPS.FND_USER_PKG", line 350
ORA-06512: at line 1
Workaround
patch 2426407를 적용해야 한다.
Solution Description
FND_USER_PKG.UpdateUser가 유저의 패스워드를 바꿀때 fail이 나는 문제이다.다음과 같은 에러가 난다:
ERROR at line 1:
ORA-20001: Unabled to change password for user JFROST for this following
reason:
Password was not changed.
ORA-06512: at "APPS.APP_EXCEPTION", line 51
ORA-06512: at "APPS.FND_USER_PKG", line 348
ORA-06512: at line 1
This is due to a change in FND_WEB_SEC.change_password being defined with a
pragma of autonomous transaction.
FND_USER_PKG.UpdateUser calls FND_WEB_SEC.change_password to change a user's
password.
Reference Documents
-------------------DBA2008 wrote:
i disable the trigger messing up tivoli user,& i am able to login fine, wondering if i enable it back it will do the same?If you keep doing the same thing, you can expect the same results.
Perhaps you should analyze the trigger to figure out
1) what it was supposed to be doing that is not being done since you disabled it
2) why it was throwing the error . . . -
Execute immediate 'alter session set current_schema = ' failed in PL/SQL
Hi
I am trying to run
EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = TEST ' ;
in a pl/sql block but it is failing.Can anyone update me on this.
CREATE OR REPLACE PROCEDURE test3
IS
A_COUNT NUMBER(15);
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = TEST ' ;
SELECT COUNT(*) INTO A_COUNT FROM (
select id from solutions );
END;
/The user who owns the procedure needs to be granted direct select rights on table test.solutions (not via a role). Still will not help. Look what OP is trying to do. In a stored procedure owned by some user (other than TEST) OP is trying to reference user TEST owned table solution without prefixing it with owner. Something like:
SQL> create table u1.test_tbl(x number);
Table created.
SQL> select * from test_tbl;
select * from test_tbl
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> alter session set current_schema = U1;
Session altered.
SQL> select * from test_tbl;
no rows selected
SQL> However, OP tries to do it in a SP using dynamic SQL to change current schema to test. Such change will occur when SP will be executed, not when is it compiled. At compile time we are still under SP owner's schema and therefore select from solutions implies table solutions owned by SP owner, not by TEST. The only way to make SP compile and work OK is to select from solutions also dynamically:
SQL> select sys_context('userenv','current_schema') from dual
2 /
SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
SCOTT
SQL> CREATE OR REPLACE PROCEDURE test3
2 IS
3 A_COUNT NUMBER(15);
4 BEGIN
5 EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = U1' ;
6 SELECT COUNT(*) INTO A_COUNT FROM (
7 select x from test_tbl );
8 END;
9 /
Warning: Procedure created with compilation errors.
SQL> sho err
Errors for PROCEDURE TEST3:
LINE/COL ERROR
6/1 PL/SQL: SQL Statement ignored
7/15 PL/SQL: ORA-00942: table or view does not exist
SQL> set serveroutput on
SQL> CREATE OR REPLACE PROCEDURE test3
2 IS
3 A_COUNT NUMBER(15);
4 c sys_refcursor;
5 BEGIN
6 EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = U1' ;
7 OPEN C FOR 'SELECT COUNT(*) FROM (select x from test_tbl )';
8 FETCH c INTO A_COUNT;
9 dbms_output.put_line(a_count);
10 CLOSE c;
11 END;
12 /
Procedure created.
SQL> insert into u1.test_tbl select rownum from emp;
14 rows created.
SQL> exec test3
14
PL/SQL procedure successfully completed.
SQL> Obviously, as you noted SP owner must have directly granted select on test3.solutions.
SY. -
RMAN-10006: error running SQL statement: alter session set remote_dependenc
Backups are failing with following error
RMAN-00554: initialization of internal recovery manager package failed
RMAN-12001: could not open channel default
RMAN-10008: could not create channel context
RMAN-10002: ORACLE error: ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must be from among MANUAL, AUTO
RMAN-10006: error running SQL statement: alter session set remote_dependencies_mode = signature
Not able to change to signature
SQL> alter session set remote_dependencies_mode=signature;
ERROR:
ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must
be from among MANUAL, AUTO
I dont see MANUAL or AUTO as valid value for this parameter (http://download.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1175.htm#1023124) DB version is 9.2.0
Parameter type
String
Syntax
REMOTE_DEPENDENCIES_MODE = {TIMESTAMP | SIGNATURE}
Default value
TIMESTAMP
Parameter class
Dynamic: ALTER SESSION, ALTER SYSTEM
=======================================
I believe it could be because of following bug
"A PRE-PATCHED ORACLE IMAGE CAN BE INSTALLED IN MEMORY "
Refer: "https://metalink2.oracle.com/metalink/plsql/f?p=130:15:1613505143885559758::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,4610411,1,1,1,helvetica"
I appreciate your effort in fixing this issue.
Edited by: user10610722 on Nov 25, 2008 4:37 PMHi:
It seems when you are starting RMAN it's executing some commands (one 'ALTER SESSION...'. It's seems to be a batch which has a bad value for SORT_AREA_SIZE. Find it and modify to a proper value as message shows. If you can't find start RMAN by calling directly the executable ($ORACLE_HOME/bin/rman or %ORACLE_HOME%/bin/rman.exe). -
Ability to perform ALTER SESSION SET SQL TRACE but not all alter clauses
I see that in order to run the ALTER SESSION SET SQL TRACE command, the user should be explicitly granted alter session privilege as the CREATE SESSION privilege alone is not enough. Is there a way to grant the ability to perform ALTER SESSION SET SQL TRACE but not the other clauses such as GUARD, PARALLEL & RESUMABLE?.
Thanks
SathyaIf you are using Oracle 10g and above, you can use DBMS_SESSION.session_trace_enable procedure,
it doesn't require alter session system privilege.
Simple example:
SQL> connect test/test@//192.168.1.2:1521/xe
Connected.
SQL> alter session set tracefile_identifier='my_id';
Session altered.
SQL> alter session set sql_trace = true
2 ;
alter session set sql_trace = true
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> execute dbms_session.session_trace_enable;
PL/SQL procedure successfully completed.
SQL> select * from user_sys_privs;
USERNAME PRIVILEGE ADM
TEST CREATE PROCEDURE NO
TEST CREATE TABLE NO
TEST CREATE SEQUENCE NO
TEST CREATE TRIGGER NO
TEST SELECT ANY DICTIONARY NO
TEST CREATE SYNONYM NO
TEST UNLIMITED TABLESPACE NO
7 rows selected.
SQL> execute dbms_session.session_trace_disable;
PL/SQL procedure successfully completed.
SQL> disconnect
Disconnected from Oracle Database 10g Release 10.2.0.1.0 - Productionand here is result from tkprof:
TKPROF: Release 10.2.0.1.0 - Production on So Paź 23 00:53:07 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Trace file: xe_ora_176_my_id.trc
( ---- cut ---- )
select *
from
user_sys_privs
call count cpu elapsed disk query current rows
Parse 1 0.08 0.08 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.01 0.01 0 15 0 7
total 4 0.09 0.09 0 15 0 7
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 61
Rows Row Source Operation
7 HASH GROUP BY (cr=15 pr=0 pw=0 time=11494 us)
7 CONCATENATION (cr=15 pr=0 pw=0 time=4913 us)
0 MERGE JOIN CARTESIAN (cr=4 pr=0 pw=0 time=1169 us)
0 NESTED LOOPS (cr=4 pr=0 pw=0 time=793 us)
0 TABLE ACCESS FULL SYSAUTH$ (cr=4 pr=0 pw=0 time=592 us)
0 INDEX RANGE SCAN I_SYSTEM_PRIVILEGE_MAP (cr=0 pr=0 pw=0 time=0 us)(object id 312)
0 BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
0 TABLE ACCESS FULL USER$ (cr=0 pr=0 pw=0 time=0 us)
7 NESTED LOOPS (cr=11 pr=0 pw=0 time=3429 us)
9 HASH JOIN (cr=9 pr=0 pw=0 time=2705 us)
9 TABLE ACCESS FULL SYSAUTH$ (cr=4 pr=0 pw=0 time=512 us)
63 TABLE ACCESS FULL USER$ (cr=5 pr=0 pw=0 time=914 us)
7 INDEX RANGE SCAN I_SYSTEM_PRIVILEGE_MAP (cr=2 pr=0 pw=0 time=510 us)(object id 312)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 2 20.64 20.65
BEGIN dbms_session.session_trace_disable; END;
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.01 0.00 0 0 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 61 -
Alter session set NLS_DATE_FORMAT and to_date not working
Hey folks,
for the sake of simplicity let's assume i want to get the current system time from the table dual in a certain format, e.g. 'YY.MM.DD'.
Currently the query
select sysdate from dual;
yields:
07-JAN-08
The desired output should look like this:
08.01.07
So, according to the manual, i tried the following:
alter session set NLS_DATE_FORMAT = 'yy.mm.dd';
No effect, date is still displayed as
07-JAN-08
Even the following query:
select TO_DATE (sysdate, 'yy.mm.dd') from dual;
yields
07-JAN-08
What am i doing wrong here?
Additional information:
-> DB is Oracle 9
-> I am using the Oracle SQL Developer under Ubuntu Gutsy
-> No, i did not forget to commit my commands....:-)
Any ideas?select TO_CHAR (sysdate, 'yy.mm.dd') from dual;However the alter session command should work:
SQL*Plus: Release 9.2.0.2.0 - Production on Mon Jan 7 14:32:26 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
SQL> alter session set NLS_DATE_FORMAT = 'yy.mm.dd';
Session altered.
SQL> select sysdate from dual;
SYSDATE
08.01.07
SQL> Note: There is nothing to commit here. Only selects, no DML.
Message was edited by:
Sven W. -
"alter session set sql_trace true" in my pakage is not working
Hi
I have a package with some procedures..in one of my procedure which is executed in the first step i run the :
execute immediate 'alter session set sql_trace true';
this command is executed in debug mode and generate trace file(GOOD) but in running mode i haven't trcce file.
what is wrong in my code ?http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/statements_2013.htm#SQLRF00901 says parameter_name = parameter_value
Regards
Etbin -
Insufficient privileges when creating MV with alter session set current_sch
I am getting Insufficient privileges when creating MV with alter session set current_schema=Application schema name. User running the alter session is DBA user. If run as SYSDBA, MV is created successfully. DB Version is 10.2.0.3
I observed similiar issue with regular View also in 9.2.0.6 also.
Any advice is greatly appreciated.
Thanks,
SivaSounds like your management needs a stern lecture on the concept of change management. <g>
I am not debating what you do. I am questioning the logic, or lack thereof, of doing it that way. My recommendation would be to change your procedure to one that:
A. Is more in line with good change management practices.
B. Works. -
Is it risky to use statement : "alter session set events"
Hi guys,
I am extracting data from cxml documents.
I had to run the following code "EXECUTE IMMEDIATE ('alter session set events ''31156 trace name context forever, level 2'''); " to disable the DTD validation...b4 running any xml extract function on it.
Example:
CREATE OR REPLACE FUNCTION f_test (
p_cxml IN CLOB
RETURN BOOLEAN
AS
l_payload varchar2(100);
l_cXML sys.xmltype := sys.xmltype.createXML(p_cxml);
BEGIN
EXECUTE IMMEDIATE ('alter session set events ''31156 trace name context forever, level 2''');
SELECT EXTRACTVALUE(l_cXML,'/cXML/@payloadID')
INTO l_payload
FROM DUAL;
RETURN TRUE;
DBMS_OUTPUT.PUT_LINE (l_payload);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE (SQLCODE || ' - '||SQLERRM);
RETURN FALSE;
END;
The vlaue of the parameter p_cxml could be
p_cXML clob:=
'<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.021/Fulfill.dtd">
<cXML payloadID="[email protected]"
timestamp="2000-10-12T18:39:09-08:00" xml:lang="en-US">
<Request deploymentMode="test">
<OrderRequest>
<OrderRequestHeader orderID="DO1234" orderDate="2000-10-12T18:41:29-08:00"
type="new">
<Total>
<Money currency="USD">187.60</Money>
</Total>
<ShipTo>
<Address>
<Name xml:lang="en">Acme</Name>
<PostalAddress name="default">
<DeliverTo>Joe Smith</DeliverTo>
<DeliverTo>Mailstop M-543</DeliverTo>
<Street>123 Anystreet</Street>
<City>Sunnyvale</City>
<State>CA</State>
<PostalCode>90489</PostalCode>
<Country isoCountryCode="US">United States
</Country>
</PostalAddress>
</Address>
</ShipTo>
</OrderRequestHeader>
</OrderRequest>
</Request>
</cXML>';
It is seems to be working.......................
MY QUESTION IS...
Is there any risk Involved to Using the
EXECUTE IMMEDIATE ('alter session set events ''31156 trace name context forever, level 2'''); statment.
Any Help will be greatly appreciated.
Thanks.Most "set events" are workarounds or needed for Oracle support to do some debugging. Using them is at your own risk, and probably not supported by Oracle if you get into trouble.
-
While Compile the Package it shows "alter session set plsql_trace=false"
Hi,
My package was working fine and suddenly the status is invalid
so i tried compiling the package that time sql developer got hanged, package also not getting compiled.
i asked DBA to find out the status, they said the following query is running from your machine.
"Alter session set plsql_trace=false". once they kill the session, sql developer got released.
What could be the reason for this?? please help me to resolve this.......
Thanks,
GMost "set events" are workarounds or needed for Oracle support to do some debugging. Using them is at your own risk, and probably not supported by Oracle if you get into trouble.
-
Can I run Alter Session set sql_trace = True in Forms.
Can I run Alter Session set sql_trace = True in Forms.
You could use 'statistics=YES' from command line. If you are using an icon from windows' desktop, then go to properties of that icon and append 'statistics=YES' at the end of TARGET. This basically issues 'ALTER SESSION SET SQL_TRACE TRUE' for the current session.
Can I run Alter Session set sql_trace = True in Forms. -
Execute sql command "ALTER SESSION SET..."
How can i execute command "ALTER SESSION SET NLS_DATE_FORMAT ='MM/DD/YYYY'" with JDBC
api.
And by default?
Bye
SteI'm not sure that you want to do this in Java. I would imagine that the NLS_DATE_FORMAT would be set by the Oracle DBA, and shouldn't be changed by a Java app via JDBC.
Besides, when you query the database for a date it's returned as a java.sql.Date, regardless of the settings in the database. Once you have that, you can format it according to your wishes by using java.text.DateFormat and java.text.SimpleDateFormat.
I thought the point was that the JDBC driver took care of ensuring that you got java.sql.Date objects back from queries, regardless of the NSL_DATE_FORMAT setting in the database.
Maybe you are looking for
-
How to properly pass credentials from WCF service to another?
I have a client application that calls a WCF service and passes client credentials like so: OrderService.OrderServiceClient sc = new OrderService.OrderServiceClient(); sc.ClientCredentials.UserName.UserName = userName; sc.ClientCredentials.UserName.P
-
Mouse problems after 11/29/05 Security Update?
I installed the 11/29/2005 Security Update 2005-009 via Software Update. Right afterwards (even before the required reboot), I began having mouse oddities. The cursor disappears from the screen, or just stays there and doesn't move. Moving the mouse
-
Selecting code bug/wishlist (for FlexBuilder 3 Dev team)
When i try to select a word in the mxml code by double click on it, sometimes can't select the hole word. I'm talking about spanish words in a string or a comment line. by example this string below (paste it in flexbuilder 3 and try to select the "mo
-
Jsp:forward param not getting included in my query string
Hi, On a particular JSP page, mine.jsp, I am forwarding to a servlet ... <jsp:useBean id="HotelResortDBBean" class="com.lvcva.database.HotelResortDBBean" scope="request" /> <jsp:forward page="/meetings/meeting-venues/results"> <jsp:param name="s
-
I've configured my KDE environment to be more night-coder/Globe background friendly so everything is pretty dark. That has left me with a problem: Certain text doesn't show up very well. I cannot find the setting to change the every-other-text in the