Monday, May 22, 2023

dbca - [INS-04008] Invalid combination of arguments passed from command line. One or more mandatory dependent arguments are not passed for the argument: -useWalletForDBCredentials

During calling of dbca you might encounter into that error running dbca in silent mode. The point is that the argument from the error (-useWalletForDBCredentials) isn't mandatory, as dbca help message says :

 $ dbca -silent -createDatabase -help
       -createDatabase - Command to Create a database.
               -responseFile | (-gdbName,-templateName)
               -responseFile - <Fully qualified path for a response file>
               -gdbName <Global database name>
               -templateName <Specify an existing template in default location or the complete template path for DB Creation or provide a new template name for template creation>
               [-useWalletForDBCredentials <true | false> Specify true to load database credentials from wallet]
                       -dbCredentialsWalletLocation <Path of the directory containing the wallet files>
                       [-dbCredentialsWalletPassword <Password to open wallet with auto login disabled>]
               [-characterSet <Character set for the database>]

...


But there is an dependent mandatory argument which depends on non-mandatory argument 😀. I.e. the argument 

-dbCredentialsWalletLocation

, which goes next after 

-dbCredentialsWalletLocation

, is actually required.

So, in case of such error just include 

-dbCredentialsWalletLocation <existing_path>

in your dbca call, and if you want, without -dbCredentialsWalletLocation 😀

 

Good luck !

Tuesday, May 9, 2023

Lots of INVALID objects in Oracle supplied schemas after PDB remote cloning to/from 19c; ORA-04023 error

I encountered into weird situation the other day. Imagine that you've made an successful upgrade of CDB from 12.2 to 19c version without any error. But after cloning new PDB over database link (to or from upgraded CDB) you're getting a warning in the alert log file like this :

PDB_TEST(19):*************************************************************** PDB_TEST(19):WARNING: Pluggable Database PDB_TEST with pdb id - 19 is
PDB_TEST(19):         altered with errors or warnings. Please look into
PDB_TEST(19):         PDB_PLUG_IN_VIOLATIONS view for more details.
PDB_TEST(19):***************************************************************

Moreover, there are hundreds of INVALID objects in Oracle supplied schemas, i.e. package bodies of DBMS_STATS, DBMS_MONITOR and so on packages are invalid.

What are you gonna do ?

I took a look into alert log file and found other lines :

ORA-04063: package body "SYS.DBMS_AQADM_SYS" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_AQADM_SYS"
ORA-06512: at line 1

I got the ORA-04023 error (Object SYS.AQ$_POST_INFO could not be validated or authorized
) trying to compile this package. 

I used the following "method" to overcome this issue :

1. I dropped the object(s) generated ORA-04023 error (it was a pl/sql type) and recreated the dictionary with checking invalid objects.

2. After dictionary recreation, I analyzed spool file for ORA-04023 error(s), and if they were, I moved on to step 1 again. 

Finally, I ended up with 4 objects to delete (DBMS_AQ is dependable of those). Here is the script :

 

rem get connected to PDB

set echo on timi on
spool drop_inv_types.out append

alter session set "_oracle_script" = true ;
drop type SYS.AQ$_REG_INFO force ;
drop type SYS.AQ$_POST_INFO force ;
drop type SYS.MSG_PROP_T force ;
drop type SYS.AQ$_SUBSCRIBER force ;

rem
rem restart PDB in upgrade mode and recreate data dictionary (catalog.sql and catproc.sql)
rem

shutdown immediate
startup upgrade

@?/rdbms/admin/catalog
@?/rdbms/admin/catproc

@?/rdbms/admin/utlrp

shutdown immediate

startup

spool off

To sum up - I still don't know the real cause of the issue, I bumped into it only once and it occured only in particular CDB. Therefore I haven't got the information how to prevent it.

Hope it will help. Good Luck !!!