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

Monday, December 7, 2009

VECTOR MQT problem

Problem:
There are values in MATCH_Q_TRAN table but there is no value in BUSY_SCRIPS_TRAN table.
Solution:
Update MatchCopyNo in MATCH_Q_TRAN table for that scrip with the value = 0

Symptom:
There were two values in MATCH_Q_TRAN which were not in BUSY_SCRIP table.
These values were not executing.
Occured after deletion of 57 scrips.It didn't come in MOCK session but occured in live on next day.

Solution:
MatchCopyNo is updated to 9 and ran 9th copy of HMserver manually.

==============================================================================================

1> select * from MATCH_Q_TRAN;
RecId ScripId XactId XactType TradingMode BSFlag
DtTime BPrice BTotalQty
BReplenishQty BPendQty SPrice STotalQty
SReplenishQty SPendQty BrokerCd TraderCd ClientCd OrderDuration
TillDtTime MatchCopyNo LastBTradeId LastSTradeId
TradeSessNo ReferenceCd ShortSellFlag
-------------------- ----------- ----------- -------- ----------- ------
-------------------------- ------------------------ -----------
------------- ----------- ------------------------ -----------
------------- ----------- -------- -------- -------- -------------
-------------------------- ----------- ------------ ------------
----------- -------------- -------------
25888.000000 23004 15960 D H S
Dec 8 2009 1:14PM 0.00 0
0 0 4,320,000.00 200
100 100 SES CTG01 CTG421 GFD
Jan 1 1900 12:00AM 2 0 0
1 NULL N
26798.000000 32009 21378 L H S
Dec 8 2009 1:20PM 0.00 0
0 0 3,722,000.00 500
0 500 SHLCT DHK01 875 GFD
Dec 8 2009 1:20PM 1 0 0
1 NULL N


Wednesday, December 2, 2009

Failover Technology

A cluster is a group of servers networked together to share the work load. Failover is the process of transferring operation of a failed server to a backup server to ensure websites remain online even due to hardware failure or maintenance. Failover is used to host mission critical websites that require constant availability.

Normal Web server

If a server fails, all sites are down, no mail works, incoming mails circulate in queue.

Failover Server with real-time data replication technology

· A cluster system where one operates web and mail, the other databases. Both get mirrored constantly.

· If server A fails, his work is done by server B

· If server B fails, his work is done by server A

· As soon as both are working again, they get mirrored.

· No offline for website and no late mails.

Database Clustering

Database clustering is the way of achieving higher availability of database.

DB clustering is a failover technology and not scale-out technology. It does not focus on performance or distributing the traffic to different servers. It merely focuses on moving the execution environment and services to another server in a cluster in case of server failure and thus ensures higher availability of database.

Terminologies:

  • Cluster: Cluster is a group of computers configured to work together to serve clients in a similar fashion.
  • Nodes: Each server participating in a cluster is called as node.
  • Max nodes in a cluster: In Windows Server 2003, the maximum number of nodes can be 4 (with at the most 16 SQL instances) whereas in case of Windows NT, maximum number of nodes can be 2 in a cluster.
  • Heartbeats: The nodes in a cluster remain in constant communication through the exchange of periodic messages, called heartbeats.
  • Same OS on Servers: A cluster cannot be made of nodes running Windows Server 2003 Enterprise Edition and Windows Server 2003 Datacenter Edition. The OS installed on all the nodes must be same.

Virtual IP (VIP): The client system communicates with the DB server using virtual IP. MSCS takes care of redirecting the client request to the active server and hence the client doesn’t have to worry about which server in a cluster is active.

Monday, November 23, 2009

Steps to Stop SQL Injections

SQL injections last year became the most common Web-based attack technique. Hackers are successful with these attacks largely due to poor coding practices. The following are six ways organizations can start to mitigate the risk from SQL injections.

Never Trust Input

Coders get themselves in trouble with injection attacks when they fail to validate user input.

Don’t use Dynamic Tables

Set parameters for SQL to thwart hackers from inserting their own SQL command into your code.

Encrypt Data

If attackers are successful in getting in and passwords are stored in clear text, they’ve hit the motherlode. Throw up a speedbump and encrypt.

Implement rules of least privilege

Hackers love it when coders set their web applications to access the database via the admin account.

Implement Code Review

Processes and tools need to be implemented that check the security of code before it goes live.

Hire a pen tester

What you don’t know CAN hurt you. Hire penetration testers to find out how vulnerable your sites really are.

Saturday, November 21, 2009

Reasons Your Team Hates You

You Don't Prioritize

If everything is important, the team can't focus on critical tasks.

Fix: Force yourself to rank each task, dividing them evenly between high medium, and low. Honor that list.

You Treat Them like Employees

If you know nothing about your team as people, they know it.

Fix: Take the time to learn some details. No faking this one.

You Don't Fight For Them

When you don't stand up for people, you lose their trust.

Fix: Get someone that raise they deserve. Get that cool new project approved. Let them know.

You Don't Model Balance

You say weekends are precious for families, then bombard them with email on Sunday afternoon.

Fix: Take a day off -- or learn how to do "delayed send" so your messages won't go out until Monday morning.

