Questions tagged [sqlplus]

Command-Line Utility Program for Oracle

Filter by
Sorted by
Tagged with
1
vote
1answer
506 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 ...
2
votes
2answers
1k 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
4answers
2k 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
0answers
69 views

oracle sqlcl and sqlplus - seperate login.sql on linux

I feel I'm probably missing something obvious here, but I can't see an easy way to have a separate login.sql for sqlplus and sqlcl This is problematic for me as the errors thrown up by sqlplus for the ...
1
vote
0answers
224 views

How to turn on the expanded mode in Oracle SQL*Plus?

As in the switch \x of PostgreSQL. For more information on the PostgreSQL expanded mode, fetch https://serverfault.com/questions/618642/psql-expanded-mode-equivalency-for-mysql. Both PostgreSQL and ...
3
votes
1answer
4k 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
2answers
50 views

SQLPlus configuration problem or firewall issue

I need to connect to a remote Oracle DB, so I requested to open the firewall on the port 1521 to the DB and the replica. [root@ansible-test ~]$ telnet <oracle_db_active> 1521 Trying <...
0
votes
2answers
746 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
136 views

Change of NLS_LANG

Until not long ago, the NLS_CHARACTERSET and the NLS_LANG were both ISO88591. We deliver to production some scripts encoded in ISO88591. Since they changed their NLS_LANG in utf8, they have a problem ...
0
votes
2answers
1k 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
0answers
35 views

Error 0xc000007b with Oracle 19c

As our (32-bit) application uses the Oracle client for communication with the Oracle server I have set up a test environment on a Microsoft Windows Server 2019 Datacenter. I have installed the Oracle ...
0
votes
0answers
35 views

Number of Field in CSV File does not match with number of field in External Table

Hi is there a way to reject a record with excess csv field. For example: CREATE TABLE Table1 ( Field1 VARCHAR(255), Field2 VARCHAR(255) ) ORGANIZATION EXTERNAL ( TYPE ...
0
votes
2answers
38 views

Creating two databases in Oracle 11g

I am a student. I have assignments and projects simultaneously. I want my project database and the other simple databases separate. I have no option to use MySQL or others as my lecturer suggested to ...
0
votes
1answer
114 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
1answer
48 views

How to install Oracle's sqlplus on a Mac? [closed]

I need steps how to install Oracle's sqlplus on a Mac.
0
votes
1answer
35 views

How to quote a SQL*Plus identifier in a bash script?

I get "ORA-00904: "MEMORY_TARGET": invalid identifier" no matter how I try to quote the identifier in the following command: MEMORY_TARGET=$(su - orat01 -c " echo 'select ...
1
vote
1answer
39 views

Using SQL*Plus to connect to remote DB from local server, how do I export a backup to my local server?

I am trying to have my entire remote DB backup made to my local server. Running the following command from my local server: expdp \"user/user@ip as SYSDBA\" full=Y directory=/backup/backup/ ...
-1
votes
1answer
42 views

Database not opening, after messing with datafiles [closed]

I was exercising some database recovery exercises First I had made a backup of my datafiles, then I moved them to another directory to test if I could recover them or not. When I was recovering them ...
0
votes
2answers
467 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 ...
2
votes
1answer
6k views

How to install Oracle sqlplus, rman utilities on local Windows workstation?

I am the administrator for our organization's Oracle database. I would like to install sqlplus and rman client utilities on my local workstation so I can administer the database without having to ...
14
votes
3answers
57k views

How to set an Oracle user's default schema?

I created a few new users in Oracle. However, when running sqlplus, they all need to fully qualified the table names in query. What's the best way to set a default schema for these new users?
10
votes
6answers
23k 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
2answers
814 views

Problems connecting remotely to a RAC DB via sqlplus

When I create a user in an 11204 single instance DB and afterwards grant the sysdba privilege to that user I can connect remotely without any problems using: sqlplus testuser/testuserpwd@testdb as ...
-1
votes
1answer
6k views

sqlplus / as sysdba is not working in windows, ERROR: ORA-12560: TNS:protocol adapter error

I tried to login using sqlplus / as sysdba in Oracle 11g, but it is asking for a password. So I tried to login using sqlplus "/ as sysdba" since I'm using Windows. But it is showing the following ...
1
vote
0answers
72 views

How to trim trailing spaces from headers in Oracle 12.1 SQLPLUS

I am creating a pipe-delimited file from a SQLPLUS query (Oracle 12.1), and the recipients are requesting that I trim the trailing spaces from the header entries. That is, the current output file ...
0
votes
1answer
32 views

Scheduled Job Does not work in oracle SQL*PLUS

I am just a beginner in Oracle and can't seem to get this job running :- I want to delete old rows from my database. And created a job as follows :- CREATE OR REPLACE PROCEDURE delete_trips AS ...
1
vote
1answer
18 views

The full contents of the bind-variable are not displayed in SQL Plus

I wrote a big query in bind-variable. I want to print it in SQL Plus, but the text doesn't show, only small part of it.
1
vote
1answer
33 views

Big string in SQLPlus

I need to write a Select query in bind-variable and this query has more than 2500 symbols. Variable sql_txt clob; Exec :sql_txt := 'Select .....'; But SQL Plus support only <2499 symbols. How ...
0
votes
0answers
104 views

How to mount current control file in ORACLE 12C1 RAC

I am trying to take a backup of my ORACLE 12C1 RAC setup and faced following error: RMAN> BACKUP CURRENT CONTROLFILE FORMAT '+FRA/RMAN/cold/ORCL/cntrl_%s_%p_%t'; Starting backup at 16-DEC-19 ...
0
votes
1answer
154 views

Oracle: Connects with sqlplus but not from perl

I need to connect to an Oracle database from a perl script, it works in my tests and when using sqlplus, but not in production. This is a summary of the situation: Oracle 11g XE (11.2.0.2.0) : (Test ...
1
vote
2answers
3k 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 ...
2
votes
1answer
2k views

Compact Spool file from Sqlplus

I have scripts that I run in Oracle SQL Developer and then export the result to my pc as a csv. I now started using sqlplus with a .bat to run my scripts and spool the result to my pc. But I noticed ...
3
votes
2answers
71k 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
3answers
6k 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
360 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 ...
1
vote
1answer
3k 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
82k 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
79 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
157 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 ...
1
vote
1answer
67 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
149 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 ....
1
vote
3answers
6k 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
37 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
141 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
2answers
193 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; /
1
vote
0answers
26 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
995 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
175 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 command ...
1
vote
3answers
861 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
102 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 ...

1
2 3 4 5