So here is another post I will keep just for my own reference.
Whenever I need to perform an incomplete recovery of the database, I usually use the SET UNTIL TIME
to specify the time for an incomplete recovery. Sadly, when NLS_LANG
is not set properly, the time format that needs to be used is not something I can remember.
So here is an example for using SET UNTIL TIME
with a sane time format:
run {
set until time "to_date('22-APR-2015 13:30:00','DD-MON-YYYY HH24:MI:SS')";
restore database;
recover database;
alter database open resetlogs;
}
You can find more examples in the Oracle documentation.
Whenever one has to move large amounts of data from one database to another, storage space might become an issue. An option to circumvent this problem is to use a database link with Oracle Datapump to move the data from one database to another. This way, the data is exported across the network and imported directly into the target database.
In this post, I will provide an example on how to move data via a Oracle Datapump and a database link. This post is based on the excellent entry in Oracle FAQ and basically comments all the steps mentioned in the article.
Read the rest of this entry
Today a colleague approached me and asked about the difference between the following two statements, because they return different results:
select count(*) from mytable;
select count(name) from mytable;
Read the rest of this entry