Help with Oracle Streams. How to uniquely identify LCRs in queue?
We are using strems for data replication in our shop.
When an error occours in our processing procedures, the LCR is moved to the error queue.
The problem we are facing is we don't know how to uniquely identify LCRs in that queue, so we can run them again when we think the error is corrected.
LCRs contain SCN, but as I understand it, the SCN is not unique.
What is the easy way to keep track of LCRs? Any information is helpful.
Thanks
Hi,
When you correct the data,you would have to execute the failed transaction in order.
To see what information the apply process has tried to apply, you have to print that LCR. Depending on the size (MESSAGE_COUNT) of the transaction that has failed, it could be interesting to print the whole transaction or a single LCR.
To do this print you can make use of procedures print_transaction, print_errors, print_lcr and print_any documented on :
Oracle Streams Concepts and Administration
Chapter - Monitoring Streams Apply Processes
Section - Displaying Detailed Information About Apply Errors
These procedures are also available through Note 405541.1 - Procedure to Print LCRs
To print the whole transaction, you can use print_transaction procedure, to print the error on the error queue you can use procedure print_errors and to print a single_transaction you can do it as follows:
SET SERVEROUTPUT ON;
DECLARE
lcr SYS.AnyData;
BEGIN
lcr := DBMS_APPLY_ADM.GET_ERROR_MESSAGE
(<MESSAGE_NUMBER>, <LOCAL_TRANSACTION_ID>);
print_lcr(lcr);
END;
Thanks
Similar Messages
-
Help on Oracle streams 11g configuration
Hi Streams experts
Can you please validate the following creation process steps ?
What is need to have streams doing is a one way replication of the AR
schema from a database to another database. Both DML and DDL shall do
the replication of the data.
Help on Oracle streams 11g configuration. I would also need your help
on the maintenance steps, controls and procedures
2 databases
1 src as source database
1 dst as destination database
replication type 1 way of the entire schema FaeterBR
Step 1. Set all databases in archivelog mode.
Step 2. Change initialization parameters for Streams. The Streams pool
size and NLS_DATE_FORMAT require a restart of the instance.
SQL> alter system set global_names=true scope=both;
SQL> alter system set undo_retention=3600 scope=both;
SQL> alter system set job_queue_processes=4 scope=both;
SQL> alter system set streams_pool_size= 20m scope=spfile;
SQL> alter system set NLS_DATE_FORMAT=
'YYYY-MM-DD HH24:MI:SS' scope=spfile;
SQL> shutdown immediate;
SQL> startup
Step 3. Create Streams administrators on the src and dst databases,
and grant required roles and privileges. Create default tablespaces so
that they are not using SYSTEM.
---at the src
SQL> create tablespace streamsdm datafile
'/u01/product/oracle/oradata/orcl/strepadm01.dbf' size 100m;
---at the replica:
SQL> create tablespace streamsdm datafile
---at both sites:
'/u02/oracle/oradata/str10/strepadm01.dbf' size 100m;
SQL> create user streams_adm
identified by streams_adm
default tablespace strepadm01
temporary tablespace temp;
SQL> grant connect, resource, dba, aq_administrator_role to
streams_adm;
SQL> BEGIN
DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE (
grantee => 'streams_adm',
grant_privileges => true);
END;
Step 4. Configure the tnsnames.ora at each site so that a connection
can be made to the other database.
Step 5. With the tnsnames.ora squared away, create a database link for
the streams_adm user at both SRC and DST. With the init parameter
global_name set to True, the db_link name must be the same as the
global_name of the database you are connecting to. Use a SELECT from
the table global_name at each site to determine the global name.
SQL> select * from global_name;
SQL> connect streams_adm/streams_adm@SRC
SQL> create database link DST
connect to streams_adm identified by streams_adm
using 'DST';
SQL> select sysdate from dual@DST;
SLQ> connect streams_adm/streams_adm@DST
SQL> create database link SRC
connect to stream_admin identified by streams_adm
using 'SRC';
SQL> select sysdate from dual@SRC;
Step 6. Control what schema shall be replicated
FaeterBR is the schema to be replicated
Step 7. Add supplemental logging to the FaeterBR schema on all the
tables?
SQL> Alter table FaeterBR.tb1 add supplemental log data
(ALL) columns;
SQL> alter table FaeterBR.tb2 add supplemental log data
(ALL) columns;
etc...
Step 8. Create Streams queues at the primary and replica database.
---at SRC (primary):
SQL> connect stream_admin/stream_admin@ORCL
SQL> BEGIN
DBMS_STREAMS_ADM.SET_UP_QUEUE(
queue_table => 'streams_adm.FaeterBR_src_queue_table',
queue_name => 'streams_adm.FaeterBR_src__queue');
END;
---At DST (replica):
SQL> connect stream_admin/stream_admin@STR10
SQL> BEGIN
DBMS_STREAMS_ADM.SET_UP_QUEUE(
queue_table => 'stream_admin.FaeterBR_dst_queue_table',
queue_name => 'stream_admin.FaeterBR_dst_queue');
END;
Step 9. Create the capture process on the source database (SRC).
SQL> BEGIN
DBMS_STREAMS_ADM.ADD_SCHEMA_RULES(
schema_name =>'FaeterBR',
streams_type =>'capture',
streams_name =>'FaeterBR_src_capture',
queue_name =>'FaeterBR_src_queue',
include_dml =>true,
include_ddl =>true,
include_tagged_lcr =>false,
source_database => NULL,
inclusion_rule => true);
END;
Step 10. Instantiate the FaeterBR schema at DST. by doing export
import : Can I use now datapump to do that ?
---AT SRC:
exp system/superman file=FaeterBR.dmp log=FaeterBR.log
object_consistent=y owner=FaeterBR
---AT DST:
---Create FaeterBR tablespaces and user:
create tablespace FaeterBR_datafile
'/u02/oracle/oradata/str10/FaeterBR_01.dbf' size 100G;
create tablespace ws_app_idx datafile
'/u02/oracle/oradata/str10/FaeterBR_01.dbf' size 100G;
create user FaeterBR identified by FaeterBR_
default tablespace FaeterBR_
temporary tablespace temp;
grant connect, resource to FaeterBR;
imp system/123db file=FaeterBR_.dmp log=FaeterBR.log fromuser=FaeterBR
touser=FaeterBR streams_instantiation=y
Step 11. Create a propagation job at the source database (SRC).
SQL> BEGIN
DBMS_STREAMS_ADM.ADD_SCHEMA_PROPAGATION_RULES(
schema_name =>'FaeterBR',
streams_name =>'FaeterBR_src_propagation',
source_queue_name =>'stream_admin.FaeterBR_src_queue',
destination_queue_name=>'stream_admin.FaeterBR_dst_queue@dst',
include_dml =>true,
include_ddl =>true,
include_tagged_lcr =>false,
source_database =>'SRC',
inclusion_rule =>true);
END;
Step 12. Create an apply process at the destination database (DST).
SQL> BEGIN
DBMS_STREAMS_ADM.ADD_SCHEMA_RULES(
schema_name =>'FaeterBR',
streams_type =>'apply',
streams_name =>'FaeterBR_Dst_apply',
queue_name =>'FaeterBR_dst_queue',
include_dml =>true,
include_ddl =>true,
include_tagged_lcr =>false,
source_database =>'SRC',
inclusion_rule =>true);
END;
Step 13. Create substitution key columns for äll the tables that
haven't a primary key of the FaeterBR schema on DST
The column combination must provide a unique value for Streams.
SQL> BEGIN
DBMS_APPLY_ADM.SET_KEY_COLUMNS(
object_name =>'FaeterBR.tb2',
column_list =>'id1,names,toys,vendor');
END;
Step 14. Configure conflict resolution at the replication db (DST).
Any easier method applicable the schema?
DECLARE
cols DBMS_UTILITY.NAME_ARRAY;
BEGIN
cols(1) := 'id';
cols(2) := 'names';
cols(3) := 'toys';
cols(4) := 'vendor';
DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER(
object_name =>'FaeterBR.tb2',
method_name =>'OVERWRITE',
resolution_column=>'FaeterBR',
column_list =>cols);
END;
Step 15. Enable the capture process on the source database (SRC).
BEGIN
DBMS_CAPTURE_ADM.START_CAPTURE(
capture_name => 'FaeterBR_src_capture');
END;
Step 16. Enable the apply process on the replication database (DST).
BEGIN
DBMS_APPLY_ADM.START_APPLY(
apply_name => 'FaeterBR_DST_apply');
END;
Step 17. Test streams propagation of rows from source (src) to
replication (DST).
AT ORCL:
insert into FaeterBR.tb2 values (
31000, 'BAMSE', 'DR', 'DR Lejetoej');
AT STR10:
connect FaeterBR/FaeterBR
select * from FaeterBR.tb2 where vendor= 'DR Lejetoej';
Any other test that can be made?Check the metalink doc 301431.1 and validate
How To Setup One-Way SCHEMA Level Streams Replication [ID 301431.1]
Oracle Server Enterprise Edition - Version: 10.1.0.2 to 11.1.0.6
Cheers. -
Help with oracle 11g pivot operator
i need some help with oracle 11g pivot operator. is it possible to use multiple columns in the FOR clause and then compare it against multiple set of values.
here is the sql to create some sample data
create table pivot_data ( country_code number , dept number, job varchar2(20), sal number );
insert into pivot_data values (1,30 , 'SALESMAN', 5000);
insert into pivot_data values (1,301, 'SALESMAN', 5500);
insert into pivot_data values (1,30 , 'MANAGER', 10000);
insert into pivot_data values (1,301, 'MANAGER', 10500);
insert into pivot_data values (1,30 , 'CLERK', 4000);
insert into pivot_data values (1,302, 'CLERK',4500);
insert into pivot_data values (2,30 , 'SALESMAN', 6000);
insert into pivot_data values (2,301, 'SALESMAN', 6500);
insert into pivot_data values (2,30 , 'MANAGER', 11000);
insert into pivot_data values (2,301, 'MANAGER', 11500);
insert into pivot_data values (2,30 , 'CLERK', 3000);
insert into pivot_data values (2,302, 'CLERK',3500);
using case when I can write something like this and get the output i want
select country_code
,avg(case when (( dept = 30 and job = 'SALESMAN' ) or ( dept = 301 and job = 'SALESMAN' ) ) then sal end ) as d30_sls
,avg(case when (( dept = 30 and job = 'MANAGER' ) or ( dept = 301 and job = 'MANAGER' ) ) then sal end ) as d30_mgr
,avg(case when (( dept = 30 and job = 'CLERK' ) or ( dept = 302 and job = 'CLERK' ) ) then sal end ) as d30_clrk
from pivot_data group by country_code;
output
country_code D30_SLS D30_MGR D30_CLRK
1 5250 10250 4250
2 6250 11250 3250
what I tried with pivot is like this I get what I want if I have only one ( dept,job) for one alias name. I want to call (30 , 'SALESMAN') or (301 , 'SALESMAN') AS d30_sls. any help how can I do this
SELECT *
FROM pivot_data
PIVOT (SUM(sal) AS sum
FOR (dept,job) IN ( (30 , 'SALESMAN') AS d30_sls,
(30 , 'MANAGER') AS d30_mgr,
(30 , 'CLERK') AS d30_clk
this is a simple example .... my real life scenario is compliated with more fields and more combinations .... So something like using substr(dept,1,2) won't work in my real case .
any suggestions get the result similar to what i get in the case when example is really appreciated.Hi,
Sorry, I don't think there's any way to get exactly what you requested. The values you give in the PIVOT ... IN clause are exact values, not alternatives.
You could do something like this to map all alternatives to a common value:
WITH got_dept_grp AS
SELECT country_code, job, sal
, CASE
WHEN job IN ('SALESMAN', 'MANAGER') AND dept = 301 THEN 30
WHEN job IN ('CLERK') AND dept = 302 THEN 30
ELSE dept
END AS dept_grp
FROM pivot_data
SELECT *
FROM got_dept_grp
PIVOT ( AVG (sal)
FOR (job, dept_grp)
IN ( ('SALESMAN', 30)
, ('MANAGER' , 30)
, ('CLERK' , 30)
;In your sample data (and perhaps in your real data), it's about as easy to explicitly define the pivoted groups individually, like this:
WITH got_pivot_key AS
SELECT country_code, sal
, CASE
WHEN job = 'SALESMAN' AND dept IN (30, 301) THEN 'd30_sls'
WHEN job = 'MANAGER' AND dept IN (30, 301) THEN 'd30_mgr'
WHEN job = 'CLERK' AND dept IN (30, 302) THEN 'd30_clrk'
END AS pivot_key
FROM pivot_data
SELECT *
FROM got_pivot_key
PIVOT ( AVG (sal)
FOR pivot_key
IN ( 'd30_sls'
, 'd30_mgr'
, 'd30_clrk'
;Thanks for posting the CREATE TABLE and INSERT statements; that really helps! -
I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio 2013?
For MS Visio (any version) only the appropriate version of Acrobat *PRO* provides PDFMaker for Visio.
For Visio 2013 specifically you must have Acrobat XI Pro (updated to at least 11.0.1).
See:
http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html
Be well... -
I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio 2013?
For MS Visio (any version) only the appropriate version of Acrobat *PRO* provides PDFMaker for Visio.
For Visio 2013 specifically you must have Acrobat XI Pro (updated to at least 11.0.1).
See:
http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html
Be well... -
Hi,
I need some help... if someone can help its great.
I need to make a statement in Oracle SQL that read data from a file and insert in a Oracle Database ... if someone can show me the syntax of it i appreciate..
ThanksOkay, I see you followed the advice in that other thread and started a new post for you question. Congratulations. Your next lesson in forum etiquette is to give your posts a more relevant subject. Pretty much everybody who posts here needs help with oracle; if they need help with cooking catfish they've come to the wrong place.
It that other thread I suggested using SQL*Loader or External Tables might be a more suitable solution. Find out more.
Cheers, APC -
Capturing data of the previous time interval with Oracle Stream(HotLog)
I read from 10g Oracle manual that Oracle Steam can capture data within specified time interval with begin_data and end_data options.
For example :
BEGIN
DBMS_CDC_PUBLISH.CREATE_CHANGE_SET(
change_set_name => 'set_cns',
description => 'set_cns...',
change_source_name => 'HOTLOG_SOURCE',
stop_on_ddl => 'y',
begin_date => sysdate,
end_date => sysdate + 1);
END;
However if I set begin_date to previous time from now, Oracle doesn't caputre data anymore in this case.(HotLog method)
(I set begin_date => sysdate - 1/24
end_date => sysdate + 1/24.)
Does anybody know to capture the previous time interval with Oracle Stream?Change C2 to:
cursor c2(passing_date IN date) IS
SELECT MONITOR_ID, SAMPLE_ID,
COLL_TIME, DEW_POINT
FROM ARCHIVE_DATA
WHERE COLL_TIME < passing_date
ORDER BY COLL_TIME desc;And rather than populating a table with the three records, you could just select the three records using: where COLL_TIME between Prev3_time and Prev1_time -
Help with Oracle Report Builder and SQL Server2000
Hey guys,
I just installed it Oracle Developer Suite10g with Report Builder and I am trying to use Report builder and wants to connect with SQL Server 2000. The problem that I am running in to is SQL Server 2000 i have is Window Authentication so Does not required to enter user name and password. So how can i connect my report builder to SQL server or is it possible to connect Report builder to SQL server?
Also, I want to create small practice version of database in Oracle how do i do it? what i mean by that is I installed trial version or Oracle developer 10g from www.oracle.com and now trying to get some knowledge with oracle. Could any one can give me some direction in this matter please.
Thank You
KeyHave a look at the reports help for the purpose header and trailer sections. Here is an exert:
"Report sectioning enables you to define multiple layouts in the same report, each with a different target audience, output format, page layout, page size, or orientation. You can define up to three report sections, each with a body area and a margin area: the names of the sections are Header, Main, and Trailer. By default, a report is defined in the Main section. In the other sections, you can define different layouts, rather than creating multiple separate reports. If you wish, you can use the margin and body of the Header and Trailer sections to create a Header and Trailer page for your reports." -
Power Query for Excel - Need Help with Oracle SQL Syntax
Hello everyone,
I am new to Power Query and am not able to figure this out. I am trying to pull in data into my Excel spreadsheet using a specific Oracle SQL query. While in query editor, how do I take the Oracle.Database function and add my SQL statement?
I already know what I want, I don't want it to download all the table names. According to the help page, I should be able to do this but it does not provide a syntax example
Also, I don't understand what "optional options as nullable record" means.
Below is what function and arguments the help page notes. How do I use this?
Oracle.Database(server as text, optional options as nullable record) as table
Any help is greatly appreciated.
Thank you,
JessicaWhen I try this, I get an error
DataSource.Error: Oracle: Sql.Database does not support the query option 'Query' with value '"Select * from Owner.View_Name"'. Details: null
I'm trying to download oracle data from a view into power query - Power Query navigator does not list th eviews from my source, it lists only the tables. When I try write sql statements, it throws me the above
error. This is what I tried
Oracle.Database("Source/Service",[Query="Select * from Owner.View_Name"])
Any ideas how to fix this? -
Help with Oracle PL/SQL and Objects...
Hi,
I wonder if you can help me, I am having some trouble dealing with Oracle objects in PL/SQL. I can declare them, populate them and read from them without any issues.
But I am having some problems with trying to copy records in to other records of the same type, and also with updating existing records. I've made a mock up piece of code below to explain what I mean, it may have a few mistakes as I've written it in notepad but should be reasonably clear.
First I have created a record type, which contains attributes relating to a person.....
CREATE OR REPLACE
TYPE PERSON_RECORD_TYPE AS object (
Person_ID NUMBER(3),
Person_Name VARCHAR(20),
Person_Age NUMBER(2),
static function new return PERSON_RECORD_TYPE );
CREATE OR REPLACE
TYPE BODY PERSON_RECORD_TYPE as
static function new return PERSON_RECORD_TYPE is
BEGIN
return PERSON_RECORD_TYPE (
NULL,
NULL,
NULL,
NULL,
NULL
END;
END;
Then I have created a table type, which is a table of the person record type......
CREATE OR REPLACE
type PERSON_TABLE_TYPE as table of PERSON_RECORD_TYPE;
Finally I have created a procedure which recieves an instance of the person table type and reads through it using a cursor.....
PROCEDURE ADMIN_PERSON (incoming_person IN PERSON_TABLE_TYPE)
IS
-- This is a local record declared as the same type as the incoming object
local_person PERSON_TABLE_TYPE;
-- Cursor to select all from the incoming object
CURSOR select_person
IS
SELECT *
FROM TABLE ( cast (incoming_person AS PERSON_TABLE_TYPE));
BEGIN
-- Loop to process cursor results
FOR select_person_rec IN select_person
LOOP
/* Up to this point works fine...*/
-- If I want to store the current cursor record in a local record of the same type, I can do this....
local_person.person_id := select_person_rec.person_id;
local_person.person_name := select_person_rec.person_name;
local_person.person_age := select_person_rec.person_age;
-- QUESTION 1
-- The above works fine, but in my real example there are a lot more fields
-- Why cant I set the local record to the value of the cursor record like this below..
local_person := select_person_rec;
-- The above line gives a pl/sql error - expression is of wrong type, (as far as I can see the records are of the same type?)
-- QUESTION 2
--Also how do you update an existing record within the original object, I have tried the following but it does not work
UPDATE incoming_person
SET age = (age + 1)
WHERE incoming_person.person_id = '123';
-- The error here is that the table does not exist
END LOOP;
END;
So I hope that you can see from this, I have two problems. The first is that I can store the current cursor record in a local record if I assign each attribute one at a time, but my real example has a large number of attributes. So why can't I just assign the entire cursor record to the local cursor record?
I get a PL/SQL error "Expression is of wrong type" when I try to do this.
The second question is with regards to the update statement, obviously this doesn't work, it expects a table name here instead. So can anyone show me how I should update existing person records in the incoming table type to the procedure?
I hope this makes sense, but I don't think I have explained it very well!!
Any help will be gratefully recieved!!
ThanksI understand why you are having trouble - my own brain started to hurt looking at your questions :)
First off, database types are not records. They can act like records but are "objects" with different characterstics.
You can create a record in PL/SQL but the "type" is of RECORD. You created an OBJECT as BODY_PERSON_RECORD_TYPE.
I don't use database types unless I really need them, such as for working with pipelined functions.
-- QUESTION 1
-- The above works fine, but in my real example there are a lot more fields
-- Why cant I set the local record to the value of the cursor record like this below..
local_person := select_person_rec; local_person is set to the (misnamed) BODY_PERSON_RECORD_TYPE, while SELECT_PERSON_REC is anchored to the cursor and is a RECORD of SELECT_PERSON%ROWTYPE with a field for each column selected in the query. Different types, not compatible.
You should be able to manually assign the object items one by one as object.attribute := record.field one field at a time.
-- QUESTION 2
--Also how do you update an existing record within the original object, I have tried the following but it does not workCheck the on-line documentation for the syntax. You'll probably have to reference the actual value through the table; this is one reason why I don't work with nested tables - the syntax to do things like updates is much more complex. -
Help with Oracle Table Audit Trigger
Hi Guys,
Need some help with the design of a trigger please. I have created one standard audit table where all sensitive data will be audited/inserted. The idea is to insert the column name and the old and new values here, dont want to maintain an audit table for each and every table there is, reporting would be a nightmare.
Trying to fetch all the column names from sys objects then looping through each and inserting the new and old values for them into the audit table. Everything else is fine apart from the actual :old and :new value inserts. The column name is coming from a variable in a cursor and this is where I seem to be failing.
Can anyone help please? What is the correct syntax to use?
CREATE OR REPLACE TRIGGER commission_update
AFTER UPDATE
ON commission
FOR EACH ROW
DECLARE
v_username varchar2(10);
v_column varchar2(20);
-- Get Table Columns
cursor table_column is
select c.name
from sys.col$ c, sys.obj$ t
where t.obj# = c.obj#
and t.type# in (2, 3, 4)
and bitand(c.property, 32) = 0 /* not hidden column */
and t.name = 'COMMISSION';
BEGIN
-- Find username of person performing UPDATE into table
SELECT user
INTO v_username
FROM dual;
open table_column;
loop
fetch table_column
into v_column;
EXIT WHEN table_column%NOTFOUND;
-- Insert record into audit_record
INSERT INTO audit_record
( aud_code,
aud_ban_code,
aud_user,
aud_table,
aud_column,
aud_old_val,
aud_new_val,
aud_date )
VALUES
( xaudit_record.nextval,
:old.com_ban_code,
v_username,
'COMMISSION',
v_column,
:old.v_column, /* problem here!!!!!!! */
:new.v_column, /* problem here!!!!!!! */
sysdate );
end loop;
close table_column;
END;
/What does auditing mean in the financial environment? "An audit is a professional, independent examination of a company's financial statements and accounting documents according to generally accepted accounting principles."
What does it mean in database terms? Surely, the basic definition would be the same, ito of a proper independent examination of changes in the database according to accepted principles?
And just how does a trigger live up to that? When it is fully dependent on being enabled for that transaction in order to examine it? It is trivial to disable a trigger, make changes, and re-enable it.
So what happens to your "auditing" then?
Do you really think that a trigger suffices as a means to audit changes in a table? And if so, what logic and reasoning do you use to discard Oracle's auditing features that are built into the core of the database? -
Need help with Oracle reports 10g
Hi
we have a requirement in a oracle 10g application
this application is on the unix server
the requirement is such that the user must be able to print a report directly to the default printer
when the user clicks on the button a report must be printed on the users default printer
can u help us understand that how can we configure the local printer of the user on the unix server?hi, piyush9010
Check this following link...
Oracle reports 10g output directly to printer
Oracle reports 10g output directly to printer
Make your printer as shared printer then try.
Use DESTYPE=PRINTER.
http://qamarsyed.blogspot.com/2011/02/how-to-print-oracle-report-to-network.html
http://docs.oracle.com/cd/E14571_01/bi.1111/b32121/pbr_cla005.htm#i637246
Hope this helps
If someone's response is helpful or correct, please mark it accordingly. -
Help with Oracle 9i/10g on RedHat 4?
If anybody can help would be greatly appreciated...
I get the same error with Oracle 9i & 10g when installing on Red Hat Fedora 4, it's java related...
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2007-03-16_01-09PM/jre/lib/i386/libawt.so: connat restore segment prot after reloc: Permission Denied
Red Hat Fedora is weak on java, it only has the Java 1.4 JRE installed. I tried to upgrade to Sun's JRE 6 but got dependency errors.
JonRed Hat Fedora 4Does not exist.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2007-03-16_01-09PM/jre/lib/i386/libawt.so: connat restore segment prot after reloc: Permission DeniedSolution 1: Modify /etc/selinux/config and change value of SELINUX to "disabled" and reboot computer.
Solution 2: Upgrade selinux-policy-targeted-1.25.2-4.noarch.rpm (Use command: "yum upgrade selinux-policy-targeted")
Red Hat Fedora is weak on java, it only has the Java 1.4 JRE installed. I tried to upgrade to Sun's JRE 6 but got dependency errors.??? OUI does not have to do with external JRE.
Oracle Installation comes with bunled JRE.
If you are using Fedora then you might consider these articles useful:
http://ivan.kartik.sk/oracle/install_ora9_fedora.html
http://ivan.kartik.sk/oracle/install_ora10gR2_fedora.html -
hi guys,
I really need ur help with this.
I have a remote session bean that retrieves a list of books from the database using entity class and I call the session bean from a web service. The problem is that when i display the books in a jsp directly from the session bean everything works ok but the problem comes when I call the session bean via the web service than it throws this:
Exception Description: An attempt was made to traverse a relationship using indirection that had a null Session. This often occurs when an entity with an uninstantiated LAZY relationship is serialized and that lazy relationship is traversed after serialization. To avoid this issue, instantiate the LAZY relationship prior to serialization.
at oracle.toplink.essentials.exceptions.ValidationException.instantiatingValueholderWithNullSession(ValidationException.java:887)
at oracle.toplink.essentials.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:233)
at oracle.toplink.essentials.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:105)
at oracle.toplink.essentials.indirection.IndirectList.buildDelegate(IndirectList.java:208)
at oracle.toplink.essentials.indirection.IndirectList.getDelegate(IndirectList.java:330)
at oracle.toplink.essentials.indirection.IndirectList$1.<init>(IndirectList.java:425)
at oracle.toplink.essentials.indirection.IndirectList.iterator(IndirectList.java:424)
at com.sun.xml.bind.v2.runtime.reflect.Lister$CollectionLister.iterator(Lister.java:278)
at com.sun.xml.bind.v2.runtime.reflect.Lister$CollectionLister.iterator(Lister.java:265)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:129)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:277)
at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:100)
at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:141)
at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:315)
at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142)
at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:108)
at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:320)
at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:93)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:454)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:176)
... 29 more
This happens when I test the web service using netbeans 6.5.
here's my code:
session bean:
ArrayList bookList = null;
public ArrayList retrieveBooks()
try
List list = em.createNamedQuery("Book.findAll").getResultList();
bookList = new ArrayList(list);
catch (Exception e)
e.getCause();
return bookList;
web service:
@WebMethod(operationName = "retrieveBooks")
public Book[] retrieveBooks()
ArrayList list = ejbUB.retrieveBooks();
int size = list.size();
Book[] bookList = new Book[size];
Iterator it = list.iterator();
int i = 0;
while (it.hasNext())
Book book = (Book) it.next();
bookList[i] = book;
i++;
return bookList;
Please help guys, it's very urgentYes i have a relationship but i didnt want it to be directly. Maybe this is a design problem but in my case I dont expect any criminals to be involved in lawsuit. My tables are like that:
CREATE TABLE IF NOT EXISTS Criminal(
criminal_id INTEGER NOT NULL AUTO_INCREMENT,
gender varchar(1),
name varchar(25) NOT NULL,
last_address varchar(100),
birth_date date,
hair_color varchar(10),
eye_color varchar(10),
weight INTEGER,
height INTEGER,
PRIMARY KEY (criminal_id)
ENGINE=INNODB;
CREATE TABLE IF NOT EXISTS Lawsuit(
lawsuit_id INTEGER NOT NULL AUTO_INCREMENT,
courtName varchar(25),
PRIMARY KEY (lawsuit_id),
FOREIGN KEY (courtName) REFERENCES Court_of_Law(courtName) ON DELETE NO ACTION
ENGINE=INNODB;
CREATE TABLE IF NOT EXISTS Rstands_trial(
criminal_id INTEGER,
lawsuit_id INTEGER,
PRIMARY KEY (criminal_id, lawsuit_id),
FOREIGN KEY (criminal_id) REFERENCES Criminal(criminal_id) ON DELETE NO ACTION,
FOREIGN KEY (lawsuit_id) REFERENCES Lawsuit(lawsuit_id) ON DELETE CASCADE
ENGINE=INNODB;So I couldnt get it. -
How to uniquely identify a users session
Hi,
I need to identify a users session, I am aware of the wwctx_api.get_user function but this returns the user name, my problem is that, how do I identify a session, if the user logs on twice then the get_user() function is not unique basically I need to identify the session by some kind of id number and no the users name.
or can I stop a user logging on twice ?
thanks in antcipation.
SD.it will cause problems in the database !..
in another words it is overloading objects.........
Maybe you are looking for
-
Open qty errin Selection list For Ref Doc. screen while converting to order
Hi SAP Gurus, For one of my materials, the open quantity is not updating in the Selection list For Ref Doc. screen while converting to sales order. Can you please help me? Thanks, Ketan
-
What setting need in SAP R/3 if i want to send only changed records to XI
Hi All I had problem while sending Idoc from SAP R/3 to XI Thing is i want to send only the changed records in Idoc not all so what settings i need to in SAP R/3 ? Can any one explain me how to do this... Adv thanks and Points
-
Attachment functionality in ROS prescreen
Hi all, The attachment functionality in ROS standard Prescreen is not working in our SRM system. Can somebody please suggest what steps need to be done to make it work? We are done with the necessary configurations. Thanks in advance for any suggesti
-
i bought creative WebCam Notebook, i used several applications to test it, and found the following problems (i use driver version .4..322 for WinXP - XP SP2): in PC-CAM center (which is supplied with the camera) when i press "Live video" - i can't se
-
Hi, How and where can I get the B2MML XI Content for ECC 5.0? OSS didn't know Thanks Vamsi ps: I did not get any responses from the ERP forum.