I have been writing a batch file that runs an impdp job through a network link.
@echo off
set server=%1
set schema=%2
set site=%3
set local_schema=%site%_SYNC
sqlplus -S sync_sites/password @C:\expdir\drop_create_user_oracle.sql %server% %schema% %site% %local_schema%
C:\app\Oracle\product\12.1.0\dbhome_1\BIN\impdp %local_schema%/password remap_schema=%schema%:%local_schema% NETWORK_LINK=%1 CONTENT=METADATA_ONLY EXCLUDE=STATISTICS VERSION=12.1
The dblink that was created through the SQL file is working well, as I can manually query through it. The problem is that when I run the batch, I keep getting the same errors:
Import: Release 12.1.0.2.0 - Production on Wed Aug 24 18:41:47 2022
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
ORA-39006: internal error
ORA-39113: Unable to determine database version
ORA-06550: line 1, column 7:
PLS-00352: Unable to access another database 'WPP_TEST'
ORA-06550: line 1, column 7:
PLS-00201: identifier 'SYS@WPP_TEST' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
ORA-39097: Data Pump job encountered unexpected error -6550
I tried to find a solution online and failed to do so. I tried to change the version, run it without a version, change many parameters in the impdp code but got the same results. Could you please shed light on this? Am I missing something? Thanks in advance!