You Never Relax

Negative or stressful energy transfers to others.

Fix: Let them know you're human. Laugh, when appropriate.

You Micromanage

They have no room to make decisions on their own.

Fix: Pick a few low risk projects; commit to doing nothing unless being asked for help.

You're A Suck-up

This shows a lack of spine -- and could mean you expect the same from them.

Fix: Try kicking up, and kissing down.

You Treat Them like Mushrooms

In the dark, fed manure.

Fix: Share information within reason. You aren't 007.

You Don't Get Your Hands Dirty

You're great at assigning work. Doing work? Not so much.

Fix: Pick a smaller project and do it yourself.

You're Indecisive

Flip-flopping is not leadership.

Acknowledge you might make a mistake, but move ahead.

Monday, November 16, 2009

Hot Swapping,What is SWAP

Hot Swap

A hot swap is the replacement of a hard drive, CD-ROM drive, power supply, or other device with a similar device while the computer system using it remains in operation. The replacement can be because of a device failure or, for storage devices, to substitute other data.

Hot swapping and hot plugging are terms used to separately describe the functions of replacing system components without shutting down the system. Hot swapping describes changing components without significant interruption to the system, while hot plugging describes changing or adding components which interact with the operating system.[1] Both terms describe the ability to remove and replace components of a machine, usually a computer, while it is operating. For hot swapping once the appropriate software is installed on the computer, a user can plug and unplug the component without rebooting. A well-known example of this functionality is the Universal Serial Bus (USB) that allows users to add or remove peripheral components such as a mouse, keyboard, or printer.

Reasons for hot-swapping

Hot swapping is used whenever it is desirable to change the configuration or repair a working system without interrupting its operation. It may simply be for convenience, to avoid the delay and nuisance of shutting down and then restarting complex equipment, or because it is essential that the equipment be permanently available.

Hot swapping may be used to add or remove peripherals or components, to allow a device to synchronize data with a computer, and to replace faulty modules without interrupting equipment operation.

Equipment may be designed with redundancy so that in the event of the failure of a component, other parts of the system carry out its functions while the faulty component is removed and a replacement connected. For example, computer RAID disk arrays allow a faulty disk to be hot-swapped for a new one; the new one is configured to become part of the array automatically or by user command. A machine may have dual power supplies, each adequate to power the machine; a faulty one may be hot-swapped.

Hot Swap: A true hot swap is defined as one where the drive can be replaced while the rest of the system remains completely uninterrupted. This means the system carries on functioning, the bus keeps transferring data, and the hardware change is completely transparent.

Warn Swap: In a so-called "warm swap", the power remains on to the hardware and the operating system continues to function, but all activity must be stopped on the bus to which the device is connected. This is worse than a hot swap, obviously, but clearly better than a cold one.

Cold Swap: The system must be powered off before making the swap.

RAID technology

Redundant array of independent disk (RAID) is the technology of grouping several physical drives in a computer into an array that you can define as one or more logical drives. Each logical drive appears to the operating system as a single drive. This grouping technique greatly enhances logical-drive capacity and performance beyond the physical limitations of a single physical drive.

When you group multiple physical drives into a logical drive, the ServeRAID controller can transfer data in parallel from the multiple drives in the array. This parallel transfer yields data-transfer rates that are many times higher than with nonarrayed drives. This increased speed makes the system better able to meet the throughput (the amount of data processed in a given amount of time) or productivity needs of the multiple-user network environment.

The ability to respond to multiple data requests provides not only an increase in throughput, but also a decrease in response time. The combination of parallel transfers and simultaneous responses to multiple requests enables disk arrays to provide a high level of performance in network environments.

STRIPE-UNIT SIZE

The granularity at which data is stored on one drive of the array before subsequent data is stored on the next drive of the array is called the stripe-unit size .

You can set the stripe-unit size to 8 KB, 16 KB, 32 KB, or 64 KB. You can maximize the performance of your ServeRAID controller by setting the stripe-unit size to a value that is close to the size of the system I/O requests. For example, performance in transaction-based environments, which typically involve large blocks of data, might be optimal when the stripe-unit size is set to 32 KB or 64 KB. However, performance in file and print environments, which typically involve multiple small blocks of data, might be optimal when the stripe-unit size is set to 8 KB or 16 KB.

RAID level-5

RAID level-5 stripes data and parity across all drives in the array.

RAID level-5 offers both data protection and increased throughput. When you assign RAID level-5 to an array, the capacity of the array is reduced by the capacity of one drive (for data-parity storage). RAID level-5 gives you higher capacity than RAID level-1, but RAID level-1 offers better performance.

RAID level-5 requires a minimum of three drives and, depending upon the level of firmware and thestripe-unit size, supports a maximum of 8 or 16 drives.

The following illustration is an example of a RAID level-5 logical drive.

RAID level-5 example

Start with four physical drives.

Create an array using three of the physical drives, leaving the fourth as a hot-spare drive.

Then create a logical drive within that array.

The data is striped across the drives, creating blocks.

Notice that the storage of the data parity (denoted by *) also is striped, and it shifts from drive to drive.

A parity block (*) contains a representation of the data from the other blocks in the same stripe. For example, the parity block in the first stripe contains data representation of blocks 1 and 2.

If a physical drive fails in the array, the data from the failed physical drive is reconstructed onto the hot-spare drive.

Advantages and disadvantages

RAID level-5 offers the following advantages and disadvantages.

Advantages

Disadvantages

· 100% data protection

· Offers more physical drive storage capacity than RAID level-1 or level-1E

Lower performance than RAID level-1 and level-1E

Sunday, November 8, 2009

GIS,Geographic Information System

GIS Implementation Process
The basic steps of the GIS implementation process are planning, requirements analysis, design, procurement and development, and operation and maintenance.
Strategic Vision, Scope and Organizational Impacts of GIS
To provide direction for the GIS and for all implementation and operations activities, it is necessary to establish a vision that defines the role GIS plays in the organization, its scope, and its relationship to business operations.
Assessment of Organizational Risk
Performing an assessment of organizational risk at the outset of a GIS project can increase the chances for success.
Coordinating GIS Participants and Users
Committees and team approaches are frequently employed for multi-participant GIS projects as a means for coordinating participants and guiding project development. The common model addresses participants’ GIS interests at three levels — policy, technical development and usage – and establishes a committee at each level, coordinated by the GIS manager.
Managing the GIS Committee and Team Environment
To make the GIS committee or team environment successful, several other aspects must also be managed.
Each committee must have a clear charter regarding the types of issues it will address, and must remained focused on these issues. There should be a clear plan regarding the matters to be addressed by each committee — as well as by the GIS manager — and regarding how information, recommendations, approvals and directives are to flow among the committees and staff. The appropriate committee composition follows the GIS project definition.
Organizational and professional interests should be appropriately represented according to the role of GIS in the organization. The most successful committee arrangements involve teams that are limited to a workable size – usually 6 to 8 people. When committees are very large, some success can be achieved by establishing subcommittees to address specific issues.
Communication and Providing Information
Communication is crucial to the success of a multi-participant GIS environment. It can be time consuming: communication requirements grow according to the number of participants, and differences in applications, professional backgrounds, priorities, organizational interests and personal agendas. All involved parties —future users, as well as committee members — must be kept in the communication network from the time they are first contacted through the entire project lifecycle.
In order to participate usefully in the GIS effort, participants need adequate information regarding GIS and the project goals. They must receive the right kind and amount of education and information at the right times. Different participants from different application areas and levels of the organization have different interests, backgrounds and needs related to understanding GIS. For example, the type of information required by the Mayor will differ greatly from that required by an assessment clerk. GIS education and orientation must be tailored to the specific audience. This often means conducting several events for different groups from various applications areas, professional backgrounds and levels in the organization. Furthermore, education will be an on-going need throughout the GIS project.(Somers, 1995)
Leadership and Support
In a large, multi-participant GIS project, two types of leadership are crucial to success: someone to manage the GIS implementation and operation and someone to provide support and influence at the policy level.
A large GIS effort must have a focal pint. The GIS manager coordinates the network of committees and participants. Among the many technical and managerial qualifications a GIS manager must possess, he or she must manage this complex environment. The ability to work with diverse individuals and groups, manage teams, educate, motivate and lead are critical to the success of the GIS.
Another key ingredient in an extensive GIS effort is a project champion who provides executive level support and influence.
The project champion’s support and efforts ensure continued political and financial support in the face of pressures that would erode the project’s resources and delay its implementation.

Management and Control of GIS
Basically, control and management of GIS may be centralized or decentralized. There are three basic areas in which the GIS management could be placed — in a line organization, in a support area, or at the executive level.
The appropriate organizational configuration and placement of GIS management and control within an organization depends on the role and scope of the GIS, the organization model used and the specific operational aspects of the organization.

Personnel issues
Regardless of the extent and impact of GIS within an organization, however, the basic personnel issues must at least be addressed. These issues include staff responsibilities, staff configuration, position requirements, position descriptions and pay scales, job classes and career paths, staffing and training.

Timing
Much of successful timing in GIS is an art. When developing implementation schedules, certain technical and organizational dependencies are inherent. Technically, certain components must be completed before dependent one can be developed. Organizationally, components must be prepared before technical changes can take place. There are many technical and organizational aspects whose timing must be coordinated. . Committees and large numbers of project participants often are the source of project delays. In a business environment, GIS timing must not only take into consideration cost/benefits and internal operations issues, but competitive ones as well.

Integrating GIS into an Organization’s Operations
Successful adoption and integration of GIS into an organizations operations depends on all of the above issues. Each issue must be considered by itself and in combination with the others. The primary factor in integrating GIS into an organization is to understand the role GIS will play in the organization. The scope, purpose and vision for GIS in the future of the organization will drive the development of organizational plans.
There are many other important issues affecting GIS adoption, including:

 Educating users
 Training
 Involving users in the planning and design of the system
 Transitions in operations

BBS

