Wednesday, January 20, 2010

Test SyntaxHighlighter

Navigate to Blogger -> Layout -> Edit HTML to Edit Template of Your Google Blog.

Insert the follwing code above </head> or </body>

Code:

<link href='http://alexgorbatchev.com/pub/sh/1.5.1/styles/SyntaxHighlighter.css' rel='stylesheet' type='text/css'/>



Samples:
1. Html Code
Code:
<pre name="code" class="html">

<!-- code here -->

</pre>

Result:
  





2. Python Code
Code:
<pre name="code" class="python">

<!-- code here -->

</pre>
Result:
  

# code here



3. Java Code
Code:
<pre name="code" class="java">
import java.io.Serializable;
class Dog implements Serializable {
private Collar theCollar;
private int dogSize;
public Dog(Collar collar, int size) {
theCollar = collar;
dogSize = size;
}
public Collar getCollar() { return theCollar; }
}

class Collar implements Serializable {
private int collarSize;
public Collar( int size ) { collarSize = size; }
public int getCollarSize() {return collarSize; }
}
</pre>
Result:
  
import java.io.Serializable;
class Dog implements Serializable {
private Collar theCollar;
private int dogSize;
public Dog(Collar collar, int size) {
theCollar = collar;
dogSize = size;
}
public Collar getCollar() { return theCollar; }
}

class Collar implements Serializable {
private int collarSize;
public Collar( int size ) { collarSize = size; }
public int getCollarSize() {return collarSize; }
}



For lates information about SyntaxHighlighter, please refer to: http://alexgorbatchev.com/wiki/SyntaxHighlighter

Tuesday, January 19, 2010

Migrate OIM Database from one server to another using dump file

Let's say we want to move OIM Server A's data to Server B.

A and B have both configured and running its own application
properly, but somehow we need to discard B server's data, and
replace it with A server's data.


1. The following files needs to be copy from A server to B Server
OIM_HOME/xellerate/config/...

a). .xldatabasekey
b). .xlkeystore
c). configkey.key

2. Make a full dump of server A
Use the followng script:
DBLoginID=SYSTEM
DBLoginPassword=admin123

Backup_Home="/oracle/app/oracle/DatabaseBackup/OIM_UAT"
BackupOwner="xladm_uat"
BackupComment="_backupComment"
BackupFileName="/xladm_20100119_0338${BackupComment}.dmp"

exp ${DBLoginID}/${DBLoginPassword}@orcl owner=${BackupOwner} file=${Backup_Home ${BackupFileName}

------------- xladm_uat is the schema used by A server.

3. Import the dump to B Server
Use the following script:
DBLoginID=SYSTEM
DBLoginPassword=admin123

Backup_Home="/oracle/app/oracle/DatabaseBackup/OIM_UAT" RestoreFileName="/backupFileName.dmp"

imp ${DBLoginID}/${DBLoginPassword}@orcl fromuser=xladm_uat touser=xladm file=${Backup_Home}${RestoreFileName}

note: xladm is the schema used by B server

4). Edit xlconfig.xml file on B server.
a) Open B server's xlconfig.xml file, and replace all the password

string with the one in A server's xlconfig.xml.


The following section need to be edited:
(1) configuration for DB connection
<DirectDB>
<driver>oracle.jdbc.driver.OracleDriver</driver>
<url>jdbc:oracle:thin:@192.168.19.38:1521:orcl</url>
<username>xladm</username>
<password encrypted="true">HjHsMmK0gQqrfyHKRCEfEg==</password>
<maxconnections>5</maxconnections>
<idletimeout>360</idletimeout>
<checkouttimeout>1200</checkouttimeout>
<maxcheckout>1000</maxcheckout>
</DirectDB>

(2) configuration for PKI

<Security>
<XLPKIProvider>
<KeyStore>
<Location>.xlkeystore</Location>
<Password encrypted="true">VPqfO+o717lgbuSpumj3+g==</Password>
<Type>JKS</Type>
<Provider>sun.security.provider.Sun</Provider>
</KeyStore>
<Keys>
<PrivateKey>
<Alias>xell</Alias>
<Password encrypted="true">VPqfO+o717lgbuSpumj3+g==</Password>
</PrivateKey>
</Keys>
<SignatureAlgorithm>SHA1withDSA</SignatureAlgorithm>
<SignatureProvider>sun.security.provider.Sun</SignatureProvider>
<VerifySigner>true</VerifySigner>
</XLPKIProvider>
<XLSymmetricProvider>
<KeyStore>
<Location>.xldatabasekey</Location>
<Password encrypted="true">VPqfO+o717lgbuSpumj3+g==</Password>
<Type>JCEKS</Type>
<Provider>com.sun.crypto.provider.SunJCE</Provider>
</KeyStore>
<Keys>
<DBSecretKey>
<Alias>DataBaseKey</Alias>
<Password encrypted="true">VPqfO+o717lgbuSpumj3+g==</Password>
<BlockMode>CBC</BlockMode>
</DBSecretKey>
<JMSKey>
<Alias>DataBaseKey</Alias>
<Password encrypted="true">VPqfO+o717lgbuSpumj3+g==</Password>
<BlockMode>CBC</BlockMode>
</JMSKey>
</Keys>
</XLSymmetricProvider>
</Security>

(3) Configuration for remote manager
<RMSecurity>
<KeyStore>
<Location>.xlkeystore</Location>
<Password encrypted="true">VPqfO+o717lgbuSpumj3+g==</Password>
<Type>JKS</Type>
<Provider>sun.security.provider.Sun</Provider>
</KeyStore>
<TrustStore>
<Location>.xlkeystore</Location>
<Password encrypted="true">VPqfO+o717lgbuSpumj3+g==</Password>
<Type>JKS</Type>
<Provider>sun.security.provider.Sun</Provider>
</TrustStore>
<RMIOverSSL>true</RMIOverSSL>
<SSLPort>44434</SSLPort>
<SSLContextAlgorithm>TLS</SSLContextAlgorithm>
<KeyManagerFactory>SunX509</KeyManagerFactory>
<BindingPort>44444</BindingPort>
<ServiceName>RManager</ServiceName>
<LoggerConfigFilePath>D:/Proj/OIM/910x/xlserver/xellerate/config/log.properties</LoggerConfigFilePath>
<ClientAuth>false</ClientAuth>
</RMSecurity>
5. Config B server's Design console
a). Duplicate the whole Design Console Folder of A server, called

xlclient2.
b). Copy all the files in directory /xlclient/Config/ from B
server's original design console folder to the newly duplicated one
- xlclient2
6) Start OIM Server
7) Start Design Console