Problem trying to create and manage external tables
Hello guys,
I am having problems having created my external tables trying to select from them. I created the table thus:
create table job_ext
(job_id number(3),
FUNCTION varchar2(30) )
organization external (type oracle_datapump default directory test_dir
access parameters (records delimited by newline fields delimited by "~" (job_id number(3) ,
FUNCTION varchar2(30) ) )
location ('testdump.lst')
but on running select * from job_ext, I get the error
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "identifier": expecting one of: "logfile, nologfile, version" etc..
KUP-01008: the bad identifier was: records
KUP-01007: at line 1 column 1
ORA-06512: at "SYS.ORACLE_DATAPUMP", line 19
ORA-06512: at line 1
what am I not doing right.
Secondly, I wish to ask if an directory object is created, will it be visible on the OS file system?? I am using Oracle 10g complete reference for study but it does not throw light on this.
thanks
Hi,
It looks like you may need to grant permissions to the target directory.
The ORA-29913 error can also happen in external tables when you don't grant read and write permissions to the directory:
CREATE OR REPLACE DIRECTORY extdir AS '/u01/app/oracle./extdir';
GRANT READ ON DIRECTORY extdir TO myowner;
GRANT WRITE ON DIRECTORY extdir TO myowner;
Also, see BUG 5172459 (MetaLink Note:373168.1)
The problem is that the message file for external tables oin not the English version. These steps will address the issue:
1. cd $ORACLE_HOME/rdbms/mesg
2. cp KUP<lang>.msb KUP<lang>.msb.BAK
3. cp kupus.msb KUP<lang>.msb
http://www.dba-oracle.com/t_ora_29913_external_table_error.htm
Similar Messages
-
Trouble Creating View on External Table in Diff Schema
I am unable to create a view in a different schema on an external table in a different schema, even when I am connected to my database as SYS as SYSDBA.
CREATE VIEW WH1.EXT1VIEW AS SELECT * FROM WH1.EXT1VIEW;
returns the error:
ORA-06564: object ER_ADMIN_DIR does not exist
I created a directory:
CREATE DIRECTORY ER_ADMIN_DIR AS 'C:\ER_Init';
Granted privs:
grant read,write on directory ER_ADMIN_DIR to public;
Created the external table EXT1 in a different schema WH1:
CREATE TABLE WH1.EXT1 (TABLE_NAME VARCHAR2(100), COLUMN_NAME VARCHAR2(100))
ORGANIZATION EXTERNAL (TYPE ORACLE_LOADER DEFAULT DIRECTORY SYS.ER_ADMIN_DIR
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
LOCATION ('FILE1.TXT')
REJECT LIMIT UNLIMITED;
I can query from the table successfully connected as SYS:
SQL> select count(*) from wh1.ext1;
1008
1 row selected.
However when I try to create a view on that table connected as SYS:
CREATE VIEW WH1.EXT1VIEW AS SELECT * FROM WH1.EXT1VIEW;
I get the following error:
ORA-06564: object ER_ADMIN_DIR does not exist
I can connect over to the WH1 schema and create the view successfully, however due to a specific situation I need to be able to create the view from the SYS schema. I can create the view FORCE and it creates with compilation errors, however the view cannot be compiled successfully from SYS.
Is there a known bug on creating views on external tables remotely?
Thanks for any help!
TinaI have been able to reproduce your error, using scott instead of sys, and resolve it, as demonstrated below. The combination that I found that worked consisted of having wh1 grant select on ext1 to scott explicitly and using set current_schema to wh1, so that ext1view did not require the wh1 qualifier.
scott@ORA92> CREATE USER wh1 IDENTIFIED BY wh1
2 /
User created.
scott@ORA92> GRANT CONNECT, RESOURCE TO wh1
2 /
Grant succeeded.
scott@ORA92> CREATE OR REPLACE DIRECTORY er_admin_dir AS 'c:\er_init'
2 /
Directory created.
scott@ORA92> CREATE TABLE wh1.ext1
2 (table_name VARCHAR2(100),
3 column_name VARCHAR2(100))
4 ORGANIZATION EXTERNAL
5 (TYPE ORACLE_LOADER
6 DEFAULT DIRECTORY er_admin_dir
7 ACCESS PARAMETERS
8 (RECORDS DELIMITED BY NEWLINE
9 FIELDS TERMINATED BY ','
10 MISSING FIELD VALUES ARE NULL)
11 LOCATION ('file1.txt'))
12 REJECT LIMIT UNLIMITED
13 /
Table created.
scott@ORA92> CREATE OR REPLACE VIEW wh1.ext1view AS SELECT * FROM wh1.ext1
2 /
CREATE OR REPLACE VIEW wh1.ext1view AS SELECT * FROM wh1.ext1
ERROR at line 1:
ORA-06564: object ER_ADMIN_DIR does not exist
scott@ORA92> CONNECT wh1/wh1
Connected.
scott@ORA92> @ LOGIN
scott@ORA92> SET ECHO OFF
GLOBAL_NAME
[email protected]2
wh1@ORA92> GRANT SELECT ON ext1 TO scott
2 /
Grant succeeded.
wh1@ORA92> CONNECT scott/tiger
Connected.
wh1@ORA92> @ LOGIN
wh1@ORA92> SET ECHO OFF
GLOBAL_NAME
[email protected]A92
scott@ORA92> ALTER SESSION SET CURRENT_SCHEMA = wh1
2 /
Session altered.
scott@ORA92> CREATE OR REPLACE VIEW ext1view AS SELECT * FROM wh1.ext1
2 /
View created.
scott@ORA92> ALTER SESSION SET CURRENT_SCHEMA = scott
2 /
Session altered.
scott@ORA92> SELECT * FROM wh1.ext1view
2 /
TABLE_NAME
---------------------------------------------------------COLUMN_NAME
---------------------------------------------------------tab1
col1
tab2
col2
scott@ORA92> -
Error Creating View on External Table
I create my oracle directory connected as SYS as SYSDBA and grant read,write to public:
CREATE OR REPLACE DIRECTORY ER_ADMIN_DIR AS 'C:\win32app\ingr\ER\ER_Init\scripts';
grant read,write on directory ER_ADMIN_DIR to public;
I creat my external table from SYS to reside in another schema called DRTEST:
CREATE TABLE DRTEST.SPEC_REQUIRED (TABLE_NAME VARCHAR2(100), COLUMN_NAME VARCHAR2(100))
ORGANIZATION EXTERNAL (TYPE ORACLE_LOADER DEFAULT DIRECTORY ER_ADMIN_DIR
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
LOCATION ('atts_in_red.tx')
REJECT LIMIT UNLIMITED ;
I can select from the table and all is good at this point.
However, I get an error when I try to create a view (in DRTEST from SYS) based on the external table.
CREATE VIEW DRTEST.MYVIEW1 AS SELECT * FROM DRTEST.SPEC_REQUIRED;
CREATE VIEW DRTEST.MYVIEW1 AS SELECT * FROM DRTEST.SPEC_REQUIRED
ERROR at line 1:
ORA-06564: object ER_ADMIN_DIR does not exist
(note I'm still connected as SYS as SYSDBA here)
I can create the view if I connect to DRTEST and run the exact same create view statement there. Is there something in Oracle that prevents me from doing this from the SYS account? I usually think of SYS as having the "Power of God to do all things".
I have to create the external table and view on several schema's and I don't want the user to have to connect to each schema separately.
TinaTina,
I think you are facing bug 2948123 (CREATE VIEW ON EXTERNAL TABLE ORA-6564). The workaround is to connect (in your case) as user DRTEST and then perform the CREATE VIEW statement (you tested this already). Or (according to the bug description) create the view under the SYS schema itself. -
Query on Creating and Populating I$ table on different condition
Hi,
I have a query on creating and populating I$ table on different condition.In which condition the I$ table is created??And These condition are mentioned below:
1)*source and staging area* are on same server(i.e target is on another server)
2)*staging area and Target* are on same server(i.e source is on another server)
3)*source,staging area and Target* are on *3 different* server
4)source,staging area and Target are on same server
ThanksI am not very much clear about your question. Still trying my best to clear it out.
In your all above requirement I$ table will be created.
If staging same as target ( One database,one user) then all temp tables will be created under this user
If staging is different than target ( One database,two user (A,B)) then all temp tables will be created under this user A (lets consider) and data will be inserted to the target table that is present in user B
If staging is different than target ( Two database,two user (A1,A2), not recommended architecture) then all temp tables will be created under this user A1 (database A1) and data will be inserted to the target table that is present in user A2 (database A2)
If source,staging,target will under one database then No LKM is required,IKM is sufficient to load the data into target. Specifically for this you can see one example given by Craig.
http://s3.amazonaws.com/Ora/ODI-Simple_SELECT_and_INSERT-interface.swf
Thanks. -
How do I Create and Manage one library for several computers
As our family has grown over the years, we have 4 kids and 6 macs and duplicate images scattered thought all the separate computers in their own libraries. Is there a way to create and manage one central library that all computers access? That way we can reduce the headaches when we need an image and have to go to each computer and search it's library. Not to mention when we need to jump on a computer and it doesn't happen to be the one we have our library on and need to download our pictures and they end up forever lost on a different computer.
You cannot share a library over the network, since a library needs to be on a locally mounted volume, but you can put a shared library onto a "sneaker drive" and plug it into each of your mad in turn, see Apple's support document:
iPhoto: Sharing libraries among multiple users http://support.apple.com/en-us/HT201517
iPhoto does not support to merge libraries. But iPhoto Library Manager can.
You can download it here: http://www.fatcatsoftware.com/iplm/
See : http://www.fatcatsoftware.com/iplm/Help/merging%20libraries.html
Or, if you have Aperture, you can use it to merge libraries. Aperture 3.3: How to use Aperture to merge iPhoto libraries -
Can I create and manage collections in itunes instead of on the ipad?
Can I create and manage collections in itunes instead of on the ipad? I have hundreds (maybe thousands) of PDF files for technical work items that I need to categorize and use on my ipad but it is a bit cumbersome to manually move them one at a time on the ipad.
While you can add pdf files to iTunes it is not really intended to be used for organizing things other than a music collection. It will only accept PDF files and media (audio, movie) files. On the other hand if you can creatively come up with a way to make it work for you then go for it.
-
How to create and manage the log file
Hi,
I want to trace and debug the program process.
I write the code for creating log file and debugging the process.
But i am not able get the result.
please help me how to create and manage the log file.
Here i post sample program
package Src;
import java.io.*;
import org.apache.log4j.*;
import java.util.logging.FileHandler;
public class Mylog
private static final Logger log = Logger.getLogger("Mylog.class");
public static void main(String[] args) throws Exception {
try {
// Create an appending file handler
boolean append = true;
FileHandler handler = new FileHandler("debug.log", append);
// Add to the desired logger
Logger logger = Logger.getLogger("com.mycompany");
System.out.println("after creating log file");
catch (IOException e)
System.out.println("Sys Err");
}Please give the your valuable suggesstion... !
Thanks
MerlinRoshinaJust i need to write a single line in log file.
-
How to create and edit anomalous tables in DIAdem? Such as the example list.
How to create and edit anomalous tables in DIAdem?
Can the tables be edited as in MS Word?
帖子被yangafreet在08-21-2007 10:28 PM时编辑过了
Attachments:
table example.doc 26 KBHi yangafreet,
There is no way I know of to create a DIAdem table that looks like the table in your Word document.
Brad Turpin
DIAdem Product Support Engineer
National Instruments -
Any way i can create and manage SharePoint 2013 workflows in browser.
Guys,
is there any way i can created and manager sharepoint 2013 workflows in browser like Nintex lets you do. This will eliminate the need for sharepoint designer.
thanks
MMNo. SharePoint's work flows are created from SharePoint Designer or Visual Studio. Third party solutions like Nintex have other approaches.
Mike Smith TechTrainingNotes.blogspot.com
Books:
SharePoint 2007 2010 Customization for the Site Owner,
SharePoint 2010 Security for the Site Owner -
Why does my credit car decline when I'm trying to review my credit card details? I'm trying to creat and finish my apple login but it keeps saying declined. Does Apple charge credit cards just for registering a credit card??
Just to add to AnaMusic's list:
Does Apple charge credit cards just for registering a credit card??
Yes, Apple will validate the credit card, when you are setting up the account information for an Apple ID. The credit card must be valid in the country of the store, that you are trying to buy from. And the card you are using must neither be blocked by the issuer of the card nor by the Apple for store services.
The error message you are citing is misleading: The error message could either mean
that you are using the wrong type of card (Are you using a debit card or a credit card?)
that the AppeID or the credit card you are using has been blocked for security reasons,
or that you are encountering a store error, because you are trying to use the iTunes Store or AppStore from a country, where it is not yet supported. -
Facing Many Problems About Creating Directory and an External Table
Question:
The weird thing is if you look at question 10-b in page 3-41, it says:
(page 3-41 "Oracle Database 10g SQL Fund. II Vol.1")
Merge the data in the EMP_DATA table created in the last lab into the data in the emp_hist table. Assume
that the data in external EMP_DATA table matches the EMP_HIST table, update the email column
of the EMP_HIST table to match the EMP_DATA table row. If a row in the EMP_DATA table does not
match, insert into the EMP_HIST tables. Rows are considered matching when the employee's first and
last name are identical.
To me, this question is constructed wrongly. First of all in the last lab we have not been asked to create EMP_DATA. Secondly, EMP_DATA is empty.
Thirdly, this question asks us to merge into EMP_HIST table while EMP_DATA is empty.
EMP_HIST table currently has copied data from employees table. EMP_HIST structure:
FIRST_NAME VARCHAR2(20)
LAST_NAME NOT NULL VARCHAR2(25)
EMAIL NOT NULL VARCHAR2(45)
Anway, i did the merge as following:
merge into emp_hist e
using emp_data d
on (e.first_name = d.first_name)
when matched then
update set
e.last_name = d.last_name,
e.email = d.email
when not matched then
insert values (d.first_name, d.last_name, d.email);
I get this error:
Error report:
SQL Error: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file emp.dat in EMP_DIR not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19
29913. 00000 - "error in executing %s callout"
*Cause: The execution of the specified callout caused an error.
*Action: Examine the error messages take appropriate action.
On the other hand, i said let me try this:
merge into emp_data d
using emp_hist e
on (d.first_name = e.first_name)
when matched then
update set
d.last_name = e.last_name,
d.email = e.email
when not matched then
insert values (e.first_name, e.last_name, e.email);
I get this error because external table is final once its created as far as i know:
Error report:
SQL Error: ORA-30657: operation not supported on external organized table
30657.0000 - "operation not supported on external organized table"
*Cause: User attempted on operation on an external table which is
not supported.
*Action: Don't do that!
I do not know what to do. I did my best, please help.
Edited by: user11164565 on Jul 27, 2009 2:43 AMuser11164565 wrote:
NOTE: I did my best, i did all what i can do, but the problem persists. Please help
I will mention all the steps i did clearly....
I gave scott the following grants:
grant create any directory to scott;
grant read on directory emp_dir to scott;
1. Created a directory and its been created successfully:
create or replace directory emp_dir
as 'F:\emp_dir';
Then i did the following just to make sure my directory is recognized:
SELECT *
FROM dba_directories;
I found the drive amongst the results...
OWNER DIRECTORY_NAME
DIRECTORY_PATH
SYS EMP_DIR
F:\emp_dir
SYS SUBDIR
D:\oracle\product\10.2.0\db_1\demo\schema\order_entry\/2002/Sep
SYS XMLDIR
D:\oracle\product\10.2.0\db_1\demo\schema\order_entry\
2. I created an external table emp_data (the script is given by the text book): done successfully
drop table emp_data;
CREATE TABLE emp_data
(first_name VARCHAR2(20)
,last_name VARCHAR2(20)
, email VARCHAR2(30)
ORGANIZATION EXTERNAL
TYPE oracle_loader
DEFAULT DIRECTORY emp_dir
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE CHARACTERSET US7ASCII
NOBADFILE
NOLOGFILE
FIELDS
( first_name POSITION ( 1:20) CHAR
, last_name POSITION (22:41) CHAR
, email POSITION (43:72) CHAR )
LOCATION ('emp.dat') ) ;
3. I went to F:\ drive to see if emp_dir folder exist or not! I did not see it. I checked hidden files, nothing there. Anyway, i ignored it and did step 4.
<snip>
"Anyway, I ignored it . . . "
and hence the rest of your problems. I did not see in the steps you recounted that you acually created a directory ("folder") named "\emp_dir" on your f: drive. Nothing you create within the database will actually create that directory on the OS. Createing a directory in Oracle, createing an external table in Oracle, will only create pointers to objects that Oracle will simply assume actually exists. -
Problem when we created the managed server to configure different ports.
I am trying to configure different ports for admin console and my communication service as we can’t share admin port to the outside world.
So that only admin can access admin console using admin port.
And out side clients can access my webapplication using different port.
For this i have created the managed server in weblogic.and I deployed the application on managed server.
Now admin server is running on 8001 port and my Communication Service application is running on 7001 port.
But when I tried to configure MBeans related to myCommunicationServiceApplication those were disapper on admin console. And the other wlng services are appearing on admin console.
1. Since my application deployed on managed server MBeans registration happened from myapplication hence it’s disappear on admin console.
Now If I want to configure Mbeans (related to my communication service) how can I configure it?
2. My communication service using configurationStore module and other wlng services.
When I tried to start my application on managed server I got the below error:
<Apr 28, 2009 12:22:44 PM IST> <Error> <Deployer> <BEA-149231> <dscp11166.TechMahindra.com> <Unable to set the activation state to true for the application 'wlng_nt_qualcomm_active_mediation [Version=1.0]'.
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException: Configuration store module is not available.
3. I tried to target all wlngResources to manged server by editing config.xml file.
Then all wlng services disappears on admin console. If this is the case how can I configure container/account services on wlng?
I have created the Basicweblogic domain.
Below is the config.xml for reference.
"QualcommServer" is managed server name.
Can any one please suggest me how to configure this kind of scenarios?
<server>
<name>AdminServer</name>
<machine>new_Machine_1</machine>
<listen-port>8001</listen-port>
<default-iiop-user>weblogic</default-iiop-user>
<default-iiop-password-encrypted>{3DES}W8nBdoJPRZ8TkwcXwAZoxA==</default-iiop-password-encrypted>
<listen-address>localhost</listen-address>
</server>
<server>
<name>QualcommServer</name>
<machine>new_Machine_1</machine>
<listen-address>localhost</listen-address>
<server-start>
<java-vendor>Sun</java-vendor>
<java-home>C:\Program Files\Java\jdk1.6.0</java-home>
<class-path>C:\bea\wlng400\server\lib\weblogic.jar;C:\bea\wlng_pds400\lib\wlng\wlng.jar</class-path>
<bea-home>C:\bea</bea-home>
<username>weblogic</username>
<password-encrypted>{3DES}W8nBdoJPRZ8TkwcXwAZoxA==</password-encrypted>
</server-start>
</server>
<embedded-ldap>
<name>managedserver</name>
<credential-encrypted>{3DES}9q80YuFJueVVJxoWduJA1OGhbqk14EpgQWWyTrzlmxo=</credential-encrypted>
</embedded-ldap>
<configuration-version>10.0.1.0</configuration-version>
<app-deployment>
<name>wlng_nt_session#4.0</name>
<target>QualcommServer</target>
<module-type>ear</module-type>
<source-path>C:\bea\wlng400/applications/wlng_nt_session.ear</source-path>
<security-dd-model>CustomRolesAndPolicies</security-dd-model>
</app-deployment>
<app-deployment>
<name>interceptors</name>
<target>QualcommServer</target>
<module-type>ear</module-type>
<source-path>C:\bea\wlng400/applications/interceptors.ear</source-path>
<security-dd-model>CustomRolesAndPolicies</security-dd-model>
</app-deployment>
<app-deployment>
<name>wlng_prm</name>
<target>QualcommServer</target>
<module-type>ear</module-type>
<source-path>C:\bea\wlng400/applications/wlng_prm.ear</source-path>
<security-dd-model>CustomRolesAndPolicies</security-dd-model>
</app-deployment>
<app-deployment>
<name>wlng_nt_qualcomm_active_mediation#1.0</name>
<target>QualcommServer</target>
<module-type>ear</module-type>
<source-path>servers\AdminServer\upload\wlng_nt_qualcomm_active_mediation.ear</source-path>
<security-dd-model>DDOnly</security-dd-model>
</app-deployment>
<machine>
<name>new_Machine_1</name>
<node-manager>
<name>new_Machine_1</name>
<listen-address>localhost</listen-address>
</node-manager>
</machine>
<jms-server>
<name>JMSServer-AdminServer</name>
<target>AdminServer</target>
</jms-server>
<jms-system-resource>
<name>WLNGJMSResource</name>
<target>QualcommServer</target>
<descriptor-file-name>jms/wlng-jms.xml</descriptor-file-name>
</jms-system-resource>
<custom-resource>
<name>networktier</name>
<target>AdminServer</target>
<descriptor-file-name>custom/nt.xml</descriptor-file-name>
<resource-class>com.bea.wlcp.wlng.management.descriptor.resource.WlngTierResource</resource-class>
<descriptor-bean-class>com.bea.wlcp.wlng.management.descriptor.bean.WlngTierBean</descriptor-bean-class>
</custom-resource>
<custom-resource>
<name>wlng-edr</name>
<target>AdminServer</target>
<descriptor-file-name>custom/wlng-edr.xml</descriptor-file-name>
<resource-class>com.bea.wlcp.wlng.management.descriptor.resource.WlngEdrResource</resource-class>
<descriptor-bean-class>com.bea.wlcp.wlng.management.descriptor.bean.WlngEdrBean</descriptor-bean-class>
</custom-resource>
<admin-server-name>AdminServer</admin-server-name>
<jdbc-system-resource>
<name>wlng.datasource</name>
<target>QualcommServer</target>
<descriptor-file-name>jdbc/wlng-jdbc.xml</descriptor-file-name>
</jdbc-system-resource>
<jdbc-system-resource>
<name>wlng.localTX.datasource</name>
<target>QualcommServer</target>
<descriptor-file-name>jdbc/wlng-localTX-jdbc.xml</descriptor-file-name>
</jdbc-system-resource>
Thanks,
Srinu Babu PDear Nariharan,
Today I faced a simlar issue, and this SAP Note helped me fix it: 1966807 - Duplication of AET table records in change processing
In my case, cardinality of AET table was 1:1, and I was getting duplicate PARENT_ID every time when trying to create a subsequent service request for my activity.
Regards,
Andrew -
[OBIEE Security] create and manage user without entreprise manager
Currently, the user creation and role assignment is done at company manager.
I want to allow a small group of users to manage the rights (access to reports for example) to other users. All this without going through corporate manager.
Is this possible?
Best regards,
BenNo, you cannot create user accounts in answers. If you are using default ldap from weblogic, all the users must be created in weblogic. If you do external table authentication, then you can add as many users as you want to the table based on your needs.
Assign points if helpful.
Regards,
-Amith. -
Problem with Drag & Drop and multiselection in tables
Hi,
we have a problem concerning drag and drop and multiselection in tables. It is not possible to drag a multiselection of table rows, as the selection event is recognized or handled before the drag event. So before the drag starts, the selection will be changed and only a single row is selected at the position where you started the drag with a mouse click.
There was also a java bug with the id 4521075 regarding this problem a couple of years ago. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4521075.
This bug has been resolved but in our application we have not enabled drag by setting setDragEnabled(true) on the table as we have an own implementation of a DragSource (which is the table component), and a DragGestureRecognizer to control mimetype and data to be dragged.
So my question is: Is there any solution for this case without calling setDragEnabled(true) on the table? Or is it possible to enable drag on the table and override some method where the drag recognition happens and the transferable object is created?
Thanks,Thanks for reply,
Steps to reproduce the problem:
1) user clicks the ascending sorting icon in the table(the button get disabled after sorting the table).
2) After sorting user drag and drop some row over another row.
3) Now the table is no longer sorted.
4) If user again wants to sort the table now, he cannot do it because the sorting button is still disabled.
So I want the user to sort the table again, without refreshing the page
Thanks and Regards,
Tarun -
Bad file is not created during the external table creation.
Hello Experts,
I have created a script for external table in Oracle 10g DB. Everything is working fine except it does not create the bad file, But it creates the log file. I Cann't figure out what is the issue. Because my shell scripts is failing and the entire program is failing. I am attaching the table creation script and the shell script where it is refering and the error. Kindly let me know if something is missing. Thanks in advance
Table Creation Scripts:_-------------------------------
create table RGIS_TCA_DATA_EXT
guid VARCHAR2(250),
badge VARCHAR2(250),
scheduled_store_id VARCHAR2(250),
parent_event_id VARCHAR2(250),
event_id VARCHAR2(250),
organization_number VARCHAR2(250),
customer_number VARCHAR2(250),
store_number VARCHAR2(250),
inventory_date VARCHAR2(250),
full_name VARCHAR2(250),
punch_type VARCHAR2(250),
punch_start_date_time VARCHAR2(250),
punch_end_date_time VARCHAR2(250),
event_meet_site_id VARCHAR2(250),
vehicle_number VARCHAR2(250),
vehicle_description VARCHAR2(250),
vehicle_type VARCHAR2(250),
is_owner VARCHAR2(250),
driver_passenger VARCHAR2(250),
mileage VARCHAR2(250),
adder_code VARCHAR2(250),
bonus_qualifier_code VARCHAR2(250),
store_accuracy VARCHAR2(250),
store_length VARCHAR2(250),
badge_input_type VARCHAR2(250),
source VARCHAR2(250),
created_by VARCHAR2(250),
created_date_time VARCHAR2(250),
updated_by VARCHAR2(250),
updated_date_time VARCHAR2(250),
approver_badge_id VARCHAR2(250),
approver_name VARCHAR2(250),
orig_guid VARCHAR2(250),
edit_type VARCHAR2(250)
organization external
type ORACLE_LOADER
default directory ETIME_LOAD_DIR
access parameters
RECORDS DELIMITED BY NEWLINE
BADFILE ETIME_LOAD_DIR:'tstlms.bad'
LOGFILE ETIME_LOAD_DIR:'tstlms.log'
READSIZE 1048576
FIELDS TERMINATED BY '|'
MISSING FIELD VALUES ARE NULL(
GUID
,BADGE
,SCHEDULED_STORE_ID
,PARENT_EVENT_ID
,EVENT_ID
,ORGANIZATION_NUMBER
,CUSTOMER_NUMBER
,STORE_NUMBER
,INVENTORY_DATE char date_format date mask "YYYYMMDD HH24:MI:SS"
,FULL_NAME
,PUNCH_TYPE
,PUNCH_START_DATE_TIME char date_format date mask "YYYYMMDD HH24:MI:SS"
,PUNCH_END_DATE_TIME char date_format date mask "YYYYMMDD HH24:MI:SS"
,EVENT_MEET_SITE_ID
,VEHICLE_NUMBER
,VEHICLE_DESCRIPTION
,VEHICLE_TYPE
,IS_OWNER
,DRIVER_PASSENGER
,MILEAGE
,ADDER_CODE
,BONUS_QUALIFIER_CODE
,STORE_ACCURACY
,STORE_LENGTH
,BADGE_INPUT_TYPE
,SOURCE
,CREATED_BY
,CREATED_DATE_TIME char date_format date mask "YYYYMMDD HH24:MI:SS"
,UPDATED_BY
,UPDATED_DATE_TIME char date_format date mask "YYYYMMDD HH24:MI:SS"
,APPROVER_BADGE_ID
,APPROVER_NAME
,ORIG_GUID
,EDIT_TYPE
location (ETIME_LOAD_DIR:'tstlms.dat')
reject limit UNLIMITED;
_***Shell Script*:*----------------_*
version=1.0
umask 000
DATE=`date +%Y%m%d%H%M%S`
TIME=`date +"%H%M%S"`
SOURCE=`hostname`
fcp_login=`echo $1|awk '{print $3}'|sed 's/"//g'|awk -F= '{print $2}'`
fcp_reqid=`echo $1|awk '{print $2}'|sed 's/"//g'|awk -F= '{print $2}'`
TXT1_PATH=/home/ac1/oracle/in/tsdata
TXT2_PATH=/home/ac2/oracle/in/tsdata
ARCH1_PATH=/home/ac1/oracle/in/tsdata
ARCH2_PATH=/home/ac2/oracle/in/tsdata
DEST_PATH=/home/custom/sched/in
PROGLOG=/home/custom/sched/logs/rgis_tca_to_tlms_create.sh.log
PROGNAME=`basename $0`
PROGPATH=/home/custom/sched/scripts
cd $TXT2_PATH
FILELIST2="`ls -lrt tstlmsedits*.dat |awk '{print $9}'`"
NO_OF_FILES2="`ls -lrt tstlmsedits*.dat |awk '{print $9}'|wc -l`"
$DEST_PATH/tstlmsedits.dat for i in $FILELIST2
do
cat $i >> $DEST_PATH/tstlmsedits.dat
printf "\n" >> $DEST_PATH/tstlmsedits.dat
mv $i $i.$DATE
#mv $i $TXT2_PATH/test/.
mv $i.$DATE $TXT2_PATH/test/.
done
if test $NO_OF_FILES2 -eq 0
then
echo " no tstlmsedits.dat file exists " >> $PROGLOG
else
echo "created dat file tstlmsedits.dat at $DATE" >> $PROGLOG
echo "-------------------------------------------" >> $PROGLOG
fi
NO_OF_FILES1="`ls -lrt tstlms*.dat |awk '{print $9}'|wc -l`"
FILELIST1="`ls -lrt tstlms*.dat |awk '{print $9}'`"
$DEST_PATH/tstlms.datfor i in $FILELIST1
do
cat $i >> $DEST_PATH/tstlms.dat
printf "\n" >> $DEST_PATH/tstlms.dat
mv $i $i.$DATE
# mv $i $TXT2_PATH/test/.
mv $i.$DATE $TXT2_PATH/test/.
done
if test $NO_OF_FILES1 -eq 0
then
echo " no tstlms.dat file exists " >> $PROGLOG
else
echo "created dat file tstlms.dat at $DATE" >> $PROGLOG
fi
cd $TXT1_PATH
FILELIST3="`ls -lrt tstlmsedits*.dat |awk '{print $9}'`"
NO_OF_FILES3="`ls -lrt tstlmsedits*.dat |awk '{print $9}'|wc -l`"
$DEST_PATH/tstlmsedits.datfor i in $FILELIST3
do
cat $i >> $DEST_PATH/tstlmsedits.dat
printf "\n" >> $DEST_PATH/tstlmsedits.dat
mv $i $i.$DATE
#mv $i $TXT1_PATH/test/.
mv $i.$DATE $TXT1_PATH/test/.
done
if test $NO_OF_FILES3 -eq 0
then
echo " no tstlmsedits.dat file exists " >> $PROGLOG
else
echo "created dat file tstlmsedits.dat at $DATE" >> $PROGLOG
echo "-------------------------------------------" >> $PROGLOG
fi
NO_OF_FILES4="`ls -lrt tstlms*.dat |awk '{print $9}'|wc -l`"
FILELIST4="`ls -lrt tstlms*.dat |awk '{print $9}'`"
$DEST_PATH/tstlms.datfor i in $FILELIST4
do
cat $i >> $DEST_PATH/tstlms.dat
printf "\n" >> $DEST_PATH/tstlms.dat
mv $i $i.$DATE
# mv $i $TXT1_PATH/test/.
mv $i.$DATE $TXT1_PATH/test/.
done
if test $NO_OF_FILES4 -eq 0
then
echo " no tstlms.dat file exists " >> $PROGLOG
else
echo "created dat file tstlms.dat at $DATE" >> $PROGLOG
fi
#connecting to oracle to generate bad files
sqlplus -s $fcp_login<<EOF
select count(*) from rgis_tca_data_ext;
select count(*) from rgis_tca_data_history_ext;
exit;
EOF
#counting the records in files
tot_rec_in_tstlms=`wc -l $DEST_PATH/tstlms.dat | awk ' { print $1 } '`
tot_rec_in_tstlmsedits=`wc -l $DEST_PATH/tstlmsedits.dat | awk ' { print $1 } '`
tot_rec_in_tstlms_bad=`wc -l $DEST_PATH/tstlms.bad | awk ' { print $1 } '`
tot_rec_in_tstlmsedits_bad=`wc -l $DEST_PATH/tstlmsedits.bad | awk ' { print $1 } '`
#updating log table
echo "pl/sql block started"
sqlplus -s $fcp_login<<EOF
define tot_rec_in_tstlms = '$tot_rec_in_tstlms';
define tot_rec_in_tstlmsedits = '$tot_rec_in_tstlmsedits';
define tot_rec_in_tstlms_bad = '$tot_rec_in_tstlms_bad';
define tot_rec_in_tstlmsedits_bad='$tot_rec_in_tstlmsedits_bad';
define fcp_reqid ='$fcp_reqid';
declare
l_tstlms_file_id number := null;
l_tstlmsedits_file_id number := null;
l_tot_rec_in_tstlms number := 0;
l_tot_rec_in_tstlmsedits number := 0;
l_tot_rec_in_tstlms_bad number := 0;
l_tot_rec_in_tstlmsedits_bad number := 0;
l_request_id fnd_concurrent_requests.request_id%type;
l_start_date fnd_concurrent_requests.actual_start_date%type;
l_end_date fnd_concurrent_requests.actual_completion_date%type;
l_conc_prog_name fnd_concurrent_programs.concurrent_program_name%type;
l_requested_by fnd_concurrent_requests.requested_by%type;
l_requested_date fnd_concurrent_requests.request_date%type;
begin
--getting concurrent request details
begin
SELECT fcp.concurrent_program_name,
fcr.request_id,
fcr.actual_start_date,
fcr.actual_completion_date,
fcr.requested_by,
fcr.request_date
INTO l_conc_prog_name,
l_request_id,
l_start_date,
l_end_date,
l_requested_by,
l_requested_date
FROM fnd_concurrent_requests fcr, fnd_concurrent_programs fcp
WHERE fcp.concurrent_program_id = fcr.concurrent_program_id
AND fcr.request_id = &fcp_reqid; --fnd_global.conc_request_id();
exception
when no_data_found then
fnd_file.put_line(fnd_file.log, 'Error:RGIS_TCA_TO_TLMS_CREATE.sh');
fnd_file.put_line(fnd_file.log, 'No data found for request_id');
fnd_file.put_line(fnd_file.log, sqlerrm);
raise_application_error(-20001,
'Error occured when executing RGIS_TCA_TO_TLMS_CREATE.sh ' ||
sqlerrm);
when others then
fnd_file.put_line(fnd_file.log, 'Error:RGIS_TCA_TO_TLMS_CREATE.sh');
fnd_file.put_line(fnd_file.log,
'Error occured when retrieving request_id request_id');
fnd_file.put_line(fnd_file.log, sqlerrm);
raise_application_error(-20001,
'Error occured when executing RGIS_TCA_TO_TLMS_CREATE.sh ' ||
sqlerrm);
end;
--calling ins_or_upd_tca_process_log to update log table for tstlms.dat file
begin
rgis_tca_to_tlms_process.ins_or_upd_tca_process_log
(l_tstlms_file_id,
'tstlms.dat',
l_conc_prog_name,
l_request_id,
l_start_date,
l_end_date,
&tot_rec_in_tstlms,
&tot_rec_in_tstlms_bad,
null,
null,
null,
null,
null,
null,
null,
l_requested_by,
l_requested_date,
null,
null,
null,
null,
null);
exception
when others then
fnd_file.put_line(fnd_file.log, 'Error:RGIS_TCA_TO_TLMS_CREATE.sh');
fnd_file.put_line(fnd_file.log,
'Error occured when executing rgis_tca_to_tlms_process.ins_or_upd_tca_process_log for tstlms file');
fnd_file.put_line(fnd_file.log, sqlerrm);
end;
--calling ins_or_upd_tca_process_log to update log table for tstlmsedits.dat file
begin
rgis_tca_to_tlms_process.ins_or_upd_tca_process_log
(l_tstlmsedits_file_id,
'tstlmsedits.dat',
l_conc_prog_name,
l_request_id,
l_start_date,
l_end_date,
&tot_rec_in_tstlmsedits,
&tot_rec_in_tstlmsedits_bad,
null,
null,
null,
null,
null,
null,
null,
l_requested_by,
l_requested_date,
null,
null,
null,
null,
null);
exception
when others then
fnd_file.put_line(fnd_file.log, 'Error:RGIS_TCA_TO_TLMS_CREATE.sh');
fnd_file.put_line(fnd_file.log,
'Error occured when executing rgis_tca_to_tlms_process.ins_or_upd_tca_process_log for tstlmsedits file');
fnd_file.put_line(fnd_file.log, sqlerrm);
end;
end;
exit;
EOF
echo "rgis_tca_to_tlms_process.sql started"
sqlplus -s $fcp_login @$SCHED_TOP/sql/rgis_tca_to_tlms_process.sql $fcp_reqid
exit;
echo "rgis_tca_to_tlms_process.sql ended"
_**Error:*----------------------------------*_
RGIS Scheduling: Version : UNKNOWN
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
TCATLMS module: TCA To TLMS Import Process
Current system time is 18-AUG-2011 06:13:27
COUNT(*)
16
COUNT(*)
25
wc: cannot open /home/custom/sched/in/tstlms.bad
wc: cannot open /home/custom/sched/in/tstlmsedits.bad
pl/sql block started
old 33: AND fcr.request_id = &fcp_reqid; --fnd_global.conc_request_id();
new 33: AND fcr.request_id = 18661823; --fnd_global.conc_request_id();
old 63: &tot_rec_in_tstlms,
new 63: 16,
old 64: &tot_rec_in_tstlms_bad,
new 64: ,
old 97: &tot_rec_in_tstlmsedits,
new 97: 25,
old 98: &tot_rec_in_tstlmsedits_bad,
new 98: ,
ERROR at line 64:
ORA-06550: line 64, column 4:
PLS-00103: Encountered the symbol "," when expecting one of the following:
( - + case mod new not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternatively-q
ORA-06550: line 98, column 4:
PLS-00103: Encountered the symbol "," when expecting one of the following:
( - + case mod new not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql st
rgis_tca_to_tlms_process.sql started
old 12: and concurrent_request_id = '&1';
new 12: and concurrent_request_id = '18661823';
old 18: and concurrent_request_id = '&1';
new 18: and concurrent_request_id = '18661823';
old 22: rgis_tca_to_tlms_process.run_tca_data(l_tstlms_file_id,&1);
new 22: rgis_tca_to_tlms_process.run_tca_data(l_tstlms_file_id,18661823);
old 33: rgis_tca_to_tlms_process.run_tca_data_history(l_tstlmsedits_file_id,&1);
new 33: rgis_tca_to_tlms_process.run_tca_data_history(l_tstlmsedits_file_id,18661823);
old 44: rgis_tca_to_tlms_process.send_tca_email('TCATLMS',&1);
new 44: rgis_tca_to_tlms_process.send_tca_email('TCATLMS',18661823);
declare
ERROR at line 1:
ORA-20001: Error occured when executing RGIS_TCA_TO_TLMS_PROCESS.sql ORA-01403:
no data found
ORA-06512: at line 59
Executing request completion options...
------------- 1) PRINT -------------
Printing output file.
Request ID : 18661823
Number of copies : 0
Printer : noprint
Finished executing request completion options.
Concurrent request completed successfully
Current system time is 18-AUG-2011 06:13:29
---------------------------------------------------------------------------Hi,
Check the status of the batch in SM35 transaction.
if the batch is locked by mistake or any other error, now you can release it and aslo you can process again.
To Release -Shift+F4.
Also you can analyse the job status through F2 button.
Bye
Maybe you are looking for
-
How to present SAP R/3 data in SQL Server 2005 Reporting service?
Our company is using SharePoint Portal Server 2003 as our intranet. We are also using SAP R/3 4.6C to run their business. There are huge amount of important data in SAP database. There ere are business needs to present SAP data on SharePoint pages wh
-
New Apple ipad air display not working,please help?
Please can anyone offer help? Week old ipad air display has stopped working after app froze and son double tapped home button to shut app down.Thank you in advance for any offers.
-
Optical SPDIF output stopped working- why?
I recently installed a larger HD and more RAM in my 1.63MHz Mini. After getting buttoned back up I noticed the optical SPDIF output stopped working (as in NO laser visible). Is there any possibility that this could be related to the OS (10.5.8)? Seem
-
Error running command: /usr/java/bin/java: error execing process: Not enough space In a whole root zfs zone the webconsole service fails to start. This is what I get: svc:/system/webconsole:console (java web console) State: maintenance since Fri Aug
-
Login screen shows AM/PM time while resources are in Dutch
I have a strange anomaly. After startup my Macs show the password screen and at the upper right time is shown in AM/PM. After entering my password, the time is shown correctly in 24 hour format. System Preferences/Date & Time/Clock: - Use a 24 hour c