Immigration Financial Information Bangladesh Gateway General World Cup Entertainment Programing University and College Scholarship Job Interview Health Job

Sunday, November 8, 2009

Vector Related issue

(1)
Change Password scrip
Location of this scrip is
‘/ITS/release/bin/chpwd’
To change any trader password run following utility
chpwd “Brokercd” “Tradercd” Example:-

Suppose BrokerCd is –CSE2
And TraderCd is -002
Then to change this trader password run following command
chpwd CSE2 002

Now trader 002 password will be reset to 1111

To change mops or surveillance password to update “Password” field
of SYSUSER_MAST table according to User is

Example:-
To set User Id 6 password run following command
update SYSUSER_MAST set Password=’ZYXW’ where UserId=6

This will set UserId 6 password to 1111


(2) Match_q_tran problem

If there are large data in match_q_tran table first time then perform
Following steps
(i) Open one fresh crt window
(ii) Go to /ITS/release/exe path
(iii) Run additional copy of HM server using following command
(iv) ./HMserver –S91040 –N9 ok
(v) Do not close this window till Closing session

If Second time onwards this problem occur during trading session then perform following steps
(i) kill running existing HM by pressing Ctrl+c key
(ii) Again run HM server copy using following command from same window.
(iii) ./HMserver –S91040 –N9 ok


(3)
(1) SMstatus
If session is run means session is pass away and if u want to go reverse way
Say it is post closing session and if u want to run cp-trade session.
Then enter appropriate session id in session_curr table.
And run SMstatus utility from /ITS/release/exe/SMstatus

Then for menu select A to active all the session in memory.
And then select E to exit from menu.

(4) Close Price calculation Problem
If CP Trade Session come and Close price is not calculated then perform following Step
(1) Update Session CURR table to session id 5
update SESSION_CURR set SessionId=5
(2) Then Run SMstatus command and change all server status to ‘A’
(3) Then run Close Price Session using following command
./CPserver –S8001 –N1 ok
(4) The update SESSION_DLY session and set CP-trade time
(5) Then run CPT server using following command
./CPTserver –S9320 –N1 ok

(5) Table Lock Problem
To monitor table lock run following command
show locks

Example :-

name
type
class program_name spid
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------
------------------------------ ------------------------------ ------
INT_LOGIN
Shared intent lock
Non Cursor Lock QUERY 43
INT_CLIENT_MASTER
Shared intent lock
Non Cursor Lock QUERY 43
INT_LOGIN
Shared page lock
Non Cursor Lock QUERY 43
INT_LOGIN
Shared intent lock
Non Cursor Lock ctisql 44
INT_LOGIN
Shared page lock
Non Cursor Lock ctisql 44

INT_CLIENT_MASTER
Shared intent lock
Non Cursor Lock QUERY 166

Here Sybase process processes no 43,44,166 are generating lock on INT_LOGIN ,INT_CLIENT_MAST

Now to further investigate why locks are occur and which exact query or store procedure is generating lock login with super user
isql -Usa –P
run following query

select * from sysprocesses where spid in (43,44,166,167,183,187);

output of above query will be like this
spid kpid enginenum status suid
hostname program_name
hostprocess cmd
cpu physical_io memusage blocked dbid uid
gid
tran_name
time_blocked network_pktsz fid execlass
priority affinity id stmtnum
linenum origsuid block_xloid clientname
clienthostname clientapplname sys_id
ses_id loggedindatetime
ipaddr
nodeid
------ ----------- ----------- ------------ -----------
------------------------------ ------------------------------
------------------------------ ------------------------------
----------- ----------- ----------- ------- ------ -----------
-----------
----------------------------------------------------------------
------------ ------------- ------ ------------------------------
---------- ------------------------------ ----------- -----------
----------- ----------- ----------- ------------------------------
------------------------------ ------------------------------ ------
----------- --------------------------
---------------------------------------------------------------- ------
43 1153106073 0 lock sleep 5
chittra1 QUERY
24117 SELECT
122 0 5 167 8 1
0
NULL
238 512 0 EC2
HIGH ANYENGINE 2092612035 2
10 NULL 0
0
0 Jul 15 2009 9:30AM
192.168.101.100
NULL
44 1676410978 0 lock sleep 5
WinNT ctisql
12788 SELECT
0 0 13 167 8 1
0
NULL
153 512 0 EC2
HIGH ANYENGINE 0 1
1 NULL 0
0
0 Jul 15 2009 11:46AM
192.168.102.199
NULL
166 1153368224 0 lock sleep 5
chittra1 QUERY
24116 SELECT
132 0 5 167 8 1
0
NULL
218 512 0 EC2
HIGH ANYENGINE 2092612035 2
10 NULL 0
0
0 Jul 15 2009 9:30AM
192.168.101.100
NULL
167 1149108404 0 recv sleep 5
server-its NULL
AWAITING COMMAND
4 0 2 0 8 1
0
$chained_transaction
NULL 512 0 EC2
MEDIUM ANYENGINE 0 1
1 NULL 0
0
0 Jul 15 2009 9:23AM
203.76.107.52
NULL
183 1153302590 1 lock sleep 5
chittra1 QUERY
24119 SELECT
102 0 5 167 8 1
0
NULL
80 512 0 EC2
HIGH ANYENGINE 2092612035 2
10 NULL 0
0
0 Jul 15 2009 9:30AM
192.168.101.100
NULL


