We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [sqlplus]

Command-Line Utility Program for Oracle

Filter by
Sorted by
Tagged with
0
votes
3answers
2k views

sqlplus SP2-0341 (line overflow during variable substitution)

I want to export an Oracle database to a file and i'm using SQLDeveloper on Windows for that (the resulting SQL text file is about 35MB). This results in very long lines. I hit a snag when importing ...
-1
votes
1answer
43 views

Oracle database - how to switch instance

I'm totaly new in oracle, so sorry for my probably stupid question... I have two instances on oracle server, when I'm connecting to the server via sqlplus in default opens connection to instance X but ...
0
votes
1answer
33 views

Cannot connect database as sys as sysdba using sqlplus

I am new to oracle server 18c (currently taking online course). My problem is sql*plus where I tried to use sqlplus then sys as sysdba (it did not work) and the error appeared below. However, if I ...
3
votes
2answers
80k views

Error ORA-12560 when trying to connect Windows SQL*Plus client to Oracle 11g Linux server

I installed 11g on Centos VM on my mac.I have everything up and working on server.I have included following command I ran on cenos. $lsnrctl status LSNRCTL for Linux: Version 11.2.0.1.0 - Production ...
0
votes
2answers
44 views

How can the TNS connect identifier passed to SQL*Plus be accessed from the run script for reconnecting?

I wonder how the TNS identifier can be used within a SQL script. In this example $ sqlplus MY_USER/pswd@TNSID @script.sql par1 par2 I'd like to get TNSID as a string in order to use it from script....
1
vote
2answers
927 views

Empty v$asm_diskgroup with sqlplus

I have an Oracle Database instance installed under an OL7. It is a 12c2. Oracle GI also installed and my database has some files stored in ASM. I am using sqlplus to connect to the database instance ...
0
votes
1answer
365 views

How can I be specific about which CDB I want to connect to wrapping a PDB?

I'm quite new to Oracle. I created a CDB like cdb1 and then a PDB within like pdb1. Now I can connect to my PDB using something like: sqlplus user/password@server:port/pdb1 But can't I have two PDBs ...
1
vote
2answers
59 views

Can sqlplus fetch more than one row at a time?

