Ask the Expert

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 -

    Requires Free Membership to View

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
FROM    mani_test@my_db_link;

Use the local view name in your SQLLDR control file.

This was first published in November 2003

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: