another oracle dba blog
The dereference of aliases is unfortunately not supported by the 389ds ldap server. Therefore I’ve created a small plugin which resolves aliases during base search. Subtree and onelevel searches are not supported.
It is here
Hit the ORA-13516 error during datapatch during latest (19.18 JAN23) PSU installation.
datapatch throws this:
Patch 34765931 apply: WITH ERRORS logfile: /oracle/cfgtoollogs/sqlpatch/34765931/25078403/34765931_apply.log (errors) -> Error at line 9395: script rdbms/admin/backport_files/bug_33527739_apply.sql - ORA-13516: AWR Operation failed: CATPROC not valid - ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 328 - ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 355 - ORA-06512: at line 12
Usually we patch the ORACLE_HOME, then start the DB in upgrade mode. After this we execute
datapatch -verboseto patch DB dictionary, and finally restart DB in open mode. Well, not anymore. Since 19.12 (JUL21) both DB and OJVM patches don’t require upgrade mode.
After restarting DB in open mode, the datapatch has sucseeded.
Looks like it makes sense to check PSU’s readme from time to time …
Hit this issue on the one Windows server. The datapatch command freezes completely after displaying “Gathering database info…” prompt like this
D:\oracle\ora193\opatch> datapatch -verbose SQL Patching tool version 188.8.131.52.0 Production on Tue Aug 31 14:10:50 2021 Copyright (c) 2012, 2021, Oracle. All rights reserved. Log file for this invocation: D:\oracle\cfgtoollogs\...\sqlpatch_invocation.log Connecting to database...OK Gathering database info...
The problem is that the datapatch uses Windows internal
typecommand to create temporary files. It is defined in the
%ORACLE_HOME%\rdbms\admin\catcon.pmfile in the
my $WindowsDoneCmd = "\nhost type nul > ";
It turns out that on the server there was another
type.exefile from UnxUtils in the PATH. So the datapatch has used it instead of command processor’s internal
That’s why things went wrong: the datapatch couldn’t create the file and waits forever on the following line (
select (undef, undef, undef, 0.01) until (-e $DoneFile);
After removing the third-party
type.exefrom the PATH, the datapatch works fine again.
I have no idea why Oracle decided to use external utilities to create files while sqlplus can create files with its own SPOOL command just fine…
Hope it helps!
- To debug datapatch you can use the -debug switch, but it doesn’t help much. Setting the environment variable “CATCON_DEBUG” to “true” enables debug mode in the catcon.pm and it is much more helpful.
You can use
wherecommand to find files in the PATH:
C:\>where type c:\Program Files\bin\type.exe C:\>del "c:\Program Files\bin\type.exe" C:\>where type INFO: Could not find files for the given pattern(s).
To export or import a subset of data, Datapump utilities use the QUERY clause to define the subset. Recently i need to export partial data from a table with a lower case column names and the filter has to be defined on a date column. After multiple attempts of trying to escape quotes with backslash character and receiving a lot of error messages like
ORA-39001: invalid argument value ORA-39035: Data filter SUBQUERY has already been specified. ORA-31655: no data or metadata objects selected for job ORA-31693: Table data object XXX failed to load/unload and is being skipped due to error: ORA-01858: a non-numeric character was found where a numeric was expected LRM-00111: no closing quote for value LRM-00113: error when processing file 'parfile.par' UDE-00014: invalid value for parameter, 'query'.
i have found the solution - you need to double the single quotes:
QUERY='"lowercase_table":where "lowercase_date_column" <= DATE''2019-01-01'''
The whole QUERY clause is surrounded by single quotes, the table name and the column name are surrounded by double quotes, and finally the DATE literal is surrounded by double single quotes. This way it works correctly.
Hope it helps!
create database link PRD connect to U identified by X using 'PRD';— Franck Pachot 🚀 (@FranckPachot) June 8, 2017
create pluggable database SBY from PRD@PRD refresh mode every 1 minutes;
Sometimes you may need to copy files from or to the Oracle directory. It is easy when you have direct access to the database server’s file system. It is a little bit tricky when you don’t (AWS RDS instance for example). One way to accomplish this is to create database link between the existing database (the one you have access to) and the target db and use DBMS_FILE_TRANSFER package to copy files between instances.
I. powershell+odac: ora_dir_transfer.ps1
ora_dir_transfer.ps1 is another solution which doesn’t require the second database. It is a powershell script which uses ODAC to access the database and UTL_FILE package to read/write files on the database server. It is influenced by this perl script. You may need to fix Oracle dll path on the “[Reflection.Assembly]::LoadFile” line.