Basic listener query

I have two Oracle Instance ORA1 and ORA2 running on Single Server SERVER1.
How do i configure listener on SERVER1 to listen on 1521 for ORA1 and 1522 for ORA2?

You can :
1. Have a single listener on a single port for all database instances
2. Two or more listeners, one for each port for each database instance
3. A single listener listening on multiple ports -- however, it would allow connections to the database instances on each of the ports (thus, if you have a single listener on 1521 and 1522 for database instances ORA1 and ORA2, it would allow connections to both instances on both ports)
This is how you could specify multiple ports for a single listener :
# LISTENER =
#  (ADDRESS_LIST=
#       (ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=1521))
#       (ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=1522))
#   )This is how you could specify separate listeners :
# LISTENER_1521 =
#  (ADDRESS_LIST=
#       (ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=1521))
# LISTENER_1522 =
#  (ADDRESS_LIST=
#       (ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=1522))
#   )The startup/shutdown/admin command would have to specify "LISTENER_1521" or "LISTENER_1522" for each listener.
What you choose to do depends on how you want to manage the environments.
For example, if you have a single listener for multiple databases, each running from a separate ORACLE_HOME and you have to apply a patch to the listener ORACLE_HOME that requires a listener shutdown, it would make the other databases inaccessible for that short time -- so you'd define another listener from another ORACLE_HOME while this listener is down for patching.
Hemant K Chitale
http://hemantoracledba.blogspot.com
Edited by: Hemant K Chitale on Oct 1, 2010 10:47 AM

