SQL Language (MOSC)

MOSC Banner

Remote database and SELECT successful, CTAS and INSERT fails.

edited Dec 3, 2010 10:49PM in SQL Language (MOSC) 5 commentsAnswered
Hi All,

I have very weired problem on my oracle standard 10g Release2 installation. I am having a complex query involving many remote tables over database link and some local tables. I have used a driving_site  hint into the sql.

While this is going to be a nightly refresh, I created a shell script with simple HEREDOC syntax on sqlplus as follows:

---------------------------------------------------------------------------------

sqlplus <login> <<EOF

CREATE TABLE ATABLE AS

SELECT /*+ driving_site (ptable) */

......

/

exit

EOF

---------------------------------------------------------------------------------

Idea was to run this under DBMS_SCHEDULER.

Now above query consistently fails. Giving

ORA-00904: "A1"."acolumn": invalid identifier
ORA-02063: preceding line from remote_DB

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center