We have a task running every day dumping results of a query into a CSV-file -- as the stdout of sqlplus running a query. The number of records is many millions (don't ask), and the job takes over two ...
0
votes
2answers
2k views

Spool Unicode data in sqlplus to ISO-client without character set conversion

I'm currently facing the following problem: We have an Oracle 11g database with character set AL32UTF8, and an sqlplus-client with NLS_LANG=GERMAN_GERMANY.WE8ISO8859P1. Stored in the database are ...
1
vote
1answer
34 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,...
1
vote
1answer
109 views

I am not able to use the sqlplus after intalling 11g on redhat 6.7 [closed]

When I execute: $ sqlplus / as sysdba bash: sqlplus: command not found and the bash profile for oracle user is : # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then ....
3
votes
1answer
3k 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 ...
1
vote
3answers
4k views

System account locked, insufficient privileges to log in as sysdba

I've researched the web but I could not found exactly the same situation than mine so I'm posting this message. I'm connecting via Remote Desktop Connection to a remote server (Win2k3 Server). This ...
1
vote
0answers
19 views

Equivalent in SQL*Plus of sqlite3's “line mode”

One of the output display modes supported by the default sqlite3 text client is the so-called "line mode". In this mode, the output of SELECT queries is displayed "one value per line". Here's an ...
0
votes
2answers
39 views

SQL*Plus - interactive mode on windows

How can I issue commands through SQL*Plus on Windows? In Linux is like this: sqlplus -s /nolog<<EOF conn username/password@database EXECUTE some_proc; EXIT; EOF And Windows?
0
votes
1answer
101 views

Problems to connect to an Oracle Database with SQLPLUS and URL-Variable, can somebody explain what I have to do?

I would like to connect to a ORACLE database via SQLplus. If I do it this way: sqlplus "user/pw@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST=dbsrv01.desy.de)(PORT=1521))(ADDRESS=(PROTOCOL = TCP)(HOST = ...
0
votes
2answers
729 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 ...
0
votes
2answers
149 views

sql script hangs in SQLplus on Solaris [closed]

Running an sql script in SQLplus on Solaris Any idea why script hangs in line 9 '/' and not executed? declare dummy number; begin select 1 into dummy from dual ; end; /
0
votes
0answers
27 views

What gets executed immediately after logging into an Oracle database?

When I login with SQL*Plus, without executing a command, I always get the following error: $ sqlplus db_user/db_pass@localhost/XE SQL*Plus: Release 18.0.0.0.0 - Production on Wed Aug 7 10:33:03 2019 ...
1
vote
0answers
22 views

How does Oracle authenticate a user?

I'm learning Oracle and below is my testing of starting up an Oracle instance and make the database available. oracle:[~]$ sqlplus SQL*Plus: Release 19.0.0.0.0 - Production on Mon Aug 5 09:29:30 ...
0
votes
1answer
342 views

SQLplus run without admin account

I have a weird problem. I login to a pc using non admin user. Then I installed sqlclient 64 bit for oracle 11.2. Installation went fine, no errors. Then i tried to login using sqlplus from command ...
0
votes
1answer
105 views

Oracle user password with space character in it

I connected to an Oracle 19c database and executed the following SQL: alter user sys identified by "a b" container=all; It executed successfully. However, after that I can't connect to Oracle using ...
2
votes
0answers
47 views

In SQLPlus, why the first run of the command doesn't work?

I use SQLPlus connecting to an Oracle database. See below snapshot. Why the first run of the command show con_name doesn't work and the second run works? Edit I have to admit that I typed the ...
0
votes
3answers
602 views

Leading zeros are truncated when I spool to CSV

I have spooled a file to CSV using sqlplus. Everything works great but there is one issue. I have mobile numbers which start with 0, for example 04589 and 02586. After the spooling is complete, 0s ...
1
vote
3answers
191 views

How can I disable the @ symbol in SQL scripts for sqlplus?

In Oracle's sqlplus tool, when the script contains an @ symbol, it loads an SQL script with that name and executes it. I'm inserting a VARCHAR value which contains some CSS code, so when it encounters ...
0
votes
0answers
33 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 ...
0
votes
2answers
235 views

sqlplus, command line parameters and ORACLE_HOME with spaces

I have noticed strange interaction between ORACLE_HOME and parameter substitution. Here is my test.sql prompt &1 prompt &2 prompt &3 prompt &4 exit The expected behavior: C:\...
6
votes
4answers
71k views

sqldeveloper ORA-12505. TNS: listener does not currently know of SID given in connect descriptor

There are similar questions asked and answered in this network related to the error message given in the question, however this problem is a little different from each. I have installed oracle 12c in ...
0
votes
0answers
28 views

How to insert Total Amount in Sql Plus as a new record?

Everything in the code works fine but I can't figure out how to insert the total amount into the record. The top code ask for the quantity amount and once the user inputs the quantity, it multiplies ...
81
votes
4answers
726k 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 conenct to that database local_SID = (DESCRIPTION = (ADDRESS =...
12
votes
3answers
32k views

Is there any difference between Rem and — comments for SQL*Plus?

On SQL*Plus prompt, both Rem and -- qualify as comment indicators: Rem this is a comment -- this is also a comment create table emp ( id number primary key, name cvarchar2(40)); Is there any ...
0
votes
1answer
78 views

UTL_RAW “invalid identifier” error message

When I execute the following: select utl_raw.cast_to_raw('8') from dual; I receive the error message below: invalid identifier ...while in other PC with the same Oracle version, i.e., 11g, the ...
0
votes
1answer
57 views

How do I know what my username/password is for SQL PLUS? [closed]

I am trying to set up an Oracle SOA Suite environment with docker containers according to this website -> https://svgonugu.com/2018/03/12/docker-containers-for-oracle-soa-suite/ I got to a point ...
11
votes
3answers
994 views

Do I have to retype information every time I make a mistake in SQLPlus

If I make a mistake in SQLPlus while inputting an 'insert into' command, is there a way I can bring this information back up in order to edit it?
0
votes
0answers
85 views

Oracle CLOB contains html - export to csv

I have a table that contains html formatted text in Oracle. I'm trying to export that to a csv but can't use the built in SQL Developer Export features because of character limits. I've tried almost ...
3
votes
1answer
33k views

How to connect to oracle 12c from sqlplus without password in command line

This may seem as weird question: If i have user called demo with password Pass1234 When connecting to oracle 11g I can run sqlplus like this with password in command line: on DB host: C:\> ...
2
votes
1answer
396 views

ORA-48108 / ORA-48140 / ORA-48187 - diagnostic_dest value error(s) - init files / control files

This is all testing / training - none of this is related to a production env Using ORACLE DB 12c + UNIX/LINUX 64-bit on an VM. . Hi Guys! I am running in the below error(s) and seem unable to ...
0
votes
2answers
748 views

Special Character in password

I'm Trying to connect to a remote DB using Sqlplus, but the password contains a special character (!). The SID is working fine, but Sqlplus is complaining about it when I use the ! in the password /...
0
votes
1answer
52 views

Sqlplus not using NLS_LANG env variable

I am trying to login to an Oracle 10g database vía sqlplus. In the nls_session_parameters I need NLS_DATE_LANGUAGE in American, but I always have Spanish. In the database server my NLS_LANG is ...
1
vote
1answer
358 views

connect to Oracle Cloud from SQLPlus and Instant Client

I want to try to connect with SQLPlus to Oracle Cloud. for regular oracle I can connect from remote machine as follows: IP = 1.2.3.4 PORT = 1521 ServiceName = "ORCL1" Username = "username" Password ...
-1
votes
1answer
175 views

Error while updating a date column using SQL*Plus variable

I am not able to update the date time which I have already stored in a variable and I am trying to update the another record with date time present in that variable. last_update_time=`sqlplus -s user/...
-1
votes
1answer
55 views

How to use mariadb instead of sqlplus using sqlnet configuration files

currently I can access a database on a remote server using Oracle's instant client "sqlplus" The connection is dependent on a couple of configuration files in: $ORACLE_HOME/network/admin which are ...
1
vote
2answers
204 views

Create dynamic folder using SQL*Plus

I need to create directory in Linux with date stamp from SQL*Plus. Is there a command that can be run in *.sql file to create a directory with current date?
0
votes
0answers
962 views

Import .dmp file into Oracle Database

Guys. When I tried to import a .dmp file into a fresh oracle database (sqlplus), I got this error. dump file "exp_tbs_gxplt01282019.dmp" may be an Data Pump export dump file My step is: SQL> ...
0
votes
2answers
50 views

Long query causes problems

I have a huge sql query which causes problems: select distinct subjectnr from proces where (produkttypenr = 1 or produkttypenr = 3 or produkttypenr = 4 or produkttypenr = 5 or produkttypenr = 9 or ...
0
votes
1answer
219 views

When is the best time to use RMAN vs when to use Data Pump? [duplicate]

And also... if I backup a database with RMAN, is it not possible to use impdp to restore small parts of that database?
0
votes
2answers
86 views

Unable to connect oracle 12 database remotely while local connection works

I have two oracle test nodes. On node 2 as root I am able to connect without credential with the command, su - oraabc -c "/oracle/ABC/12102/bin/sqlplus / as sysdba" Output: SQL*Plus: Release 12.1.0....
0
votes
1answer
1k views

Oracle: Save PDB state for all instances in RAC environment

I found out the following two contradicting statements in the Oracle DBA guide. For an Oracle RAC CDB, you can use the instances clause in the pdb_save_or_discard_state clause to specify the ...
0
votes
1answer
575 views

Delete all types created by a user

In Oracle 10g, how do I delete all the types owned by a specific user? This is the view that gives me the types I want to drop:SELECT type_name FROM user_types;
0
votes
1answer
200 views

sqlldr not recognizing new line/row

Our organization switched to a new tool and now our text files are generated with only a trailing CR instead of a CR & LF. Now sqlldr thinks all of the data in the file is 1 row. How can I fix ...