15.9.09

XML DB: Forced XSD Schema deregistering

I played with OracleDB 11.1.0.7 XML DB and ended up in the situation where I couldn’t get my registered schema to disappear from Enterprise manager console.

Tried with all the options in the deletion mode, still the schema appears in the schema list and I get ORA-31000 errors while trying to delete the schema both from EM console and SQL*Plus:

SQL> exec DBMS_XMLSCHEMA.DELETESCHEMA('http://www.oracle.com/emp.xsd', DBMS_XMLS
CHEMA.DELETE_CASCADE_FORCE);
BEGIN DBMS_XMLSCHEMA.DELETESCHEMA('http://www.oracle.com/emp.xsd', DBMS_XMLSCHEM
A.DELETE_CASCADE_FORCE); END;

*
ERROR at line 1:
ORA-31000: Resource 'http://www.oracle.com/emp.xsd' is not an XDB schema
document
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 106
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 102
ORA-06512: at line 1

Purging Schema

The solution for this is purging the schema. First of all, take a look at the registered schemas using SQL statement:

SQL> select schema_url from user_xml_schemas;

SCHEMA_URL
---------------------------------------------

http://www.oracle.com/emp.xsd

SQL>

select schema_id from user_xml_schemas;

SCHEMA_ID
--------------------------------
91429F33C64A4D60B16294C670DD86C7

Now, copy that schema ID as the parameter to PURGESCHEMA and execute following:

SQL> exec DBMS_XMLSCHEMA.PURGESCHEMA('91429F33C64A4D60B16294C670DD86C7');

PL/SQL procedure successfully completed.

After this you shouldn’t have that extra schema hanging in your schema list anymore.

11.9.09

SOA Suite 11g installation – How to start BAM and SOA servers the first time

 

After installing SOA Suite 11g there has been a few questions asked why SOA or BAM servers are not started up. After you start the Admin server from $ORACLE_HOME/user_projects/domains/soadomain –using startWebLogic.cmd, you will get the Admin server up with the built-in Enterprise Manager. When you login to the enterprise manager using http://hostname:port/em, you will see the status of other servers, like this:

image

Indication is that BAM server or SOA server are not started. You can try starting these servers from GUI (click on server and mouse right-click) if you have your node manager up and running. If you don’t, here are my steps to do this form command line (replace the “C:\product\FMW11G” with your installation directory and “soadomain” with your domain name) :

C:\product\FMW11G\user_projects\domains\soadomain\bin>startManagedWebLogic.cmd soa_server1

Enter username to boot WebLogic server: weblogic

Enter password to boot WebLogic server:

 

After this, the SOA server starts up and SOA server runtime files gets created under C:\product\FMW11G\user_projects\domains\soadomain\servers –directory.

To automate the startup, not having to enter username and password, you need to create file called boot.properties and place this under security directory. In my example the directory would be C:\product\FMW11G\user_projects\domains\soadomain\servers\soa_server1\security. You need to create this directory manually if you don’t have it.

Editing the boot.properties is familiar if you have dealt with WebLogic server:

username=weblogic
password=mypassword

Next time server is started up, it reads the credentials from boot.properties, encrypts them in this file and continues with startup process.

Above instructions apply to BAM server as well.

This should be the end result:

image

“Start all” script for Windows

Here is a sample Windows script to start all servers that belong to SOA Suite (defaults to being on SOA domain directory):

start "SOA Admin Server" startWebLogic.cmd
start "SOA Server" bin\startManagedWeblogic.cmd soa_server1
start "BAM Server" bin\startManagedWeblogic.cmd bam_server1