Skip to main content

Questions tagged [sqlplus]

Command-Line Utility Program for Oracle

Filter by
Sorted by
Tagged with
0 votes
1 answer
664 views

Can't log into Oracle 19c database running inside a container from the host

I have a server running Oracle 19c inside a Docker container, and I would like the ability to log into the database from the host using sqlplus. Inside the container, I am able to run this command ...
0 votes
1 answer
11 views

sqlplus column header misaligned

In wide sqlplus reports, column headers get misaligned from the data The code that led to this output was: set linesize 32767 set trimspool on col z format a1 alter session set nls_date_format='...
0 votes
2 answers
6k views

Oracle: Simple way to compare all objects of a schema in two databases?

I'm attempting to compare all objects of two schemas located in two different databases. I know there may be ways to do this with TOAD and SQL Developer, but is there another way to do this by script ...
0 votes
1 answer
934 views

Direct, simple SQL query results in "ORA-01406: fetched column value was truncated"

All the information I've seen on this issue is always in regards to running a query via some other utility (e.g. TOAD); however, I am seeing this issue when I simply try to select * from v$asm_disk; ...
0 votes
3 answers
2k views

Pass multiples values to script into sqlplus in Oracle

I want to execute the same sql script passing one text every time but I don't know how to it. I want to do it into sqlplus. With this select I have the values but I don't know how to pass this ...
1 vote
2 answers
869 views

How to avoid split in output in sqlplus