Similar Messages

  • Basic SQL query scripts for SAP B1

    hi guys,
    do you have any documents, guides or reference links regarding basic SQL query scripts for SAP B1?
    thanks and have a nice day!
    blake p.

    Hi
    You can also check SBONotes.com.
    For sql understanding , you can search in websearch - tsql and it will pop up with informations you need.
    You can also refer to forum once you understand the basic techniques
    Hope this helps
    Bishal

  • Problems with basic spatial query

    I'm trying to learn Oracle Spatial working with 11g R2 and with 3D georeferenced data (specifically data describing buildings in a city).
    But I'm having trouble getting a basic query to work on my dataset (it works for the book example), and I'm trying to do it exactly the way it's done in the Spatial Developer's Guide for 11g.
    To learn how spatial queries work, I set up the cola_markets tables used in the documentation, made the appropriate manual entry in the user_sdo_geom_metadata view and created the index. Having done that, I can run the following simple query (as well as the others in the manual) on the book tables:
    SELECT SDO_GEOM.SDO_DISTANCE(c_b.shape, c_d.shape, 0.005)
    FROM cola_markets c_b, cola_markets c_d
    WHERE c_b.name = 'cola_b' AND c_d.name = 'cola_d';
    but when I try to do the same thing on my own tables (created from citygml data), I get an error. There is the difference that the data is 3D, and the index was created without any PARAMETERS ( ... ), hence is just 2D. But still I don't get why the following query doesn't work:
    SELECT SDO_GEOM.SDO_DISTANCE(c_w.envelope, c_b.envelope, 0.0005)
    FROM cityobject c_w,
    cityobject c_b
    WHERE c_w.id = 50025
    AND c_b.id = 50018;
    The id's for the buildings are valid, and I used the same tolerance used by the software that set up the database.
    Here's the error I get in SQL developer:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.Exception: 54535
    ORA-06512: at "MDSYS.SDO_3GL", line 637
    ORA-06512: at "MDSYS.SDO_GEOM", line 1973
    ORA-06512: at "MDSYS.SDO_GEOM", line 1990
    29532. 00000 - "Java call terminated by uncaught Java exception: %s"
    *Cause: A Java exception or error was signaled and could not be
    resolved by the Java code.
    *Action: Modify Java code, if this behavior is not intended.
    So, thinking it might have something to do with the fact that it's a Java interface, I also tried running it from SQL/PL command line and get essentially the same thing:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.Exception: 54535
    ORA-06512: at "MDSYS.SDO_3GL", line 637
    ORA-06512: at "MDSYS.SDO_GEOM", line 1973
    ORA-06512: at "MDSYS.SDO_GEOM", line 1990
    Any ideas why this isn't working?

    Hi,-
    There are many ways to model a building with our open 3D data model:
    Please note that each polygon can be any planar surface as long as you dont use
    shortcut definitions like axis-aligned box as Siva mentioned. We dont allow curved surfaces in 3D.
    Gtype 3003 can be composite surface which means each polygon should be connected to another polygon with an edge. Etype must be then 1006. You can have as many polygons as possible as long as they are connected.
    Gtype 3003 can also be a single polygon. But, this will not be able to model a building.
    As you pointed out, maybe it is the footprint of the building.
    You can also model building with gtype 3008 which is simple or composite solid.
    Etype 1007 means it is simple solid and etype 1008 means it is composite solid.
    Composite solid has one or more solids which has at least one full or partial common surface in between.
    In your case with single polygon, you can use sdo_util.extrude as follows to make
    3D buildings. The surfaces created will be on the out-side surface of the building.
    You will not have walls inside the building when you use this following function:
    SELECT SDO_UTIL.EXTRUDE(
      SDO_GEOMETRY(
        2003,
        null,
        null,
        SDO_ELEM_INFO_ARRAY(1,1003,1),
        SDO_ORDINATE_ARRAY(5, 1,8,1,8,6,5,7,5,1)),
      SDO_NUMBER_ARRAY(0,0,0,0,0),
      SDO_NUMBER_ARRAY(5,10,10,5,5),
      0.005) from dual;
    SDO_UTIL.EXTRUDE(SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1),SDO_O
    SDO_GEOMETRY(3008, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1007, 1, 1, 1006, 6, 1, 10
    03, 1, 16, 1003, 1, 31, 1003, 1, 46, 1003, 1, 61, 1003, 1, 76, 1003, 1), SDO_ORD
    INATE_ARRAY(5, 1, 0, 5, 7, 0, 8, 6, 0, 8, 1, 0, 5, 1, 0, 5, 1, 5, 8, 1, 10, 8, 6
    , 10, 5, 7, 5, 5, 1, 5, 5, 1, 0, 8, 1, 0, 8, 1, 10, 5, 1, 5, 5, 1, 0, 8, 1, 0, 8
    , 6, 0, 8, 6, 10, 8, 1, 10, 8, 1, 0, 8, 6, 0, 5, 7, 0, 5, 7, 5, 8, 6, 10, 8, 6,
    0, 5, 7, 0, 5, 1, 0, 5, 1, 5, 5, 7, 5, 5, 7, 0))
    The following example returns the three-dimensional composite solid geometry representing an extrusion from a two-dimensional polygon geometry with inner rings.
    SELECT SDO_UTIL.EXTRUDE(
      SDO_GEOMETRY(
        2003,
        null,
        null,
        SDO_ELEM_INFO_ARRAY(1, 1003, 1, 11, 2003, 1,
          21, 2003,1, 31,2003,1, 41, 2003, 1),
        SDO_ORDINATE_ARRAY(0,0, 8,0, 8,8, 0,8, 0,0,
          1,3, 1,4, 2,4, 2,3, 1,3, 1,1, 1,2, 2,2, 2,1, 1,1,
          1,6, 1,7, 2,7, 2,6, 1,6, 3,2, 3,4, 4,4, 4,2, 3,2)),
      SDO_NUMBER_ARRAY(-1.0),
      SDO_NUMBER_ARRAY(1.0),
      0.0001) from dual;
    SDO_UTIL.EXTRUDE(SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1,11,200
    SDO_GEOMETRY(3008, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1008, 4, 1, 1007, 1, 1, 10
    06, 16, 1, 1003, 1, 46, 1003, 1, 91, 1003, 1, 106, 1003, 1, 121, 1003, 1, 136, 1
    003, 1, 151, 1003, 1, 166, 1003, 1, 181, 1003, 1, 196, 1003, 1, 211, 1003, 1, 22
    6, 1003, 1, 241, 1003, 1, 256, 1003, 1, 271, 1003, 1, 286, 1003, 1, 301, 1007, 1
    , 301, 1006, 10, 301, 1003, 1, 328, 1003, 1, 355, 1003, 1, 370, 1003, 1, 385, 10
    03, 1, 400, 1003, 1, 415, 1003, 1, 430, 1003, 1, 445, 1003, 1, 460, 1003, 1, 475
    , 1007, 1, 475, 1006, 6, 475, 1003, 1, 490, 1003, 1, 505, 1003, 1, 520, 1003, 1,
    535, 1003, 1, 550, 1003, 1, 565, 1007, 1, 565, 1006, 10, 565, 1003, 1, 592, 100
    3, 1, 619, 1003, 1, 634, 1003, 1, 649, 1003, 1, 664, 1003, 1, 679, 1003, 1, 694,
    1003, 1, 709, 1003, 1, 724, 1003, 1), SDO_ORDINATE_ARRAY(4, 0, -1, 4, 2, -1, 4,
    4, -1, 3, 4, -1, 2, 4, -1, 2, 7, -1, 1, 7, -1, 1, 6, -1, 1, 4, -1, 1, 3, -1, 0,
    3, -1, 0, 8, -1, 8, 8, -1, 8, 0, -1, 4, 0, -1, 4, 0, 1, 8, 0, 1, 8, 8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, 2, 3, -1, 1, 3, -1, 1, 3, 1, 2, 3, 1
    , 2, 3, -1))These are examples from Spatial User's Guide.
    ORA-54668 means that you need to update your srid to a 3D srid.
    Please check out Spatial User's Guide, Pro Oracle Spatial for 11g book and
    the following paper (which we can send you a copy offline)
    B. M. Kazar, R. Kothuri, P. v. Oosterom and S. Ravada, "On Valid and Invalid Three-
    Dimensional Geometries", 2nd International Workshop on 3D Geo-Information: Requirements, Acquisition,
    Modelling, Analysis, Visualisation, 12-14 December 2007, Delft, the Netherlands (Published as Chapter 2,
    pp. 19-46 in Advances in 3D Geoinformation Systems Series: Lecture Notes in Geoinformation and
    Cartography Oosterom, P.v.; Zlatanova, S.; Penninga, F.; Fendel, E. (Eds.) 2008, XX, 441 p. 235 illus.,
    Hardcover ISBN: 978-3-540-72134-5
    Maybe if you can post here an example geometry from your data,
    we can help you more.
    Hope these help.
    Thanks

  • Basic Spatial Query

    Hi guys,
    I am currently developing a java applet to display telecommunication sites taken from an Oracle 8.1.6 DB. The company I work for also happens to have the spatial cartridge which I intend to use to overlay a country map over my plottings. I have imported the map data into a table, and I can view the GEOLOC information as a huge stream of longs and lats via a simple SELECT query in SQLPLUS - so the data has been imported correctly.
    I have tried to digest huge articles on querying spatial information - however, unfortunately being an Oracle novice, it has left me quite dazzled.
    Basically all I want to do is take from my spatial table a list of long and lat coordinates (in double format) in a specific physical area, so that I can display them from there.
    I'd appreciate any help that anyone could give.
    null

    Hi David,
    There are a few things you will have to do in order to get this to work quickly.
    1) You will have to insert data into the user_sdo_geom_metadata field so Oracle Spatial can know some information about the data you've created (table name, spatial column name, information about upper and lower bounds as well as tolerance for each dimension.
    2) You'll need to create a spatial index on the data.
    3) You'll need to analyze the spatial index table.
    4) Then you can query the data. You'll have to decide whether you need exact answers (using the sdo_relate operator) or approximate answers based only on the index (sdo_filter operator).
    There is too much information required to put it all here, but I'll include a few samples.
    to insert data into user_sdo_geom_metadata:
    insert into user_sdo_geom_metadata values ('TABLE_NAME','GEOMETRY_COLUMN_NAME',
    mdsys.sdo_dim_array(mdsys.sdo_dim_element('X',-180.0,180,0.00000005),
    mdsys.sdo_dim_element('Y',-90,90,0.00000005)),NULL);
    commit;
    In the above example, TABLE_NAME is the name of the table with your geometry column, then the geometry column name, then the dimarray has attributes in it associated with each of two dimensions (two dimensional data is stored here), the first dimension has a lower bound of -180, and upper bound of 180, and a tolerance or 0.00000005 (the decimal precision of your data, with a 5 appended), the second dimension has the info supplied, and the last null means there is no coordinate system stored with the data. I'd suggest if you are a newbie to leave it as NULL, then ease into coordinate systems once you get more experience.
    2) create the index
    create index table_name_sidx
    on table_name(geometry_column_name)
    indextype is mdsys.spatial_index
    parameters('sdo_level=x');
    where x is usually a number between 6 and 14 based on the type of data you have. There is a lot to say about this, but I can't say it here.
    3) analyze the spatial index table:
    from sql*plus, run the following statements:
    set head off
    spool analyze_it.sql
    select ' analyze table ' | | sdo_index_table | | ' estimate statistics sample 32 percent;'
    from user_sdo_index_metadata order by sdo_index_table;
    spool off;
    @analyze_it.sql
    4) execute a query based on an area of interest:
    this statement will return all geometries that have any interaction with a query window specified by a rectangle with bounds
    2,2, 10,2, 10,10, 2,10, 2,2
    SELECT geometry_column_name
    FROM table_name
    where sdo_relate (geometry_column_name,
    mdsys.sdo_geometry(2003,NULL, NULL
    mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array (2,2, 10,2, 10,10, 2,10, 2,2)),
    'mask=anyinteract querytype=window'
    = 'TRUE';
    You will have to dig more into each of these subject to understand them.
    Hope this helps,
    dan
    null

  • Can someone quickly spot the syntax error in this basic XML query?

    I'm very new to SQL/XML and I'm using this query in the basic HR schema provided by Oracle in the 10g Express Edition Database.
    I'm getting the "ORA-00907: missing right parenthesis" message when I run the following query, but the parenthesis all seem to match up:
    SELECT
    XMLELEMENT ("EMPLOYEES",
    XMLAGG(XMLELEMENT ("DEPARTMENTS",
    XMLELEMENT ("Department", department_name),
    (SELECT
    XMLELEMENT ("EMPLOYEE",
    XMLAGG(XMLELEMENT ("Empno", employee_id),
    XMLELEMENT ("Job", job_id),
    XMLELEMENT ("FirstName", first_name),
    XMLELEMENT ("LastName", last_name),
    XMLELEMENT ("Email", email),
    XMLELEMENT ("Phone", phone_number)))
    AS result
    FROM employees
    WHERE employees.department_id = departments.department_id)))
    AS result
    FROM departments)

    You do have the correct number of parenthesis, just the last one is in the wrong spot. Here is the corrected version. I moved the trailing ) to before "AS result"
    SELECT
    XMLELEMENT ("EMPLOYEES",
      XMLAGG(
        XMLELEMENT ("DEPARTMENTS",
          XMLELEMENT ("Department", department_name),
          (SELECT
             XMLELEMENT ("EMPLOYEE",
               XMLAGG(
                 XMLELEMENT ("Empno", employee_id),
                 XMLELEMENT ("Job", job_id),
                 XMLELEMENT ("FirstName", first_name),
                 XMLELEMENT ("LastName", last_name),
                 XMLELEMENT ("Email", email),
                 XMLELEMENT ("Phone", phone_number)
             ) AS result
             FROM employees
            WHERE employees.department_id = departments.department_id
    AS result
    FROM departmentsI don't have those tables installed but when I made a few tweaks and tried to run the above it encountered an error in regards to the inner XMLAGG. I tweaked your exampled and ended up with this. Feel free to change if not what you intended to produce.
    SELECT
    XMLELEMENT ("EMPLOYEES",
      XMLAGG(
        XMLELEMENT ("DEPARTMENTS",
          XMLELEMENT ("Department", department_name),
          (SELECT
             XMLAGG (
               XMLELEMENT("EMPLOYEE",
                 XMLFOREST (employee_id AS "Empno",
                            job_id AS "Job",
                            first_name AS "FirstName",
                            last_name AS "LastName",
                            email AS "Email",
                            phone_number AS "Phone"
             FROM employees
            WHERE employees.department_id = departments.department_id
    AS result
    FROM departments

  • Basic media query

    This is driving me to distraction, can anybody tell me why the extremely basic coding does not show correctly in the Multiscreen view for mobile.:
    The CSS:
    @charset "UTF-8";
    /* CSS Document */
    .container {
              width: 500px;
    .content {
              float: left;
              width: 235px;
              margin-top: 0px;
              margin-right: 15px;
              margin-bottom: 0px;
              margin-left: 0px;
              background-color: #900;
              height: 40px;
    @media only screen and (max-device-width: 320px) {
              .container {width: auto;}
              .content {
                        float:none;
                        margin: 0;
                        width: auto;
    and the html:
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Untitled Document</title>
    <link href="basic_mobile.css" rel="stylesheet" type="text/css" media="screen">
    <body>
    <div class="container">
    <div class="content"></div>
    <div class="content"></div>
    </div>
    </body>
    </html>
    Despite the media screen query canceling the Float it refuses to sit on on top of the other in the browser.
    Apologies for the basic nature of this but it is a sticking point.
    Ian

    Hi
    Not certain what you mean when you say,"shouldn't the two divs still stop floating though in the smaller browser window?", as the position of the divs are on the left by default in a browser, so they may give the impression of floating left, (try float right).
    Insert some text into the content div.
    PZ

  • Basic AD query

    Hi,
    I'm looking into using Power Query so that I can get up-to-date Active Directory information about our users. I want to be able to extract basic data like names, email addresses, department etc. When I query the user table in Power Query it returns the display
    names of all the users but no other useful columns (it shows things like securityPrinciple and posixAccount though). Is there some simple way I can use Power Query to combine data from multiple AD tables to provide a cohesive view of all our user data?
    I don't know the names of all the fields I want, so I'd rather just extract all the data and figure it out from there.
    Thanks in advance for anyone that can offer any help.

    When you connect to the user table, as you noted, there's a column of displayName and then a bunch of other columns. Are you familiar with the expand button? Most of the other columns in this table are links to other related tables so those columns have
    a little button to the right of the column name that looks like two arrows pointed left and right. Click that and then it will let you choose which of the embedded/related columns that you want to add to your table. I expect that the user, organizationalPerson,
    and person columns probably contain most of the data you want. But if you want to blow out every single column and then go from there (not good for performance but maybe easier to dig through) then just go to each column and click those expand buttons. You
    should end up with a huge table of data for each user.
    This is one of my favorite features in Power Query. It's a great way to dig through a data schema that you're not quite familiar with and pull in related information without worrying about joins and merges.

  • Basic question - querying xmltype column

    Hi,
    Sorry for the basic question but please could someone paste in a working 'select where' statement which will pick out only those rows containing an element with specified content.
    For example, how would I return n complete XML documents as query results for a situation where 'element_1' has text content 'apples'?
    This does not seem to work:
    SELECT x.xml_body.extract('/root_element/element_1/text()').getStringVal()
    FROM xmltable x
    WHERE x.xml_body.extract('/root_element/element_1/text()').getStringVal()='apples'

    Hi Paul,
    The query you have given works. I tried that query in the following format and it works.
    Query 1:
    SELECT x.xmlcol.extract(/Employee/Name/text()').getStringVal()
    FROM table_name x
    WHERE x.xmlcol.extract('/Employee/Name/text()').getStringVal()='Anu'
    Query 2:
    SELECT extractvalue(x.xmlcol,'//Name/text()')
    FROM table_name x
    WHERE extractvalue(x.xmlcol,'//Name/text()')='Srini'
    Both the queries work. The xml is of the following format
    <Employee company="Oracle">
    <Name>Anu</Name>
    <Department>OTN</Department>
    <Location>India</Location>
    </Employee>
    Can you please tell the database version on which you are working?
    For more information on XMLType you can refer the XMLDB Samples located at
    http://otn.oracle.com/sample_code/tech/xml/xmldb/content.html
    You can also refer to the XMLType Sample present at this location
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/9i_jdbc/content.html#xmltype
    to know how to work with XMLType columns.
    You can get back to us if you have any more doubts.
    Regards,
    Anupama Majety

  • Listener query

    Hi Team,
    I have a query regarding to listener.
    Suppose if i install oracle 9i/10g on windows platform with personal addition.
    For personal addition only one user is supported right?
    Regards,
    Rajesh

    Suppose i installed the oracle 9i/10g with personal eddition, what is the use of listener? means can i disable the listener after the user connects to the target database?
    listener purpouse is just communicates the client connection to the databse.
    Regards,
    Rajesh

  • Basic select query with round

    Hello everyone,
    I am very new to Oracle. I have a query that i use for getting table space statistics;
    Here is my query;
    "select * from dba_tablespace_usage_metrics"
    This returns me the data that i want it.
    like;
    TABLESPACE_NAME USED_SPACE TABLESPACE_SIZE USED_PERCENT
    PRRFK 52543200 57647104 91.14629591800483160437686514
    How can edit my query to show me the USED_PERCENT in 4 digit rather than long digits
    such as 91.14
    Any input greatly appreciated.
    Thank you.

    yes that what i am looking for but could not figure out where to put in the query.
    can you please put in the full query?
    Here is my actual query;
    select * from dba_tablespace_usage_metrics
    Thank you.

  • MDM listener Query

    Hi All,
    A MDM listener listening for record updates;
    Will it take record updates within a checked out record (like assignments) Or Will it
    Take as a record update when the entire record is checked in?
    Regards,
    nitesh

    Hello Nitesh
    SAP MDM support check out mechanism for all record modifications
    If you update no checked out record it record will lock for another user
    If record checked out all user work with copies of that record
    When you insert somthing to checked out record and then press save fire "Error" validators then fire workflow "Modify record"
    after that(if you havn't error) your changes will appliy to MAIN(checked out) record.
    If you used not exclusive checked out insert some changes to record can different users but not same time
    in that case SAP MDM create one copy main record(checked out) for each user
    and after insert changes applied it to main record from each copy
    last changes applied last to main record
    Regards
    Kanstantsin

  • Basic sql query

    Hi all, I am trying to get a report using sql, but I do not get the data out.
    Select data1, sum(data2)
    from table1
    where date1 between '01-JAN-2007' and '01-JAN-2009'
    group by data1
    I know I have data because the query runs in sql+
    I do not get any error message, the reports is just empty.
    Can someone help me to understand what I am doing wrong?
    Many thanks
    Maria

    Hi,
    I thought you were using SQL server 2005, anyways if you are firing your query against Oracle, try this.
    Select data1, sum(data2)
    from table1
    where
    to_date(to_char(date1,'YYYY-MM-DD'),'yyyy/mm/dd') between
    to_date('2007/01/01','yyyy/mm/dd') and to_date('2009/01/01','yyyy/mm/dd')
    group by data1
    >>What is the problem with dates between Crystal reports and oracle databases?
    The problem is that when you compare the dates in strings then you need to provide them in the same format the date is stored with though you get in 'DD/MM/YYYY' on select but it is not necessarily be that, Thanks.
    Hope this helps.
    Thanks
    -Azhar

  • Basic networking query

    How do I check if a given server is responding at a given port #?? when I telnet to that port it responds well.
    Any other indications for that I could look for?
    Thanks
    anand

    You can run netstat on the server to see what its listening for.

  • Basic negociation query

    Dear All,
    I had some queries running in my mind which iam sure could be cleared in this forum :)
    My scenario is like this...
    Client-1(b mode)------ AP(auto or mixed mode) ------ Client-2(g mode)
    Now suppose Client-1 wants to transfer data to client-2 via AP, what would be the rate of transfer of data
    a) 11 Mbps (b mode) - lowest of the two rates
    b) 11 Mbps (b mode) from Client-1 to AP and 54Mbps from AP to Client-2 and vice versa.
    can someone pl throw some light here.
    looing forward for your replies.
    - Queenie

    When you configure the 802.11g access point radio for best throughput, the access point sets all data rates to basic (required). This setting blocks association from 802.11b client devices. The best throughput option appears on the web-browser interface Express Setup and Radio Settings pages and in the speed CLI configuration interface command.
    The wireless device always attempts to transmit at the highest data rate that is set to Basic. If there are obstacles or interference, the wireless device steps down to the highest rate that allows data transmission.
    The data rates supported on an IEEE 802.11b, 2.4 GHz radio are 1 Mbps, 2 Mbps, 5.5 Mbps and 11 Mbps.
    The data rates supported on an IEEE 802.11g, 2.4 GHz radio are 1 Mbps, 2 Mbps, 5.5 Mbps, 6 Mbps, 9 Mbps, 11 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps and 54 Mbps.
    The data rates supported on an IEEE 802.11a, 5 GHz radio are 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps and 54 Mbps.

  • Basic design query

    Hi All,
    I have got an interesting question out here; perhaps something that everyone comes across at some point of time.
    I have a list of Presentation-Layer Object - say PObject
    I have a list of Business-Layer Object - say BObject
    Now, there is one-is-to-one mapping between them i.e. every BObject is associated with PObject and vice-versa.
    Query:
    What is the best way to represent such information in terms of data-structure?
    One way is to have a big ContainerObject which contains the PObject and corresponding BObject; and yes, have an array-list of this ContainerObject. But is this the best way? The problem with this approach is the search strategy - like if I ask you to fetch me the PObject with a specific attribute, I would need to iterate over the ContainerObject, get the corresponding PObject, check if the search condition is met... Not a very clean way...
    Any suggestions???
    Thanks in advance.
    Kind Regards,
    Jayant

    Jay@Java wrote:
    Hi All,
    I have got an interesting question out here; perhaps something that everyone comes across at some point of time.
    I have a list of Presentation-Layer Object - say PObject
    I have a list of Business-Layer Object - say BObject
    Now, there is one-is-to-one mapping between them i.e. every BObject is associated with PObject and vice-versa.
    Sounds like a bad design. Why two objects? Why not just pass the BObject around and tell your developers that presentation is just for view? It's a lot of code to write just to enforce layer purity.
    If you know aspects, you can write an aspect to guarantee that calls to business objects can only happen from the service layer back.
    Query:
    What is the best way to represent such information in terms of data-structure?
    My advice? Don't do it.
    One way is to have a big ContainerObject which contains the PObject and corresponding BObject; and yes, have an array-list of this ContainerObject. But is this the best way? The problem with this approach is the search strategy - like if I ask you to fetch me the PObject with a specific attribute, I would need to iterate over the ContainerObject, get the corresponding PObject, check if the search condition is met... Not a very clean way...
    Any suggestions???
    Thanks in advance.
    Kind Regards,
    JayantLook at all the complexity you're introducing. What's it buying you? Nothing that I can see. I think parallel object hierarchies like this are a bad architectural smell.
    %

Maybe you are looking for