Query Network interface with C#

Hello,
I'm developing a C# winforms application under Windows server 2008 (64bit)
Is there a way to query all network interfaces installed in the PC and check their IP address and if there is an ethernet connection (connected \ not connected) ?
I want to do it with Microsoft C# classes. 
Best regards,
Z.V

Hi,
Solution 1:>
Step1:>
UdpClient u = new UdpClient(remoteAddress, 1);
IPAddress localAddr = ((IPEndPoint)u.Client.LocalEndPoint).Address;
Step2:>
foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
IPInterfaceProperties ipProps = nic.GetIPProperties();
// check if localAddr is in ipProps.UnicastAddresses
Solution 2:>
foreach(NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())
if(ni.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 || ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet)
Console.WriteLine(ni.Name);
foreach (UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)
if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
Console.WriteLine(ip.Address.ToString());
Documentation:>
NetworkInterface.GetAllNetworkInterfaces Method
Good Tutorial:>
http://www.codeproject.com/Articles/64975/Detect-Internet-Network-Availability
Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

Similar Messages

  • URGENT !!! Two physical network interface with two completely different subnets - No bridges - cannot connect both

    This is my urgent problem:
    I have a physical machine with two physical network interfaces. I have a VMWARE player installed and a virtual machine that must use both cards on two different subnets, one directly public on the router and one intranet inside the company.
    How can I just tell one net card to go on that sub and the other on the public sub ?  Going crazy. Please help.
    Thanks,
              P.

    Using VMware Player Virtual Network Editor, create a additional bridged VMnet and bind each bridged VMnet to a different physical network adapter... on virtual machine, create a virtual network adapter to each subnet, and bind each virtual network adapter to a different bridged VMnet.
    For additional help with virtual network editor, check this KB: VMware KB: Using the Virtual Network Editor in VMware Workstation

  • Intel network interface with Solaris 10 x86

    Hi,
    I have been Googling all evening to try and find a solution to this, but here is the problem:
    I have a PC built around an Asus P4C800-E system board, and I have Solaris 10 x86 01/2006 installed. I would like to get the Ethernet interface (Intel adaptor, running on a CSA bus) up and running - but for some reason I can't seem to get the driver to bind to the proper address (pci8086,1019 - from what I have been able to find out): It instead insists on binding to pci1043,80f7. Even though pci8086,1019 is listed in /etc/device_aliases, it won't play nice.
    I know the NIC is working, and have tried it under other OSes (including Linux).
    Although Solaris x86 "sees" something there, and the interface is plumbed (it can even tell when the network link is up or down), I can't get the interface to work - pings do not work, etc.
    Is there a way I can convince the driver to bind to pci8086,1019 instead of pci1043,80f7?
    Any assistance would be greatly appreciated.
    Joovilhar.

    <table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td class="SmallText"><b>Joovilhar wrote on Wed, 08 March 2006 02:14</b></td></tr><tr><td class="quote">
    I can't seem to get the driver to bind to the proper address (pci8086,1019 - from what I have been able to find out): It instead insists on binding to pci1043,80f7. Even though pci8086,1019 is listed in /etc/device_aliases, it won't play nice.
    </td></tr></table>
    Is 1043,80f7 the device's pci subsystem vendor and subsystem device id?
    And 8086,1019 is the normal vendor/device id?
    In this case everything would work as expected.
    What is listed by "/usr/X11/bin/scanpci -v" for the ethernet controller?
    <table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td class="SmallText"><b>Quote:</b></td></tr><tr><td class="quote">
    I know the NIC is working, and have tried it under other OSes (including Linux).
    Although Solaris x86 "sees" something there, and the interface is plumbed (it can even tell when the network link is up or down), I can't get the interface to work - pings do not work, etc.
    </td></tr></table>
    Try to boot the kernel with various settings of the "acpi-user-options" variable,
    to disable / enable ACPI. In previous Solaris x86 releases, when
    something went wrong configuring an interrupt vector for a nic device,
    the typical end result is a nic that is unable to receive incomming
    packets. Maybe your Asus P4C800-E is still problematic with ACPI, with
    S10 x86 1/2006, and needs the acpi-user-options workaround.
    http://blogs.sun.com/roller/page/danasblog?anchor=configurin g_solaris_acpi_at_boot
    To change the "acpi-user-options" variable, edit the grub boot command
    line and edit the "multiboot" line, e.g. append "-Bacpi-user-options=0x2".

  • Oracle 10g RAC - public network interface down

    Hi all,
    I have a question about Oracle RAC and network interface.
    We're using Oracle 10gR2 RAC with two nodes on Linux Red Hat.
    Let's assume that the public network interface goes down.
    I would like to know what happens with existing connections
    on node with network interface with problems.
    Are connections frozen, actives?
    Can the users continue to use theses existing connections using the another node of RAC?
    I know that the listener goes down and any other connections is allowed.
    Thank you very much!!!!

    Tads wrote:
    Hi all,
    I have a question about Oracle RAC and network interface.
    We're using Oracle 10gR2 RAC with two nodes on Linux Red Hat.
    Let's assume that the public network interface goes down.
    I would like to know what happens with existing connections
    on node with network interface with problems.
    Are connections frozen, actives?
    Can the users continue to use theses existing connections using the another node of RAC?If the interface is down? what do you think? All connections to this node will die. How does your application handle fail-over, does it attempt to reconnect or just have a complete application failure?
    You should spend some time in a test lab where you can test this stuff for yourself. Read the documentation and there are tons of sites out there that purport to have all of your RAC/TAF/FAN/FAF questions. - I would read and trust the documentation first.
    >
    I know that the listener goes down and any other connections is allowed.
    Thank you very much!!!!

  • BadRequest: Virtual machines with secondary network interfaces and virtual machines with no secondary network

    I'm trying to create an "ExtraLarge" VM with multiple NICs.  The New-AzureVM returns the following error:
    BadRequest: Virtual machines with secondary network interfaces and virtual machines with no secondary network
    interfaces are not supported in the same deployment, also a virtual machine having no secondary network interfaces
    cannot be updated to have secondary network interfaces and vice-versa.
    But I have no other VMs.  Or at least I did and then deleted them and all their disks.  The service has no deployments (either staging or production).
    Why is New-AzureVM complaining about a mismatch of VMs with and without secondary network interfaces when no other VMs exist?
    I have tried many things to fix this, including the deletion of ALL of my resources.  I have deleted and created the service many times, both with an affinity group and without.  I have a screen print of the -debug output if your interested.
    Thanks for the outstanding help.

    Hi Ron,
    IMPORTANT NOTE: Please do not post the CONFIDENTIAL DETAILS ever on the public forums, this is HIGH RISK action.
    Please send an email with your contact details to my email
    [email protected] so that I guide you on steps which help you come out of the current scenario. Thank you for understanding.
    I suggest you to create a new VNET and new VM with cloud services. Create Multiple NIC VM. Let us know the results.
    Ref:
    http://azure.microsoft.com/blog/2014/10/30/multiple-vm-nics-and-network-virtual-appliances-in-azure/
    http://blogs.technet.com/b/canitpro/archive/2014/11/04/step-by-step-create-a-vm-with-multiple-nics-in-azure.aspx
    If you are unable to create a VM with multiple NIC, please open a support case as it requires more confidential information which is out of scope of FORUM support offerings.
    Regards,
    Girish

  • Solaris 10 u11 : Is it possible to mix IPMP with vertual network interface

    Hi
    I have a system with 4 Ethernet interfaces , I'd like to try to have virtual network interface on two of them . then configure IPMP between each two.
    - Is it possible to mix IPMP and VNIC ?
    - online , I found posts about having vnic on solaris by creating additional interface file (ex, /etc/hostname.bge0:1 ) and also the IPMP create such interface?
    - How can I know which IPMP version installed on the system ? and how to know I'm reading the right configuration guide?
    - on what basis should i choose the type of IPMP for my system (Link-based or Probe-based)
    Thanks in advance
    HEBA

    Hi.
    IPMP can coexist with VNIC.
    IPMP - part of Solaris. So you not need check version of IPMP. Just read Docs for Solaris.
    http://docs.oracle.com/cd/E23823_01/html/816-4554/ipmptm-1.html#scrolltoc
    It's not clear what Vnic you plan use. Is it VLAN or just additional IP on interface ?
    For test address of IPMP you should configure interface like bge0:1 with additional options.
    Regards.

  • Wireless capability Compaq Presario SR1950NX with Integrated 10/100 Base-T networking interface

    Wireless capability available for 6-year old Compaq Presario SR1950NX desktop with "Integrated 10/100 Base-T networking interface" ?  How best to do this. Wireless adapter via USB 2.0 ?  Have Time Warner's modem and my Linksys N750  router in another room, and want to use wireless printer in a third room.  Router currently serves Smart TV and a Lap Top in different rooms.

    Hi:
    Yes, the easiest thing to do is to purchase an external usb wireless adapter.
    I just got this one for my desktop.
    http://www.linksys.com/en-eu/products/adapters/AE3000
    You can read some customer reviews on the adapter at the link below.
    http://www.newegg.com/Product/Product.aspx?Item=N82E16833124477
    I am very happy with mine. It connects to my Linksys E4200 router at 450 MBPS on my N only 5.0 GHz band.
    I believe that is the maximum throughput for the AE 3000 wireless adapter.
    I also like that it comes with the 3' usb extension cable and cradle to position the device for the best reception.

  • Cannot see network interface counters under Solaris 10 with Sun SMA

    Hi,
    Noticed this a few weeks ago. When I do a discovery of a Sun server running the Net-SNMP SMA that is a zone, I can see the network interfaces:
    .1.3.6.1.2.1.2.2.1.2.1 = STRING: lo0:1
    .1.3.6.1.2.1.2.2.1.2.2 = STRING: ipge1:1
    .1.3.6.1.2.1.2.2.1.3.1 = INTEGER: softwareLoopback(24)
    .1.3.6.1.2.1.2.2.1.3.2 = INTEGER: ethernetCsmacd(6)
    .1.3.6.1.2.1.2.2.1.4.1 = INTEGER: 8232
    .1.3.6.1.2.1.2.2.1.4.2 = INTEGER: 1500
    .1.3.6.1.2.1.2.2.1.5.1 = Gauge32: 127000000
    .1.3.6.1.2.1.2.2.1.5.2 = Gauge32: 100000000
    But the counters all come up as 0:
    .1.3.6.1.2.1.2.2.1.8.1 = INTEGER: up(1)
    .1.3.6.1.2.1.2.2.1.8.2 = INTEGER: up(1)
    .1.3.6.1.2.1.2.2.1.9.1 = Timeticks: (0) 0:00:00.00
    .1.3.6.1.2.1.2.2.1.9.2 = Timeticks: (0) 0:00:00.00
    .1.3.6.1.2.1.2.2.1.10.1 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.10.2 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.11.1 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.11.2 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.12.1 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.12.2 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.13.1 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.13.2 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.14.1 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.14.2 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.15.1 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.15.2 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.16.1 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.16.2 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.17.1 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.17.2 = Counter32: 0
    .1.3.6.1.2.1.2.2.1.18.1 = Counter32: 0
    This happens consistently across all zones we have running. We can monitor traffic for a zone via the hwardware node SNMP daemon, but certainly seems like we should be able to also monitor network interface utilization via SNMP from any zone as well.
    Has anyone encountered this / know of a fix or workaround for this? We have a valid Sun support contract but they unfortunately have been REALLY BAD about answering questions related to the SMA Net-SNMP agent thus far.
    - Max

    <table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td class="SmallText"><b>tcbarrett wrote on Fri, 28 October 2005 15:37</b></td></tr><tr><td class="quote">
    SunOS Release 5.10 Version s10_69 64-bit
    </td></tr></table>
    Why are you trying to run an old obsolete pre-release version of Solaris 10?
    I'd suggest that you install the final released product.

  • How many network interfaces the Airport Extreme (a/b/g/n with USB) has?

    I am trying to use an SNMP client on the computer to monitor my network traffic.
    I using the Airport Extreme (AEBS) to connect to the internet using PPPoE. wifi and ethernet (RJ45) ports are used for LAN
    Now after setting up the SNMP client, it shows so many interfaces the AEBS has, and most names of the interfaces cant give me a clue about what they are:
    1: mgi0
    2. mgi1
    3. mv0
    4. mv1
    5. lo0
    6. wlan0
    7. wlan1
    8. pppoe0
    9. bridge0
    The "pppoe0" interface is self evident. That's the overall traffic in and out of the router to the Internet.
    But I also want to monitor the traffic on my local computer, which is a Macbook Pro connected thru wifi. I also have a few other windows boxes on the LAN using wifi or ethernet connect.
    So I need to what those interfaces are.
    Is there any documentation regarding the network interfaces of the AEBS?

    Gabriel Dillaine wrote:
    Now after setting up the SNMP client, it shows so many interfaces the AEBS has, and most names of the interfaces cant give me a clue about what they are:
    This post on another forum will explain some of those:
    http://forums.macrumors.com/showthread.php?t=846079

  • Unable to connect to Mac Pro with 2 network interfaces

    The Mac Pro has 2 network interfaces. The first one is connected to a local network and the other interface has an external IP address (connected directly to the internet).
    What we want to be able to do is to connect to the computer from home through the external interface and then be able to run applications on it that access a server on the local network. But, from home it is showing "Offline" in the "Current Status" column. If we try to connect it fails.
    The thing I can't figure out is why I can access it from work on a different local network, using the external IP address. It works fine that way. There are no hardware firewalls that could be causing it. So either way, it is coming into the computer through the external adapter.
    I'm stumped... Maybe it's something simple that I'm just missing. If you have any idea how I can access the computer from home please let me know so I can try it.
    Thanks.

    Just installed TeamViewer and we're using that. Works great.

  • Deep problem with starting SOA suite when network interface is up......

    Hi
    thank you for reading my post
    I have finally installed SOA suite in Advanced mode.
    When i install the SOA suite my network interface was down and now that the network inteface is up the SOA suite does not starts.
    even if i disable the network interface and start the soa suite, i can not use it when i am connected to the network (My network IP is static).
    for example when i am connected to network EM does not opens and gives the folowing error :
    Error connecting to OPMN (is it running?): Connection refused: connect
    oracle.ias.opmn.optic.OpticBadConnectException: Error connecting to OPMN (is it running?): Connection refused: connect at oracle.ias.opmn.optic.OpmnPhone.dialOpmn(OpmnPhone.java:451) at oracle.ias.opmn.optic.OpmnPhone.makePhoneCall(OpmnPhone.java:178) at oracle.ias.opmn.optic.OpmnPhone.request(OpmnPhone.java:130) at oracle.ias.opmn.optic.OpmnQuery.getBuf(OpmnQuery.java:347) at oracle.ias.opmn.optic.OpmnQuery.getDom(OpmnQuery.java:467) at oracle.ias.opmn.optic.OpmnQuery.getProc(OpmnQuery.java:615) at oracle.sysman.ias.studio.cluster.OpticTopologyAdminBean.getOrganizedApps(OpticTopologyAdminBean.java:540) at oracle.sysman.ias.studio.cluster.OpticTopologyAdminBean.listApplications(OpticTopologyAdminBean.java:507) at oracle.sysman.ias.studio.cluster.TopologyHelper.getApplicationsHGrid(TopologyHelper.java:1382) at oracle.sysman.ias.studio.cluster.TopologyHelper.prepareData(TopologyHelper.java:1283) at oracle.sysman.ias.studio.sdk.AbstractController.prepareData(AbstractController.java:875) at oracle.sysman.emSDK.svlt.PageHandler.handleRequest(PageHandler.java:391) at oracle.sysman.emSDK.svlt.EMServlet.myDoGet(EMServlet.java:765) at oracle.sysman.emSDK.svlt.EMServlet.doGet(EMServlet.java:283) at oracle.sysman.ias.studio.app.StudioConsole.doGet(StudioConsole.java:297) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64) at oracle.sysman.ias.studio.app.BrowserVersionFilter.doFilter(BrowserVersionFilter.java:75) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) at oracle.sysman.ias.studio.app.MultipleJVMFilter.doFilter(MultipleJVMFilter.java:85) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17) at oracle.sysman.ias.studio.app.PostLogonFilter.doFilter(PostLogonFilter.java:80) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17) at oracle.sysman.ias.studio.app.ShortHostnameRedirectFilter.doFilter(ShortHostnameRedirectFilter.java:68) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:619) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)Is there any solution for this?

    By accessing. I mean accessing them through thier network ip address through ssh or an xterm or any other network service the zone is running.
    say I have all 3 zone running each in a xterm.
    I click on zone 1 or global zone and both this 2 xterm windown respond and I can run commands.
    If I swich to the zone 2 zterm, zone 1 and global zone freeze, and zone 2 takes 30 sec - 1 min to start responding.
    If I am in a ssh session instead of a xterm the ssh session will stop responding and session will get disconnected.

  • IDSM-2 Upgrade procedure (network interface query)

    Hello Guys,
    I am planning to upgrade IDSM-2  software on a 6500 chassis to the latest Software version, but I am confused in one thing if I am connecting my console directly to the Sup engine and log in into the IDSM, which interface can I use to push the image file while I am in Maintenance partition for upgarde. Cause I cannot take any kind of telnet session, I wil have to connect my laptop's network interface directly to the switch, unsure through which interface will I be able to use for this purpose, any help would be appreciated.
    Thnx
    Krishna

    Which IOS type that you are using on the supervisor? catos or ios? The commands will differ between those two types. Upgrading IDSM is similar to upgrading other service module (FWM). Basically you can use the supervisor interface to transfer the file to the IDSM. Below you can find the procedure on how to reimage the application image from the maintenance partition:
    http://www.cisco.com/en/US/products/hw/modules/ps2706/products_configuration_example09186a00800a3d42.shtml#newreimage

  • Install solaris via jumpstart with 2 network interfaces

    Hi guys,
    I'm trying to deploy Solaris 10 on a LDOM , using Jumpstart server. The LDOM must have 2 network interfaces and 2 default routes. Here's the relevant part of sysidcfg file:
    network_interface=vnet0 {primary
                    hostname=aaaaaaaaa
                    ip_address=aaa.aaa.aaa.aaa
                    netmask=255.255.240.0
                    protocol_ipv6=no
                    default_route=bbb.bbb.bbb.bbb
    network_interface=vnet1 {
                    hostname=bbbbbbbbbbb
                    ip_address=ccc.ccc.ccc.ccc
                    netmask=255.255.248.0
                    protocol_ipv6=no
                    default_route=ddd.ddd.ddd.ddd
    }After {ok} boot net - install, I get these messages:
    Using RPC Bootparams for network configuration information.
    Attempting to configure interface vnet1...
    Skipped interface vnet1
    Attempting to configure interface vnet0...
    Configured interface vnet0
    USB keyboard
    Reading ZFS config: done.
    Setting up Java. Please wait...
    Serial console, reverting to text install
    Beginning system identification...
    Searching for configuration file(s)...
    Using sysid configuration file xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:/sysidcfg
    Search complete.
    Discovering additional network configuration...
    Completing system identification...and then unattended install stops and goes into interactive menu:
    Default Route     Error for vnet1     ────────────────────────────────────────────────
      The route ddd.ddd.ddd.ddd could not be added at this time. If you     wish to     accept
      the route provided, the route     will be     added to the /etc/defaultrouter     file
      to be     used at     reboot.     If you choose not to accept your choice, you will be
      asked     to enter network information again for this interface.
          Accept Route
          ────────────
          [X] Yes
          [     ] NoAfter I choose "yes" , the installation goes back to unattended (automated) state.
    Any ideas why installation breaks when adding second default route?
    If I delete the line default_route=ddd.ddd.ddd.ddd, the installation is not interrupted.
    Many thanks,
    kido
    Edited by: kido on Dec 29, 2010 6:10 PM

    Hello again,
    First of all, if I delete the second default route from sysidcfg, the installation performs uninterrupted, but vnet1 is not brought up after reboot. I get a message like: vnet1 is not a valid interface name...or something similar...
    Regarding multiple default routes now... As long as "man defaultrouter" and "man sysidcfg" state that multiple routes are supported, I would expect this to work...or at least I need a way of installing 2 NICs without human intervention...
    I will try to use some post install script instead ( will create /etc/hostname.vnet1 and add second route to /etc/defaultrouter) and will let you know the results.

  • Database design to support parameterised interface with MS Excel

    Hi, I am a novice user of SQL Server and would like some advice on how to solve a problem I have. (I hope I have chosen the correct forum to post this question)
    I have created a SQL Server 2012 database that comprises approx 10 base tables, with a further 40+ views that either summarise the base table data in various ways, or build upon other views to create more complex data sets (upto 4 levels of view).
    I then use EXCEL to create a dashboard that has multiple pivot table data connections to the various views.
    The users can then use standard excel features - slicers etc to interrogate the various metrics.
    The underlying database holds a single days worth of information, but I would like to extend this to cover multiple days worth of data, with the excel spreadsheet having a cell that defines the date for which information is to
    be retrieved.(The underlying data tables would need to be extended to have a date field)
    I can see how the excel connection string can be modified to filter the results such that a column value matches the date field,
    but how can this date value be passed down through all the views to ensure that information from base tables is restricted for the specied date, rather than the final results set being passed back to excel - I would rather not have the server resolve the views
    for the complete data set.
    I considered parameterisation of views, but I dont believe views support parameters, I also considered stored procedures, but I dont believe that stored procedures allow result sets to be used as pseudo tables.
    What other options do I have, or have I failed to grasp the way SQL server creates its execution plans and simply having the filter at the top level will ensure the result set is minimised at the lower level? (I dont really want the time taken for the dashboard
    refresh to increase - it currently takes approx 45 seconds following SQL Server Engine Tuning Advisor recommendations)
    As an example of 3 of the views, 
    Table A has a row per system event (30,000+ per day), each event having an identity, a TYPE eg Arrival or Departure, with a time of event, and a planned time for the event (a specified identity will have a sequence of Arrival and Departure events)
    View A compares seperate rows to determine how long between the Arrival and Departure events for an identity
    View B compares seperate rows to determine how long between planned Arrival and Departure events for an identity
    View C uses View A and view B to provide the variance between actual and planned
    Excel dashboard has graphs showing information retrieved from Views A, B and C. The dashboard is only likely to need to query a single days worth of information.
    Thanks for your time.

    You are posting in the database design forum but it seems to me that you have 2 separate but highly dependent issues - neither of which is really database design related at this point.  Rather you have an user interface issue and an database programmability
    issue.  Those I cannot really address since much of that discussion requires knowledge of your users, how they interface with the database, what they use the data for, etc.  In addition, it seems that Excel is the primary interface for your users
    - so it may be that you should post your question to an excel forum.
    However, I do have some comments.  First, views based on views is generally a bad approach.  Absent the intention of indexing (i.e., materializing) the views, the db engine does nothing different for a view than it does for any ad-hoc query. 
    Unfortunately, the additional layering of logic can impede the effectiveness of the optimizer.  The more complex your views become and the deeper the layering, the greater the chance that you befuddle the optimizer. 
    I would rather not have the server resolve the views for the complete data set
    I don't understand the above statement but it scares me.  IMO, you DO want the server to do as much work as possible since it is closest to the data and has (or should have) the resources to access and manipulate the data and generate the desired
    results.  You DON'T want to move all the raw data involved in a query over the network and into the client machine's storage (memory or disk) and then attempt to compute the desired values. 
    I considered parameterisation of views, but I dont believe views support parameters, I also considered stored procedures, but I dont believe that stored procedures allow result sets to be used as pseudo tables.
    Correct on the first point, though there is such a thing as a TVF which is similar in effect.  Before you go down that path, let's address the second statement.  I don't understand that last bit about "used as pseudo tables" but that sounds more
    like an Excel issue (or maybe an assumption).  You can execute a stored procedure and use/access the resultset of this procedure in Excel, so I'm not certain what your concern is.  User simplicity perhaps? Maybe just a terminology issue?  Stored
    procedures are something I would highly encourage for a number of reasons.  Since you refer to pivoting specifically, I'll point out that sql server natively supports that function (though perhaps not in the same way/degree Excel does).   It
    is rather complex tsql - and this is one reason to advocate for stored procedures.  Separate the structure of the raw data from the user.
    (I dont really want the time taken for the dashboard refresh to increase - it currently takes approx 45 seconds following SQL Server Engine Tuning Advisor recommendations)
    DTA has its limitations.  What it doesn't do is evaluate the "model" - which is where you might have more significant issues.  Tuning your queries and indexing your tables will only go so far to compensate for a poorly designed schema (not that
    yours is - just a generalization).  I did want to point out that your refresh process involves many factors - the time to generate a resultset in the server (including plan compilation, loading the data from disk, etc.), transmitting that data over the
    network, receiving and storing the resultset in the client application, manipulating the resultset into the desired form/format), and then updating the display.  Given that, you need to know how much time is spent in each part of that process - no sense
    wasting time optimizing the smallest time consumer. 
    So now to your sample table - Table A.  First, I'll give you my opinion of a flawed approach.  Your table records separate facts about an entity as multiple rows.  Such an approach is generally a schema issue for a number of reasons. 
    It requires that you outer join in some fashion to get all the information about one thing into a single row - that is why you have a view to compare rows and generate a time interval between arrival and departure.  I'll take this a step further and assume
    that your schema/code likely has an assumption built into it - specifically that a "thing" will have no more than 2 rows and that there will only be one row with type "arrival" and one row with type "departure". Violate that assumption and things begin to
    fall apart.  If you have control over this schema, then I suggest you consider changing it.  Store all the facts about a single entity in a single row.  Given the frequency that I see this pattern, I'll guess that you
    cannot.  So let's move on.
    30 thousand rows is tiny, so your current volume is negligible.  You still need to optimize your tables based on usage, so you need to address that first.  How is the data populated currently?  Is it done once as a batch?  Is it
    done throughout the day - and in what fashion (inserts vs updates vs deletes)?  You only store one day of data - so how do you accomplish that specifically?  Do you purge all data overnight and re-populate?   What indexes
    have you defined?  Do all tables have a clustered index or are some (most?) of them heaps?   OTOH, I'm going to guess that the database is at most a minimal issue now and that most of your concerns are better addressed at the user interface
    and how it accesses your database.  Perhaps now is a good time to step back and reconsider your approach to providing information to the users.  Perhaps there is a better solution - but that requires an understanding of your users, the skillset of
    everyone involved, what you have to work with, etc.  Maybe just some advanced excel training? I can't really say and it might be a better question for a different forum.   
    One last comment - "identity" has a special meaning in sql server (and most database engines I'm guessing).  So when you refer to identity, do you refer to an identity column or the logical identity (i.e., natural key) for the "thing" that Table A is
    attempting to model? 

  • Unable to receive multicast on a multi network interface host

    Can anyone please help?
    I am not able to receive multicast on a multi network interface host.
    This is the code:
    public class LegacyMulticast {
    public static void main(String[] args) throws IOException {
    InetSocketAddress group = new InetSocketAddress("224.10.20.30", 12345);
    NetworkInterface iface = NetworkInterface.getByName("eth3");
    MulticastSocket socket = new MulticastSocket();
    socket.setSoTimeout(5000);
    socket.joinGroup(group , iface);
    byte[] b = new byte[4096];
    DatagramPacket datagram = new DatagramPacket(b, b.length);
    try {
    socket.receive(datagram);
    System.out.println("Success");
    catch (SocketTimeoutException ste) {
    System.out.println("Failure");
    socket.leaveGroup(group, iface);
    The funny thing is that when I start this code, Wireshark detects IGMP join on the correct network interface caused by joinGroup call, followed by constant UDP traffic on correct port which I aim to receive and finally I see correct IGMP leave caused by leaveGroup call and the UDP traffic stops.
    I just don't receive anything on socket.receive call.
    I am trying to figure this one out for days now. Pls help someone :)
    P.S. I suspected security, but System.getSecurityManager() call returns null.
    P.P.S. I also tried implementing this with NIO, but with same result.

    public class LegacyMulticast {
    public static void main(String[] args) throws IOException {
    InetSocketAddress group = new InetSocketAddress("224.10.20.30", 12345);
    NetworkInterface iface = NetworkInterface.getByName("eth3");
    MulticastSocket socket = new MulticastSocket(12345);
    socket.setSoTimeout(5000);
    socket.joinGroup(group , iface);
    byte[] b = new byte[4096];
    DatagramPacket datagram = new DatagramPacket(b, b.length);
    try {
    socket.receive(datagram);
    System.out.println("Success");
    catch (SocketTimeoutException ste) {
    System.out.println("Failure");
    socket.leaveGroup(group, iface);
    This is still not working.
    The multicast is coming from the network (not localhost), OS is Windows 7.
    When I start a multicast stream localy via VLC application on this same group and port, I receive the traffic in this Java application OK.
    Once again, Wireshark detects IGMP join and leave and multicast traffic flow on eth3 network interface initiated by the Java application, but it just doesn't see the UDP datagrams.

Maybe you are looking for

  • Ar_receipt_api_pub.create_and_apply is returning Invalid Transaction Number

    Hi All couple of things 1) Not able to create a receipt and apply against an invoice using this api in only one environment 2) When we try to apply manually, apply to List box does not contain any invoices, even though customer has open invoices exis

  • IDVD to ISO -- Is It Possible ?

    Hi ive just made a full blown iDVD and saved it to a iDVD project file because my iMac is not equipt with a DVD Burner but my other windows (ugly) laptop has got a DVD burner is it possible to turn the iDVD project to an ISO ?

  • Adobe Form- Radio Button!!

    Hi Experts, I am working on the Adobe Form in which the data is coming from the Backend RFC. So my DataSource is binded to the Bapi node. Now my requirement is to add Radio Button for which I have defined in the Dictionary SimpleTypes and binded an a

  • Keyboard Issues in Windows

    I have been using Windows for some time for my Simply Accounting Program with the ability to use the numbers portion of my keyboard, until last week.  For some reason it quit.  How do I get it back?

  • How to retrieve online form with populated fields?

    Greetings, SDN members! I have a WD Java application which embeds an Adobe Interactive Form inside. There are a couple of fields in this form, which are binded to context, as the PDF form itself (througjh binary pdfSource attribute). My scenario requ