In this query
hostname – wil be the name of server which has fire query
program_name – will be the name of application server which has fire query.
Cmd – will be the command which is fire.

Set of recovery.
(1) Check which program_name and check which application server is generating lock
(2) Then try to kill and restart is using following command
(3) killbn ServerName
(4) Then check locks using show locks command. Even after this locks are not remove then run following command
(5) killb ServerName
(6) srv ServerName
(7) After above 2 option even if lock remain then kill that spid
(8) Login with isql –Usa –P
(9) Kill spid
(10) After killing server-its if in ITS internal server error is coming then restart web server.



(6) Syabse log
To check Sybase error log login with sybase user id and sybase password
Then go to ASE-15_0/install
Open vi SYBASE.log file
Go to last line using Shift+g command
IF in




(7) Scrip suspension and Revocation
(i) If from mops scrip suspension is not working then run RECUTIL Utility
(ii) If after running RECUTIL utility scrip is not suspended then update its’s status using following query.
update SCRIP_MAST set ScripStatus=’S’ where ScripId=”suspendedscripid”

To revoke any scrip if it is not coming in mops revocation list then
update SCRIP_MAST set ScripStatus=’A’ where ScripId=”suspendedscripid”

(8) To load Store procedure
run following command
LOAD UTcktbrkr.usp
Other option is
UTcktbrkr.usp d vectest
UTcktbrkr.usp a vectest
To compile C program
First go to appropriate directory
For example to compile GQ server go to GQ server directory
cd $GQ
Then make clean
make clobber
make
after successful make system will display message make successful.
Then run
make install


(9)Queue problem
show qs

IPC status from /dev/kmem as of Thu Jul 16 14:22:43 2009
T ID KEY MODE OWNER GROUP CBYTES QNUM LSPID LRPID
Message Queues:
q 2 0x000006a4 -Rrw-rw-rw- itsusr users 256 262144 22972 22970
q 3 0x00000708 --rw-rw-rw- itsusr users 251 262144 22970 22972
q 4 0x0000076c -Rrw-rw-rw- itsusr users 251 262144 23022 23012
Current Time ::
----------------------------
Jul 16 2009 02:22:43PM

If All Queues is getting full and all terminal r hang nothing is moving on then

Fist kill all server using following command
killbn server
Then Go to exe folder and start PMserver
./PMserver



(10)
For index calculation following scrip is used.
select * from INDEX_SCRIP_MAST where IndexId=2 and NewScripFlag='Y'

/* for cse-30 index */
SELECT (NoofShareDebent*ClosePrice)
FROM SCRIP_MAST SM,SCRIP_STAT_CURR SSC WHERE SM.ScripId IN
(SELECT ScripId FROM INDEX_SCRIP_MAST where IndexId=2 and NewScripFlag='Y')
AND SSC.ScripId IN (SELECT ScripId FROM INDEX_SCRIP_MAST where IndexId=2 and NewScripFlag='Y')
AND SM.ScripId = SSC.ScripId


/* for CSCX index */
SELECT (NoofShareDebent*ClosePrice)
FROM SCRIP_MAST SM,SCRIP_STAT_CURR SSC WHERE
SM.ScripId = SSC.ScripId
AND SM.EquityDebFlag='E'
AND SM.GroupCd IN ('A','B','G','N')


/* for all scrip index */
SELECT (NoofShareDebent*ClosePrice)
FROM SCRIP_MAST SM,SCRIP_STAT_CURR SSC WHERE
SM.ScripId = SSC.ScripId
AND SM.EquityDebFlag='E'

update this value in INDEX_HIST table in closeIndex column

No comments :

Post a Comment