Support Overview

Tutorials

Usage Examples

Upgrade Information

FAQ

New Release History

You are here:   Visualware >   MyConnection Server >   Support >   Online Manual Overview >   SQL Examples

SQL Examples

Setting up MySQL Database Tables

Sub section menu:

The commands in this section are for MySQL and assumes a MySQL database has already been installed and created.

The CREATE TABLE commands on the right have to be entered separately.

It's NOT NECESSARY to have every test, just pick and choose the results and tables required.

If for any reason these commands aren't working or an error has been spotted please don't hesitate to let us know.

CREATE TABLE tests (recordid int, testid int, time varchar(40), timeint bigint, detaillink varchar(128), sid varchar(255), ip varchar(64), dnsname varchar(64), cc varchar(2), isp varchar(64), PRIMARY KEY (recordid));

CREATE TABLE accessct (recordid bigint, testid bigint, dspeed bigint, uspeed bigint, qos int, rtt int, maxpause int, maxroutespeed bigint, maxlinespeed bigint, concurrenttcp float, tcpforcedidle float, tcprxpooo int, tcprxbooo int, tcprxpow int, tcprxbow int, tcprxdop int, tcprxdob int, tcprxpdp int, tcprxpdb int, tcprxcrcerr int, tcprxboff int, tcprxts int, tcpbyteslost int, uqos int, umaxpause int, umaxlinespeed bigint, uconcurrenttcp float, utcpforcedidle float, ethrxftl int, ethrxnoal int, ethrxsf int, ethrxcrcerr int, ethrxovr int, ethrxtrunc int, dtesttype varchar(6), version varchar(128), runtime int, freeq int, PRIMARY KEY (recordid), UNIQUE KEY (testid));

CREATE TABLE myfirewall (recordid int, testid int, avgresponse int, minresponse int, maxresponse int, ports int, protocol int, PRIMARY KEY (recordid), UNIQUE KEY (testid));

CREATE TABLE myhispeed (recordid int, testid int, dspeed bigint, uspeed bigint, qos int, uqos int, rtt int, maxpause int, avgpause int, bandwidth bigint, routespeed bigint, forcedidle int, routeconc int, dtesttype varchar(6), utesttype varchar(6), PRIMARY KEY (recordid), UNIQUE KEY (testid));

CREATE TABLE mycapacity (recordid int, testid int, dcapacity bigint, ucapacity bigint, dpackets int, upackets int, packetsize int, qos int, PRIMARY KEY (recordid), UNIQUE KEY (testid));

CREATE TABLE myiptv (recordid int, testid int, jitter1 float, loss1 float, order1 float, jitter2 float, loss2 float, order2 float, jitter3 float, loss3 float, order3 float, PRIMARY KEY (recordid), UNIQUE KEY (testid));

CREATE TABLE myroute (recordid int, testid int, ipto varchar(64), hops int, endms int, maxms int, endloss int, maxloss int, ipfrom varchar(64), nameto varchar(128), PRIMARY KEY (recordid), UNIQUE KEY (testid));

CREATE TABLE myspeed (recordid int, testid int, dspeed bigint, uspeed bigint, qos int, rtt int, maxpause int, avgpause int, bandwidth bigint, routespeed bigint, forcedidle int, routeconc float, dtesttype varchar(6), utesttype varchar(6), PRIMARY KEY (recordid), UNIQUE KEY (testid));

CREATE TABLE myvideo (recordid int, testid int, ajitter float, vjitter float, aloss int, vloss int, adiscards int, vdiscards int, PRIMARY KEY (recordid), UNIQUE KEY (testid));

CREATE TABLE myvoip (recordid int, testid int, jitter float, djitter float, loss float, dloss float, uorder float, dorder float, discards float, mos float, PRIMARY KEY (recordid), UNIQUE KEY (testid));

Creating an SQL Profile to pass results to the newly formed table(s)

The commands on the right can be entered into MyConnection Server (MCS) when creating a new SQL Profile, as shown here.

It's IMPORTANT that the names proceeding the INSERT INTO statement match those of the SQL database.

If for any reason these commands aren't working or an error has been spotted please don't hesitate to let us know.

INSERT INTO tests (recordid, testid, time, timeint, detaillink, sid, ip, dnsname, cc, isp) VALUES (%RECORDID%, %TESTID%, '%TIME%', %TIMEINT%, '%DETAILLINK%', '%SID%', '%IP%', '%DNSNAME%', '%CC%', '%ISP%');

[speed] INSERT INTO myspeed (recordid, testid, dspeed, uspeed, qos, rtt, maxpause, avgpause, bandwidth, routespeed, forcedidle, routeconc, dtesttype, utesttype) VALUES (%RECORDID%, %TESTID%, %SPEED.DSPEED%, %SPEED.USPEED%, %SPEED.QOS%, %SPEED.RTT%, %SPEED.MAXPAUSE%, %SPEED.AVGPAUSE%, %SPEED.BANDWIDTH%, %SPEED.ROUTESPEED%, %SPEED.FORCEDIDLE%, %SPEED.ROUTECONC%, '%SPEED.DTESTTYPE%', '%SPEED.UTESTTYPE%');

[firewall] INSERT INTO myfirewall (avgresponse, minresponse, maxresponse, ports, protocol) VALUES (%FIREWALL.AVGRESPONSE%, %FIREWALL.MINRESPONSE%, %FIREWALL.MAXRESPONSE%, %FIREWALL.PORTS%, %FIREWALL.PROTOCOL%);

