Expdp In Legacy Mode

What is Expdp Legacy Mode?. Legacy mode permits you use commands from old exp command (imp too), it is a solution for people who have scripts for exp and want not lots them. You can use parameter from exp or imp as usual.

How I know if legacy mode is in use. It is very easy, when output starts you will see a pair of lines like show below;

Legacy Mode Active due to the following parameters:
Legacy Mode Parameter: "consistent=TRUE" Location: Command Line, Replaced with: "flashback_time=TO_TIMESTAMP('2017-02-27 16:44:44', 'YYYY-MM-DD HH24:MI:SS')"

In the example I need a consistent backup for move from a production enviroment to test. Consistent option not exist but expdp change it for flashback_time parameter. Please, remember that there are parameters like buffer that are ignored. For more information refer the next link;

Datapump Legacy Mode Doc.


Estimate Size For Export Data Pump

In this entry  I like to show how to estimate the size for a data pump export. It is very easy because expdp command has a parameter to calculte. The problem is that this function, based in mi experiencie, no estimate very well but it is a starting  point. Here you have an example;

expdp system/xxx FULL=y ESTIMATE_ONLY=y ESTIMATE=blocks DIRECTORY=work_directory LOGFILE=EstimateFullSizeDump.log



ORA-39002 ORA-39070 ORA-29283 ORA-06512 ORA-29283 Errors When Excute Expdp

Today I have been reported with the next error;

Export: Release – Production on Thu Feb 23 10:19:00 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release – 64bit Production
With the Partitioning, OLAP and Data Mining options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at “SYS.UTL_FILE”, line 536
ORA-29283: invalid file operation

The problem is simple and the solution very easy. There isn’t a directory created in the database. The next command create a Oracle database directory where dump the data and logs for expdp. If you can some directories whit data pump “directory” parameter you can choose which you want.

create directory dumps_and_logs as ‘/server/prod/dbhome_1/scracth’;





OPatch Session Completed With Warnings

Yesterday I was patching a engine with opatch (a two node cluster), in rolling mode. It finished with warnings.

Look at the logfile I had the next error;

OPatch found the word "warning" in the stderr of the make command.                                                                                                                                                                                                         
Please look at this stderr. You can re-run this make command.                                                                                                                                                                                                              
Stderr output:                                                                                                                                                                                                                                                             
+ PATH=/bin:/usr/bin:/usr/ccs/bin                                                                                                                                                                                                                                          
+ export PATH                                                                                                                                                                                                                                                              
+ lib=/teddy/prod/server/12102/sqlplus/lib/libsqlplus.so                                                                                                                                                                                                                      
+ makefile=/teddy/prod/server/12102/sqlplus/lib/ins_sqlplus.mk                                                                                                                                                                                                                
+ so_ext=so                                                                                                                                                                                                                                                                
+ target=dlopenlib                                                                                                                                                                                                                                                         
+ basename /teddy/prod/server/12102/sqlplus/lib/libsqlplus.so .so                                                                                                                                                                                                             
+ libname=libsqlplus                                                                                                                                                                                                                                                       
+ dirname /teddy/prod/server/12102/sqlplus/lib/libsqlplus.so                                                                                                                                                                                                                  
+ sodir=/teddy/prod/server/12102/sqlplus/lib                                                                                                                                                                                                                                  
+ ardir=/teddy/prod/server/12102/lib/                                                                                                                                                                                                                                         
+ [ var '=' dlopenlib ]                                                                                                                                                                                                                                                    
+ suffix=LIBS                                                                                                                                                                                                                                                              
+ var=''                                                                                                                                                                                                                                                                   
+ [ ! -f /teddy/prod/server/12102/lib/libsqlplus.a ]                                                                                                                                                                                                                          
+ [ '' '!=' '' ]                                                                                                                                                                                                                                                           
+ make -f /teddy/prod/server/12102/sqlplus/lib/ins_sqlplus.mk dlopenlib _FULL_LIBNAME=/teddy/prod/server/12102/sqlplus/lib/libsqlplus.so _LIBNAME=libsqlplus _LIBDIR=/teddy/prod/server/12102/lib/ _LIBNAME_LIBS='$(libsqlplusLIBS)' _LIBNAME_EXTRALIBS='$(libsqlplusEXTRALIBS)'    
ld: warning: symbol '_init' not found, but .init section exists - possible link-edit without using the compiler driver                                                                                                                                                     
ld: warning: symbol '_fini' not found, but .fini section exists - possible link-edit without using the compiler driver                                                                                                                                                     
OUI-67008:OPatch Session completed with warnings.                                                                                                                                                                                                                          

Search the error in ML/MOS I found the 1534528.1 note, it says that error can be ignore, but the note is confused because of it says that problem is solved in but this version is which I’m installing.


Restore Backup From SQLSERVER 2000 To SQLSERVER 2012 Fails

Today I have been requested to move an old database Sqlserver 2000 to a Sqlserver 2012. When I executed the restore I got the next error;

TITLE: Microsoft SQL Server Management Studio

Restore of database ‘HERCULES40’ failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)


System.Data.SqlClient.SqlError: The database was backed up on a server running version 8.00.0760. That version is incompatible with this server, which is running version 11.00.2100. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2100.60+((SQL11_RTM).120210-1917+)&LinkId=20476

In this case I forgot to check the compatible matrix for backp and restores between version, of course, is my fault. Okay possible solutions;

i) Upgrade fro 2000 to 2012, through the versions like 2008.

ii) Jump, restore this backup in a 2008 and generate a new backup and restore it in 2012.

In my case, option ii was choosed.


ORA 7445 [kkobmValidInlistNode()+212] Error

Today I get the next error in a database;


After a little of investigation I have discoved that a new named procedure has been created. This Pl/Sql has a statement that produces the error. In mi case I hitting the Bug 8978631. It is because of using INLIST clause and conversions de b*tree indexes in bitmap. There are three solutions to solve this;

i) Patch the database (a hard work and slow)

ii) Change parameter _b_tree_bitmap_plans and set to false, at level session or database session, of course, you have permission from Oracle. (medium difficulty)

iii) Change the query, this was my solution (easy and fast)



How To Know If I’m An Administrator

Today, in this entry a easy way to check if we are administrators on WindowsBox. With it we can see all administrators. From a cmd window execute the next command;

net localgroup administrators

And below the output;


C:\Users\antonio>net localgroup administrators
Alias name     administrators
Comment        Administrators have complete and unrestricted access to the computer/domain


NBCLOCAL\Domain Admins
The command completed successfully.