I am running the following query to get list of all PDBs using SQLPLUS and calling each PDB NAME using for loop in shell script. Unfortunately, few PDB NAMEs are split/broken in the output(for example,...
0 votes
1 answer
553 views

How to we get history of sql statements of sysdba?

We have been running a list of commands in cli: sqlplus / as sysdba We did not have "history on" and we logged out of the session. How do we get the list of sql statements we ran before as ...
-1 votes
2 answers
509 views

How to export and Import entire oracle database using sqlplus on terminal linux machine?

I have database that i want export from one machine and import into another machine using sqlplus on linux terminal. I have tried nothing
0 votes
6 answers
788 views

How could I fix this warning?

SQL*Plus: Release 12.2.0.1.0 Production on Thu Sep 20 13:08:07 2018 Copyright (c) 1982, 2016, Oracle. All rights reserved. Enter user-name: system Enter password: ERROR: ORA-28002: the password will ...
0 votes
1 answer
369 views

How to install sqlplus in macOS M1 Pro ( silicon chip)

I have been searching in internet for best way to install sqlplus in MacOs apple silicon chip ( arm bases processor). please guide me some easiest method to do that. I saw that many article about ...
user avatar
0 votes
0 answers
27 views

sqlplus connects to my Oracle server only on "second try"

My Oracle DB used to work fine but lately I have the following problem: When I try to connect with sqlplus with a non-interactive command as the following, from the very machine I deployed my DB on, ...
3 votes
1 answer
6k views

sqlplus is not starting

I have a strange error on a Red Hat machine. InstantClient is installed in and ORACLE_HOME is set to /opt/oracle/product/112030_cl_64/cl/ The user which installed the client was oracle:oinstall. My ...
0 votes
1 answer
156 views

sqlplus / as sysdba Connected to an idle instance

anyone can Me help uderstand what is happends? i have oraenv corectly, use su oracle to change user, use this command to conncet as sysdba - sqlplus / as sysdba answer is: SQL*Plus: Release 19.0.0.0....
0 votes
0 answers
64 views

listener issues in oracle 19c

These are my listener.ora and tnsnames.ora files listener.ora SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = dr_DGMGRL) (ORACLE_HOME = /u01/app/oracle/product/19.0.0/...
0 votes
0 answers
38 views

Unix Powershell script stops after running SQLPlus command within the script

We are trying to create a Unix Powershell (not shell script) script which first runs a SQL to update a couple of tables, psprcsque and psprcsrqst. The function which runs the SQL update gets variables ...
0 votes
1 answer
44 views

Oracle colsep is adding newlines. Why?

So, I have a script: set heading off; set feedback off; set linesize 10000; set newpage NONE; set colsep '~' whenever sqlerror exit 1; WHENEVER OSERROR EXIT 255; select TO_CHAR(je.key_date, 'YYYY-MM-...
3 votes
4 answers
84k views

How to format sql-plus-spool-file to *.csv with all columns in one line and row-content with linebreaks as one field?

I am not a professional, sorry. But perhaps you can help me anyway ... I have a table with 27 columns and within the rows data with linebreaks. When I try to export selected rows with sql-plus spool,...
0 votes
0 answers
16 views

Geting ORA-01017 after copying oracle home directory to different linux server

-- Oracle V 12c I have two different servers. I have copied the entire oracle directory from one server to another, and now I am using made relevant changes in .bash_profile. when executing sqlplus, ...
0 votes
2 answers
516 views

Unable to connect to Oracle user in pluggable database

for some reason, i am unable to connect with any user that I create. their account status is also unlocked. I want to mention one thing; the pdbs are clone of the main pdb. (as shown by their name ...
-1 votes
1 answer
121 views

How to make sqlplus parse stdin?

I have the data in the following form: 10334,99.4,4241 14354,99.5,6018 16807,93.9,2279 22042,97.5,70341 22117,96.4,70335 22138,95.7,70332 23869,94.4,135649 23937,97.5,135642 23982,96.6,135638 24055,95....
1 vote
1 answer
13k views

Why can't I log in to SYSTEM without AS SYSDBA

When loging in to sqlplus as SYSTEM, why does the login fail with an invalid username/password error if I do not include "AS SYSDBA" C:\Windows\System32>sqlplus /nolog SQL*Plus: Release 11.2.0.1....
10 votes
4 answers
190k views

SYSDBA password in Oracle DB

I am connecting to Oracle DB with: sqlplus / as sysdba What is the default password for the sysdba user? I tried in net and found out the default password is change_on_install but it is not working ...
69 votes
7 answers
854k views

Connect with sqlplus from the command line using a connection string

Let's say I have an Oracle database. I have a username = x, password = y, database = z, port = a, SID = b, and Hostname = c. So, how do I connect correctly? I used many options like: sqlplus x/y@'(...
107 votes
4 answers
985k views

How to use sqlplus to connect to an Oracle Database located on another host without modifying my own tnsnames.ora

I want to connect to an oracle database located on another host using sqlplus. This page suggested adding an item on my tnsnames to connect to that database local_SID = (DESCRIPTION = (ADDRESS = ...
1 vote
3 answers
2k views

Oracle 19c - find primary DB information from a mounted standby

I have a (probably simple) query about how to find an Oracle 19c primary database's host by querying a mounted standby using sqlplus. I can get the primary name as follows: select ...
0 votes
1 answer
977 views

Don't echo a single command in SQL*Plus

If I have a script like this... SET ECHO ON SELECT 'I want the person reading the spool to see this whole query.' FROM DUAL WHERE interesting_logic_ = 'DEBUGGABLE'; SET ECHO OFF PROMPT I only ...
51 votes
4 answers
98k views

What is the difference between sys and system accounts in Oracle databases?

There are two ways to connect to Oracle as an administrator using SQL Plus: sqlplus sys as sysdba sqlplus system/manager These accounts should be used for different purposes, I suppose. Which tasks ...
-1 votes
1 answer
457 views

import .dmp in Toad : Invalid format of Import utility name Verify that ORACLE_HOME is properly set

When I tried to import a DMP file using TOAD (9.0.1) Import Utility Wizard I get an error Invalid format of Import utility name Verify that ORACLE_HOME is properly set Any suggestions please? I ...
0 votes
2 answers
419 views

Oracle sqlplus doesn't connect to remote DB, only local

I would appriciate some help with an issue that I'm facing. I have two Oracle DB servers with same schemas. I want to run sqlplus from one server to another. I've added the tns_names entries in ...
0 votes
1 answer
385 views

Insert file content (with white line and special characters ) in bash variable for insert in oracle table with sqlplus

I write this simpe test.ksh scipt: #!/bin/ksh TEST=$(cat $1 ) sqlplus -S *****/*****@*****<<- EOF set define off; SET SQLBLANKLINES ON; INSERT INTO DBADOC.TEST ( "TEST" ) ...
0 votes
1 answer
49 views

How to silent the login.sql output

[nir@dba etl]$ cat login.sql col TAB# new_value TAB NOPRINT select chr(9) TAB# from dual; set markup csv on delimiter "&TAB" quote off set heading off termout off echo off feedback off ...
0 votes
2 answers
144 views

ignore column width in sqlplus

I'm getting the follow SQLPLUS> create table source(aa nvarchar2(2), bb nvarchar2(100), cc nvarchar2(10)); insert into source values ('aa',null,'aa'); insert into source values (null,'aa','aa'); ...
0 votes
2 answers
2k views

How do I set tab as a delimiter in sqlplus markup

I want to return sqlplus output as tsv. For that I use set markup csv. but it does not accept tab as delimiter, not \t and not actual tab. error is SP2-1660: Invalid option. Only a single character be ...
0 votes
1 answer
65 views

How to return SQLPLUS Null as \N

I have a script that moves that from one DB to another by a SQL. I'm querying from one side and load it into another. TSV style. I'm expanding that script now to support Oracle as a source. For that ...
0 votes
3 answers
99 views

Does the Oracle database username exist for each Linux account?

Does the Oracle database username exist for each Linux account? The former employee left the company and can not find the details at this time. I can log in to the Linux root account and run a DB ...
5 votes
1 answer
108k views

SP2-0667: Message file sp1<lang>.msb not found sqlplus oracle

I've a linux RedHat which contains oracle database. I setted all environnement variables, but when I running sqlplus command I've this error : SP2-0667: Message file sp1<lang>.msb not found ...
0 votes
0 answers
122 views

What’s wrong with provided apex instance administrator password

1 I have installed Oracle Database 21c Enterprise Edition on Oracle windows 10 I am now trying to install Apex 22.2 . Got to the chapter "5.4.2.3 Running apxchpwd.sql" to set the instance ...
0 votes
0 answers
268 views

problem with services in automatic restart

I am working on Oracle 19c. I have a problem with the services I created via: alter system set service_names=' exemple1, exemple2' scope=both; I have many services to create and I am limited to 255 ...
1 vote
1 answer
168 views

My subdirectories under $ORACLE_HOME are missing

Im using oracle 11g. I cannot access the software products since they are missing. When I cd to $ORACLE_HOME, there are no files under it. They are missing. I cannot access the sqlplus. What to do in ...
1 vote
1 answer
1k views

Oracle ODBC client configuration missing variable

I'm trying to configure an ODBC connection for an Oracle DB using unixODBC drivers. For that I followed this Oracle's guide. First, I successfully installed the ODBC client and driver. # dnf install ...
0 votes
1 answer
226 views

How to store 30000 plus characters in a particular text field, which datatype should be use for it? sql*plus

Here, I have a problem in which I want to store 30000 plus characters (paragraphs) in an individual field instance. Moreover, I tried the CLOB datatype for a column, but when I am crossing the ...
0 votes
1 answer
161 views

How to use CLOB datatype for storing limitless characters in column each rows?

I want to use CLOB datatype instead of varchar2(4000) and long, in which I want store limitless characters . However, its easy to declare the string based column to CLOB but the main problem is when I ...
0 votes
0 answers
914 views

sqlplus is not working, it is frozen

When I type sqlplus / as sysdba It simply gets frozen, the cursor stays there, and I can type more character but after pressing enter nothing happens. Neither CTRL + C. My pmon service is running, ...
5 votes
9 answers
61k views

Message file not found when starting SQLPlus

I've installed Oracle XE 11.2 on Fedora 18 but have trouble starting SQLPlus. It quits with the following error: Error 6 initializing SQL*Plus SP2-0667: Message file sp1<lang>.msb not found SP2-...
3 votes
1 answer
2k views

How to Avoid SQLPlus output truncating

I have the following column in oracle database table. Column name : objectdata Data type : LONG RAW When I query this column via sqlplus output is like below. SQL> select objectdata from tableA ...
13 votes
7 answers
32k views

"ORA-24454: client host name is not set" when connecting from Ubuntu instance on AWS EC2

Some background: I am attempting to connect to an Oracle database. I have a username, password, IP address, port, and service name. I only have access to this database from an Ubuntu EC2 instance on ...
0 votes
1 answer
565 views

Cannot connect to a pluggable database via IDE

I have an Oracle XE database on computer1. When I try to connect to it via sqlplus from computer2, it works fine, for both cdb and pdb connections; e.g.: rlwrap sqlplus timon@//192.168.0.115:9121/...
0 votes
0 answers
371 views

How to store data in loop and after assign data set to out ref cursor in Oracle

I tried to store date in loop and after that dataset set to OUT SYS_REFCURSOR. In this time I declared array variable and I tried to store data in loop by each iteration. and after, I want to assign ...
0 votes
0 answers
155 views

How to get the functionality of sqlplus' "BREAK ON" in Postgres?

Is there a way to separate a query that has a group by attribute in Postgres in a fashion similar to sqlplus? Assuming I have branches of my company in every country, is there a way to have a separate ...
-1 votes
1 answer
2k views

Sql plus equivalent in psql

I'm tasked of migrating some code from sqlplus to psql In oracle, I have a bash script that excutes a stored procedure and based on the result it calls a sqlplus that spools multiple files to dump ...

1
2 3 4 5 6