How change NLS_NUMERIC_CHARACTERS parameter for load external table
Hi,
I use this version:
OWB 11gR2
Database 11gR2
Parameter NLS_NUMERIC_CHARACTERS Database ., Instance ,.
When I created database with wizard and in this moment I don't set spanish language, later I changed this parameters in instance parameters.
Now I want load data from a file to external table, but I've an error when I try load data with decimal point.
why does it use the database parameter instead of instance parameter?
Is possible to change this parameter?
Cheers
Marisol
At this moment , this is not possible . You can see metalink note ID 268906.1.
It says:
Currently, external tables always use the setting of NLS_NUMERIC_CHARACTERS
+at the database level.+
Cheers
Marisol
Similar Messages
-
How to resolve error when Loading External Table?
Iâm getting the following errors when attempting to load External Table -- I've changed the file extension from .csv to .txt to resolve ORA-29913 but error re-occurred. See syntax of External Table below.
Thanks,
Carol-Ann
SQL> desc OWB_COUNTY_TIMEZONE_EXT;
Name Null? Type
STATE_CODE VARCHAR2(2)
COUNTY_CODE VARCHAR2(3)
TIME_ZONE VARCHAR2(1)
SQL> select count(*) from OWB_COUNTY_TIMEZONE_EXT;
select count(*) from OWB_COUNTY_TIMEZONE_EXT
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file owb_county_timezone.log
OS error Permission denied
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
++++++++++++++++++++++++++++++++++++++++++++++
Synatx of External Table:
WHENEVER SQLERROR EXIT FAILURE;
CREATE TABLE "OWB_COUNTY_TIMEZONE_EXT"
"STATE_CODE" VARCHAR2(2),
"COUNTY_CODE" VARCHAR2(3),
"TIME_ZONE" VARCHAR2(1))
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY AIMQRYD_AIMP_LOC_FF_MODULE_LOC
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
CHARACTERSET WE8MSWIN1252
STRING SIZES ARE IN BYTES
BADFILE 'owb_county_timezone'
DISCARDFILE 'owb_county_timezone'
LOGFILE 'owb_county_timezone'
FIELDS
TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"' AND '"'
NOTRIM
MISSING FIELD VALUES ARE NULL
"STATE_CODE" ,
"COUNTY_CODE" ,
"TIME_ZONE"
LOCATION (
AIMQRYD_AIMP_LOC_FF_MODULE_LOC:'county_timezone_comma.txt'
REJECT LIMIT UNLIMITED
NOPARALLELHi Carol-Ann,
The key issue here is
"KUP-04063: unable to open log file owb_county_timezone.log
OS error Permission denied".
Looks like you don't have sufficient system priviliges on Unix.
This is wat AskTom mentions about it:
"the directory must exist on the SERVER.
the concerned user is the "oracle software owner" as far as the OS is concerned.
oracle must have read write access to this directory
and the directory must exist on the SERVER (database server) itself."
Hope this helps.
Cheers, Patrick -
How to change NLS_NUMERIC_CHARACTERS parameter for OWB SQLLDR mapping
Hi,
How to change the NLS_NUMERIC_CHARACTERS database paramater for my SQLLDR mapping?
I have an input flat file which has numeric data with ',' as decimal separator means NLS_NUMERIC_CHARACTERS setting as ',.'
However in my target oracle schema, the decimal separator is '.' which has NLS parameter set as NLS_NUMERIC_CHARACTERS='.,'
My OWB version is 10.2.
When I checked the configuration parameters of the sql loader mapping and the flat file operator, There is facility to change language, but not NLS_NUMERIC_CHARACTERS setting.
I do not want to change the NLS_NUMERIC_CHARACTERS setting in my database as there are many other projects which will get impacted.
We got a work around as below using external table & premap procedure. But as I have many mappings already developed, It is not possible to use this workaround.
- I can use premapping procedure with external tables to populate.
- NLS_NUMERIC_CHARACTERS setting can be changed using procedure for that particular session.
Is there a way to change NLS_NUMERIC_CHARACTERS setting only for that particular mapping/mapping session?
Thanks,
SriGPAt this moment , this is not possible . You can see metalink note ID 268906.1.
It says:
Currently, external tables always use the setting of NLS_NUMERIC_CHARACTERS
+at the database level.+
Cheers
Marisol -
Error in database parameter for star schema table in RSRV
Hi Experts,
In RSRV, I executed the following checks in my cube and it is showing me the following error:-
1) Check database parameter for star schema table for InfoCube ZMM_MVAL
564971 units missing from fact table /BIC/FZMM_MVAL; see details
Message no. RSRV134
Diagnosis
In the fact table /BIC/FZMM_MVAL records have been found that contain values other than zero for key figures that have units, but that have no value for the unit of the key figure. Since the value of the unit has to correspond to the value of the key figure, this inidicates an error when the data was loaded. The values of the units have not been loaded into BW correctly. Choose Details to display the incorrect records.
2) Consistency of time dimension of InfoCube ZMM_MVAL
/BIC/FZMM_MVAL PARTITIONED 1878 ( 30 - 50 )
Please advise me on this.
Thanks in Advance.
AparnaAs mentioned in the log, check the Unit KFs in your cube and make sure that unit is populated for all such values.
e.g. if Qty is 5 KG, then unit KF will have 5 and unit info object should have KF.
Regards,
Gaurav -
How to find Transaction for a Known Table maintenance View
Hello Friends,
May I know how to find transaction for a known table maintenance View.
Thanks,
Best Regards,
Sudhanshu GargGoto SE16 Transaction and enter TSTCP Table
Here PARAM = /SM30 VIEWNAME=Table name*;UPDATE=X;
enter table name in bold.
Thanks
Seshu -
How to give comments for a particular table
hi..
how to give comments for a particular table ..
select * from user_tab_comments;
tx in advance..Try this.
SQL> COMMENT ON TABLE EMP IS 'THIS IS SAMPLE EMPLOYEE TABLE' ;
Comment created.
SQL> select * from user_tab_comments where table_name = 'EMP'
2 /
TABLE_NAME TABLE_TYPE
COMMENTS
EMP TABLE
THIS IS SAMPLE EMPLOYEE TABLE -
How to configure ActiveSync for a database table in IdM 7.0
Hi All,
Please suggest me the steps to configure ActiveSync in IdM 7.0.
when i try it by resource-->activeSync wizard it gives
"The ActiveSync Wizard has been deprecated in Identity Manager 7.0 in favor of using MetaView and the resource action "Edit Synchronization Policy". "
how to configure ActiveSync for a database table.
Thanx
ShantHi,
You need to a script and run it on os level. Here is an example:-
emcli relocate_targets -src_agent=agentmachine1.domain:3872
-dest_agent=agentmachine2.domain:3872 -target_name=RACDB
-target_type=oracle_database -copy_from_src -force=yes
-changed_param=MachineName:agentmachine2.domain
Regards
Jomon
Edited by: JohnJomon on Nov 17, 2011 2:27 PM -
SQL LOADER , EXTERNAL TABLE and ODBS DATA SOURCE
hello
Can any body help loading data from dbase file .dbt to an oracle 10g table.
I tried last day with SQL LOADER, EXTERNAL table , and ODBC data source.
Why all of these utilities still failing to solve my problem ?
Is there an efficient way to reach this goal ?
Thanks in advanceexport the dbase data file to text file,
then you have choice of using either sql loader or external table option to use.
regards -
How to create IDOC for customer defined table
hi,
How to create IDOC for customer defined table Records and how to send this IDOC to target system.
what message type will be used and on receiving system how to post these records.
thankx.
pillac.Hi,
You need to create a custom message type and custom IDOC type for this with whatever fields you want send. You need to create segments (WE30), IDOC type (WE30), Message types (WE81) and assign the message type to the IDOC type (WE82).
You will have trigger the IDOC using a Report or something after doing the partner profile settings.
Similary in the target system also, you will have do all the settings.
Take a look the links to find out what settings needs to be done.
http://help.sap.com//saphelp_470/helpdata/EN/0b/2a611c507d11d18ee90000e8366fc2/frameset.htm
http://www.sappro.com/downloads/OneClientDistribution.pdf
Regards,
Ravi
Note : Please mark the helpful answers and close the thread if the issue is resolved. -
How to put parameter for object/table ID in BW Web Report
Hi All,
In my BW Web report, i want to get my object TABLE_1 but the code below seems not to work.
var mytable = document.getElementsByTagName("table");
Checking on it, i think IE recognize only document.getElementsByID. ( I tested it by manually creating a table in my template and putting a tag for table ID) But BW does not generate the Object ID in the parameters below, only the name.
<param name="OWNER" value="SAP_BW"/>
<param name="CMD" value="GET_ITEM"/>
<param name="NAME" value="TABLE_1"/>
<param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
<param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
<param name="GENERATE_CAPTION" value=""/>
<param name="CAPTION" value="jezel"/>
<param name="ONLY_HIERARCHY_NAVIGATION" value="X"/>
<param name="BLOCK_SIZE" value="0"/>
<param name="SHOW_PAGING_AREA_BOTTOM" value=""/>
ITEM: TABLE_1
do you know how i can add a parameter for object ID? do you know any steps how i can retrieve my table using javascript?
Thanks in advance.Hi JTi,
what i have understood from your requirement is that you want to access the web item table_1 in javascript, you can get that as below:
Add
<span>
tag before your web item and set its id to table.
<span id = "table">
<param name="OWNER" value="SAP_BW"/>
<param name="CMD" value="GET_ITEM"/>
<param name="NAME" value="TABLE_1"/>
<param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
<param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
<param name="GENERATE_CAPTION" value=""/>
<param name="CAPTION" value="jezel"/>
<param name="ONLY_HIERARCHY_NAVIGATION" value="X"/>
<param name="BLOCK_SIZE" value="0"/>
<param name="SHOW_PAGING_AREA_BOTTOM" value=""/>
ITEM: TABLE_1
</span>
In javascript access it as :
var mytable = document.getElementsById("table");
Hope this helps
Thanks
Dipika -
Imported source file name changed for the external table
Hi,
I have external table from flat file. Now the source file name is changed. I can change the file location to point to the new file name, but I can't update the source for the flat file property(as seen under flat file properties,structure tab. the column "Sampled From"). Is there way to have this update without having to import the file using the new file name again?In the Files section in the object navigator find the flat file you want to change the source of.
Double click on the actual file, and on the General tab change the old file name to the new one.
The fact that it has been sampled from a different file should not 'disturb' the working of the external table.
However, if the structure of the new file is different I'd suggest to resample.
Good luck, Patrick -
How to remove carraige return from the field while loading external table
I am facing an issue of not getting rid of carraige returns present in the fileds of the source .csv file while loading the records into external table.
I had tried using LRTRIM, but it does not help.
The error I am getting is:
KUP-04021: field formatting error for field POPULATION_DESCRIPTION
KUP-04037: terminator not found
I am pasting one record out of the .csv file which is causing this error as below:
"Business Card Accounts
",123,7 BizCard - Gamers,Control,"Business Card Accounts
",75270,75271
You can see the carraige return in the 1st field as well as 5th field. Filed are separated by commas & eclosed by double quotes.
Could anybody help on this please?Can you copy the file to an external table only version, and then dos2unix it?
Alternatively, you can use the ACCESS PARAMETERS area in your external table definition to set that your RECORDS DELIMITED BY carriage returns, instead of the default.
Check out the example here http://www.psoug.org/reference/externaltab.html -
How to pass parameter for table name in form6i.
Hi ,
I am facing the problem to pass parameter for table name in form6i.
If any solution please infirm me earliest to my mail id.
([email protected])
example:
begin
select ename into :ename
from :tab_name
where empno =7788;
end;
It gives error as bad bind variable 'tab_name'
*** where :ename and :tab_name are form fields
Thanking you,
Balasahebobject name not taken as table --> what do u mean by
this?
Please be more clear..
Regards
PriyaI have two block. First block I am displaying all the table using user_objects table. Another block I want display, user which table selected, corresponding table all the records. -
How to find rejected rows using External Table
Hi all,
I had written a stored procedure to read comma(,) separated flat file using External Tables in oracle 9i with Reject Limit "Unlimited" Option. Sometimes all rows are successfully loaded into external table and sometimes some rows are failed, I can find out those rows from logfile created by oracle. I want to inserted those rows key values into some other table. Can any body suggest/links how to write this.
Thanking you in advance"Is there a way to have the system truncate the log files besides some O/S utility that will scour the directory every night, week, etc.?"
You can use UTL_FILE.FREMOVE to delete the file, if you have sufficient privileges. You can schedule it using DBMS_JOB if you like or run it before you recreate the file, as demonstrated below. The pl/sql block to check whether the file exists is used for demonstration purposes only and is not necessary. This is just one method. There are various ways to delete or truncate a file. This just seems like the simplest.
scott@ORA92> CREATE OR REPLACE DIRECTORY mydir AS 'c:\oracle'
2 /
Directory created.
scott@ORA92> DECLARE
2 v_bfile BFILE := BFILENAME ('MY_DIR', 'test_tab.log');
3 BEGIN
4 IF DBMS_LOB.FILEEXISTS (v_bfile) = 1
5 THEN DBMS_OUTPUT.PUT_LINE ('test_tab.log exists');
6 ELSE DBMS_OUTPUT.PUT_line ('test_tab.log does not exist');
7 END IF;
8 END;
9 /
test_tab.log exists
PL/SQL procedure successfully completed.
scott@ORA92> EXECUTE UTL_FILE.FREMOVE ('MY_DIR', 'test_tab.log')
PL/SQL procedure successfully completed.
scott@ORA92> DECLARE
2 v_bfile BFILE := BFILENAME ('MY_DIR', 'test_tab.log');
3 BEGIN
4 IF DBMS_LOB.FILEEXISTS (v_bfile) = 1
5 THEN DBMS_OUTPUT.PUT_LINE ('test_tab.log exists');
6 ELSE DBMS_OUTPUT.PUT_line ('test_tab.log does not exist');
7 END IF;
8 END;
9 /
test_tab.log does not exist
PL/SQL procedure successfully completed.
scott@ORA92> CREATE TABLE test_tab
2 (col1 NUMBER,
3 col2 VARCHAR2(4))
4 ORGANIZATION external
5 (TYPE ORACLE_LOADER
6 DEFAULT DIRECTORY mydir
7 ACCESS PARAMETERS
8 (RECORDS DELIMITED BY NEWLINE
9 BADFILE 'MYDIR':'test_bad.bad'
10 LOGFILE 'MYDIR':'test_tab.log'
11 FIELDS TERMINATED BY ","
12 (col1,
13 col2))
14 LOCATION ('test.dat'))
15 REJECT LIMIT UNLIMITED
16 /
Table created.
scott@ORA92> SELECT * FROM test_tab
2 /
COL1 COL2
1 a
2 b
scott@ORA92> "Or is there a way to prevent the log from being written to every time it's accessed?"
You can use NOLOGFILE as an access parameter to prevent it from being written to, as shown below.
scott@ORA92> CREATE OR REPLACE DIRECTORY mydir AS 'c:\oracle'
2 /
Directory created.
scott@ORA92> CREATE TABLE test_tab
2 (col1 NUMBER,
3 col2 VARCHAR2(4))
4 ORGANIZATION external
5 (TYPE ORACLE_LOADER
6 DEFAULT DIRECTORY mydir
7 ACCESS PARAMETERS
8 (RECORDS DELIMITED BY NEWLINE
9 BADFILE 'MYDIR':'test_bad.bad'
10 NOLOGFILE
11 FIELDS TERMINATED BY ","
12 (col1,
13 col2))
14 LOCATION ('test.dat'))
15 REJECT LIMIT UNLIMITED
16 /
Table created.
scott@ORA92> SELECT * FROM test_tab
2 /
COL1 COL2
1 a
2 b
scott@ORA92> "Is there a way to have the log written only when an error occurs?"
Not that I know of, but that does not mean that somebody else doesn't know how or isn't able to figure out a way. If you do find a way, please post it for the benefit of the rest of us. -
How to read any file using external tables.
Hi folks,
I have written an application that reads a series of csv files using external tables which works fine as long as I specify each file name in the directory i.e.......
CREATE TABLE gb_test
(file_name varchar2(10),
rec_date date
rec_name VARCHAR2(20),
rec_age number,
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY GB_TEST
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
LOCATION ('data1.csv','data2.csv','data3.csv','data4.csv')
PARALLEL 5
REJECT LIMIT 20000;
However I have discovered that I may not know the name of the files to be processed prior to the program being run so just want to read any file regardless of it's name (although it will always be a .csv file).
Is there a way to ensure that you don't need to specify the files to be read in the LOCATION part of the syntax.
Thanks in advance.
Graham.Right, I have now completed this, however it's currently only working as SYS as opposed to any user, however here is a detail of the scenario and the steps required in case any of you guys need in the future ......
The problem was I needed to search for csv files on my hard-drive. These files would be stored in a series of directories (a through to z), so I needed a way to read all 26 directories and process all files in these directories.
The problem was, prior to running the program, the user would remove all the files in the directories and insert new ones, but it was never known how many he would decide to do each time.
Solution: I created a table called stock_data_directories as follows ...
create table stock_data_directories(sdd_rec_no number,
sdd_table_name varchar2(50),
sdd_directory_name varchar2(50),
sdd_directory_path varchar2(100));
Then inserted 26 records like ...
insert into stock_data_directories(sdd_rec_no,sdd_table_name,sdd_directory_name,sdd_directory_path)
values(1,'rawdata_a','KPOLLOCKA','C:\KPOLLOCK\A')
insert into stock_data_directories(sdd_rec_no,sdd_table_name,sdd_directory_name,sdd_directory_path)
values(2,'rawdata_b','KPOLLOCKB','C:\KPOLLOCK\B');
etc...etc...
Then created 26 DIRECTORIES E.G.
CREATE OR REPLACE DIRECTORY KPOLLOCKA AS 'C:\KPOLLOCK\A';
CREATE OR REPLACE DIRECTORY KPOLLOCKB AS 'C:\KPOLLOCK\B';
Then created 26 external tables like the following ...
CREATE TABLE rawdata_a
(stock varchar2(1000),
stock_date varchar2(10),
stock_open VARCHAR2(20),
stock_high varchar2(20),
stock_low varchar2(20),
stock_close VARCHAR2(30),
stock_qty varchar2(20) )
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY KPOLLOCKA
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
LOCATION ('AA.csv')
PARALLEL 5
REJECT LIMIT 20000
This basically says in directory rawdata_a it currently has 1 file called AA.csv.
Then wrote a procedure as follows ...
procedure p_process_files(pv_return_message OUT varchar2)is
cursor c_get_stock_data_directories is
select distinct sdd_directory_path,
sdd_table_name
from stock_data_directories
order by sdd_table_name;
vv_return_message varchar2(1000);
begin
-- here get the files for each directory
for r_get_stock_directories in c_get_stock_data_directories loop
p_build_external_table(r_get_stock_directories.sdd_directory_path,
r_get_stock_directories.sdd_table_name,
vv_return_message);
end loop;
end;
then wrote a procedure called p_build_external_table as follows ...
procedure p_build_external_table(pv_directory_path IN stock_data_directories.sdd_directory_path%type, -- e.g. 'C:\kpollock\A\
pv_table_name IN stock_data_directories.sdd_table_name%type, -- e.g. rawdata_a
pv_return_message OUT varchar2) is
vv_pattern VARCHAR2(1024);
ns VARCHAR2(1024);
vv_file_name varchar2(4000);
vv_start_string varchar2(1) := '''';
vv_end_string varchar2(3) := ''',';
vn_counter number := 0;
vv_err varchar2(2000);
BEGIN
vv_pattern := pv_directory_path||'*';
SYS.DBMS_BACKUP_RESTORE.searchFiles(vv_pattern, ns);
FOR each_file IN (SELECT FNAME_KRBMSFT AS name FROM X$KRBMSFT) LOOP
if each_file.name like '%.CSV' then
vv_file_name := vv_file_name||vv_start_string||substr(each_file.name,instr(each_file.name,'\',1,3)+1)||vv_end_string;
vn_counter := vn_counter + 1;
end if;
END LOOP;
vv_file_name := substr(vv_file_name,1,length(vv_file_name)-1); -- remove final , from string
execute immediate 'alter table '||pv_table_name||' location('||vv_file_name||')';
pv_return_message := 'Successfully changed '||pv_table_name||' at '||pv_directory_path||' to now have '||to_char(vn_counter)||' directories';
exception
when others then
vv_err := sqlerrm;
pv_return_message := ' Error found updating directories. Error = '||vv_err;
END;
This reads every file in the directory and appends it to a list, so if it finds A.csv and ABC.csv, then using the dynamic sql, it alters the location to now read 'a.csv','abc.csv',
It ignores all other file extentions.
Maybe you are looking for
-
Using Win 7 and latest download of iTunes, the software will not recognize my music CDs when inserted in my DVD drive. I put a CD in the drive and nothing happens. iTunes does not have a "start" button, or some menu option to tell it to begin copying
-
Hi all, I am using oracle 9.2. I want o know ig i set the value commit=y at the time of importing the database.HOw much rows or data will get imported at a time or it depends on the buffe size
-
The storage location/batch function * is not defined here - Message no. M7116
Hi Experts, we have a scenario - Project Subcontracting Purchase Order, Item Category - L and Account Assignment - Q. Delivery created, one of the component is Batch managed and with Batch Spli Exists. When performing Good Receipt in MB01 t-code for
-
Bug in Digital Waveform Graph X-Axis
Hello, I am making separate queried to a database to retrieve analog and digital data over the same time period. The data were logged at 2 second intervals. I have verified that both result sets return the same number of values with the same t0 and
-
OIM installation with Oracle db Standard Edition
The 11g version of OIM, OAM works with Oracle 11g db Enterprise Edition. Will these components work with Oracle db 11g Standard Edition ? If this works then I am planning to use only for prototype purpose, where I can use a low end server.