Oracle to Postgres Migration Issue with Commit
If you have some PL/SQL, Oracle allows you to include commit statements between a begin and end. Assuming this is appropriate for your application, it can produce two benefits:(1) If the code runs for...
View ArticleMinor Problem with Resumable Session
Oracle started allowing sessions with space issues to hang rather than fail in version 9. I had always assumed this only worked if a tablespace ran out of space. However, I read recently that it also...
View ArticleMaking a Hot Backup and Doing an Incomplete Recovery
This post shows how to do a hot backup followed by an incomplete recovery. I ran it on an Oracle 11.2.0.4 test database. First I checked that the database was in ARCHIVELOG mode:SQL> select log_mode...
View ArticleSUBSTR Versus LIKE in Oracle 11.2
I was reading an old SQL tuning book which was printed in 2002. It said that a where clause with like could often use an index whereas a similar clause using substr could not. I wondered if this might...
View ArticleHow to Automatically Trace a User's Sessions
This post was sponsored by arcserve It shows how you can use a logon trigger to automatically trace all sessions for a given user. This can be useful where an application is launched from a desktop but...
View ArticleDeferred Segment Creation not Supported for Partitioned Tables in Oracle...
This post was sponsored by IMPERVAI tried to create a partitioned table with deferred segment creation in an Oracle 11.2.0.1 database.First I tried to do so explicitly but this did not work:SQL>...
View ArticleHow Auditors Might Be Cracking Your Oracle Passwords
I have often wondered how auditors crack Oracle passwords, particularly if the user concerned has a profile which locks the account after a few unsuccessful login attempts. I just realised today how...
View ArticleORA-14306 and ORA-14400
Oracle apparently introduced list partitioning in Oracle 9. I decided to try it out in an Oracle 11 database.In this simple example I created a table to store the names of towns in Buckinghamshire,...
View ArticleOnline Rebuild of Bitmap Indexes
I was reading an old Oracle 9 performance tuning book (as you do) and it said that you could not do online rebuilds of bitmap indexes.I did not have access to an Oracle 9 database so I tried it out in...
View ArticleHow to Calculate pi
You can use the following series to calculate pi:4/1 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + ...I decided to try this out using PL/SQL. The example I created is shown below. It works OK but the series...
View ArticleORA-00439
I created a tablespace in an Oracle 12 Enterprise Edition database.I should have used ASM but I put its datafile in ordinary disk space by mistake:SQL> col banner format a47 SQL> l 1 select...
View ArticleORA-12954
I went to Techfest 2019 in Brighton. While I was there I saw a presentation by somebody from Pythian. He said that Oracle Database Express Edition is now very similar to Enterprise Edition, it just has...
View ArticleHow to Create a 3 by 3 Puzzle Using Oracle Database Express Edition
In 2012 I wrote a C program to create sudoku puzzles. I took a break from writing about Oracle to set up a blog for these puzzles. You can see it here. I also created a group on Facebook called Sudoku...
View ArticleORA-16005
I did a shutdown abort in an Oracle 19c database:C:\Users\Admin>sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Sun Feb 9 20:52:49 2020Version 19.3.0.0.0Copyright (c) 1982, 2019,...
View ArticleTNS-01189
I saw a couple of messages like this in an Oracle listener log recently:TNS-01189: The listener could not authenticate the user I knew that somebody in another country was carrying out internal...
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 ArticleHow to Skip N Rows in an Oracle SELECT Statement
I saw this question on a SQL Server blog. Apparently it was asked at an interview. Here is the suggested answer:SELECT *FROM [AdventureWorks2014].[Person].[Address]ORDER BY AddressIDOFFSET 100 ROWS; I...
View ArticleRMAN-04022
I created an RMAN script to copy an Oracle 11.2.0.1 target database called BUSPROD into an auxiliary database called BUSSOUT2. I left it running overnight but when I looked at the log the following...
View ArticleOracle DBA Interview Question
This Oracle DBA interview question is based on some work I did recently. I will leave you to decide whether it is too easy, too difficult or just right for your candidate.Question:I created two Oracle...
View ArticleCorrect Password Gives ORA-01017
This post replicates a real-life situation where Oracle returned an ORA-01017 when the correct password was used. First I created a user in an Oracle 11 database and checked that I could connect to...
View Article