(1) Dump of BBS is in
‘/Sybase/dump/bbs_sucess.dmp’
load database dump using following command
login using isql -Usa –P
load database vectest from ‘/Sybase/dump/bbs_sucess.dmp’
(2) To run BBS check following point
Do All The step require for vector BOD
Check data in following table
(i) BUY_TRAN
Previous day data should be there
(ii) BBO_BUY_TRAN
This table should be empty. Data will come in this table after Opening session.
(iii) INT_ORDER_MAP
In this table previous day data should be there.
(3)
If database transaction log is full then login with
isql –Usa –P
run following command
dump tran vectest with truncate_only

(4)
For BBS change no of user connection using following command
isql –Usa –P

(i)
sp_configure "connection"
This command will display current number of connection
Parameter Name Default Memory Used Config Value
Run Value Unit Type
------------------------------ ----------- ----------- ------------
------------ -------------------- ----------
cis idle connection timeout 0 0 0
0 seconds dynamic
max cis remote connections 0 526 0
0 number dynamic
number of remote connections 20 125 20
20 number static
number of user connections 25 45052 150
150 number dynamic

current no of user connection is -150


To change No of connection run following command
sp_configure "number of user connections",600

(5)
If it is fresh IPO then delete following table
DELETE FROM TRADE_TRAN
DELETE FROM BBS_PRICE
DELETE FROM BUY_TRAN
DELETE FROM BBO_BUY_TRAN
DELETE FROM INT_ORDER_MAP

Update
Scrip_mast table minallowprice and maxallowprice
Using follwing command
UPDATE SCRIP_DET SET MinAllowPrice=2400000,MaxAllowPrice=3600000 WHERE ScripId = 5558
update SCRIP_STAT_CURR set ClosePrice=3000000 where ScripId=5558

Ceiling Depth should be 10% of issued share.( Ex. 10000 for 100,000)

To check How many user login today

select * from INT_LOGIN where datediff(dd,LastLoginTime,getdate())=0

To check How many User login in last N minute
For e.g N =30

select * from INT_LOGIN where datediff(mi,LastLoginTime,getdate()) <=30

When any user is abnormal close window and next time try to login
Message will come “You are already logged in at another terminal”
Then run following query
Here Enter appropriate Broker code and Login Name
UPDATE INT_LOGIN SET LoginStatus = 'A' WHERE BrokerCd = 'BBS' AND LoginName='testing4';



Do Normal BOD



(6)
If in any case BBO Details is not display then run following query

(i) first delete record from BBO_BUY_TRAN
delete from BBO_BUY_TRAN
(ii) Then insert using following sql.


INSERT INTO BBO_BUY_TRAN
SELECT ScripId,XactType,Price,TotalQty,BrokerCd,TraderCd,'U'
FROM BUY_TRAN




Aftert 15th July 15, 2009 BBS testing database dump is
/Sybase/dump/bbs_final.dmp

if some problem occur in bbs_sucess.dmp then load this database dump




DELETE FROM TRADE_TRAN
DELETE FROM BBS_PRICE
DELETE FROM BUY_TRAN
DELETE FROM BBO_BUY_TRAN
DELETE FROM INT_ORDER_MAP


SELECT * FROM TRADE_TRAN
SELECT * FROM BBS_PRICE
SELECT * FROM BUY_TRAN
SELECT * FROM BBO_BUY_TRAN
SELECT * FROM INT_ORDER_MAP


SELECT * FROM BUY_TRAN WHERE ScripId = 5558

SELECT * FROM INT_LOGIN WHERE BrokerCd='SALTA' AND LoginName = 'krishnaa'
UPDATE INT_LOGIN SET LoginStatus = 'A' WHERE BrokerCd = 'SALTA' AND LoginName = 'krishnaa'


SELECT * FROM INT_LOGIN WHERE LoginName IN (SELECT LoginName FROM INT_REGISTRATION WHERE BrokerCd = 'BBS')
AND BrokerCd='BBS'


SELECT * FROM SCRIP_MAST WHERE ScripId = 5558
UPDATE SCRIP_MAST SET ScripStatus = 'S' WHERE ScripId <> 5558


SELECT * FROM SCRIP_DET WHERE ScripId = 5558
UPDATE SCRIP_DET SET MinAllowPrice=2400000,MaxAllowPrice=3600000 WHERE ScripId = 5558

UPDATE

SELECT * FROM BUY_TRAN WHERE ClientCd NOT IN (SELECT ClientCd FROM INT_LOGIN
WHERE BrokerCd='BBS' AND LoginName NOT IN (SELECT LoginName FROM INT_REGISTRATION WHERE
BrokerCd='BBS'))

SELECT * FROM INT_LOGIN WHERE LoginName LIKE 'atiq%'
SELECT * FROM INT_REGISTRATION WHERE LoginName = 'kajal'

SELECT * FROM INT_LOGIN WHERE BrokerCd = 'BBS' AND LoginName NOT IN (SELECT
LoginName FROM INT_REGISTRATION WHERE BrokerCd = 'BBS')


SELECT * FROM BUY_TRAN

SELECT * FROM BBS_BIDDER

UPDATE INT_LOGIN SET LoginStatus='A' WHERE BrokerCd='BBS' AND ClientCd LIKE '%BBS28'

UPDATE FINAL

