Quantcast
Channel: Andrew's Oracle Blog
Browsing all 330 articles
Browse latest View live

ORA-01749

This was tested on an Oracle 11.2 database. You cannot GRANT or REVOKE object privileges to or from yourself:  SQL> show userUSER is "ANDREW"SQL> grant select on blah to john  2  / Grant...

View Article


Simple Example with REPLACE

The REPLACE function allows you to change a string of characters to another string of characters and can accept three parameters: (1)    Input column name.(2)    Old string value.(3)    New string...

View Article


ORA-00942

These examples were tested on Oracle 11.2. If you get an ORA-00942, this might mean that a table does not exist: SQL> conn / as sysdbaConnected.SQL> drop user andrew cascade  2  / User dropped....

View Article

log file switch (archiving needed)

I was running a test in Oracle 11.2 and the SQL below, which usually takes around 1 minute, seemed to be running forever: SQL> begin   2   for a in 1..8 loop   3    insert into tab1 select * from...

View Article

ORA-01430

This was tested on Oracle 11.2. If you try to use a column name twice in the same table, you get an ORA-01430: SQL> create table tab1 (col1 number)  2  / Table created. SQL> alter table tab1 add...

View Article


Database Links and Case Sensitive Passwords

I connected to an Oracle 11 database:Oracle 11: sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 23 18:22:40 2014 Copyright (c) 1982, 2009, Oracle.  All rights reserved. Connected...

View Article

ORA-02019

I had not seen this problem for a long time so, when it happened again recently, it took me a while to see the cause. I therefore decided to record it for future reference. First I created a database...

View Article

Does Having TIMED_STATISTICS on Affect Performance?

I was reading through an Oracle publication called Oracle 9i Database Performance Planning recently and saw the following:In order to get meaningful database statistics, the TIMED_STATISTICS parameter...

View Article


ORA-01446

This was tested on Oracle 11.2. First I created a table and inserted 2 identical values in it:SQL> create table tab1 (col1 number)  2  / Table created. SQL> insert into tab1 values (1)  2  / 1...

View Article


SQL92_SECURITY

I tested the examples in this post in two Oracle 11.2 databases. In the first example, Andrew creates a table, inserts a row into it then grants UPDATE privilege on it to Fred, who is then able to work...

View Article

ORA-28010

I wondered what would happen if you tried to do a password expire on an externally identified user so I tried it out on an Oracle 11.2 database. As you might expect, it failed: SQL> alter user...

View Article

Invisible Indexes (Part 1)

Oracle introduced INVISIBLE indexes in version 11. The example below creates an INVISIBLE index, makes it VISIBLE then makes it INVISIBLE again. The VISIBILITY column in USER_INDEXES is used to check...

View Article

Invisible Indexes (Part 2)

In Oracle 11.1.0.6.0, you could not run DBMS_STATS against an invisible index or a table with an invisible index. I found 2 workarounds. You could run the old ANALYZE command or you could make the...

View Article


ORA-01700 and/or ORA-01711

I tested these on Oracle 11.2. You can grant a privilege like this:SQL> grant create table to andrew  2  / Grant succeeded.SQL>... but if you try to grant a privilege more than once in the same...

View Article

Unusable Indexes

I tested this post on an Oracle 9 database. It shows that if you have an index which is marked as UNUSABLE, truncating the underlying table makes it VALID again.First I created a table:SQL> CREATE...

View Article


ORA-12988

Tables in the SYS schema are usually created by Oracle but you can create them yourself. If they are created by Oracle you should not be trying to change them. If they are created by you, you should...

View Article

Image may be NSFW.
Clik here to view.

RMAN Copy Adds Hidden Parameters

Some testers had a problem with an application running against an Oracle 11.2.0.1.0 database. It kept failing with ORA-03114 and/or ORA-24909 messages. The only clues were that production was copied...

View Article


ORA-32771 and ORA-32772

Bigfile tablespaces were introduced, and this example was run, in Oracle 10. They have only one datafile. Usually, this will be very large, although this is not the case in the example below: SQL>...

View Article

impdp REMAP_DATAFILE Parameter

I was asked to copy one database into another, which I usually do by copying the datafiles then recreating the control file. However, on this occasion, although both databases were on Oracle 11.2.0.4,...

View Article

The Recycle Bin does not Store Tables from the SYSTEM Tablespace

Oracle introduced the recyclebin in version 10. This post shows that tables in the SYSTEM tablespace do not go into the recyclebin when they are dropped. It was tested on Oracle 11.2.0.2.7. First I...

View Article
Browsing all 330 articles
Browse latest View live


Latest Images