Command-Line Utility Program for Oracle

learn more… | top users | synonyms

1
vote
1answer
477 views

How do I execute an Oracle SQL script without sqlplus hanging on me?

For an automated task I would very much like to run some SQL scripts and make sure that sqlplus does not hang under any circumstancees, i.e.: If the script contains any named substitution variable ...
0
votes
1answer
2k 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 ...
0
votes
1answer
18 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
23 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
109 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
1answer
60 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?
1
vote
2answers
363 views

How to make sqlplus output appear in one line?

I have a table with 100 columns. When selecting data in SQL Plus the output wraps, making it difficult to read. What I'd rather like is either a horizontal scroll bar to appear or somehow send the ...
0
votes
1answer
15 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
3answers
46 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
65 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 ...
0
votes
1answer
27 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 ...
0
votes
1answer
31 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
2answers
4k views

“ORA-01017: invalid username/password” : Why is that?

What is the difference between the two : SQLPLUS / AS SYSDBA and SQLPLUS Enter user-name: SYSDBA Enter password: If I use the first command I get connected and see the prompt SQL> but upon ...
0
votes
0answers
84 views

sqlplus startup - failure in processing system parameters

I am trying to do the startup command this is what I have done set oracle_sid=ORCL sqlplus /nolog SQL> conn /as sysdba startup It shows this error message, failure in processing system ...
-1
votes
1answer
196 views

Write filename, servername/IP and date+time in spool file

I'm having some problems to verify the installation/execution of some oracle scripts in different production servers. I've created a launcher script which executes all the sql scripts in sqlplus and ...
0
votes
1answer
170 views

ORA-12899 when inserting from sqlplus, but ok with jdbc

Inserting 'ééééé' into a column defined as varchar(5) runs fine from squirrel sql client (jdbc). But doing the same insert from sqlplus fails with ORA-12899 (too long value). NLS_CHARACTERSET is set ...
3
votes
1answer
118 views

Why is SQL*Plus' desc table not showing not null constraints after using dbms_redefinition

I have the following table that I want to redefine: create table tq84_redefinition ( id number primary key, ts1 timestamp not null, ts2 timestamp ); Please note the not null constraint on the ...
1
vote
1answer
166 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 ...
4
votes
4answers
10k views

Execute a script with SQLPlus containing blanks, semi-colons, and forward slashes

Occasionally I will get a script that will run fine in SQL Developer or Toad, but requires modification in order to be run successfully from SQL*Plus. Here is a worst case example containing multiple ...
0
votes
0answers
97 views

Encode line feed characters from CLOB when exporting with SQL*Plus

I have a field of CLOB data type which has data including carriage returns and line feeds (chr(10) and chr(13)). I want to be able to encode these because currently when I export data using SQL*Plus, ...
0
votes
3answers
251 views

Oracle won't start

While it was working fine, I had to stop the server once. When trying to start Oracle using a script we have, I got the following error: SQL> Connected to an idle instance. SQL> ORA-01081: ...
0
votes
1answer
160 views

SQL output formatting

I want this: "ACCOUNT_ID","MAJOR_VERSION","MINOR_VERSION","COUNTRY","ACCEPTANCE_TIMESTAMP","AGREEMENT_ID" "abcdefgh-1234-5678-ijkl-mnopqrstuvwx","20110901","1","CN","1329574013737","tos" But I get ...
0
votes
1answer
56 views

Execute a script with SQLPlus containing html entity mappings

When executing a script with SQL PLus, I was prompted to enter value for lt, gt, and apos. Here are some code examples in this script. v_qry := replace(v_qry, '&lt;', '<'); v_qry := ...
3
votes
2answers
364 views

SQL*Plus default output format

I have noticed that using the same SQL*Plus client to connect to different Oracle database result in different outputs for the same SQL query. Database 1: C:\Oracle\instantclient_10_2>sqlplus ...
2
votes
1answer
310 views

Invalid File Name on login to SQLPLUS

The moment I log into SQLPLUS I get an SP2-0556 error. I recently moved OS but am connecting to the same database so I am not sure if it's because I'm using my old TNSNames or what. I can connect and ...
6
votes
1answer
389 views

sqlplus consuming 99% CPU

Oracle's installed on one server, I'm running sqlplus on a different (application) server. I've recently encountered a problem getting sqlplus to do anything; it simply spins, consuming 99% CPU even ...
1
vote
0answers
197 views

SQLPlus times out when connecting to an Oracle XE database on another PC

I'm having the strangest issue. I have a very basic (I think) setup of an Oracle 11G database on one Hyper-V VM, and the Oracle 11G client on another VM. Although I'm able to access the database on ...
15
votes
12answers
2k views

Comfortable sqlplus interface?

I found sqlplus'interface is rather outdated. It's quite nice to have some commands or keywords at disposal, but for example no "arrow-up" key for the previous history entry is available. What is a ...
0
votes
1answer
375 views

How to limit select output from sqlplus?

I stop using SQL Developer as found more convenient to use SQL Plus inside Emacs SQLi mode. SQL Developer on selects with large amount of rows show only few rows. But SQL Plus tend to dump all rows ...
2
votes
4answers
453 views