UPDATE INT_LOGIN SET LoginStatus = 'A' WHERE BrokerCd = 'BBS' AND LoginName='check123'
SELECT * FROM SCRIP_STAT_CURR WHERE ScripId=5558

UPDATE SCRIP_STAT_CURR SET ClosePrice = 3000000 WHERE ScripId = 5558
UPDATE SCRIP_DET SET MinAllowPrice=2400000,MaxAllowPrice=3600000 WHERE ScripId = 5558

SELECT * FROM SCRIP_DET WHERE ScripId=5558

sp_configure "number of user connections",700


SELECT * FROM SCRIP_DET WHERE ScripId=5558

SELECT * FROM INT_LOGIN WHERE LoginName = 'korban2' AND BrokerCd='BBS'

UPDATE INT_LOGIN SET BrowPass = (SELECT BrowPass FROM INT_LOGIN WHERE LoginName = 'rassel2' AND BrokerCd='BBS')
WHERE LoginName = 'korban2' AND BrokerCd='BBS'

SELECT * FROM INT_LOGIN WHERE BrokerCd='SALTA' AND LoginName


SELECT * FROM INT_ORDER_MAP

SELECT * FROM BBO_BUY_TRAN

SELECT * FROM TRADE_TRAN

SELECT * FROM BBS_PRICE

SELECT * FROM BUY_TRAN WHERE Price = -2590000

VIEWS

CREATE VIEW BBS_BIDDER_TRADE AS
SELECT INT_REGISTRATION.LoginName,INT_REGISTRATION.ClientLName,
INT_REGISTRATION.Address1,INT_REGISTRATION.Address2,INT_REGISTRATION.Telephone,
TRADE_TRAN.BClientCd,INT_REGISTRATION.BoId,BROKINVLMT_TRAN.GrossLmt,
(BROKINVLMT_TRAN.GrossLmt/convert(INT,SYS_CONFIG_PARS.ParamValue) ) DepositeLmt,
BROKINVLMT_TRAN.CurrGrossLmt,
INT_REGISTRATION.BankAcctNo,INT_REGISTRATION.ClrBankCd,INT_REGISTRATION.ClrBankName,
SCRIP_MAST.ScripName,
TRADE_TRAN.Price,TRADE_TRAN.Qty,TRADE_TRAN.ScripId, TRADE_TRAN.DtTime,TRADE_TRAN.TradeId
,TRADE_TRAN.BXactId
FROM INT_REGISTRATION,TRADE_TRAN,INT_LOGIN,BROKINVLMT_TRAN,SCRIP_MAST,SYS_CONFIG_PARS
WHERE INT_REGISTRATION.LoginName = INT_LOGIN.LoginName AND
INT_LOGIN.ClientCd = TRADE_TRAN.BClientCd AND
INT_LOGIN.BrokerCd = TRADE_TRAN.BBrokerCd AND
INT_LOGIN.TraderCd = TRADE_TRAN.BTraderCd AND
BROKINVLMT_TRAN.BrokerCd = TRADE_TRAN.BBrokerCd AND
BROKINVLMT_TRAN.TraderCd = TRADE_TRAN.BTraderCd AND
BROKINVLMT_TRAN.ClientCd = TRADE_TRAN.BClientCd AND
TRADE_TRAN.ScripId = SCRIP_MAST.ScripId AND
SYS_CONFIG_PARS.ParamMnemonic = 'BBS_GROSS_MULT'




CREATE VIEW BBS_BIDDER AS
SELECT INT_REGISTRATION.LoginName,INT_REGISTRATION.ClientLName,
INT_REGISTRATION.Address1,INT_REGISTRATION.Address2,INT_REGISTRATION.Telephone,
BUY_TRAN.ClientCd,INT_REGISTRATION.BoId,BROKINVLMT_TRAN.GrossLmt,
(BROKINVLMT_TRAN.GrossLmt/convert(INT,SYS_CONFIG_PARS.ParamValue) ) DepositeLmt,
INT_REGISTRATION.BankAcctNo,INT_REGISTRATION.ClrBankCd,INT_REGISTRATION.ClrBankName,
SCRIP_MAST.ScripName,
BUY_TRAN.Price,BUY_TRAN.TotalQty,
BUY_TRAN.ScripId,BUY_TRAN.DtTime,BUY_TRAN.XactId
FROM INT_REGISTRATION,BUY_TRAN,INT_LOGIN,BROKINVLMT_TRAN,SCRIP_MAST,SYS_CONFIG_PARS
WHERE INT_REGISTRATION.LoginName = INT_LOGIN.LoginName AND
INT_LOGIN.ClientCd = BUY_TRAN.ClientCd AND
INT_LOGIN.BrokerCd = BUY_TRAN.BrokerCd AND
INT_LOGIN.TraderCd = BUY_TRAN.TraderCd AND
BROKINVLMT_TRAN.BrokerCd = BUY_TRAN.BrokerCd AND
BROKINVLMT_TRAN.TraderCd = BUY_TRAN.TraderCd AND
BROKINVLMT_TRAN.ClientCd = BUY_TRAN.ClientCd AND
BUY_TRAN.ScripId = SCRIP_MAST.ScripId AND
SYS_CONFIG_PARS.ParamMnemonic = 'BBS_GROSS_MULT'