[hispeed] INSERT INTO myhispeed (recordid, testid, dspeed, uspeed, qos, uqos, rtt, maxpause, avgpause, bandwidth, routespeed, forcedidle, routeconc, dtesttype, utesttype) VALUES (%HISPEED.DSPEED%, %HISPEED.USPEED%, %HISPEED.QOS%, %HISPEED.UQOS%, %HISPEED.RTT%, %HISPEED.MAXPAUSE%, %HISPEED.AVGPAUSE%, %HISPEED.BANDWIDTH%, %HISPEED.ROUTESPEED%, %HISPEED.FORCEDIDLE%, %HISPEED.ROUTECONC%, %HISPEED.DTESTTYPE%, %HISPEED.UTESTTYPE%);

[voip] INSERT INTO myvoip (recordid, testid, jitter, djitter, loss, dloss, uorder, dorder, discards, mos) VALUES (%RECORDID%, %TESTID%, %VOIP.JITTER%, %VOIP.DJITTER%, %VOIP.LOSS%, %VOIP.DLOSS%, %VOIP.ORDER%, %VOIP.DORDER%, %VOIP.DISCARDS%, %VOIP.MOS%);

[video] INSERT INTO myvideo (recordid, testid, ajitter, vjitter, aloss, vloss, adiscards, vdiscards) VALUES (%RECORDID%, %TESTID%, %VIDEO.AJITTER%, %VIDEO.VJITTER%, %VIDEO.ALOSS%, %VIDEO.VLOSS%, %VIDEO.ADISCARDS%, %VIDEO.VDISCARDS%);

[iptv] INSERT INTO myiptv (recordid, testid, jitter1, loss1, order1, jitter2, loss2, order2, jitter3, loss3, order3) VALUES (%RECORDID%, %TESTID%, %IPTV.JITTER1%, %IPTV.LOSS1%, %IPTV.ORDER1%, %IPTV.JITTER2%, %IPTV.LOSS2%, %IPTV.ORDER2%, %IPTV.JITTER3%, %IPTV.LOSS3%, %IPTV.ORDER3%);

[route] INSERT INTO myroute (recordid, testid, ipto, hops, endms, maxms, endloss, maxloss, ipfrom, nameto) VALUES (%RECORDID%, %TESTID%, '%ROUTE.IPTO%', %ROUTE.HOPS%, %ROUTE.ENDMS%, %ROUTE.MAXMS%, %ROUTE.ENDLOSS%, %ROUTE.MAXLOSS%, '%ROUTE.IPFROM%', '%ROUTE.NAMETO%');

[capacity] INSERT INTO mycapacity (recordid, testid, dcapacity, ucapacity, dpackets, upackets, packetsize, qos) VALUES (%RECORDID%, %TESTID%, %CAPACITY.DCAPACITY%, %CAPACITY.UCAPACITY%, %CAPACITY.DPACKETS%, %CAPACITY.UPACKETS%, %CAPACITY.PACKETSIZE%, %CAPACITY.QOS%);

[act] INSERT INTO accessct (recordid, testid, dspeed, uspeed, qos, rtt, maxpause, maxroutespeed, maxlinespeed, concurrenttcp, tcpforcedidle, tcprxpooo, tcprxbooo, tcprxpow, tcprxbow, tcprxdop, tcprxdob, tcprxpdp, tcprxpdb, tcprxcrcerr, tcprxboff, tcprxts, tcpbyteslost, uqos, umaxpause, umaxlinespeed, uconcurrenttcp, utcpforcedidle, ethrxftl, ethrxnoal, ethrxsf, ethrxcrcerr, ethrxovr, ethrxtrunc, dtesttype, version, runtime, freeq) VALUES (%RECORDID%, %TESTID%, %ACT.DSPEED%, %ACT.USPEED%, %ACT.QOS%, %ACT.RTT%, %ACT.MAXPAUSE%, %ACT.MAXROUTESPEED%, %ACT.MAXLINESPEED%, %ACT.CONCURRENTTCP%, %ACT.TCPFORCEDIDLE%, %ACT.TCPRXPOOO%, %ACT.TCPRXBOOO%, %ACT.TCPRXPOW%, %ACT.TCPRXBOW%, %ACT.TCPRXDOP%, %ACT.TCPRXDOB%, %ACT.TCPRXPDP%, %ACT.TCPRXPDB%, %ACT.TCPRXCRCERR%, %ACT.TCPRXBOFF%, %ACT.TCPRXTS%, %ACT.TCPBYTESLOST%, %ACT.UQOS%, %ACT.UMAXPAUSE%, %ACT.UMAXLINESPEED%, %ACT.UCONCURRENTTCP%, %ACT.UTCPFORCEDIDLE%, %ACT.ETHRXFTL%, %ACT.ETHRXNOAL%, %ACT.ETHRXSF%, %ACT.ETHRXCRCERR%, %ACT.ETHRXOVR%, %ACT.ETHRXTRUNC%, '%ACT.DTESTTYPE%', '%ACT.VERSION%', %ACT.RUNTIME%, %ACT.FREEQ%);

 

MyConnection Server

Home
Online Testing Portal
Download
Purchase
Resources
Support

Visualware Products

VisualRoute
eMailTrackerPro
Visual IP Trace

   

© Visualware Inc. 2014 - All Rights Reserved