Wednesday, July 13, 2016

Kill a java process from the command-line or a bat file


If we execute the "tasklist" command, it will not list the Java process name.













If you installed the JDK, we can use "jps -m"







C\> jsp -m command give you the PID and the detailed process name
Using that we can use below command to kill the process.

Note: Use %% when you are using this command in BAT files instead of the one % mark. 


for /f "tokens=1" %i in ('jps -m ^| find "Name of your java process"') do ( taskkill /F /PID %i )

Tuesday, June 21, 2016

How to DISABLE CASE SENTIVITIY of SCHEMA Logins in ORACLE

* Check the current status of the CASE Sensitive parameter.

1) Log in to database as SYS or SYSTEM

C:\sqlplus system/password@PIONEERS


SQL> show parameter case;

Output will be like below.

NAME                                 TYPE        VALUE
------------------------------------ ----------- ---------
sec_case_sensitive_logon             boolean     TRUE


* Alter the value and disable the CASE sensitivity.

SQL> alter system set sec_case_sensitive_logon=FALSE;

"System altered." message will be appear.

*  Check the new status of the CASE Sensitive parameter as mentioned in the first step.

SQL> show parameter case;

NAME                                 TYPE        VALUE
------------------------------------ ----------- -------------
sec_case_sensitive_logon             boolean     FALSE

Wednesday, June 8, 2016

How to enable multiple remote connection for windows server 2012


How to enable multiple remote connection for windows server 2012
Answer:
1. Open command propmt
2.write gpedit.msc and open it
3.Go to computer configuration -> Administrative Tempalates -> Wondows Components
->Remote Desktop services -> Remote Desktop Session Host -> Connections.
4. Here Disble the below mentioned.

Restrict Remote Desktop Services user to a single remote.....

Now go to command prompt and update the group policy using below mentioned command.

Go to command prompt and type -> gpupdate and enter it. it should be successfully applied.

Friday, August 15, 2014

Recover Database from ORA-00333: redo log read error

I got the above error when i start My DB.
I followed the below steps to recover this.

SQL> startup
ORACLE instance started.
Total System Global Area ***** bytes
Fixed Size               ***** bytes
Variable Size            ***** bytes
Database Buffers         ***** bytes
Redo Buffers             ***** bytes
Database mounted.
 
 ORA-00333: redo log read error block *Number* count *Number*



================================================================================
Step 1: Since the DB is in mount mode, We can query v$log & v$logfile to identify the status of log file group and their member.

 SQL> select l.status, member from v$logfile inner join v$log l using (group#); 
 STATUS  MEMBER
 ------------- --------------------------------------
 CURRENT /oracle/fast_recovery_area/redo01.log
 INACTIVE /oracle/fast_recovery_area/redo02.log
 INACTIVE /oracle/fast_recovery_area/redo03.log



 
Step 2: Recover the database using ackup controlfile.

 SQL> recover database using backup controlfile;
ORA-00279: change  generated at  needed for thread 1
ORA-00289: suggestion : /oracle/fast_recovery_area/archivelog/o1_mf_1_634_%u_.arc
ORA-00280: change  for thread 1 is in sequence #
Specify log: {=suggested | filename | AUTO | CANCEL}




Step3: Give 'CURRENT' log file member along with location as input. If it does not work give other log file members along with location in input prompt. In our case we give 
/oracle/fast_recovery_area/redo01.log

Saturday, December 21, 2013

Scheduled task won't run .bat file 2008R2

In our production environments, i scheduled a task to start some programs which is a BAT file in Windows Server 2008 R2.

If i double click the .bat file, it started. But from scheduled task, it is not starting. Although i select the task and try to run task manually , it is not starting.

Solution 

 Fill in the "Start In (Optional)" field. There you need to enter the path of .BAT file.
Go to task's properties, Actions, Edit and put the path to BAT filr.

Ex: E:\MUBASHER-IT\ANBI\Documents\

No need to put double quotes.


Sunday, June 16, 2013

How to increase number of connections in Oracle




SQL> alter system set processes=200 scope=spfile/both; 

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.