Questions tagged [sqlcl]

sqlcl is a command line interface for Oracle databases.

sqlcl is a command line inteface for Oracle databases. It is similar to SQL*Plus but contains additional features such as in-line editing and auto-completion.

Questions with the tag should probably also have the tag.

81 questions
1
vote
1 answer

start oracle .sql script through SQLcl on a remote windows host

On an Oracle database server, I have been able to schedule a nightly job that runs oracle scripts initiated from a powershell script which has this line: sqlplus accountID/password @C:\scripts\run_scripts.sql Now I need to achieve the same on…
newman
  • 97
  • 9
1
vote
0 answers

sqlcl can't perform liquibase update for a simple changelog

I'm really stuck on the simpliest example of liquibase migration taken from Oracle-Base. So I've created two files and put it into folder preset. Contents of file controller.xml:
Roman
  • 473
  • 5
  • 22
1
vote
1 answer

How to configure SQLcl prompt to be 2 lines?

For a long time now, I've had my login.sql file configured to set the prompt in SQLPLUS to two lines, so that it looks like so: my_username@my_db_instance SQL> The code within login.sql that accomplishes this is below (the chr(10) is what creates…
1
vote
0 answers

SQL File not found when running liquibase update from sqlcl

The problem is simple: liquibase fails to find my changeset sqlfile to run it against my db. Paths are as follows: SqlCl: C:\Oracle\sqlcl No CLASSPATH is defined in user env variables Main changelog file: C:\repos\odb\db-scripts\main.yaml Changeset…
Roman
  • 473
  • 5
  • 22
1
vote
0 answers

"hints" formatted query output using oracle jdbc driver

Is it possible to get "hints" formatted query output using oracle jdbc driver? example query Select /*insert*/ * from sample_table or Select /*html*/ * from sample_table looks like the stmt.executeQuer is just ignoring formatting "hints" and only…
David Abragimov
  • 524
  • 2
  • 6
  • 24
1
vote
0 answers

How do you create an Oracle SQLcl one-liner command

I'm trying to run sqlcl on Windows 10 cmd with a one-liner query ... Simply stated, here is what I'm trying to to do: C:\ sql.exe -s username/password@database.hello.com:1521/ORCL 'SELECT * FROM some_table' I know this is possible in linux, but I'm…
Ivan Tuma
  • 11
  • 2
1
vote
1 answer

Oracle sqlcl format ignores custom rules when formatting file

sqlcl appears to use the formatting rules when formatting the buffer, but ignores them for formatting a file. I have an input file (test.sql) and a small set of formatting rules (format.xml) [abayley@abayley1 ~]$ cat test.sql SELECT * from…
Alistair Bayley
  • 331
  • 2
  • 14
1
vote
0 answers

Exporting data to csv file: sqlplus vs sqlcl parallel vs pl/sql utl_file dbms_parallel_execute, which one is faster

In my last project we were working on a requirement where huge data (40 million rows) needs to read and for each row we need to trigger a process. As part of design we used multithreading where each thread fetch data for a given partition using Jdbc…
Rob Wilkinson
  • 1,131
  • 5
  • 18
  • 34
1
vote
1 answer

Loading assembly into SQL Server 2017 database

I am trying to load a CLR assembly Split.dll into a SQL Server 2017 database: CREATE ASSEMBLY Split FROM 'D:\SqlClr\split.dll' WITH Permission_set = SAFE GO I've built this assembly using Visual Studio 2019. But I get this error: Msg…
Bohdan
  • 158
  • 2
  • 10
1
vote
0 answers

oracle sqlcl via bash script unknown host specified error

I have oracle VM in my virtualbox and from host OS I want to be able to run a shell script which would: 1. put an .sql script into VM 2. run the sqlcl and the .sql script on a VM When I run oracle sqlcl from my host machine it throws an error…
pawelek69420
  • 134
  • 1
  • 5
1
vote
1 answer

how can you add multiple rows in sqlcl?

i am trying to add multiple rows in my table. i tried to follow some of the online solutions but i keep getting ORA-00933: SQL command not properly ended. how do i add multiple rows at once. insert into driver_detail…
Mr Josh
  • 120
  • 2
  • 11
1
vote
2 answers

Batch file stops after SQL statement is completed and doesn't continue to exit

I'm running a simple batch file to execute a SQL statement. The batch file: cd /D C:\sqlcl\bin sql username/password@host:port:SID @C:\scripts\statement.sql exit The SQL statement runs perfectly. It spools the results of the query to a CSV file…
1
vote
2 answers

Oracle SQL: How to capitalize first character of column header rather than the value?

I've built a statement where the result is spooled into a .json file. With SQLcl, it starts off as: SET ENCODING UTF-8 SET SQLFORMAT JSON SPOOL language.json Then, I do selects. Just an example: SELECT INITCAP(ltl.language) language, // ...…
cbll
  • 6,499
  • 26
  • 74
  • 117
1
vote
2 answers

How to change Oracle Insert Query Date Format to to_date in sqlc

Good day, within sqlcl I will like to run a query that build a insert statement. Such as: SELECT /*insert*/* FROM TABLE; but each date value is returned as to_timestamp('date', 'format') and I want to get to_date('date', 'format') instead. What do…
1
vote
1 answer

How to create a new database in Oracle Database 11g using SQL Developer command line?

I installed Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production on a Linux virtual machine. The linux machine doesn't have a desktop environment which eliminates the possibility of using the SQL Developer software. According to…
dgo1970
  • 61
  • 1
  • 4