Skip to main content

Questions tagged [sqlplus]

SQL*Plus is a command-line interface for the Oracle RDBMS product. SQL*Plus questions should probably be also tagged with oracle.

sqlplus
1 vote
0 answers
18 views

Oracle Instant Client download zips do not have the mesg folder

I am trying to install sqlplus without the rest of the oracle client onto a laptop with windows 11. I installed it from the instant client zip but when I run it I get the message SP2-0667: Message ...
John Zajic's user avatar
1 vote
0 answers
41 views

Oracle PL/SQL setting spool commands. I need to clear output from variable values

I have a test table "bbb". COLB bba aa1 bbb aaa bbb bb1 and do following commands: variable a varchar2(20); begin :a:='bbb'; end; / set heading off; spool C:\Temp\test.txt; set ...
Timur Pak's user avatar
2 votes
2 answers
38 views

Issue selecting table in database using oracledb python module and local Oracle 21c database

I installed a local database and used SQL Developer to create a test table. Database connection works, also the table is created and populated; example here Running this example code in Python throws ...
Arbiter Vildred's user avatar
0 votes
1 answer
40 views

How to declare a constant in Oracle SQL PLUS?

I know how to declare a variable in Oracle sql plus but not sure with the constant declaration , Pls guide with that : An example of variable declaration : DEFINE v_target_table_name = '...
radha's user avatar
  • 135
0 votes
1 answer
41 views

In Oracle, does a DDL script need commit statements when run with sqlplus?

DDL scripts do not need COMMIT statements as per the docs. If I run these statements in SQL Developer, no commit is required: CREATE TABLE dummy_table(ID NUMBER(38,0) NOT NULL PRIMARY KEY); CREATE ...
Sybuser's user avatar
  • 1,316
1 vote
0 answers
36 views

Command-line sqlplus does an unwanted change directory

Normally starting the command-line version of sql*plus (sqlplus.exe) would retain the current working folder, allowing a script that is stored in that same folder to be run with the @ command. D:\...
David0337's user avatar
0 votes
2 answers
72 views

SQL Oracle/Concat and then use it in select * from

I want to define a variable for further use in the query. Something like this: --does not work-- define Name = 'Table_name' define tableNm1 = concat(&Name, '_001') define tableNm2 = concat(&...
STEP's user avatar
  • 11
0 votes
1 answer
75 views

sqlplus send two commands to the command line

I have tried both of these methods for sending two commands to the commandline with sqlplus. Neither are working. What am I doing wrong? I thought one of them would work. sqlplus username/password@...
noobprogrammer1987's user avatar
0 votes
0 answers
38 views

ORA-01017 invalid username/password 19.9c

I can't connect Oracle 19C with sqlplus / as sysdba Oracle Linux [oracle]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jun 5 11:25:22 2024 Version 19.9.0.0.0 Copyright (c) ...
Gaal Benga's user avatar
0 votes
1 answer
34 views

nested foreach in tcsh

I need to act over several database clients, these client have a static name APPUSR with numbers (1,11,12,13 2,21,22,23 3,31,32,33 ...) Id. APPUSR1,APPUSR12, APPUSR3, APPUSR32,.... I thought loop ...
Atropo's user avatar
  • 3
0 votes
0 answers
15 views

Running SqlPlus in PowerShell Not accepting Parameters

I am using PowerShell to run a sql script via SqlPlus. I need to pass two dates parameters into the sql script. If I type everything out directly, it works fine: sqlplus userName/Password @C:\myFolder\...
Aaron Johnsen's user avatar
0 votes
0 answers
37 views

sqlplus does not use column separators for specific output

i am trying to build an sql plus script that extracts some values out of my database to do a log search with them afterwards. It looks like this, amended to not use real data: IFS='' read -r -d '' SQL ...
Broetchenholer's user avatar
0 votes
0 answers
26 views

ORACLE Sqlplus-connection problem wehn running in local container

I am trying to run sqlplus inside a container on my windows-machine, and I cannot connect to the database using the TNS-Name. The connection works when I connect through the IP-Adress or the hostname. ...
user7882389's user avatar
0 votes
2 answers
35 views

Oracle output to DUAL with double Quotes

I'm running a SQL job from Linux. I'm trying to grab the start time and end time of the job so I'm using the following SQL to grab SYSdate select to_char(sysdate - 5/24, 'YYYY/MM/DD HH:MI:SS') "...
RagnarLB's user avatar
1 vote
1 answer
56 views

How to write a SQL statement that spools the result of select, replace and order by with custom delimiters to a csv file

I am trying to do exactly what the question says: selecting from a table, replacing special characters from a column, order the result, then spool to a .csv file, with a custom delimiter. I can only ...
Wei Xiong's user avatar
  • 199

15 30 50 per page
1
2 3 4 5
232