SQL & PL/SQL :: How To Enable NOLOGGING In External Tables
Jun 16, 2011
How can I enable NOLOGGING in an External Table ?
My Table FT_PRICE_COST_MASTER is taking a long time(more than 1 hour) to excute inside the procedure. The statement is:
SELECT SUBSTR(m.sr_no,1,16) SR_NO, m.SKU_CODE, m.location_code, m.start_date, m.end_date, m.COST, m.tax, m.octroi, m.freight, m.cash_disc, m.scheme_disc, m.mrp, m.csp, m.rsp1_qty, m.rsp1_value, m.rsp2_qty, m.rsp2_value, m.rsp3_qty, m.rsp3_value, m.net_cost, m.final_cost, m.current_margin, m.pc_effect, m.created_by, m.creation_date, m.modified_by, m.modification_date, m.change_ind, m.tax_code,
[code]......
When I am recreating the External table with NOLOGGING keyword at the bottom of the synatx, it's showing "operation not supported". Else are there any other points that I should look to increase the execution time of the above statement ?
View 2 Replies
ADVERTISEMENT
Sep 2, 2012
I am trying to enable OLTP compression on tables and at tablespace level for the tables
Steps I am following are:
1. Move indexes to its own tablespace
2. enable OLTP compression at table level:
alter table table_name move compress for OLTP
3. Rebuild indexes
4. Issue I have is what to do with tables with LOB columns
ALTER TABLE lob_table MOVE LOB (LOB_COL) STORE AS (TABLESPACE index_tbsp); -- Is this correct?
5. alter tablespace data_tablespace default compress for OLTP;
I have a question, is the sequence of steps correct. For tables with LOB columns do we needto move lobindex to index tablespace. Beacuse lobsegment and lobindex are created in data tablespace?
View 2 Replies
View Related
Aug 10, 2011
I made a directory and a external table, pointing to a file in the created directory. It appears that using unc path in my directory, won't work with my external table. Although the unc path points to the same server as where the database server is located.Is my assumption correct?
create or replace directory DIVA_POK as '\tvm011gm_diva_dir$ronnendbga_pok'
create table KOT_AOT(
AOT_IDENTIFICERENDE_SLEUTELvarchar2(14),
AOT_BEGINDATUMGELDIGHEIDdate,
AOT_EINDDATUMGELDIGHEIDdate,
[code]...
View 5 Replies
View Related
Jul 31, 2012
I am using an external table with numbers and joining the external table to fetch data and Insert into another table.I am altering the table within procedure to pass csv file name as parameter as It'll change each time. It's working fine but in case if my grouping id is having two gids, then Header from csv file is also inserted as row in to coupon_personlization_members.
I gave skip 1 in external table but for second GID, header is inserted as row.I don't want header to be inserted as row but header will be there on csv file.
Here is my procedure :
CREATE OR REPLACE
PROCEDURE proc_coupon_load(
p_grouping_id NUMBER,
p_file_name VARCHAR2)
[code]..
View 4 Replies
View Related
Jan 26, 2011
I have created a softlink to a data file orig_file.dat using the command ln -s orig_file.dat orig_file_link.dat
Now is it possible to create an external table using this linked file orig_file_link.dat
I am using this linked file to minimise the space usage because every month we get different data files and external table creation is done as a batch job copying the data file to another file whenever a new data file arrives. External table is created with the new file. so i need to check whether it is possible with the linked file instead of copying the file.
View 6 Replies
View Related
Jan 22, 2013
i am trying to create a external table.Table is getting created but there is no data.While checking the log file, its saying
KUP-04021: field formatting error for field CUST_CODE
KUP-04026: field too long for datatype
KUP-04101: record 1 rejected in file /data/mmi_mig_data/PCOM_CUSTOMER_1.csv
KUP-04021: field formatting error for field CUST_CODE
KUP-04026: field too long for datatype
KUP-04101: record 2 rejected in file /data/mmi_mig_data/PCOM_CUSTOMER_1.csv
But according to me in CSV file everything looks to be okay.External Table:
CREATE TABLE ET_PCOM_CUSTOMER(CUST_CODE VARCHAR2(12), CUST_TITLE VARCHAR2(12),
CUST_NAME VARCHAR2(240), CUST_MIDDLE_NAME VARCHAR2(240),
CUST_FIRST_NAME VARCHAR2(240), CUST_LAST_NAME VARCHAR2(240),
CUST_GENDER VARCHAR2(12), CUST_MARITAL_STS VARCHAR2(12),
CUST_NIC_NO VARCHAR2(60), CUST_ADDR_01 VARCHAR2(240),
[code]...
View 3 Replies
View Related
Jun 6, 2011
How i use external tables as a form datablock in oracle oracle forms 10g an i use anyway external tables in a form datablock ?
View 3 Replies
View Related
May 11, 2011
I'm not sure if this should go on this topic.
Anyway, I've loaded 5 .csv files through an external table and after doing it I tried to delete them.
But this error comes "Cannot delete 'filename': It is being used by another person or program".
I closed Oracle Developer and tried again deleting them manually, and the result was the same.
Tried restarting and deleting one .csv and it worked, but when I open sql dev and tried deleting the other files couldn't do it.
The question is: files that were used on external tables can't be deleted if developer is working?
The thing is that I've created a Stored Procedure that delete the files and obviously can't work. So, I should delete every time I load a csv file after restarting the computer.
View 6 Replies
View Related
Apr 29, 2008
Actually what i am trying to do is to extract data form tables and place them in an external text file....i wrote the following code
FUNCTION
create or replace
FUNCTION dump_data ( p_query in varchar2,
p_separator in varchar2 ,
[Code].....
View 3 Replies
View Related
Mar 15, 2011
Is it possible to trim the file name while loading into OWB through external tables?
Like suppose I am trying to read a file which has a timestamp value appended in its name. In that case loading into external file would give an error.
View 3 Replies
View Related
Nov 28, 2012
using oracle 10g currently create many external tables like so..
CREATE TABLE "XT_UNITS"
(
"Q1_2012" VARCHAR2(25 BYTE),
"Q2_2012" VARCHAR2(25 BYTE),
"Q3_2012" VARCHAR2(25 BYTE),
"Q4_2012" VARCHAR2(25 BYTE)
[code]....
is there any way I can use 1 flat file (csv) to populate many external tables ?
View 4 Replies
View Related
Feb 9, 2011
I would like to know which of the above is faster for the same conditions.
i.e. If I am loading 1 million rows for the same conditions which will perform faster?
View 9 Replies
View Related
Mar 28, 2011
i just posted another topic where i heard about external table and i had a few questions concerning them. I thought it was best to create a new topic than to continue on the other one...
I noticed that to create an external table the CTL is like this:
CREATE TABLE emp_load (FIELDS description)
ORGANIZATION EXTERNAL (TYPE ORACLE_LOADER DEFAULT DIRECTORY ext_tab_dir
ACCESS PARAMETERS (RECORDS FIXED 62 FIELDS (employee_number CHAR(2),
[Code]...
1) This creates an external table, but, is it possible to Create a normal table in a CTL file? For physical tables, the table has to exist right?
2) if you create a view linked to 2 external tables and if the CSV files are updated each day, the external tables will be updated automatically, and the view will be updated as well?
3) Can't there be any synchronisation problems?
4) What happens if a select request (or someone requests on the view) while the CSV file is being updated?
5) Is there anyway you can protect the accesses from those tables/views when the CSVs are being updated?
6) Is it possible to create an index on these sort of tables?
7) Is it possible to index a view?
8) Are external tables visible on a tool like sql developper?
View 11 Replies
View Related
Oct 4, 2013
the following situation, I have a directory named /dat/global/stock/ inside this i will get files named differently for example below.abcdef.112dfgrt.2......
Here i want to load this file one by one into the external tables and generate one more file based on some enrichment.
Step 1. Have to take first file and to load into the ext table.
Step 2. Enrichment
Step 3.File generation.
Now here i am facing a problem that in that particular directory i usually get 1000 files so i need to get file one by one and to put in one more directory. how can i get file one by one and generate file by using oracle loader
View 4 Replies
View Related
Oct 16, 2012
I am building a database to store call quality statistics for VOIP networks. It is a very insert heavy application, and data reliability is of relatively minimal importance (in the sense that a few corrupt call records here and there doesn't matter the way corruption does in for example a banks database). Long term storage is also unimportant, most customers only wish to keep 3 months of data readily available in the database. Most do not even archive the older data.
To that end I am searching for every possible way to improve my insert performance and the internet has turned me onto the idea of NOLOGGING. These are the steps I have taken to reduce my IO consumed by the Redo and Undo logs.
1. I am inserting with the APPEND_VALUES hint.
2. I have disabled force logging at the database level
3. I have disabled force logging at the tablespace level
4. I have disabled logging on the relevant table and each of its indices
As best I can tell this is all I can do to minimize Redo/Undo, but based on my observations of the Disk portion of the WinServer2008 Performance Monitor, this has made little to no change in the amount of IO to my REDO and UNDO files. IO to the .dbf containing my table makes up less than 20% of the total disk IO for oracle.exe, the rest is the REDO and UNDO logs.
asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:897564200346274711
The above article is a little over my head but I am able to extract from it that I will never entirely eliminate REDO/UNDO, which is fine, but I would think I could get it lower than it currently is.ted.
View 26 Replies
View Related
Jul 20, 2012
I have a live OLTP system where i have delived a solution for performance tunning , as a part of performance tunning i have created a MV which as below. I have created MV with no logging option as this will be refreshed at 3 min interval. i have compared the AWR report prior to deploy MV and after deployment. After deployment it have increased the redo by 4 times. Is there any way i can reduce the redo and what is wrong with mv with nologging.
CREATE MATERIALIZED VIEW "OVSD"."GSP_RELATEDEVENTS1"
NOLOGGING
REFRESH FORCE
--START WITH SYSDATE NEXT SYSDATE + 3/1440
AS
[code]....
View 8 Replies
View Related
Feb 27, 2012
How to change the attributes of a table from nologging to logging?
SQL> select table_name,LOGGING from dba_tables where owner='HXL';
TABLE_NAME LOG
------------------------------ ---
TB_OBJECTS NO
SQL> alter table hxl.tb_test logging;
Table altered.
SQL> select table_name,LOGGING from dba_tables where owner='HXL';
TABLE_NAME LOG
------------------------------ ---
TB_OBJECTS NO
View 4 Replies
View Related
Jan 23, 2013
I have got a procedure that successfully creates an oracle external table and populates it with the contents of a file. This works fine until I have a situation where one of the fields is a VARCHAR2(2) and I try to insert say, a 5 character value. When this happens the record in question does not get populated in the external table (and rightly so), but I could do with working out if there is a discrepancy in the number of records in the file and the number of records that actually make it into the table so I could inform the user that there is a problem.
I have attached the code that creates the external table and populates it.
View 5 Replies
View Related
Mar 30, 2011
I am trying to execute procedure using dbms scheduler.but i am getting below errors
ORA-06550: line ORA-06550: line 1, column 407:
PLS-00103: Encountered the symbol "AMANORATEST" when expecting one of the following:
:= . ( @ % ; immediate
The symbol ":=" was substituted for "AMANORATEST" to continue.
, column :
but procedure is executing fine with sql commmand line.
View 1 Replies
View Related
Nov 11, 2011
I have the table is partitioned.
Can I set the table table to "alter table x enable row movement" even when it is index organized table?
How do I know if the table is INDEX ORGANIZED TABLE.
View 3 Replies
View Related
Dec 15, 2010
In PL/SQL Plus, i can enable/disable auditing when i connect as sysdba by using these command:
SQL> ALTER SYSTEM SET audit_trail=db SCOPE=SPFILE
SQL> shutdown
SQL> startup
I've done it successfully with PL/SQL Plus command line. But in PHP, how can i do that?How to execute "shutdown" and "startup" from PHP?
I've found this code for connect to oracle as sysdba:
oci_connect("/", "", null, null, OCI_SYSDBA);
From the following link:
[URL]......
But, i still can't execute "shutdown", "startup";
View 4 Replies
View Related
Jul 5, 2012
I facing the below issue while enable the audit on table.
SQL> audit delete on test;
audit delete on test
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01400: cannot insert NULL into ("SYS"."AUDIT_DDL"."DICT_OBJ_TYPE")
ORA-06512: at line 2
===
Related Information
===
SQL> select version from v$instance;
VERSION
-----------------
11.2.0.2.0
SQL> show parameter audit;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string /orasw/product/11.2.0
/rdbms/audit
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string DB
SQL> SELECT TABLESPACE_NAME,owner from dba_tables where table_name='AUD$';
TABLESPACE_NAME OWNER
------------------------------ ------------------------------
AUDIT_DATA SYS
View 4 Replies
View Related
Feb 20, 2013
I have Apex 4.1.1.00.23 and I want enable Session State Protection (just for testing and for learning how this works).
When I go to Home --> Application Builder --> Application 121 --> Shared Components --> Session State Protection and I click Set protection button I get to the page where I have 3 options (Disable, enable and Configure SSP).
After clicking on enable option, I get to page [URL].......
There is no Finish or submit or complete or confirm button, only cancel and previous (print screen is on picture). I found out that SSP is already enabled so I can't enable it again. But other question is still open, how to get it now to work in real.
View 0 Replies
View Related
Nov 1, 2011
I have a table, it has 3 terabytes of data. We are sure whatever the data we have in that table is valid. I need to add the index to table it should be enabled and need not to be validated for existing data.
I am using following command
CREATE INDEX U_IXN_MTRS_ORGIDMTRNOMTRTYPEID ON MTRS (nlssort(METERNO), METERTYPEID) TABLESPACE OLTP_IDX_TS ENABLE NOVALIDATE;
it is giving me problem
ORA-02158: invalid CREATE INDEX option error
View 4 Replies
View Related
Aug 27, 2013
1.) Whatever statics/data should we gather to compare the database performance before and after enable the audit on database level?
2.) How can we enable audit on database level?
3.)what is pros and crons of enable audit database level?
View 1 Replies
View Related
Aug 18, 2010
I need to know if PARALLEL is enabled in my session. Would this be a session parameter or something else? Is there a view I have to query or some SQL*Plus command to execute?
P.S. Is there a way to correct the title spelling after submitting.
View 3 Replies
View Related
Dec 8, 2011
How to enable auditing in oracle ?
View 2 Replies
View Related
Apr 8, 2010
I knew, how to enable or disable a constraint on a table.
>alter table <table_name> disable constraint <constraint_name>;
But if we know all the data is correct, it's better to disable all constraints to improve the performance.
We are allowed to Disable or Enable only a single constraint.
Enable or Disable All Constraints.
View 11 Replies
View Related
Jul 12, 2013
I have installed database in one server. I would like to enable AWR into it. Statistics_level is set to Typical. While running the below script to enable the AWR, its gives error -
SQL> exec dbms_scheduler.enable('GATHER_STATS_JOBS');
BEGIN dbms_scheduler.enable('GATHER_STATS_JOBS'); END;
*
ERROR at line 1:
ORA-27476: "SYS.GATHER_STATS_JOBS" does not exist
ORA-06512: at "SYS.DBMS_ISCHED", line 4343
ORA-06512: at "SYS.DBMS_SCHEDULER", line 2802
ORA-06512: at line 1
make AWR automatical generation.
View 3 Replies
View Related
Sep 5, 2013
Is there any way to enable the constraint with out validating for the existing information.
As We can accomplish the same functionality when we are adding the constraint for the first time.
Ex: alter table scott.emp add constraint fk_deptno foreign key(deptno) references scott.dept(deptno) enable novalidate
The above SQL statement will enable the constraint with out validating for the existing information. So there is possibility of data will be there only in the child table but not in the parent table for existing information.
But in the future it will not allow to do so,if the constraint is in ENABLE staus.So i am just trying to disable the constraint to insert only into child table & trying to enable it with NOVALIDATE option .
But the following exception is coming .
SQL> alter table scott.emp ENABLE constraint fk_deptno enable NOVALIDATE;
alter table scott.emp ENABLE constraint fk_deptno enable NOVALIDATE
ORA-00905: missing keyword
SQL> alter table scott.emp ENABLE constraint fk_deptno NOVALIDATE;
alter table scott.emp ENABLE constraint fk_deptno NOVALIDATE
ORA-00933: SQL command not properly ended
Instead of dropping & recreating the same constraint , is there any alternate way to do this ?
View 3 Replies
View Related