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

A Simple Introduction to ADDM and AWR

ADDM was introduced in Oracle 10 and stands for Automatic Database Diagnostic Monitor. You can use it to help solve performance problems. I was looking through some old copies of Oracle Magazine, found...

View Article


The Right and Wrong Ways to Add a NOT NULL Constraint

I tested these examples in an Oracle 11.2 database. The first one shows how to add a NOT NULL constraint retrospectively. You start by creating a table:SQL> create table andrew (col1 varchar2(1))  2...

View Article


ORA-01075

I tried to log on to an Oracle 11.2 test database, which the developers could no longer use, and saw the following error:MDMDEV1 /export/home/oracle > sqlplus / as sysdba SQL*Plus: Release...

View Article

ORA-39095

I kicked off an expdp with the following parameters. I set the filesize parameter but forgot to set the dumpfile parameter to...

View Article

PL/SQL lock timer

I was looking through V$SYSTEM_EVENT on an Oracle 11.2 production database (as you do) and I noticed that it had waited for exactly 1 second on the PL/SQL lock timer event. Apparently this is the...

View Article


Oracle Pipes (Part 1)

Oracle pipes use the DBMS_PIPE package to allow one session to communicate with another. I decided to try this out in an Oracle 11.1 database. Pipes can be public or private. This example only looks at...

View Article

ALTER DATABASE ADD SUPPLEMENTAL LOG DATA Hangs

This post demonstrates that if a database has an unfinished transaction and you try to run the above-mentioned command, it will hang. I logged into an Oracle 11 database, started a transaction but did...

View Article

ORA-12838

If you do an INSERT /* APPEND */, you cannot query the table afterwards until you have done a COMMIT. If you try to do so, Oracle gives you an ORA-12838. You can see what I mean in the example below,...

View Article


INSERT /*+ APPEND */

This example demonstrates that an INSERT /*+ APPEND */ does not put rows into free space within a table, it adds them at the end instead. It also shows that Oracle inserts these rows using a DIRECT...

View Article


A Simple Example Using COMPUTE SUM OF in SQL*Plus

I needed some SQL to show the time spent on idle events in an Oracle 11.2 database with a grand total at the end. I wrote this as shown below. The SQL*Plus syntax at the start is taken from the Oracle...

View Article

Virtual Columns

Oracle 11g allows you to create virtual columns in a table. Values are not stored for these columns, Oracle calculates them at runtime. You can see the expression used to generate the value in the...

View Article

ORA-39001, ORA-39000 and ORA-39142

I exported 3 large tables from an Oracle 11.2.0.4.0 database then tried to import them into an Oracle 11.1.0.6.0 database but the impdp failed as follows:PQECOG3 /database/DB_exports/andrew > impdp...

View Article

ALTER DATABASE BEGIN BACKUP and ALTER DATABASE END BACKUP

I logged into an Oracle 12.1 database, checked it was in ARCHIVELOG mode then ran the ALTER DATABASE BEGIN BACKUP command. This told Oracle I was about to do a hot backup:C:\Users\Andrew>sqlplus /...

View Article


Re-Creating Datafiles When Backups Are Unavailable

I found an old copy of the Oracle 9i User-Managed Backup and Recovery Guide and read the following: If a datafile is damaged and no backup of the file is available, then you can still recover the...

View Article

A Simple Example With V$BACKUP

I tested this in an Oracle 12.1 database. The V$BACKUP view tells you if a datafile is in hot backup mode. I started off with none of the datafiles in hot backup mode so they were all shown as NOT...

View Article


RECOVER DATABASE TEST

I logged into an Oracle 12.1 database and ran the ALTER DATABASE BEGIN BACKUP command. This told Oracle I was about to start a hot backup:C:\Users\Administrator>sqlplus / as sysdba SQL*Plus: Release...

View Article

Recursion in Oracle 12

Oracle 12 has a new parameter called PGA_AGGREGATE_LIMIT:SQL> conn system/managerConnected.SQL> l  1  select value from v$parameter  2* where name = 'pga_aggregate_limit'SQL> /...

View Article


One Cause of ORA-01092

I saw the following error in a job which had just recreated the control file of a test database after cloning:SQL>   2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18...

View Article

Image may be NSFW.
Clik here to view.

enq: TM - contention

This example was tested in an Oracle 11.1 database. I created a DEPT (or parent) table, added a couple of departments then made it available to other database users:SQL> conn...

View Article

ORA-12801 in utlrp

I tried to run a utlrp in an Oracle 11.1.0.6.0 database and saw the errors below:ORA-12801: error signaled in parallel query server P035ORA-00018: maximum number of sessions exceededORA-06512: at...

View Article
Browsing all 330 articles
Browse latest View live