SERVERS
/sybase/dump >display

======================================================================
No Server Name No of Copies
=====================================================================
1 ACserver 2
2 AMserver 0
3 AUserver 0
4 BCTserver 1
5 BCserver 1
6 BOserver 0
7 CPTserver 0
8 CPserver 0
9 CSserver 3
10 DOserver 0
11 DQserver 1
12 DRSserver 0
13 FIserver 0
14 FTserver 0
17 GQserver 2
16 HMserver 5
17 HSserver 1
18 IHserver 0
19 IXserver 1
20 LMserver 1
21 NDserver 0
22 OLserver 0
23 OMserver 0
24 OPserver 0
25 OSWserver 2
26 OSserver 4
27 PAserver 1
28 POSWserver 1
29 POSserver 1
30 PSserver 0
31 QMserver 0
32 QSserver 0
33 SLserver 0
34 SMSserver 0
35 SMserver 1
36 SPserver 0
37 TSserver 1
38 UMSserver 1
39 UMserver 1
=========================================================================
Total Number Of Servers Running Are : 30




---------------Some Query------------------------------------------------------------------------
->
select LoginName,BrokerCd,TraderCd,ClientCd,LoginStatus from INT_LOGIN where BrokerCd='BBS' order by LoginStatus

->
select ScripId,BrokerCd,TraderCd,ClientCd from BUY_TRAN order by ClientCd;

->
select LoginName,ClientCd from INT_LOGIN where ClientCd in (select ClientCd from ORDER_ADD_LOG);
->Clients who placed order
select LoginName,ClientCd from INT_LOGIN where ClientCd in (select ClientCd from BUY_TRAN)
->
UPDATE INT_LOGIN SET LoginStatus = 'A' WHERE BrokerCd = 'BBS' AND LoginName = 'SHAFIQB6'


?
UPDATE SCRIP_DET SET MinAllowPrice=2400000,MaxAllowPrice=3600000 WHERE ScripId = 5558
update SCRIP_STAT_CURR set ClosePrice=3000000 where ScripId=5558

? [Client –wise Total Bid qty]
select ClientCd,sum(TotalQty),sum(PendQty) from BUY_TRAN group by ClientCd order by 1

? [Clients who didn’t place order]
select LoginName,ClientCd from INT_LOGIN where ClientCd not in (select ClientCd from BUY_TRAN) and ClientCd not like'%BBS
%' order by 2













Exception

(26 rows affected)
1> update BUY_TRAN set TotalQty=10000,PendQty=10000 where ClientCd like '%BS11';
1> go
1> update BUY_TRAN set TotalQty=10000,PendQty=10000 where ClientCd like '%BS35';
1> update BUY_TRAN set TotalQty=10000,PendQty=10000 where ClientCd like '%BS84';
1> select ClientCd,sum(TotalQty),sum(PendQty) from BUY_TRAN group by ClientCd order by 1
2> go



Selecting The client who are not BBS and BrokerCd=BBS
select LoginName,ClientCd from INT_LOGIN where BrokerCd='BBS' and ClientCd not like ('%BBS%') order by 2

Selecting The client whose BrokerCd=BBS and TraderCd=BBS1
select BrokerCd,TraderCd,LoginName,ClientCd,UserStatus,LoginStatus from INT_LOGIN where BrokerCd='BBS' and TraderCd='BBS1' order by 3


If Tic
update SCRIP_MAST set TickPrice=2500 where ScripId=5559


UPDATE SCRIP_DET SET MinAllowPrice=2400000, MaxAllowPrice=3600000 WHERE ScripId = 5558
update SCRIP_STAT_CURR set ClosePrice=3000000 where ScripId=5558

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

Website Speed Factors