Shell: How to time a script running in SQLPlus and kill it after x amount of minutes?

I have a little tool which automatically runs a series of SQL scripts when and outputs to .XLS when an appropriate request is made. However, some SQL scripts need to be ran on a live database, and I ...
1
vote
1answer
104 views

Appending data from one program to the other using batch commands

I have a database which sometimes crashes. I want to create a batch program that does this: Runs SQL*Plus. Makes SQL*Plus run a script from a plain text file. Gets the results back to the main batch ...
2
votes
1answer
828 views

Can't return data from SQL/Plus and Toad but can from SQL Developer

This one has me stumped. We are running an Oracle 11g on Amazon EC2 and I can connect and query fine with SQL Developer but with Toad and SQL/Plus I can connect but when I try to do a simple select ...
7
votes
2answers
762 views

If I SET ARRAYSIZE 1 in SQL*Plus, the records are still fetched in pairs. Why?

I thought about writing a simple tail -f like utility to "trace" the progress of some figures within the database: create or replace function tail_f return varchar2_tab pipelined as n number; ...
0
votes
1answer
421 views

SQLPlus: Cmd vs PowerShell

From cmd.exe, when I run: C:\oracle\client\BIN\sqlplus.exe username@server then type my password, I get in. However, if I run the same command from PowerShell and type the same password I get: ...
5
votes
1answer
7k views

How to resolve ORA-01031: insufficient priviledges error on Windows installation?

I installed Oracle 11G on my Windows 2008 R2 Server. I also installed Oracle Client Libraries using separate installation media. After the client installation, when I try to log into the database ...
0
votes
1answer
2k views

SYSDBA password in Oracle DB

I am connecting to Oracle DB using sysdba: sqlplus / as sysdba What is the default password for sysdba user. I tried in net and found out the default password is change_on_install but it is not ...
0
votes
1answer
3k views

Set encoding from within SQL*Plus

I have a large set of files with SQL commands that I run with a SQL*Plus script that uses the @@ operator. I run the script on third-party computers (or even send it by e-mail) so I'd like to make it ...
1
vote
2answers
3k views

ORA-12154 TNS: could not resolve the connect identifier specified with SQLPLUS

I am using Toad to connect my database and its working fine for me . But when i try to connect with the same credential , i am getting the error message as shown below: ORA-12154 TNS: could not ...
1
vote
1answer
64 views

There is an equivalent of login.sql on PostgresSQL?

When you log on Oracle database with SQLplus, it looks for a login.sql file in the current directory. If the file exists, it's executed. It's usefull to set preferences... There is an equivalent ...
3
votes
1answer
967 views

halt on error in a sqlplus script

I am deploying pl/sql code using several sql files that are called with @@file. If a package got a compilation error the script continues to the end. Is there a way to stop on every compilation ...
0
votes
1answer
366 views

Where to put login.sql in Windows environment to configure SQL Plus?

I installed Oracle 10g XE on my Windows Server 2008 R2. Now I would like to configure SQL Plus to use login.sql for login settings. I created a login.sql file and put it into a C:\users\myname ...
8
votes
3answers
252 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?
2
votes
1answer
1k views

Simple Oracle query hangs depending on WHERE clause

Not used to using Oracle, but we have a large database where a non-unique query like SELECT * FROM employees where department = 'HR' is working, results list up no problem. But when I do ...
2
votes
1answer
171 views

Oracle start database with incorrect password

I have a question regarding starting oracle database with in correct sys password. I have provided incorrect password for sys user and I am still able to start database and execute statements. So ...
3
votes
1answer
927 views

sql*plus 11.2 client connection to oracle timing out on Linux

One of our DBAs is seeing connection issues with his sql*plus client. Whenever he connects to the Oracle v10g server, the connection seems to time out for no apparent reason. We tried checking ...
2
votes
2answers
7k 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?
2
votes
2answers
9k views

Oracle11.2g post-installation problem on Oracle Linux kernel

[question copied from stackoverflow] After installation of Oracle 11.2g in silent mode on the Oracle Linux kernel, I have the following error: [u01/app/oracle/product/11/bin] $ sqlplus sqlplus ...
2
votes
1answer
2k views

Oracle not available error with Oracle XE 11.2.0-1.0

I have downloaded Oracle XE 11.2.0-1.0 and installed it on a CentOS 6.3 virtual machine with 1.5GB memory and 3GB of swap. SYS and SYSTEM set to have password 123456. I have set ...
3
votes
3answers
3k views

Login Problem as SYSDBA ORA-01031

I have the following problem: I can connect to an Orcale database as normal user or as sysdba: sqlplus myuser/myPw@myDB sqlplus "sys/sysPw@myDB as sysdba" But when another (Windows-User) is logged ...
1
vote
2answers
696 views

Remote to a remote oracle server and get running instances?

I need to make a shell script that takes a list of servers and and check the running instances then run sql script in each instance! now I do not want it to ask me for a password! it's redhat and ...