Command-Line Utility Program for Oracle

learn more… | top users | synonyms

-4
votes
0answers
19 views

SQLPLUS QUERY HELP

Please help to create what might be a simple query for you; very tricky for me. Maybe a nested query?... or maybe a "For Loop". Thank you! Table name: WO_OPERATION Relevant Columns: ...
0
votes
1answer
24 views

sqlplus connect without typing the @local_SID when only have one instance

Every time I want to connect with a user in Sqlplus I have to specify the database|sid name too, SQL>connect scott/tiger@orcl I have installed another database for other purpose but I removed ...
0
votes
1answer
28 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 ...
-1
votes
0answers
20 views

Oracle sqlplus report

I try to make a sqlplus report like that: A B C D --- --- --- --- 1 A Z 100 2 A Y 100 COUNT 2 TOTAL 200 ------------------------- 3 B ...
1
vote
1answer
34 views

SQLPlus Command Line In-line Set Commands

I have the need to run linux command line direct query, including SET options. The query by itself runs fine. However, when I attempt to add set commands, it fails. (my alias 'db' connects to ...
0
votes
0answers
51 views

Why is there a difference in CSV Export Results of Oracle SQL Developer and SQL Plus Spool

When I export data from SQL Developer GUI, setting format: csv, left enclosure: ", right enclosure: ", and Encoding: UTF8, I get data exactly the way that I need it for processing in Python. ...
0
votes
1answer
32 views

sqlplus not connecting to Oracle XE 11g

I installed Oracle XE 11g on my Ubuntu in vmware fusion. The oracle installation is all went fine but I am not able to connect the oracle database using sqlplus. I am getting this exception: $ ...
1
vote
0answers
33 views

How to make sqlplus more user-friendly anyone? [closed]

Note: I've tried using Toad from the Mac, but that's another fine mess so I'd rather bite the bullet and run commands through ssh. This is to edit and run interactive discovery SELECTs, not to run ...
1
vote
1answer
57 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 ...
0
votes
0answers
73 views

WHENEVER OSERROR suppresses error messages

$ sqlplus <connstring> 2>&1 <<! WHENEVER SQLERROR EXIT FAILURE ROLLBACK; WHENEVER OSERROR EXIT FAILURE ROLLBACK; SET ECHO ON; @nonex.sql; ! Produces SQL*Plus: Release 11.2.0.1.0 ...
0
votes
0answers
49 views

Sql*PLUS: Output each field as a new line

Right now the configuration I have is the following: set pagesize 0; SET NULL *NULL*; SPOOL output/output.txt I am outputing the results to a text file in order to run a function on the file to ...
0
votes
1answer
559 views

Sql*Plus ERROR: ORA-12154: TNS:could not resolve the connect identifier specified

I installed Sql*PLUS on a cloud Oracle Linux Environment in order to access an remote database. I used the installation instructions provided as an answer here: ...
0
votes
2answers
85 views

Failed to connect to oracle SQL Plus [closed]

I tryed to connect to SQL Plus as the admin "System", I'm sure that the password I wrote was correct but the connection failed. I also tried to connect with Scott/tiger but it failed as well. What can ...
0
votes
0answers
55 views

sqlplus on linux not connecting when provided with IP port

I am running Oracle Database 11g R2 on Oracle Linux 5. I am able to connect to my SID from sqlplus if I use the command sqlplus system/password@orcl but when I provide the IP address and port: ...
0
votes
2answers
49 views

Tablespace Creation and Reassignment

It has been determined that user "SCOTT" should use a new temporary tablespace called TEMP2 size equivalent to TEMP tablespace (refer to Notes below for determining the size of TEMP). Create ...
0
votes
1answer
271 views

Spool in Shell script not working for me

#!/bin/sh echo "Started at" `date +%Y/%m/%d" "%H:%M:%S` sqlplus -s ${ORA_LOGIN_SYSADM} <<EOF 2>&1 > /dev/null SET SERVEROUTPUT ON SET FEED OFF spool ech.txt create BEGIN ...
0
votes
1answer
132 views

Setting the delimiters for Oracle multiline Procedures Oracle sqlplus

how to set the procedure delimiters in Oracle sqlplus. I am new to Oracle SQLPlus. [oracle@Server1 bin]$ ./sqlplus ******/*********@1ipaddress:1521/test</home/oracle/user/test.sql SQL*Plus: ...
1
vote
2answers
103 views

SQLPlus : default define settings

My workstation is Ubuntu 14.04. I have Oracle Express 11g installed. Whenever i run the define command in SQLPlus, is see the define _editor = "ed". Is there a way to change that permanently to gedit ...
0
votes
0answers
441 views

How to compare between two values in one field depending on another field in SQL* / Oracle Reports?

I have three fields in a table named table_family. One is "relation" it has 3 kinds of values 1 for person, 2 for parents, 3 for son. Other field is "age" and it contains the ages of all the ...
1
vote
1answer
202 views

How to access apex data from sqlplus?

I have setup an oracle database in my Ubuntu machine. Now I have took the following steps to create tables 1) login to my ubuntu account 2) su oracle 3) sqlplus "sys as sysdba" //Connected to an ...
2
votes
1answer
6k 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 ...
0
votes
1answer
33 views

sql script hangs in SQLplus on Solaris

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
2answers
55 views

glogin.sql supress error when Instance Idle

I have a pl/sql block in my glogin.sql file to show information from v$instance when I connect on the database server. Is there a way to suppress the ORA-01034 we would naturally get when the ...
1
vote
2answers
1k views

Using transactions in sqlplus

I'm coming to oracle from postgresql. In postgresql, I can use the command-line tool, psql, to execute a delete or update in a transaction: dbpool.production=> begin; BEGIN ...
0
votes
1answer
3k views

Can't connect to a Oracle db instance via SQLDeveloper

When I set the connecting information on the GUI in SQLDeveloper I get the following error (everytime!) Status : Failure -Test failed: IO Error: The Network Adapter could not establish the ...
0
votes
2answers
46 views

Filtering of sql output

I want to migrate the database. When I disable the constraints before adding the data to the output file I get extra lines: SQL> spool disable_constraints.sql; SQL> select 'alter table ...
0
votes
1answer
137 views

Check Oracle Service is Started from Batch Command

Uses: Oracle9i Standard Ed; I have a schedule which performs a Dump Import and afterwards the System Reboots itself, which is happening without any problem. After the System had rebooted, I have ...
0
votes
3answers
88 views

Prevent auto commit of DROP without SET AUTOCOMMIT OFF

I dropped my table and I lost my data and I can't roll it back because DROP statement automatically commits. How can I prevent auto commit action of DROP without using SET AUTOCOMMIT OFF?
1
vote
2answers
10k views

sqlplus: ORA-01017 logon denied from one host but OK from another

I have a strange behavior for remote sqlplus login to Oracle 11.2 that I cannot explain: 1) I have an Oracle 11.2 server running on a virtual host, say host1 2) I set up another VM, say host2 (CentOS ...
0
votes
0answers
16 views

sqlplus: ORA-01017 logon denied from one host but OK from another [duplicate]

I have a strange behavior for remote sqlplus login to Oracle 11.2 that I cannot explain: 1) I have an Oracle 11.2 server running on a virtual host, say host1 2) I set up another VM, say host2 (CentOS ...
0
votes
2answers
29 views

transaction not processing?

I'm trying to test out an update prior to running it on our production server, however when running my transaction in sqlplus, I don't seem to be able to commit the transaction or get any data back ...
0
votes
0answers
2k views

execute .sql script inside an anonymous pl/sql block which is invoked by a shell script

I got a shell script which connects to SQLPLUS and executes the .sql file like below: read a x=`echo $a | cut -d , -f 1` y=`echo $a | sed 's/.*,//'` c=`echo $USER | cut -c -2`"OPR"`echo $USER | ...
1
vote
1answer
600 views

Pass the unix variable to the ddl command inside a pl/sql block

I would like to create a db link dynamically, using the input given in the unix session. i.e. the remote db name and db instance would be given by the user, in unix, which are VAR1 and VAR2. Now, from ...
0
votes
1answer
53 views

Using oracle easy connect does it really connect to the remote DB?

I tried connecting to remote host db using : sqlplus abc/abc@hostname1:1000/ABC And tried printing !hostname it still shows me local hostname from which I am running and not HOSTNAME1. So if ...
2
votes
1answer
24k 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
1answer
266 views

Why is it necessary to type “host” before the imp command when I'm using SQL*Plus to import a dmp file into Oracle?

In SQL*Plus, I'm connected to an Oracle 11g database. When I type imp help=y It gives me SP2-0042: unknown command "imp help=y" - rest of line ignored. But when I type host imp help=y it ...
0
votes
2answers
100 views

SQL*Plus save current COLUMN settings

In SQL*Plus, is there a way to save current COLUMN settings similar to STORE which saves SET commands in a script? COLUMN can be used to list the settings, but they are not in script format.
1
vote
1answer
1k views

Oracle 11gR2 + RedHat 6.5 cannot start sqlplus

I cannot start sqlplus I've read everything I found, tried everything and still I am getting "command not found" I have a user oracle, I did export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 ...
4
votes
6answers
65k views

Connect to sql plus from command line using connection string

Let's say I have a Oracle database. I have a username = x, password = y, database = z. Also I know the port = a, SID = b, Hostname = c. So how do I need to connect correctly? I used many options ...
3
votes
1answer
262 views

How to Substitute Variables in PostgreSQL

The given Oracle query inserts data into table by substituting variables. How I achieve the same in PostgreSQL? INSERT INTO control_threshold ( threshold_id, group_name, description, sql, ...
2
votes
1answer
258 views

How to make sqlplus prompt longer than 50 chars?

I've set a prompt in my sqlplus glogin.sql a little bit long, mainly because of some internal variables and control sequence. Starting sqlplus I get the following error: String beginning ...
0
votes
1answer
39 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;
2
votes
2answers
1k views

How does SQL*Plus connect to Oracle without a listener?

sqlplus can be used even if there is no listener in the system, or if it isn't running. How does SQL*Plus connect to Oracle without a listener? I can connect any user using SQL*plus even with no ...
0
votes
3answers
337 views

How to mirror the privileges of an user to another in Oracle Database? [duplicate]

I need to grant all the privileges of a user (say 'AAA') to another user (say 'BBB'). Is there such an Oracle command (11.2.0.3.0)?
1
vote
0answers
2k views

Export Oracle Database User data from client

I am working on client system. There is a database on server contains many users. I have the access to database with a userid and password. my userid is "ncon" and Database name is 'HYDPPD'. We are ...
1
vote
1answer
460 views

Why don't HOST comands appear in the spool?

spooltest.sql: SPOOL test.log CLEAR SCREEN SET VERIFY OFF PROMPT Queries will appear in spool select sys_context('USERENV', 'INSTANCE_NAME') from dual; PROMPT Output from the HOST command will not ...
0
votes
1answer
50 views

In SQL*Plus, how do I run @https://here.is.url/script.sql behind a proxy?

In SQL*Plus, I try to run a script that is stored at a certain URL. From where I am currently, I can http(s) connect with the internet only via a proxy. So, if in SQL*Plus, I try ...
1
vote
1answer
72 views

SQLPlus Padding in Query Results

I have several Oracle servers that exhibit a behavior I do not understand. I have identified a two node RAC in which one node exhibits the behavior, but the other node does not. RAC is not involved ...
0
votes
1answer
267 views

Connection with SQL*Plus to Oracle

I've installed Oracle Database Express 10g on Ubuntu, but the following error occures when I try to connect to sql plus using the sysdba as username and it's password which I gave during installation ...
0
votes
1answer
989 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 ...