I need to automate catcdb.sql in Oracle 12cR2.
Our organization has a requirement to automate the process of building a new 12cR2 multitenant database on Solaris 11 without using DBCA. Everything works fine until we hit the catcdb.sql script to load the data dictionary into our container database. This script prompts for the passwords of the SYS and SYSTEM users during execution. Normally, I feed data into sqlplus using shell here documents, but the data is being requested in such a way that this does not work. Catcdb.sql forces this to be a manual input, but that causes the entire process to blow up.
One wonders why this is necessary. At the time of running catcdb.sql, our process is already logged into the database as the SYS user. Why should it need to request the passwords when it already has SYSDBA privilege in the open session? Is this a bug in catcdb.sql? I cannot imagine why it should work this way.