SQL LOADER in shell script [message #680141] |
Fri, 24 April 2020 02:53 |
|
bkbora
Messages: 21 Registered: April 2020
|
Junior Member |
|
|
Hi,
i am passing multiple LOAD files into a script, but the script is connecting to DB again and angain. Is there anyway we can pass mutiple LOAD files with one oracle session.
|
|
|
|
|
|
|
|
|
|
Re: SQL LOADER in shell script [message #680151 is a reply to message #680150] |
Fri, 24 April 2020 06:15 |
Solomon Yakobson
Messages: 3280 Registered: January 2010 Location: Connecticut, USA
|
Senior Member |
|
|
Any session will fail during failover/switchover unless it is TAF. SQL*Loader isn't TAF-aware as far as I know. So all you can do is catch ORA-28547, do cleanup, if needed, and start over or track number of committed rows and start SQL*Loader again using skip number of committed rows (assuming you use 1 physical record = 1 logical record), Now about "not able to start the oracle session". Service to primary is stopped when failover/switchover occurs. Your TNS must have multiple ADDRESS entrees in order on how do you want to connect - primary first, then local dataguard (HA - high availability), then remote data guard (DR - disaster recovery site). For example:
XXX =
(description=
(load_balance=off)(failover=on)
(address=(protocol=tcp)(host=primary_scan_listener)(port=1521))
(address=(protocol=tcp)(host=ha_scan_listener)(port=1521))
(address=(protocol=tcp)(host=dr_scan_listener)(port=1521))
(connect_data=
(service_name=XXX)
(failover_mode=(type=select)(method=basic))
)
)
This way SQL*Loader will first attempt to connect to primary. If unsuccessful it will try connecting to HA. If unsuccessful it will try connecting to DR. And if that is unsuccessful connection attempt will error out.
SY.
|
|
|
|
|
|
|