Q
Problem solve Get help with specific problems with your technologies, process and projects.

Using a database link in a SQLLDR control file

Is it possible to use a database link in a SQLLDR control file? I tried, but I got the following error:

SQL*Loader: Release 8.1.7.4.0 -
SQL*Loader-350: Syntax error at line 2.
Illegal combination of non-alphanumeric characters REPLACE INTO TABLE mani_test@my_db_link
So you're loading into database a but the table is actually located in database b. The obvious work-around is to load into database b. That may not be a good solution (for example, if it's a multi-table load and some of the tables do reside in a). Creating a synonym to use in the control file results in a different error, ORA-01405.

Loading into a view does work.

CREATE OR REPLACE VIEW  local_mani_test
AS
SELECT  *
FROM    mani_test@my_db_link;

Use the local view name in your SQLLDR control file.

Dig Deeper on Using Oracle PL-SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close