|
@ECHO OFF |
|
SETLOCAL |
|
|
|
REM ************************************************************* |
|
REM SQLcl.cmd |
|
REM |
|
REM Copy this file to the same folder that sql.exe is in |
|
REM ************************************************************* |
|
|
|
REM ============================================================= |
|
REM Set JAVA_HOME folder |
|
REM |
|
REM If the computer has SQL Developer _with the embedded JDK_, |
|
REM SQLcl can use that JDK, if you want it to. Otherwise, point |
|
REM JAVA_HOME to your preferred JDK. |
|
REM ============================================================= |
|
SET JAVA_HOME=%ProgramW6432%\SQL Developer\jdk\jre |
|
rem SET JAVA_HOME=%ProgramW6432%\Java\jdk-13 |
|
|
|
REM ============================================================= |
|
REM Set SQLPATH folder |
|
REM |
|
REM If the SQLPATH environment variable is set, and the SQLPATH |
|
REM folder contains a login.sql, SQLcl will run it. |
|
REM ============================================================= |
|
SET SQLPATH=%USERPROFILE%\Documents\Oracle |
|
|
|
REM ============================================================= |
|
REM Set TNS_ADMIN folder |
|
REM |
|
REM If you want SQLcl to use a tnsnames.ora file, point the |
|
REM TNS_ADMIN environment variable to the file's folder. |
|
REM ============================================================= |
|
SET TNS_ADMIN=%SystemDrive%\Oracle64\instantclient_19_11\network\admin |
|
|
|
REM Switch codepage to UTF-8 |
|
CHCP 65001 >NUL 2>&1 |
|
|
|
SET SQL_HOME=%~dp0.. |
|
|
|
REM add all SQLcl libraries to classpath |
|
SET CPFILE=%SQL_HOME%\lib\dbtools-sqlcl.jar;%SQL_HOME%\lib\*;%SQL_HOME%\lib\ext\* |
|
|
|
REM Use internal simple X for awt in |
|
SET STD_ARGS=-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xss10M |
|
|
|
"%JAVA_HOME%\bin\java" %STD_ARGS% -cp "%CPFILE%" oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli %* |
|
|
|
ENDLOCAL |
The link Oracle broke should now point to
https://community.oracle.com/tech/developers/discussion/4139916/unable-to-launch-sqlcl-18-1