Using oracle's sqlcl, I was able to use SPOOL to create data dump files on my dev computer. However, when I tried to run sqlcl on a windows server, with java installed, it gave this error:
C:path>sql.exe username/password@connection_string
SQLcl: Release 20.3 Production on Fri Jan 08 13:41:39 2021
Copyright (c) 1982, 2021, Oracle. All rights reserved.
USER = username
URL = jdbc:oracle:thin:@connection_string
Error Message = Could not initialize class sun.management.ManagementFactoryHelper
It doesn't seem to be rejected by remote database server because I could use SQL developer to access the database. Doesn't seem to be login credential or connection string error either, because I tested the same command on my dev computer and it works.
Searched around and haven't seen a related topic.
SQLcl version: Release 20.3 Production
Java version: "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)
############ Edit:
As for the environment variable, it is :
C:Program Files (x86)Common
FilesOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32WindowsPowerShellv1.0;C:Program
FilesAmazoncfn-bootstrap;C:Javajre1.8.0_271;C:Javajre1.8.0_271in;C:Java;C:oracleinstantclient;C:oracle
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…