Find error table created using DBMS_ERRLOG
Hello,
I am working on Oracle 10.2.0.5 and have a requirement to log the Error records without allowing the Load process to fail. In order to achieve this, I have decided to use the DBMS_ERRLOG functionality provided.
However, there is a catch. The application has approx. 100+ database tables, which are loaded with data received in flat files, and many of them have length nearning 30 characters.
Now, DBMS_ERRLOG, will automatically create an error table corresponding to database table, but will only consider first 25 characters. And since, many tables have similar names differing only towards the end. Hence, my question is, Is there any data dictionary view which might store the underlying database table name?
I am aware of two options to achieve this:
1. Maintain a document to reference each Error table to its database table. This being a manual approach, I am trying to avoid it.
2. Use the USER_TAB_COMMENTS, which will store the table name in comment. Although I have seen this happening, but do not see this as sure-shot approach, since I do not remember reading this anywhere in documentation.
Can anybody suggest a better approach to manage the situation?
padders answer is a good one. I do not see the problem since you can create the error log tables with names of your choosing in any schema you want. Don't let oracle name the tables. Use SQL to create the PL/SQL for all your tables based on a tag you put in the table comments or based on another table with the table names to be logged.
DBMS_ERRLOG.create_error_log
dml_table_name => 'real_schema.my_thirty_character_table_name',
err_log_table_name => 'my_thirty_character_table_name',
err_log_table_owner => 'error_schema',
skip_unsupported => TRUE
Table_Name
Error_Table_Name
Error_SchemaHeader
my_thirty_character_table_name
my_thirty_character_table_name
error_schema
my_short_name
my_short_name_err_log
support
With so many tables I would write a generator to create all the error log tables and the DML (insert, update or merge statements) with error logging for all the tables based on the above table and maybe put the DML in an API package that can be called from your app.
Similar Messages
-
Finding Error while creating Data Integrator Repositor
Hi,
I am working in SAP BO Data Integrator. I have created databeses and its login. Installed SQL Server and while installing Data Integrator I got an error for creating a new repository which is as follows
Cannot open connection to the repository. The error message from the underlying DBMS is <ODBC call <SQLDriverConnect> for data source <MSSERVER\SQLEXPRESS> failed: <[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'AIO_REPO_IDOC'. The user is not associated with a trusted SQL Server connection.>. Notify Customer Support.>. (BODI-20006)
Can anyone resolve this problem.
Edited by: sap_beginnner on Aug 9, 2010 4:10 PMHi,
I used SQL Server Authentication to logon to databases and for DI Version I am using SAP BusinessObjects XI 3.2.
I tried it again by deleting all databases and then create the same databases but on creating repository for table AIO_REPO_IDOC in repository manager gives error which is as follows
Cannot open connection to the repository. The error message from the underlying DBMS is <ODBC call <SQLDriverConnect> for data source <IDHASOFT238933\SQLEXPRESS> failed: <[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'AIO_REPO_IDOC'. The user is not associated with a trusted SQL Server connection.>. Notify Customer Support.>. (BODI-20006)
An error occurred during creation of the local repository. (BODI-300054)
I also tried through another tool to acces the databases. It is working successfully.
Edited by: sap_beginnner on Aug 10, 2010 8:58 AM -
To find the table name using field name
Hi,
Do we have any transaction code using field name to find out the table name
Regards,
P.Arunkumar.Hi Arun,
The best way to find out table from field is,
Use SE15 Transaction->dictionary fields ->table fields->goto table field columns
Enter ur fields..
or you can use ST05
Reward points if it is useful
Regards,
R.Brahmankar -
Tables created using Enterprise Console Manager do not show up in SQLPLUS
I am struggling with Enterprise console manager and command line SQLPLUS.
I have tried scott/tiger , system/manager and the new user that I have created. But I am having the following problems:
1. I cannot connect as NORMAL through Enterprise Console Manager if I use scott/tiger OR new/paswd. Only way I can connect as NORMAL is using system/manager
2. The tables that I create using Enterprise Console Manager (while connected as system/manager in NORMAL mode) do not show up in the command line SQLPLUS. I am check this by running the following command:
SELECT OWNER, OBJECT_NAME FROM ALL_OBJECTS WHERE OBJECT_NAME LIKE '%TEST%';
While running the above command I am conected to SQLPLUS using system/manager WITHOUT SYSDBA
3. Lastly, I have a JAVA class which establishes as connection to the database using system/manager. But I can access only the tables that I create using the Enterprise Console Manager. If I create a table using command line SQLPLUS (while connected as system/manager), I cannot access it through Java program.
I am struggling with this since last morning and now I have run out ways to debug what is happening. Can anybody suggest any ways to tackle this?
Thanks in advance,
MaheshPrior to 11g, when you created a table or whatever, you automatically allocated one extent.
This is now no longer true and depends on a parameter I don't remember.
dba_segments is a summary of dba_extents.
Obviously, if there is no extent allocated, the table (view is defined with inner join) will not show up.
You could qualify this is as a bug and submit a SR to Oracle. But then the performance impact may be huge.
Sybrand Bakker
Senior Oracle DBA -
Reuse Table created using AET in CRM 7.0 EHP 1
Hello,
I have created table using AET for Lead transaction and displayed it as a assignment block. This works fine.
Now I want to reuse the same table in Opportunity as an assignment block. When open the configuration page and go to show enhancement, after clicking on the 'ADD REUSEABLE TABLE' I am able to select the table in Lead. But after this it should be shown in assignent block but invain. I also had a look into the Tcode bsp_wd_cmpwb for oppotunity but even there in the configuartion page it is not showing up. How do I show this reusable table as assignment block on opportunity page.
While creating the table in Lead it showed only 'ORDERADM_H' under which the table is created. While in opportunity after adding the table using 'ADD REUSEABLE TABLE' , if I try to add new table it shows 'ORDERADM_I' only .... why so?
I did not find any document on this... but yes there are few on 'ADD REUSABLE FIELDS' accordingly it should show up... don't know where I am going wrong.
Regards,
Jaya.Hi Jaya,
Please refer to Note 1606039 - Table-type enhancement not displayed for opportunity, as there seems to be a program error..
If you have already refered to this note then can you let me know the steps which you have followed to create this table and which version of CRM are you using, kindly also note that you have to activate the business functions applications depending on the objects that you are enhancing, for example:
EXT_BO (Enhanced Object) EXT_BO_PART (Part of Enhanced Object) SWITCHID (Switch ID) Business Function
SDP CUSTOMER_H CRM_IPS_4S_1 CRM_IPS_4S_1
SDP CUSTOMER_I CRM_IPS_4S_1 CRM_IPS_4S_1
SDP ORDERADM_H CRM_IPS_4S_1 CRM_IPS_4S_1
SDP ORDERADM_I CRM_IPS_4S_1 CRM_IPS_4S_1
SSP CUSTOMER_H CRM_IPS_4S_1 CRM_IPS_4S_1
SSP CUSTOMER_I CRM_IPS_4S_1 CRM_IPS_4S_1
SSP ORDERADM_H CRM_IPS_4S_1 CRM_IPS_4S_1
SSP ORDERADM_I CRM_IPS_4S_1 CRM_IPS_4S_1
let me know if this addresses your query...let me know in case of any issues..
Edited by: ar_on_crm on Oct 30, 2011 9:11 PM -
How to store Image data in table created using se11?
Please Help me I am Working on a project there i have a requirement of saving image in database table
along with All other information.
with Regards
laxmikant soniHello Laxmikant,
You can use SE78 to store the file and the data will be stored in STXBITMAPS table.
To put it in MIME repository refer to the below links.
FM for uploading Image to SAP
Dynamic Use of Mime in component
Regards,
Thanga -
How do we use Data rules/error table for source validation?
How do we use Data rules/error table for source validation?
We are using OWB repository 10.2.0.3.0 and OWB client 10.2.0.3.33. The Oracle version is 10 G (10.2.0.3.0). OWB is installed on Linux.
I reviewed the posting
Re: Using Data Rules
Thanks for this forum.
I want to apply data rules to source table/view and rule violated rows should go to defined error table. Here is an example.
Table ProjectA
Pro_ID Number(10)
Project_name Varchar(50)
Pro_date Date
As per above posting, I created the table in object editor, created the data rule
NAME_NOT_NULL (ie project name not null). I specified the shadow table name as ProjectA_ERR
In mapping editor, I have projectA as source. I did not find error table name and defined data rules in table properties. It is not showing up the ERR group in source table
How do we bring the defined data rules and error table into mapping?
Are there any additional steps/process?
Any idea ?
Thanks in advance.
RIHi,
Thanks for your reply/pointer. I reviewed the blog. It is interesting.
What is the version of OWB used in this blog?
After defining data rule/shadow table, I deployed the table via CC. It created a error table and created the all the source coulmns in alphabatical order. If I have the primary key as 1st coulmn (which does not start with 'A') in my source, it will apprear middle of of columns in error table.
How do we prevent/workaround this?
If I have source(view) in sch A, how do we create Error table in Sch B for source(view)?
Is it feasible?
I brought the error table details in mapping. Configured the data rules/error tables.
If I picked up 'MOVE TO ERROR' option, I am getting "VLD-2802 Missing delete matching criteria in table. the condition is needed because the operator contain at least one data rule with a MOVE TO ERROR action"
On condition Loading - I have 'All constraints' for matching criteria.
I changed to "no constraints' still I get the above error.
If I change to 'REPORT' option instead of 'MOVE TO ERROR' option, error goes off.
Any idea?
Thanks in advance.
RI -
How to use error table in mapping level?
Hi all
Any one please tell me how to use error table in mapping level or how to handle the errors in mapping.
I am creating one error table in oracle but i dont know how to use it in mapping.
Thanks in advance.
KumarHi Kumar,
You need to use Error Table along with the Data Rule .
Error tables are used with Logical error handlers (Data Rules). Detailed description on using data rules is explained in the following document
http://www.oracle.com/technology/products/warehouse/pdf/OWB10gR2_ETLandBusinessRules.pdf
In a nut shell usage of error tables is as follows.
1. Create a data rule associate it with a table (Target table or table in which you load data).
2. Use the table in a mapping as target table.
3. Deploy the table and mapping.
Now in the target schema one more table will be created with the name <target table name>_ERR. When a mapping is executed the data which violates the data rule gets into this error table.
The following has to be done to have error table name of customers choice.
1. Right click on the table and click configure.
2. Give the table name in "shadow table name" section.
3. Deploy the table.
4. Use this table in a mapping. Now in the mapping on this table properties in "Error Table Name" section the name of the table specified in "shadow table name" will be populated.
Thanks,
Sutirtha -
Hi all,
There is a property named error table for source and target operators in mapping editor. Can anyone tell me about its function? I mean where i can use this feature in mapping. and what is the structure of this error table? where i have to create this error table ...in target schema or OWB designer?The document doesn't tell much about it.
Plzz tell me as soon as possible.
Thanks & Regards,
Sumanta DasHi Sumanta. Error Tables can be used if you are having any data rules.
First you need to open a table (for which you want to have error table) ,create data rules and then specify the shadow table name in the data editor for table. After that is done, you need to deploy the table. This will create the error table.
all the error tables will have the below columns by defalut The columns which are present in the original table will also be present in the error table in adddition to the below 7 columns in alphabetical order.
ERR$$$_AUDIT_RUN_ID
ERR$$$_AUDIT_DETAIL_ID
ERR$$$_ERROR_ID
ERR$$$_ERROR_REASON
ERR$$$_SEVERITY
ERR$$$_OPERATOR_NAME
ERR$$$_ERROR_OBJECT_NAME
I suggest you try creating an error table and then you will understand better than what i said.
Hope this helps
Regards
Vibhuti -
Error while creating new tab/user...
hi there ...
I have this error while creating using this <a href="http://https://www.sdn.sap.com/irj/sdn/message?messageID=3171191">https://www.sdn.sap.com/irj/sdn/message?messageID=3171191</a>
that i have posted for help...
I have encountered this error
"Error occurred while trying to access desktop: "portal_content/every_user/general/defaultDesktop". The object does not exist or you are not authorized to access it. If this problem persists, contact your system administrator."
I never tried to create anything new inside the EP so i have encountered this as the 1st error ...
Can anyone help me?? or have encountered this prob as well? do u have any solutions to it??
Thanks loads
QuatreHello quatre,
The error seems to be due to the fact that your default desktop has been
corruptd or maybe deleted or this could be jst a permission isuue .
For restoring the desktop pls try this ,Access the Master rule collection ,
Try this url for the display rules.Login with admin and restore your desktop.
http://<host>:<port>/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fadministrator!2fsystem_admin!2fsystem_admin_role!2fcom.sap.portal.system_admin_ws!2fcom.sap.portal.themes!2fcom.sap.portal.portalDisplayRules
Assign the restored desktop to your user id.
<b>Or this could be just a permission issue.
<i>See the permission for default framework and defaultdesktop ,
assign everyone to read permission</i></b>
Hope this helps you
Regards
Vineeth -
Is it possible to find the table based on the Date ?
Dear Team ,
Is it possible to find the table based on the Date ?
I have created an table ,But forgot the Table Name .
Is it possible to find the Tables created on particular Date .
Regards ,
Augustineas date is record the time also below query will work.
select * from user_objects
where
object_type = 'TABLE' and
to_date(created,'DD-MON-YYYY') =to_date('<your date value in DD-MON-YYYY format>','DD-MON-YYYY');
Edited by: shaileshM on Feb 24, 2010 9:39 PM -
Error while creating the DWH tables using DAC
Hi,
I am getting error while creating the DWH tables using DAC. I have created a ODBC DSN using merant driver with DAC repository DB credentials and the test connection is successful. And while creating the tables i gave the olap dw credentials and the DSN name which i created earlier. But it throws the error as below:
Please find the below mentioned error message
=====================================
STD OUTPUT
=====================================
CREATING SIEBEL DATABASE OBJECTS
F:\DAC\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u infdomain /p ******* /c DB_DAC /G "SSE_ROLE" /f F:\DAC\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b "" /K "" /X "" /W N
Error while importing Siebel database schema.
=====================================
ERROR OUTPUT
=====================================
Siebel Enterprise Applications ODBC DDL Import Utility, Version 7.7 [18030] ENU
Copyright (c) 2001 Siebel Systems, Inc. All rights reserved.
This software is the property of Siebel Systems, Inc., 2207 Bridgepointe Parkway,
San Mateo, CA 94404.
User agrees that any use of this software is governed by: (1) the applicable
user limitations and other terms and conditions of the license agreement which
has been entered into with Siebel Systems or its authorized distributors; and
(2) the proprietary and restricted rights notices included in this software.
WARNING: THIS COMPUTER PROGRAM IS PROTECTED BY U.S. AND INTERNATIONAL LAW.
UNAUTHORIZED REPRODUCTION, DISTRIBUTION OR USE OF THIS PROGRAM, OR ANY PORTION
OF IT, MAY RESULT IN SEVERE CIVIL AND CRIMINAL PENALTIES, AND WILL BE
PROSECUTED TO THE MAXIMUM EXTENT POSSIBLE UNDER THE LAW.
If you have received this software in error, please notify Siebel Systems
immediately at (650) 295-5000.
F:\DAC\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u infdomain /p ***** /c DB_DAC /G SSE_ROLE /f F:\DAC\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b /K /X /W N
Connecting to the database...
28000: [DataDirect][ODBC Oracle driver][Oracle]ORA-01017: invalid username/password; logon denied
Unable to connect to the database...
any help is appreciated.
Thanks,
RMThe fact that you are getting an "ORA-01017: invalid username/password; logon denied" message indicates that you are at least talking to the database.
The log shows that username "infdomain" is being used. Can you double check the username and password you have in DAC in a SQL*Plus/SQL Developer session?
Please mark if useful/helpful,
Andy. -
JPA - TroubleShooting - Error in Datatypes used in Creating Tables
h1. JPA - TroubleShooting - Error in Datatypes used in Creating Tables
h2. Error Description
The error appears when JPA is trying to automatically
generate tables from Entities. It uses types it shouldn't because they aren't
supported by the Database Engine. If you examine the createDDL.jdbc file you
are going to find not supported data types. You could run the statements that
are listed there directly to your Database Engine and find out that they don`t
run generating syntax errors like the error posted below.
h3. Query example (statement)
CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50), SEQ_COUNT NUMBER(19))h3. PostgreSQL Error whent trying to execute the statment
CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50),
SEQ_COUNT NUMBER(19))": org.postgresql.util.PSQLException: ERROR: syntax
error near "("
h3. MSSQL 2000 Error when trying to execute the statement:
[CREATE - 0 row(s), 0.578 secs] [Error Code: 2715, SQL State: HY000] [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Column or parameter #1: Cannot find data type NUMBER
h3. FireBird Error when trying to execute the statment
Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 62
Statement: CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50),
SEQ_COUNT NUMBER(19))
h2. TroubleShooting
Looks like it wants "NUMERIC", not "NUMBER".
[http://www.postgresql.org/docs/8.1/interactive/datatype.html#DATATYPE-NUMERIC]
I had this problem using Firebird. I found out it had to do
with the database jdbc driver. I tried using a different database engine, like
Microsoft SQL Server 2000 with the corresponding driver and it worked as it
should. I suspect the JDBC driver has to supply in some way the datatypes it
supports to JPA TopLink Library.
Edited by: juanemc2 on Apr 1, 2008 7:39 AMIn Hibernate you can supply the "dialect" to use for SQL generation. I assume TopLink to have a similar functionality.
This is not a generic JPA issue, but rather something with the specific implementation you're using.
Or rather it is a generic SQL issue, caused by different database engines using slightly (or not so slightly) different SQL syntax which causes problems when generating SQL automatically. -
Logical error in creating tables using db link in solaris
Hi,
While creating table using the syntax create table newtab...as select * from tab@dblink .. I am facing a problem. The newtab table created is having a structure different (from datalength point of view of varchar2 and char datatypes) from the source. The data length is getting tripled i.e. if a column a is varchar2(20) in tab then it is becoming --- a varchar2(60) in newtab. This is happening in solaris environment when the two databases are in 2 different servers. Please let me know if there are any patches to resolve the problem.
Thanks
ArnabORA-02019: connection description for remote database not foundHave you used this database link successfully for some other queries?
The error posted seems to indicate that the DB Link is not functional at all. Has it worked for any other type of DML operation or is this the first time you ever tried to use the link? -
Error logging using DBMS_ERRLOG package
Hi All,
We have following tables, which are growing day-by-day and giving performance problems.
There are total 25 tables (1 parent and 24 child tables, with different structures).
Here i gave some Samples, NOT actual table structures.
Actually we don't require all the data for our regular activities.
So we thought of moving part of the data into Other (Archive) tables, on daily basis.
Using SOME criteria, we are finding eligible records to be moved into Archive tables.
All child records follows the Parent.
Original Tables
==================
create table customer (c_id number(5), c_name varchar2(10),c_address varchar2(10));
create table orders (o_id number(5),c_id number(5),o_info clob);
create table personal_info (p_id number(5),c_id number(5), age number(3), e_mail varchar2(25), zip_code varchar2(10)):
Archive Tables
==============
create table customer_arch (c_id number(5), c_name varchar2(10),c_address varchar2(10));
create table orders_arch (o_id number(5),c_id number(5),o_info varchar2(100));
create table personal_info_arch (p_id number(5),c_id number(5), age number(3), e_mail varchar2(25), zip_code varchar2(10)):
Temp table
==========
create table C_temp (rnum number(5), ids number(5));
Sample Code
============
PROCEDURE payment_arch
IS
l_range_records NUMBER (4) := 2000;
l_total_count NUMBER(10) := 0;
l_prev_count NUMBER(10) := 0;
l_next_count NUMBER(10) := 0;
BEGIN
--Finding eligible records to be moved into Archive tables.
INSERT INTO C_TEMP
SELECT ROWNUM,c_id FROM customer;
SELECT NVL(MAX(ID),0) INTO l_total_count FROM OPP_PAYMENT_ID_TEMP;
IF l_total_count > 0 -- Start Count check
THEN
LOOP -- Insert Single payments
IF ((l_total_count - l_prev_count) >= l_next_count )
THEN
l_next_count := l_prev_count + l_range_records;
ELSE
l_next_count := l_total_count;
END IF;
l_prev_count := l_prev_count ;
INSERT INTO customer_ARCH
SELECT * FROM customer a
WHERE c_id in (SELECT c_id
FROM C_TEMP b WHERE rnum BETWEEN l_prev_count AND l_next_count);
INSERT INTO orders_ARCH
SELECT * FROM orders a
WHERE c_id in (SELECT c_id
FROM C_TEMP b WHERE rnum BETWEEN l_prev_count AND l_next_count);
INSERT INTO personal_info_ARCH
SELECT * FROM personal_info a
WHERE c_id in (SELECT c_id
FROM C_TEMP b WHERE rnum BETWEEN l_prev_count AND l_next_count);
-- Delete Archived Single Payments
DELETE customer a
WHERE c_id in (SELECT c_id
FROM C_TEMP b WHERE ID BETWEEN l_prev_count AND l_next_count);
COMMIT;
IF l_next_count = l_total_count
THEN
EXIT;
else
l_prev_count := l_next_count;
END IF;
END LOOP; -- Insert Single payments
END IF; -- End Count check
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
WHEN OTHERS
THEN
RAISE_APPLICATION_ERROR('-20002','payment_arch: ' || SQLCODE ||': ' || SQLERRM);
END Payment_Arch;
In production, we may require to archive 25000 Parent records and 25000*4*3 child records per day.
Now the problem is:
By any chance, if record fails, We want to know the Exact record ,just "c_id" for the particular table
where the error raised and Error message.
We thought of using DBMS_ERRLOG package, but we CAN NOT log errors of Different tables into SINGLE error log table.
In the above case It require 3 Different tables and it logs all columns from the original table.
It's a un-necessary burden on the database.
We would be very glad, if anyone can help us with some good thought.
Thanks in advance.
srinivasduplicate post
Insufficient privilege error when executing DBMS_ERRLOG through PLSQL
Maybe you are looking for
-
"updating ipod failed..files could not be read from or written to+
help!! this is the message that appears everytime we try to add a song to the ipodshuffle on itunes. we have updated itunes, the ipods and windows and nothing is working. we even restored the ipod to factory settings and it still wont work properly!!
-
Goods Receipt wrt Outbound delivery and Restrict GR wrt PO!
Hi, In a scenario of intercompany, i need a functionality! GR should be done only wrt Outbound Delivery but not wrt Purchase order for intercompany document type. Pl. help!
-
2.4ghz MacBook Pro/30" Cinema Display Compatibility
I have a 15" 2.4ghz MacBook Pro (Intel Core 2 Duo) ...can hook it up to a 30" Cinema Display at the full resolution? If so, what adapter do I need? Thanks!
-
Problem in export/import work repo !!!
Hi All, Good Morning. I have a problem with exporting and importing repositories. The description of the problem is given below, I have a remote machine in that sunopsis is installed and all the developments,implementations,testing are happening ther
-
Need more info - same spontaneous shutdown problem...
I'm using a very trustworthy 2.5 year-old T500 running Vista SP2 32-bit and my laptop has begun to have the same spontaneous shutdown problems as other users who've written here. I suspect it's overheating. I normally use my T500 on a docking stati