SQL> alter system set processes=200 scope=spfile/both;
Sunday, June 16, 2013
Sunday, June 2, 2013
Schedule a CRON Job in HP-UX
Few days back i have a problem to schedule a cron job in HP-UX to run a .sh script.
Cron is staring exactly on the scheduled time and the particular .sh script also calling from the cron job.
But that component is not starts.
This start.sh script is as follows.
/usr/java/jre1.5.0_22/bin/java -server -Xms512m -Xmx1024m -XX:MaxPermSize=512m -Dsun.rmi.dgc.client.gcInterval=90000 -Dsun.rmi.dgc.server.gcInterval=90000 -Djavax.net.ssl.keyStore=keystore -Djavax.net.ssl.keyStorePassword=password -jar lib/DBC.jar> nohup_dbc.out &
Solution
What i did was, i created another script start-cron.cron file which as follows.
"cd /<File path to start.sh>
sleep 2
./start.sh
"
and save as .cron.
Change the permission as 777
Then i call the start-cron.cron file in the CRON job scheduler.
Then the component was started.
Cron is staring exactly on the scheduled time and the particular .sh script also calling from the cron job.
But that component is not starts.
This start.sh script is as follows.
/usr/java/jre1.5.0_22/bin/java -server -Xms512m -Xmx1024m -XX:MaxPermSize=512m -Dsun.rmi.dgc.client.gcInterval=90000 -Dsun.rmi.dgc.server.gcInterval=90000 -Djavax.net.ssl.keyStore=keystore -Djavax.net.ssl.keyStorePassword=password -jar lib/DBC.jar> nohup_dbc.out &
Solution
What i did was, i created another script start-cron.cron file which as follows.
"cd /<File path to start.sh>
sleep 2
./start.sh
"
and save as .cron.
Change the permission as 777
Then i call the start-cron.cron file in the CRON job scheduler.
Then the component was started.
Monday, May 20, 2013
Import PKCS12 private keys into JKS keystores using Java Keytool
1) Import alice.p12 into alice.jks
keytool -v -importkeystore -srckeystore certifiate.p12 -srcstoretype PKCS12 -destkeystore mykeystore.jks -deststoretype JKS
=================================
* Create an new empty JKS store.
keytool -genkey -alias mykey -keystore keystore.jks
keytool -delete -alias mykey - keystore keystore.jks
keytool -v -importkeystore -srckeystore certifiate.p12 -srcstoretype PKCS12 -destkeystore mykeystore.jks -deststoretype JKS
=================================
* Create an new empty JKS store.
keytool -genkey -alias mykey -keystore keystore.jks
keytool -delete -alias mykey - keystore keystore.jks
Wednesday, April 24, 2013
Websphere Application server-Transaction across two base servers fails
During a brokerage solution implementation, we have faced a issue of connecting two Websphere application servers. In "SystemOut.log" files, the following error appears.
org.omg.CORBA.TRANSACTION_ROLLEDBACK:
>> SERVER (id=4773e3aa, host=ICAPNT17) TRACE START:
>> org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException: ; nested exception is:
com.ibm.websphere.csi.CSITransactionRolledbackException: vmcid: 0x0 minor code: 0 completed: No
>> at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:988)
>> at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:259)
>> at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:570)
>> at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4558)
>> at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4372)
>> at com.mubasher.connectors.web.session.EJSRemoteStatelessWebConnectorFacade_415e6c0a.createOrder(Unknown Source)
>> at com.mubasher.connectors.web.session._EJSRemoteStatelessWebConnectorFacade_415e6c0a_Tie.createOrder(_EJSRemoteStatelessWebConnectorFacade_415e6c0a_Tie.java:369)
>> at com.mubasher.connectors.web.session._EJSRemoteStatelessWebConnectorFacade_415e6c0a_Tie._invoke(_EJSRemoteStatelessWebConnectorFacade_415e6c0a_Tie.java:168)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:622)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:475)
>> at com.ibm.rmi.iiop.ORB.process(ORB.java:504)
>> at com.ibm.CORBA.iiop.ORB.process(ORB.java:1571)
>> at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2771)
>> at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2640)
>> at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
>> at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
>> SERVER (id=4773e3aa, host=ICAPNT17) TRACE END.
vmcid: 0x0 minor code: 0 completed: No In class: class com.directfn.tradeweb.plugins.trade.service.CreateOrderService
com.directfn.tradeweb.system.exceptions.ServiceException: javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
I found that this is happening because of global security enabled default behavior is for transaction protocol messages, e.g. prepare, commit, rollback to be secured. This prevents malicious completion of global transactions.
What we Did
1) Global transaction on WAS requires the two servers to "trust" each other. I solved the problem by importing server A's LTPA key into server B and vice-versa.
2) If you run in an environment where security is not a concern, or the servers are secured by another means, this behavior can be disabled by unchecking the Enable protocol security check box on the transaction
service panel in the admin console
org.omg.CORBA.TRANSACTION_ROLLEDBACK:
>> SERVER (id=4773e3aa, host=ICAPNT17) TRACE START:
>> org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException: ; nested exception is:
com.ibm.websphere.csi.CSITransactionRolledbackException: vmcid: 0x0 minor code: 0 completed: No
>> at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:988)
>> at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:259)
>> at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:570)
>> at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4558)
>> at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4372)
>> at com.mubasher.connectors.web.session.EJSRemoteStatelessWebConnectorFacade_415e6c0a.createOrder(Unknown Source)
>> at com.mubasher.connectors.web.session._EJSRemoteStatelessWebConnectorFacade_415e6c0a_Tie.createOrder(_EJSRemoteStatelessWebConnectorFacade_415e6c0a_Tie.java:369)
>> at com.mubasher.connectors.web.session._EJSRemoteStatelessWebConnectorFacade_415e6c0a_Tie._invoke(_EJSRemoteStatelessWebConnectorFacade_415e6c0a_Tie.java:168)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:622)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:475)
>> at com.ibm.rmi.iiop.ORB.process(ORB.java:504)
>> at com.ibm.CORBA.iiop.ORB.process(ORB.java:1571)
>> at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2771)
>> at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2640)
>> at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
>> at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
>> SERVER (id=4773e3aa, host=ICAPNT17) TRACE END.
vmcid: 0x0 minor code: 0 completed: No In class: class com.directfn.tradeweb.plugins.trade.service.CreateOrderService
com.directfn.tradeweb.system.exceptions.ServiceException: javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
I found that this is happening because of global security enabled default behavior is for transaction protocol messages, e.g. prepare, commit, rollback to be secured. This prevents malicious completion of global transactions.
What we Did
1) Global transaction on WAS requires the two servers to "trust" each other. I solved the problem by importing server A's LTPA key into server B and vice-versa.
2) If you run in an environment where security is not a concern, or the servers are secured by another means, this behavior can be disabled by unchecking the Enable protocol security check box on the transaction
service panel in the admin console
Thursday, May 5, 2011
How To Set Your Oracle Database to ARCHIVELOG Mode
1) Connect to Database as SYSDBA
bash$ sqlplus "/as sysdba"
2) Shutdown the Database
SQL> shutdown immediate;
3) Mount the Database.
SQL> startup mount;
4) Set the Database to ARCHIVELOG mode.
SQL> alter database archivelog;
5) Open your Database.
SQL> alter database open;
6) Check the setting areOK
SQL> archive log list;
You will get a output like following.
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /archive/arc
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4
bash$ sqlplus "/as sysdba"
2) Shutdown the Database
SQL> shutdown immediate;
3) Mount the Database.
SQL> startup mount;
4) Set the Database to ARCHIVELOG mode.
SQL> alter database archivelog;
5) Open your Database.
SQL> alter database open;
6) Check the setting areOK
SQL> archive log list;
You will get a output like following.
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /archive/arc
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4
Wednesday, April 27, 2011
Create a file with Back dated time stamp in solaris
To ceate a file with back dated time stamp, use thefollowing command.
touch -t 201001011030 timestamp-test
This will create a file name as "timestamp-test " with the last modified date as
2010-01(January)-01 10.30 AM.
touch -t 201001011030 timestamp-test
This will create a file name as "timestamp-test " with the last modified date as
2010-01(January)-01 10.30 AM.
Wednesday, October 27, 2010
Automate the FTP in Solaris , Linux environment
Here i am writing a sample script which was very helpful for me.
There was a requirment to FTP some files Daily which were generated Daily in our live server to Billing servers in Maldives.
I used following small script to automate this process.
======================================================================
root@oracle-R-D # vi ftp-automate (Use your own name)
HOST=(Remote Server IP address)
FTPUSER=(FTP User id in remote server)
FTPPASSWORD=(FTP User Password)
ftp -n $HOST << -EOF
user $FTPUSER $FTPPASSWORD
lcd /(File location path in local server)
cd /(Directory path where you want to put th file in remote server)
bin
prompt off
mput (Or mget)
bye
EOF
Make sure thet you give the Execution permission to script file.
PowerDesk Pro 6.0
Using Ftp (User Friendly Reference)
The TCP/IP Guide: A Comprehensive, Illustrated Internet Protocols Reference
There was a requirment to FTP some files Daily which were generated Daily in our live server to Billing servers in Maldives.
I used following small script to automate this process.
======================================================================
root@oracle-R-D # vi ftp-automate (Use your own name)
HOST=(Remote Server IP address)
FTPUSER=(FTP User id in remote server)
FTPPASSWORD=(FTP User Password)
ftp -n $HOST << -EOF
user $FTPUSER $FTPPASSWORD
lcd /(File location path in local server)
cd /(Directory path where you want to put th file in remote server)
bin
prompt off
mput (Or mget)
bye
EOF
Make sure thet you give the Execution permission to script file.
PowerDesk Pro 6.0
Using Ftp (User Friendly Reference)
The TCP/IP Guide: A Comprehensive, Illustrated Internet Protocols Reference
Labels:
Automate FTP,
FTP automatio script,
FTP automation
Subscribe to:
Posts (Atom)