Wednesday, July 25, 2018

How to change java version form WAS console

1. Login to Web

2. Go to Servers -> Server Types -> WebSphere application servers.




















3. Click on server1

4. Under configuration tab click on Java SDKs



5. Tick the check box which version you want and click on make default

6. Then make sure 1.6 is showing true(in my case) then click in save.



7. Then restart the server to effect the changes



How to restart WAS server by deleting temp and cache.

Please follow below steps to restart WAS server by deleting temp and cache.

cd mydomain/bin
./stopServer server1
cd ..
rm -fr temp tranlog wstemp
cd bin/
./clearClassCache.sh
./osgiCfgInit.sh
./startServer server1

How to find and replace string in linux using sed command


   Below command will find string test and replaces it with test1 in all files under current directory

   sed -i 's/test/test1/g' $(find . -type f)

How to Add datafile to existing tablespace

ALTER TABLESPACE data01
 ADD DATAFILE 'data01_1.dbf'
   SIZE 20M
   AUTOEXTEND ON;

How to resize table space in oracle

alter database 
data1
   /u01/oracle/oradata/data1.dbf'
resize 200M;

How to alter tablespace file

For making Table space offlie:

ALTER TABLESPACE data1 OFFLINE NORMAL;


For Renaming data file

ALTER TABLESPACE data1
  RENAME DATAFILE 'data1.dbf'
  TO 'data1_new.dbf';

For making Table space online:

ALTER TABLESPACE data1 ONLINE;

How to drop physically deleted tablespace file

First run select * from v$datafile; to get the FILE#.

Then run select NAME from v$datafile where file#=39; to verify the tablespace name.

Then run alter database datafile 39 OFFLINE DROP; to drop