August 2011 Posts

Selamat Idul Fitri 1432H 2011AD


Mata bisa salah lihat
Kuping bisa salah dengar
Mulut bisa salah bicara
Hati bisa salah sangka
Di hari yang fitri ini
Mohon maaf lahir dan bathin.
Selamat Hari Raya Idul Fitri.


Google+

Creating A New WebSphere Instance

Im planning to create more than 1 WebSphere instance on my box, im using a CentOS for development, and IBM AIX for production. On this example i have an instance named “AppSrv01″ and trying to create a new WebSphere instance “AppSrvTeller”. Btw, im using WAS 6.1 on my box.

Okay here we go,
first is executing manageprofiles.sh to create a new profiles, when im executing manageprofiles.sh -help -create, it will print

The following command line arguments are required for this mode.
Command-line arguments are case sensitive.
-create: Creates a new profile. Specify -help -create -templatePath <path> to get template-specific help information.
-templatePath: The fully qualified path name of the profile template that is located on the file system. The following example selects a template: -templatePath <app_server_home>/profileTemplates/<Template_name>
-profileName: The name of the profile.
-profilePath: The intended location of the profile in the file system.

The following command line arguments are optional, and have no default values.
Command-line arguments are case sensitive.
-isDefault: Make this profile the default target of commands that do not use their profile parameter.
-omitAction: Omit optional features.

you just provide the needed parameters, well in my case i’ll show you what i write on my console

[root@localhost bin]# uname -a
Linux localhost.localdomain 2.6.18-128.el5 #1 SMP Wed Jan 21 10:44:23 EST 2009 i686 i686 i386 GNU/Linux
[root@localhost bin]# pwd
/opt/IBM/WebSphere/AppServer/bin
[root@localhost bin]# sh manageprofiles.sh -create -profileName AppSrvTeller -templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/default/ -profilePath /opt/IBM/WebSphere/AppServer/profiles/AppSrvTeller
INSTCONFSUCCESS: Success: Profile AppSrvTeller now exists. Please consult /opt/IBM/WebSphere/AppServer/profiles/AppSrvTeller/logs/AboutThisProfile.txt for more information about this profile.

Hope it can help others (H)

Google+

How to Set Timezone on WebSphere Application Server

It’s actually quite easy, but a little tricky. This is how i do it,

1. Start the administrative console.
2. In the topology tree, expand Servers and click Application Servers.
3. Click the name of the application server for which you want to set the time zone.
4. On the application server page, click Process Definition.
Process Definition
5. On the Process Definition page, click Java Virtual Machine.
6. On the Java Virtual Machine page, click Custom Properties.
7. On the Custom Properties page, click New.
8. Specify user.timezone in the Name field and timezone in the Value field, where timezone is the supported value for your time zone.
9. Click Apply.
10. Save the configuration

In this example, i’m setting my timezone as Asia/Jakarta

user.timezone=Asia/Jakarta  

Timezone Success

Have fun with WebSphere (*)

Google+

Useful DB2 Commands

Among dozens of usefull db2 commands, these are several most usefull db2command, well at least commands that i use the most.

db2move
A Database Movement Tool Command. This tool facilitates the movement of large numbers of tables between DB2 databases located on workstations. The tool queries the system catalog tables for a particular database and compiles a list of all user tables. It then exports these tables in PC/IXF format. The PC/IXF files can be imported or loaded to another local DB2 database on the same system, or can be transferred to another workstation platform and imported or loaded to a DB2 database on that platform.

db2batch
A Benchmark Tool Command. Reads SQL statements from either a flat file or standard input, dynamically prepares and describes the statements, and returns an answer set.

restore
The RESTORE DATABASE command rebuilds a damaged or corrupted database that has been backed up using the DB2 backup utility. The restored database is in the same state that it was in when the backup copy was made. This utility can also overwrite a database with a different image or restore the backup copy to a new database.

Sample Command

db2move sample export

This will export all tables in the SAMPLE database; default values are used for all options.

db2move sample export -tc userid1,us*rid2 -tn tbname1,*tbname2

This will export all tables created by “userid1″ or user IDs LIKE “us%rid2″, and with the name “tbname1″ or table names LIKE “%tbname2″.

db2move sample export -tn *cust*

This will export all tables with the name “%cust%”.

db2move sample import -io replace -u userid -p password

This will import all tables in the SAMPLE database in REPLACE mode; the specified user ID and password will be used. Parameters for io can be one of INSERT, INSERT_UPDATE, REPLACE, CREATE, and REPLACE_CREATE.

restore db rcms2 from /data/tempdb taken at 20100324184458  into RCMS3 without rolling forward

Restore the DB to another name and with a specific timestamp.

db2batch -d CSS -f insertproduct.sql

This will execute insertproduct.sql

references :


http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/core/r0002079.htm


http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/core/r0002043.htm


http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/core/r0001976.htm

Have Fun (@)

Google+