Commit point in SqlLoader, Used rows not working - oracle

I am using SqlLoader to load huge file for this I need to change commit point.
I have used rows=1000 but it is not reflecting while executing. I have tried below command to do this :
>sqlldr user/pass#db control=myctl.ctl log=mylog.log rows=1000
The above command is not changing the commit point for me. Is there any oracle environment file do I need to modify to change the commit point?

There is also the bindsize to consider. Bump that up to ensure that you get the rows values you want. eg
C:\temp>sqlldr control=emp.ctl userid=/#db18_pdb1
SQL*Loader: Release 18.0.0.0.0 - Production on Mon Oct 7 16:00:54 2019
Version 18.6.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Path used: Conventional
Commit point reached - logical record count 250
Commit point reached - logical record count 500
Commit point reached - logical record count 750
Commit point reached - logical record count 1000
....
C:\temp>sqlldr control=emp.ctl userid=/#db18_pdb1 rows=1000 bindsize=8000000
SQL*Loader: Release 18.0.0.0.0 - Production on Mon Oct 7 16:01:19 2019
Version 18.6.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Path used: Conventional
specified value for readsize(1048576) less than bindsize(8000000)
Commit point reached - logical record count 1000
Commit point reached - logical record count 2000
Commit point reached - logical record count 3000
Commit point reached - logical record count 4000

Related

How to solve this error signaled in parallel query server ORA-12801 when delete

