ORA-28002
The PASSWORD_LIFE_TIME in the DEFAULT profile is 180 days in Oracle 11: SQL> select limit from dba_profiles 2 where profile = 'DEFAULT' 3 and resource_name = 'PASSWORD_LIFE_TIME' 4 /...
View ArticleHard Coded Variables in PL/SQL
Many applications need to use the same value in several different places. The examples below show a net value and a tax figure being added to create a gross amount. The tax figure is calculated by...
View ArticleORA-00030
This was tested on Oracle 11.2. When you run ALTER SYSTEM KILL SESSION ‘X,Y’; X must be a SID from V$SESSION and Y must be the SERIAL# from the same row. If not, you will get an ORA-00030: SQL>...
View ArticleORA-01754
The first example below was tested on Oracle 11.2. If you try to have more than one long column in a table, you get an ORA-01754: SQL> create table tab1 (col1 long, col2 long) 2 /create table tab1...
View ArticleDBMS_UTILITY.EXEC_DDL_STATEMENT
I published a post recently about executing DDL from PL/SQL. You can also do this using dbms_utility.exec_ddl_statement as shown in the examples below, which I tested in Oracle 11: SQL> begin 2...
View ArticleORA-02210
I discovered a new error today while working on an Oracle 11 database. If you try to use alter table without any options, you get an ORA-02210. If you add a valid option, the error does not...
View ArticleORA-00604, ORA-04092, ORA-06512 and ORA-00942
I saw an ORA-00604 in a database recently and decided to see what might have caused it. The test below was run in an Oracle 9 database and shows one possible reason for an ORA-00604. Strangely enough,...
View ArticleORA-12500
I had ORA-12500 errors each time I tried to connect to a database on a particular server: C:\>sqlplus system@livsost1 SQL*Plus: Release 11.2.0.3.0 Production on Fri Feb 7 11:05:18 2014 Copyright (c)...
View ArticleSP2-0308
If you are running a SQL script and you see the message below: SP2-0308: cannot close spool fileSQL>... it could be that the disk the SPOOL file is on is full (as usual, click on the image to...
View ArticleDROP TYPE Statement Hangs
This happened in an Oracle 11 database. I had an INACTIVE session in the database:SQL> select status from v$session 2 where sid = 112; STATUS--------INACTIVE SQL> I tried to use this session to...
View ArticleORA-13505
I tested this on an Oracle 10 database running on Linux. If you try to make the SYSAUX tablespace READ ONLY, you get an error. There is no way round this, you cannot do it: SQL> alter tablespace...
View ArticleRecursive Procedure Compilation
This was tested on Oracle 11.2. You cannot compile a procedure if anybody is running it so, if you write a procedure which compiles itself, it hangs: SQL> conn andrew/reidConnected.SQL> select...
View ArticleLogons Cumulative
The logons cumulative statistic in V$SYSSTAT shows how many sessions have connected since the database was opened. If this value is too high, there could be shell scripts looping round and connecting...
View ArticleUser Commits, Log File Parallel Write and Log File Sync
I ran this example on Oracle 11.2. If an application spends too much time waiting on log file parallel write and/or log file sync, it may be doing too many user commits. To illustrate this, I created...
View ArticleORA-00028
This example shows how to kill a user session. You can view sessions in your database as follows:SQL> col username format a10SQL> l 1 select username, sid, serial#, status 2 from v$session...
View ArticlePermissions Required to Create a Materialized View
The idea for this post came from a problem, which I saw on Javier Morales Carreras' blog here. This example was tested on Oracle 11.2. It shows the permissions required to create a materialized view....
View ArticleORA-04098
I noticed this recently on an Oracle 11.1.0.6.0 database. If you create a table, add a trigger then add a column, it all works: SQL> create table tab1 (col1 varchar2(1)) 2 / Table created. SQL>...
View ArticleJustify Left, Centre and Right
This was tested on Oracle 11.2. NUMBER items and their column headings are right justified by default: SQL> set numwidth 15SQL> select count(*) table_count from dba_tables 2 /...
View ArticleORA-00034
If a session does ALTER SESSION DISABLE COMMIT IN PROCEDURE then a procedure tries to do a COMMIT or ROLLBACK, Oracle returns an ORA-00034. You can see what I mean in the example below, which was...
View ArticleData Dictionary Cache Hit Ratio
Every Oracle database has a data dictionary, which is owned by the SYS user and stored in the SYSTEM tablespace. This consists of read-only tables, which record information about the database e.g....
View Article