Displaying keyword search results 1 - 10
Created by Dr. Xi on February 06, 2012 12:14:11 Last update: February 07, 2012 15:39:35
Oracle sqlplus command line tools does not support command line editing out-of-the-box. But on Linux there's a handy utility that enables command line editing with any command line tool: rlwrap - readline wrapper. Install rlwrap:
$ sudo apt-get install rlwrapCreate a keywords file .sql.dict (optional, but convenient):
false null true access add as asc begin by chec...It would be nice to add the tables names also. Create an alias for sqlplus (put it in .bashrc ):
alias sqlplus='rlwrap -f $HOME/.sql.dict sqlplus'
Created by Dr. Xi on February 06, 2012 09:20:20 Last update: February 06, 2012 09:20:20
This is the error message:
Error 6 initializing SQL*Plus SP2-0667: Message...It might be that the ORACLE_HOME environment variable is not properly set or a missing sp1<lang>.msb (for example sp1us.msb ) file. But for my Ubuntu system, there was no such thing as sp1<lang>.msb , and it wasn't caused by a missing ORACLE_HOME . The error was resolved after I restored the shared library file libsqlplusic.so .
Created by Dr. Xi on February 06, 2012 09:19:27 Last update: February 06, 2012 09:19:27
These are the steps to install the Oracle sqlplus command line utility on Ubuntu Linux: Get Oracle instant client packages from Oracle (you'll need basic or basiclite + sqlplus). Install the RPM files with alien :
$ sudo alien -i oracle-instantclient11.2-basic-11....Install Oracle shared libraries: create file /etc/ld.so.conf.d/oracle.conf and add this line:
Created by Dr. Xi on March 31, 2010 19:32:42 Last update: March 31, 2010 19:41:14
The dev database keeps locking up because of failed login attempts. For a dev database, we really don't need such security measure. This is how to remove the limit. Log in as sysdba
sqlplus sys@xe as sysdbaFind out the profile for the user.
SQL> select profile from dba_users where username ...Look at the current limits
SQL> select resource_name, limit from dba_profiles...Increase the value for failed login attempts
SQL> alter profile default limit failed_login_atte...
Created by Dr. Xi on February 06, 2010 00:25:00 Last update: February 06, 2010 00:26:50
grant unlimited tablespace to <user>or
alter user <user_name> quota 250m on <tablespace_n...Example:
SQL> create table customer ( 2 id number(9),...
Created by Dr. Xi on February 03, 2010 19:26:35 Last update: February 04, 2010 16:53:04
This seemed to happen when Oracle does not know which instance to connect to. Instead of telling you that you didn't give enough information, Oracle decides that you are better informed by telling you that it's a "protocol adapter error". In the following I didn't give the SID, nor did I set LOCAL:
C:\>sqlplus scott/tiger SQL*Plus: Release 1...It does seem to give the right information on Linux:
$ sqlplus scott/tiger SQL*Plus: Release 10....Strange enough, when I change the connection string to connect to my echo server instead of the Oracle listener, I got "packet checksum failure":
C:\tmp>sqlplus scott/tiger@xe SQL*Plus: Rel...
Created by Dr. Xi on February 03, 2010 19:32:30 Last update: February 04, 2010 16:30:49
This happens when you don't have connectivity to the Oracle server. This could be that the server is not up or you are blocked because of some firewall rules. A typical session looked like this:
C:\>sqlplus scott/tiger@xe SQL*Plus: Releas...Use tnsping to confirm the cause:
C:\>tnsping xe TNS Ping Utility for 32-bit ...
Created by Dr. Xi on February 03, 2010 17:44:14 Last update: February 03, 2010 17:44:14
When you start sqlplus withoud SID, Oracle says that you connect to the default database you created during installation. What if I installed multiple databases and I forgot which one is default? Is there a way to find out which is the current default? I wasn't able to find an answer. But there are a couple of ways to change the default by setting a couple of environment variables. The bad news is: the variables are different depending on which platform you are on. Unix If you are on Unix and the database is local, set these two variables:
export ORACLE_HOME=/app/oracle/product/10.2.0/db_1...If the database is remote, set TWO_TASK :
export TWO_TASK=orclWindows If you are on Windows, set LOCAL :
set LOCAL=orclOf course,...
Created by Dr. Xi on November 22, 2008 00:28:53 Last update: February 03, 2010 15:49:55
I got "ORA-12638: Credential retrieval failed" while trying to log in an Oracle database. But my colleagues had no problems at all.
C:\tmp>sqlplus scott@xe SQL*Plus: Release 1...Changing SQLNET.AUTHENTICATION_SERVICES in sqlnet.ora from NTS to NONE fixed the problem.
Created by Dr. Xi on August 20, 2009 03:24:25 Last update: August 20, 2009 03:25:55
I get this error using PL/SQL to enqueue a JMS message in Oracle XE: Oracle: PLS-00302: component 'CONSTRUCT' must be declared . Following an advice I found on the web , I ran the script "$ORACLE_HOME/rdbms/admin/prvtaqal.plb" as SYS in sqlplus. That worked even though I got a bunch of errors running the script:
Warning: Package created with compilation errors. ...