Speed
Speed is a measure of how fast a web site responds to user input. There are two main components to web site speed, 1) initial download and display speed and 2) the response time of particular web page elements to user input. Users are sensitive to download speed (King 2008), with tolerable thresholds that depend on perceived complexity, bandwidth speed, and other factors (such as age). But page element delays (after a page has loaded) are even more important to minimize than download times. This study tested the effects of varying post-display response times on user satisfaction.
Here are the tips for website speed:
1. Get A Fast & Less-Loaded Web Server
This is a must. Whatever you do to make your website faster, if it is served slow, there’s nothing to do.
Make sure that the server your website is hosted has low ping values & it is not over-loaded. Specially if you’ve a database and/or using dynamic files (like asp, asp.net, php, ruby..) server over-load can kill the performance.
If you’ve a simple website with few visitors then shared hosting is ok. For a website getting popular, think of a VPS with guaranteed RAM & CPU usage. If the website is already popular, a dedicated server will be the best performing one.
2. Know When To Use GIF, JPG & PNG Files.
Playing with the quality of images will dramatically lower the sizes of them while they will still be looking good.
GIF is suitable for images with few colors like logos, text & line art. When saving a GIF file, make sure you use a small color pallette (learn more).
JPG is good for images with lots of colors & details like photographs. Decrease the quality of a JPG image before saving. It will still look good for a web image (learn more).
PNG, a format specially for websites, has great quality – both transparent & non-transparent – is specially functional when you’re in need of quality transparent images. Don’t forget that IE6 has problems in displaying them (learn more).
3. Use XHTML – No Tables
This is easy to tell but may be harder to implement for anyone that has few experience with XHTML.
The thing is, tables are rendered slower than DIVs by browsers. You can do more with less code & no need to say it is much better to be compatible with any browser (including mobile browsers), in means of SEO, etc..
Update: There may be cases when using tables are much more logical like "tabular data". You may have to code a lot for creating the look of a simple 5 columned table. Don’t do that & use tables when needed.
What is tried to be mentioned here is, use XHTML rather than tables in general. But don’t try to draw images with XHTML.
4. Use CSS Smartly & Compressed
• Mention every style in CSS files.
• Find the common properties in objects, define them once & try not to repeat them.
• If using a significant amount of totally different properties for a specific page, define them in another CSS file & only include on that page. So users viewing other pages won’t need to download those properties.
• Compress your CSS file (you may try this, this or this).
5. Merge & Compress JavaScript Files
Try merging JavaScript files prevent multiple includes (see step 6).
If a JavaScript file will be used only in few pages, try to include them inside those pages only (like CSS in step 4).
Compress JavaScript files. It lowers the size seriously & doesn’t have any bad effects on your side. This & this are some of the popular compressors.
6. Manage Included Files Better
There may be several files included in webpages like CSS files, JavaScript files and other JavaScript files for statistic services, social bookmarking sites, widgets & more.
Try to decrease the number of these files:
• If using digg-reddit-like voting widgets, don’t use them in stories that won’t hit the frontpage & remove the ones that were submitted few days ago as they won’t have any help after sometime.
• Use only 1 statistic service if possible. Every web-based service requires new files to be installed & they are called each time a page is loaded.
• Host files on your side & don’t use web addresses as file paths.
o If you’re using any JS frameworks like jQuery or MooTools, don’t call the .js files from their websites but download & upload them to your website.
o Don’t try to call any file from a web address like "http://.." as this always requires dns queries to be done & will work slower.
• PHP Speedy (WRD post)is a very effective solution that does all the combining & compressing automatically. You may want to try it.
7. Use HTTP Compression
HTTP compression is one of the most effective step with a little effort.
Today, almost every browser & web server supports HTTP compression. Using it, your files are sent to the visitor compressed & un-compressed on their side & you can have up to 90% success for the text based files (like HTML).
You have 2 popular choices with this:
• HTTP compression: a feature of the web server (can be enabled on the server side)
• Gzip: can be enabled at the site level. Here are more details.
• Further readings:
o HTTP Compression at Wikipedia
o Speed Web Delivery With HTTP Compression – By IBM DeveloperWorks 8. Better Coding
This is for websites which does not use any ready-to-use systems like Wordpress, Drupal, ExpressionEngine or similar (if you’re using these then you’re lucky as they are already well-coded).
Besides the better XHTML & CSS coding, the dynamic coding of the website directly effects the performance.
As you can guess, this is a huge subject. But there are some major things like:
• Seperate the static & dynamic content. This will help writing less-code.
• Create smart & effective functions. For ex: if you’re going to use a user’s name & birthdate at the same page, don’t run 2 queries or functions, your function must call 2 of them. Simply, try to do everything once.
• Connect to the database as few as you can & once connected, call only the data you need.
• Try to keep database sizes small. If you’ve a large database, sometimes seperating it into several databases perform better, specially for the data which is reached not so often. From the server’s point of view: 4-250mbs of dbs perform better than 1-1gb of db.
9. Cache Webpages
Caching is a superb way of decreasing the stress on the server by running more static files & less queries. It simply saves a static, HTML version of the page to be displayed & displays that file rather than the dynamic one.
For CMS applications like Wordpress, there are already ready-to-use caching plugins (like WP-Cache). For PHP, here is a great article from SitePoint.
A small note, caching can also be done at the web server level. But if you’re on a shared hosting account, you better be lucky to have it on.
Site loading speed depends roughly on these factors:

1. Hosting server
a) speed (DNS timing test from http://www.dnsstuff.com/ )
- server hardware: processor, RAM(?)
- server connection to internet (can somone say what is considered as fast xxMB/s ? )
b) location (IP information from http://www.dnsstuff.com/ )
Site will open slower for a visitor from China then for US visitor if the hosting server is located in US. Check for any site how fast it opens from Europe, China, US : http://alertra.com . You can ask some friends from various parts of the world (via MSN...) to open your site and tell you secunds until opening.
c) crowdness
Check how many domains are already hosted on your nameserver: http://www.domaintools.com/ns-spy/ You don't even not need to know your nameserver url, just input your domain and it will tell you nameserver's name. Then input nameserver. (You can check any domain you want, not only one you own).

(Some) hosting servers arranged by speed/continent/country:
http://HOSTINGSPEEDS.com (http://web.mail386.com/util/go.php?url=http%3A%2F%2FHOSTINGSPEEDS.com&Horde=6d76f3c60175c07224d14a07b49f6664)

