ORA-01951, ORA-01952 and ORA-01045
I saw a strange question on a forum and decided to reproduce it in an Oracle 12.1 database. First I created a user:SQL> conn / as sysdbaConnected.SQL> create user a identified by b 2 / User...
View ArticleDBMS_SYSTEM.KCFRMS
I read about this in the book advertised at the end of this post. It was tested on Oracle 11.2. V$SESSION_EVENT holds similar information to V$SYSTEM_EVENT but it is broken down by session (only...
View ArticleRollback to Savepoint Does Not Release Locks
I read that rolling back to a savepoint releases locks. This sounded reasonable so I decided to check it out in an Oracle 11.2 database. I logged in as user John (in blue) and noted my SID for future...
View ArticleCase Sensitive Passwords in Oracle 11
In version 11, Oracle passwords became case sensitive. You can see what I mean in the example below:SQL> conn / as sysdbaConnected.SQL> alter user system identified by manager 2 / User altered....
View ArticleSegment Creation Deferred and ORA-02266
If you try to truncate a table with a primary key which is referenced by an enabled foreign key, you usually get an ORA-02266 error. This happens straight away if the table is set up with segment...
View ArticleSUCCESS and FAILURE Columns in DBA_STMT_AUDIT_OPTS
I tested this in Oracle 10.2. DBA_STMT_AUDIT_OPTS records auditing options which are currently in effect. If no auditing has been requested, it will be empty: SQL> select user_name, audit_option,...
View ArticleA Difference Between SQL*Plus and SQL Developer
A third-party supplier delivered some SQL today but it did not work in SQL*Plus. We asked the supplier about this and it turned that the code had been tested in SQL Developer. The reason for the...
View ArticleORA-01114 Not Recorded Correctly in Alert Log
A user reported an ORA-01114 and an ORA-27069 in a 3rd party application running against an Oracle 11.1 database:ERROR 28/01/2015 10:32:37 INF2 LKPDP_10:READER_1_1 RR_4035 SQL Error [ORA-01114: IO...
View ArticleORA-00600: internal error code, arguments: [kzdlk_zt2 err]
This example is based on an error which a colleague showed me recently. I logged into an Oracle 11.1 database, reset its SYSTEM password and checked the encrypted value: Oracle11 > sqlplus / as...
View ArticleHow Many Values Can You Have in an IN List?
I have often wondered how many values you could have following an IN and I have just found out. I loaded some new data into a name and address table in an Oracle 11 database over the weekend. On...
View ArticleOracle "read by other session" Wait Event
When a session needs to read data from disk into the Oracle buffer cache, it may have to wait for another session to finish doing the same thing. Time spent doing this is recorded as a read by other...
View ArticleBug 5497611
I used Oracle Enterprise Manager to look at the execution plan for some SQL in an Oracle 10.2.0.3 database. (The SQL shown is just an example done later for the purposes of this blog post. As usual,...
View ArticleVARCHAR and VARCHAR2
If you create a table with a VARCHAR column in Oracle 11.2, Oracle sets it up as a VARCHAR2:SQL> l 1 create table t1 2 (c1 varchar(1), 3* c2 varchar2(1))SQL> / Table created. SQL> desc...
View ArticleDefault Size of a CHAR Column
If you do not specify a size for a CHAR column, the default is 1. You can see what I mean in the example below, which I tested on Oracle 11.2:SQL> create table t1 2 (c1 char, 3 c2 char(1)) 4...
View ArticleORA-02391
I tested this on an Oracle 11.1 database. Oracle profiles control how certain database resources are allocated to a user session. They also define some security rules. When you create a user, it is...
View ArticleFULL and NO_INDEX Hints
I was reading about hints and decided to try out a couple on an Oracle 11.2 database. First I created a table, added some data and created an index:SQL> create table t1 (c1 varchar2(30)) 2 / Table...
View ArticleORA-04000
I created a table in an Oracle 11.2 database. I did not specify pctfree or pctused so it was given the defaults of 10% and 40% respectively:SQL> conn system/manager Connected. SQL> create table...
View ArticleUsing NOT = in a WHERE Clause
I ran this test in Oracle 12.1. First I created a table, added some data to it and made sure that the bytes column was set to zero in every row: SQL> conn system/managerConnected.SQL> alter...
View ArticleWhat is an INDEX SKIP SCAN?
I tested this on Oracle 11.2. First I created a table with two columns. The first column, OWNER, had low cardinality i.e. it had only two possible values, PUBLIC and SYS. The second column,...
View ArticleHow to See the Height of an Index
This example shows where to find the height of an index. I tested it on Oracle 11.2. First I deleted the index's statistics:SQL> exec dbms_stats.delete_index_stats ->...
View Article