Thursday, December 13, 2012

How to find a character set of database / table / column in MySQL?

This post describes how to check the character set of a database/ table/ column in MySQL.
Database:

SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = "schemaname";

Table:

SELECT CCSA.character_set_name FROM information_schema.`TABLES` T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA WHERE CCSA.collation_name = T.table_collation AND T.table_schema = "schemaname" AND T.table_name = "tablename";

Column:

SELECT character_set_name FROM information_schema.`COLUMNS` C WHERE table_schema = "schemaname" AND table_name = "tablename" AND column_name = "columnname";

How to create and delete profiles in IBM WebSphere

How to create a new profile in IBM WebSphere
Go to /home/abc/IBM/WebSphere/AppServer/bin/ProfileCreator ./pct.bin

How to delete WAS profiles - This will delete all profiles in the AppServer
Go to /home/abc/IBM/WebSphere/AppServer/bin and ./wasprofile.sh –deleteAll