2. Your connection type and current speed: http://speedtest.net You can set up results as Mb (megabits) or MB (megabytes).

3. Your site's Home page size/speed websiteoptimization (http://www.websiteoptimization.com/services/analyze/) test from the first post. Optimal Home page size does not exceed 100Kb.



A solid way to make your website faster is have your site coded to W3C standards.


Ways to speed up your website
HTML issues:
- Use CSS where possible: Bees because path style sheets load faster than those web sites designed with font tags and tables, and also it’s much faster and easier to make changes. (Some resources on CSS –
http://www.webcredible.co.uk/user-fr…resources/css/
http://www.websitetips.com/css/ )
- Stay clear of nested tables: Nested tables are basically tables within tables, but too many of theses can really slow down the browser. When a page loads the browser starts from the top and goes down in a consecutive manner, with nested tables it has to find the end of the table before it can display the entire thing.
- Specifying height and width: For tables and images it’s a good idea to specify their height and width, as it helps out the browser and therefore speeds up the process.
Page size:
- Reduce the number of images where possible: Most common causes of slow web pages are images, but they are also the easiest to fix. Try to eliminate repeat and unnecessary images, so they are not downloaded the second time. And also try not to use images for words, unless it’s absolutely necessary reason being the download time and also they can’t be searched.
- Reduce the size of images: Everybody uses different techniques (e.g. converting to JPEG), but as long as the images are compressed it’s beneficial for everyone.
- Remove unnecessary multimedia: This includes video, audio, flash and animation, if it isn’t important then it shouldn’t be on the page.
- Remove unnecessary scripts: Some codes can slow down the site, consider evaluating the codes and making them better if possible.
- Remove unnecessary META tags and META content: META tags don’t achieve very much anymore, people used them for search engine optimization but due to misuse they don’t hold much importance in Search Engine Optimization.
Web host:
- Bandwidth: Make sure you have enough bandwidth allocated, it’s a good idea to attain more bandwidth then needed just in case of a sudden rise in traffic. If you’re website is nearing its limit the website speed can decline significantly.
- Capacity of severs: There’s a limit as to how many people can access your website so once again if your web site is growing in traffic, you should consider upgrading your service.

Thursday, October 29, 2009

GIS Management Strategies and Issues

Common “success strategies” that are often cited include:

• Establish executive level leadership.

• Have a project champion.

. Establish an identity and visibility for the GIS project.

• Form committees, workgroups or teams.

• Formalize the budget for the whole GIS project.

• Hire pre-trained staff.

• Establish a GIS job class.

• Conduct an initial GIS educational event.

• Perform pilot projects.

• Provide early deliverables.

• Build your database on the highest accuracy data you can.

Bootstrap the GIS with inexpensive, low accuracy,high utility data.

Establish a GIS department.

• Initiate GIS in a low-level work unit.

• Use an enterprise GIS model.

• Start small.


Craigslist Tips & Resources


IP's

· Check what IP address your a using online at any given time, but most importantly for craigslist marketing, it is the location of the IP that is the most significant. Make your initial posts in the wrong city and you account will be flagged and you will never post a live ad to that account PERIOD. Once you account, IP, headline, content has been flagged...never try and use it again. Once flagged by the craigslist programs these resources are obsolete.

· http://www.ip-adress.com/

URL Shorteners

· There are plenty online for you to choose from. Simply google the term. Don't bother trying to use the ones that are known for being popular with internet marketers, like, viralurl, tinyurl, yatu etc...

· Try this one to get you started. Scroll down midway on the screen and you will see a list of "services not reviewed" - these links will take you to external URL shorteners that are less common with online marketers (well maybe until now - the flip side of sharing all your secrets!)

· http://notlong.com/links/

Buying Domain Names

For as little as a couple of dollar's you can purchase a domain name. (consider the cheapest options first) Set your domain up so that it frame redirects to another destination (your website or lead capture page for example). If you choose a unique name that has never been registered before this is better, cause then you know it isn't blacklisted on craigslist yet. This domain will do for craigslist posting for a while until it gets picked up by the bots. It doesn't matter what name you choose, but I wouldn't use words like 'make money' 'internet marketing' ....

Linking To Other Ads

Take the url for an ad you have posted on another website and use that url for your craigslist marketing. Sending people to a video link is another option.

How To Have Your URL Temporarly Whitelisted

So by now you understand a little more about how craigslist works and what types of things will get your ads ghosted.

Great! Let's work the system and use craigslists rules to our advantage.

How? Here is one of my best tips, but it requires a little more investment on your part. If you are already considering purchasing software, auto IP changing cards etc you can digg a little deeper and give your ads a better chance of sticking by adopting this trick.

· Pay for a ad in one of the cities where craigslist is charging per post. Then you have a URL that is listed as safe on the craigslist system at least for the period that your payment covers. The prices vary from city to city so check around and find the cheapest city.

· Using this domain, create multiple sub-domains to use for your bulk posting submissions. Too easy

Just be sure to check that your domain service provider allows unlimited sub-domains at no extra charge to you. If yours doesn't, simple, find one that does and use their service instead.