When i run this delete statement
delete /*+ PARALLEL(19) */
from billing_lines
where id_service in (select before_line from number_change)
and id_service not in (select max(a.new_line)
from number_change a, number_change bef
where a.new_line = bef.before_line
and not exists(select null from billing_lines f where f.id_contract= a.id_contract)
group by a.id_contract);
I get this error
ORA-12801: error signaled in parallel query server P003
ORA-12853: insufficient memory for PX buffers: current 12192K, max needed 6255360K
ORA-04031: unable to allocate 65560 bytes of shared memory ("
ORA-06512: at line 28
What is the problem. Do I have to increase the memory?
Any suggestion to solve this problem. Thanks in advance.
Oracle version
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
"CORE 11.2.0.4.0 Production"
TNS for HPUX: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
We need memory for each parallel thread in order to pass data between the threads and back to the coordinator. The more threads you have, the more memory you need.
"parallel 19" could give you up to 38 processes (19 producers, 19 consumers). Try reducing that, otherwise you probably need to bump up your SGA

Oracle SQL Loader control file to ignore ellipsis

I have an Oracle SQL Loader control file based on position in a text file. One particular field periodically gets an ellipsis '...' from the source, which causes a carriage return in the loading table. No matter how many times I request '...' to NOT be used by these users, there is eventually someone who forgets, or due to staff turnover, etc. Here is the current control file line for that field:
TRAN_DESC POSITION(153 : 202) Char,
Is there any command that can be added to this line in order to ignore special characters such as an ellipsis?
I'd think of REPLACE. Here's an example.
Sample table:
SQL> create table test (id number, tran_desc varchar2(10));
Table created.
Control file:
load data
infile *
into table test
(id position(1:2),
tran_desc position(3:12) char "replace(:tran_desc, '...', '')"
)
begindata
10LittleFoot
11Big...foot
Loading session and result:
SQL> $sqlldr scott/tiger control=test2.ctl log=test2.log
SQL*Loader: Release 11.2.0.2.0 - Production on Pon Tra 5 17:03:39 2021
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 2
SQL> select * from test;
ID TRAN_DESC
---------- ----------
10 LittleFoot
11 Bigfoot
SQL>

Expdp :ORA-39171: Job is experiencing a resumable wait.?

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\Administrator>expdp USERNAME/*****#db FULL=Y VERSION=12.1 DIRECTORY=Load_Dump DUMPFILE=fNAMe.DMP LOGFILE=NAme.log parallel=4
Export: Release 12.1.0.2.0 - Production on Mon Jul 20 11:11:57 2020
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
WARNING: Oracle Data Pump operations are not typically needed when connected to the root or seed of a container database.
......
------------------------------------------------------------------------------
Resumable stmt status: SUSPENDED
Resumable stmt start: 07/20/20 11:14:02 stmt suspend: 07/20/20 11:14:03
ORA-39171: Job is experiencing a resumable wait.
Resumable error: ORA-01691: unable to extend lob segment DBUSER.SYS_LOB0000109481C00100$$ by 128 in tablespace DBTBS
Resumable stmt: INSERT INTO "DBUSER"."SYS_EXPORT_FULL_01" (object_type_path, object_path_seqno, dump_fileid, dump_position,dump_length, dump_orig_length, dump_allocation, process_order, duplicate, object_row, object_type, object_schema, original_object_schema, object_name, object_long_name, original_object_name, partition_name, subpartition_name, object_tablespace, grantor, flags, processing_state, processing_status, base_process_order, base_object_type, base_object_schema, base_object_name, domain_process_order, xml_clob, ancestor_process_order, property, trigflag, size_estimate, creation_level, parent_process_order, value_n, object_int_oid, metadata_io, tde_rewrapped_key, option_tag, orig_base_object_schema, parallelization, unload_method) VALUES(:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :13, :16, :17, :18, :19, :20, :21, :22, :23, :24, :25, :26, :27, :28, :29, :30, :31, :32, :33, :34, :35, :36, :37, :38, :39, :40, :41, :42, :43)
You don't have a problem with Datapump, rather a storage issue. Datapump jobs will be suspended until the issue is solved.
Your clue:
ORA-01691: unable to extend lob segment DBUSER.SYS_LOB0000109481C00100$$ by 128 in tablespace DBTBS
A resumable error in datapump is a recoverable error, it means that the job is suspended until the issue that produced the suspension is fixed.
Increase the tablespace DBTBS and your job will resume.
As #Roberto mentioned this is due to the tablespace size issue, you can extend the table space size. In my case, I had the autoextend ON but the max size got breached. You can extend the max table space size and resume the import process.
ALTER TABLESPACE DBTBS
ADD DATAFILE 'DBTBS.dbf'
SIZE 200m
autoextend ON NEXT 1000M maxsize 4000M;
Assuming 4000M would be the max limit for your DB import.

Unable to alter Oracle Parameters

I am unable to add more than 200 datafiles in my database because of these parameters:
select records_total from v$controlfile_record_section where type = 'DATAFILE';
select value from v$parameter where name = 'db_files';
Both of these give me an output of 200. I need to increase this to 400 so I have tried:
alter system set records_total = 400 where name = 'db_files';
alter system set value= 400 where type = 'DATAFILE';
but I am getting
S
QL Error: ORA-02065: illegal option for ALTER SYSTEM
02065. 00000 - "illegal option for ALTER SYSTEM"
*Cause: The option specified for ALTER SYSTEM is not supported
*Action: refer to the user manual for option supported
Am I able to change these parameters and how?
You probably want to use commands like this:
C:\Users\jonearles>sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 10 13:07:16 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> show parameter db_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 200
SQL> alter system set db_files=400 scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1048576000 bytes
Fixed Size 3053584 bytes
Variable Size 662702064 bytes
Database Buffers 377487360 bytes
Redo Buffers 5332992 bytes
Database mounted.
Database opened.
SQL> show parameter db_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 400
SQL>
This assumes you are using an SPFILE (or else you will need to manually edit the init.ora file and restart) and you are not using RAC (or else you will need to use a command like srvctl stop database -d my_sid).
As ditto mentioned, it can help to look at the ALTER syntax. It may also help to look at the Oracle Database Reference, which will tell you if the command is dynamic (meaning it can be run without restarting the database).

Do not want to show time stamp which is an out of the box functionality

I need to just show the date stamp when used as an information field, but out of the box functionality shows both date and time stamp. Is there a way, I can only show date stamp and not time stamp. Is there a way I can add a side effect
For example: Implemenation date: 7/17/13 12:00 AM (This is how it is right now)
Implemenation date: 7:17/13 (I want it to be displayed like this)
Thanks
Chetan
The answer is not obvious, as some critical details are missing. The main one being, what client program is retrieving and displaying the data? That's where the change needs to be made. Oracle stores date and time in a variety of datatypes, but regardless of datatype (DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE, etc), the date is stored in an internal format in the database. When a date is selected from the database, it's up to the client program to decide how to display the information.
For example, if the client program is SQL*Plus, you can set NLS_DATE_FORMAT to control how a date is displayed.
For example:
-bash-4.1$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Nov 19 10:38:49 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> show parameter nls_date_format
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
nls_date_format string
SQL> select sysdate from dual;
SYSDATE
---------
19-NOV-13
SQL> alter session set nls_Date_format = 'mm:dd/yy';
Session altered.
SQL> select sysdate from dual;
SYSDATE
--------
11:19/13
So, that's an example for SQL*Plus client. You need to determine how to set the date format for your client, which you have thus far, not specified.
Hope that helps...

Resources