Joining 3.42 in array

We have 2 3.42 systems - one on Fedora Core 1 and one on RedHat Enterprise
3 and wish to join as an array. However no matter whether use command line
or array manager and primary or secondary(to be), it starts - prompting
for administrator account, and then fails with no very informative message.
I wonder if because no telnet & using ssh with root as adminitrator
account?
Thanks for any help.

Peter Polkinghorne wrote:
Carl wrote:
Peter Polkinghorne wrote:
Carmelo wrote:
Peter Polkinghorne wrote:
We have 2 3.42 systems - one on Fedora Core 1 and one on RedHat
Enterprise
3 and wish to join as an array. However no matter whether use commandline
or array manager and primary or secondary(to be), it starts - prompting
for administrator account, and then fails with no very informativemessage.
I wonder if because no telnet & using ssh with root as adminitrator
account?
Thanks for any help.
Peter,
Try using the following command to help you see why the servers are not
attaching. You can post the output. From the primary.
$ tarantella array join primary FQDN secondary FQDN --verbose
Use FQDN and make sure that each can resolve the other.
Other things to look out for.
* You need to have port 5427 open between the servers
* servers need to be able to resolve each other, use DNS
Your problem does not sound like it has anything to do with telnet or
ssh.
>>>
>>>
Regards,Thanks for the suggestions - I have verified that they can resolve
eachother and have used FQDN. I have also checked not firewalled from
eachother.
What happens is that the array join command prompts for secondary admin
username & password, which it accepts and then completes.
Running tarantella status --verbose initially yields:
Health check:
- primary.ksblaw.co.uk: Accepting peer connections.
- secondary.ksblaw.co.uk: Accepting peer connections.
One or more array members reported that they are not in this array.
If an array join has just been performed, the join is complete when the
servers report they are array members.
then after 5 minutes or so yields:
Health check:
- asterix.ksblaw.co.uk: Accepting peer connections.
- All responsive servers report consistent array topology.
Contacting primary.ksblaw.co.uk for status information.
Array members (1):
- primary.ksblaw.co.uk (primary): Accepting standard and secure
connections.
- Webtop sessions (0):
- Emulator sessions (0):
I there any logs I can check for why failed - I did have a scan but could
see nothing obvious.
Peter Polkinghorne
Do either of these systems have more than one network card ?
Carl
No - they both have single ethernet port & are both on same subnet.
PeterSituation resolved - did not have correct reverse DNS set up - now fine.
Just a pity no very obvious error message to alert to this problem.
Peter

Similar Messages

  • Join Table with Collection Array Type

    Hi All,
    I'm trying to join 2 types of tables (real table and array collection type)
    When I wrote this code:
    Declare
    -- Types
    Type cArr Is Record (col1 Number);
    Type tArr Is Table Of cArr Index By Binary_Integer;
    -- Objects
    ocArr cArr;
    otArr tArr;
    Begin
    -- Set Array Table
    ocArr.col1 := 1;
    otArr(1) := ocArr;
    ocArr.col1 := 3;
    otArr(2) := ocArr;
    -- Fetch Records
    For Rec in (Select col1 From Table(otArr) Arr)
    Loop
    Dbms_Output.Put_Line(Rec.col1);
    End Loop;
    End;
    I Get This Error:
    ORA-06550: line 10, column 64:
    PLS-00382: expression is of wrong type
    ORA-06550: line 10, column 58:
    PL/SQL: ORA-22905: cannot access rows from a non-nested table item
    ORA-06550: line 10, column 21:
    PL/SQL: SQL Statement ignored
    I know that I can Use this as sn answer:
    For Rec In 1..2
    Loop
    Dbms_Output.Put_Line(otArr(Rec).Col1);
    End Loop;
    But I need later on to use this collection join with another real table based on values compare like:
    For Rec in (Select a.Col2 From a,(Select col1 From Table(otArr)) Arr Where a.Col1 = Arr.Col1)
    Loop
    Dbms_Output.Put_Line(Rec.col1);
    End Loop;
    Can someone tell me where I'm wrong and how to fix it?
    Thanks,

    Welcome to the forum.
    Don't use a PL/SQL type, but an SQL type.
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2270447621346#tom3041776036531
    Do a search on ORA-22905 on this forum for more examples.

  • Read several 2D Arrays out of lvm file

    Hello,
    for my data aquisition, I join three 1-D Arrays to a 2D array. I then save several of these 2D Arrays to a lvm file, until it exceeds 500kb. Here I ues the "write to measurement" express VI. When I'm trying to read the data I encounter a problem:
    the "read from measurement file" express vi, seems to only give out the first 2D Array, that is in the file! Each 2D Array holds 75 values for every channel. I checked the content by dragging and dropping the file to Excel and the notepad. I can then see all the arrays, I saved in the file, and not only the first one. I tried to adjust the options in the "read from measurement file" VI as well, but nothing seems to help.
    I attached an example lvm file and my reading VI.
    It would be very nice if somebody could help
    Simon
    Solved!
    Go to Solution.
    Attachments:
    Datenauswertung.vi ‏52 KB
    example file.zip ‏68 KB

    Hi
    I'm not really sure which way you want to read out the data.
    Do the different 2D Array all belong together, meaning that the 2nd array is just a continuation of the first?
    If this is the case, you could select "Segment Headers">"No Headers" in the "Write to measurement file" VI.
    Then, in the "Read from measurement file" select: Read generic text file, and set the parameters accordingly.
    Use the "Read File now" function to test the set parameters.
    Further you may have to change the indices for the Index Array in your VI.
    However, this method has the obvious drawback of loosing the header information.
    Alternatively, you can save the data in a tdms file, instead of a lvm file. Here the headers are handled better.
    Select "One header only" in the write to measurement file. When your then read out the data, it automatically will read out all data.
    And you keep the information of at least the first header.
    If each 2D Array should be read out separately, you should use a different approach. Please let me know, if this is the case and I will explain further.
    Kind regards,
    Corinne Doppmann
    Applications Engineer
    National Instruments

  • Traversing an array - start with i=1 or i =

    dupe thread, delete please
    Edited by: ohshititsaliongetinthecar on Apr 30, 2008 7:12 PM

    Yep, 0 or 1 depending on the circumstances... but yeah, 0 is ALLWAYS the first element in a java array, definately definately.
    <aside>VB's Option Base was THE worste idea in the history of programming languages (barring regex's of course ;-).</aside>
    <warning>This code hasn't even been compiled, let alone tested.</warning>
      public String join(String... array) {
        int n = array.length;
        if (array==null || n==0) return "";
        StringBuffer result = new StringBuffer(""+array[0]);
        for(int i=1; i<n; i++) {
          result.append(", "+array);
    return result.toString();
    Cheers. Keith.
    Edited by: corlettk on 1/05/2008 12:54 - Oops!

  • Write out array

    Is there a way to write out an array without the
    -->,<-- that separates the elements in the array?

    Array.join() will print an array with any separator you like.
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Can I union several cursors for the same secondary db?

    I want to search several keys in one secondary database.
    select * from adb where a=6 or a=9 or ....
    certainly, this can be done by running several queries, but it is definitely slow.
    wondered if it is possible to union these several cursors together, then fetch the data from the primary database at once? seems this is not supported in current BDB implementation.
    trying to modify the bdb code to support the cursor union operation. but get lost in the code. (seems java version is simpler than the c version. )
    can some friend from Oracle, Ron, Bogdan, Andrei,Alexander
    shed me some light on how a cursor in bdb is implemented. did not find too much detail in the document.
    and hope this is in the to-do list of next version.
    thanks

    Hi,
    The idea of joining cursors on the same secondary db presents no logic since you don't want to identify common keys within the records corresponding to each cursor.
    A join cursor works the following way: the first cursor on a secondary db within the cursor array is analyzed and each primary key that the cursor refers to is searched within the next primary keys refered to by the next joined cursor in the array, and so on, leading to identifying the primary keys that each of cursors within the array refer to (the common keys).
    What you want to achieve on a secondary db can be accomplished by positioning several cursors on the records that you want, begin reading sequentially with each of them, go to the other when you have finished reading with one cursor. A faster approach, which shouldn't involve any locking issues since the acquired locks are shared/read locks and you'll not perform any writes at that moment, may be that of spawning several threads and open a cursor within each thread, thus performing multithreading cursor read operations. You'll have to analyze each approach with regard to how many duplicates the cursors will refer, time consumed to spawn the threads etc.
    Let us know if you need further information, regards,
    Andrei

  • How to get the response of a vbscript ran from extended js?

    Hi All,
    I  want to get the result from a vbscript, how to get that in my jsx? This is what I'm doing-
    vbscript (this will return me something, i've added just a sample string)
    Wscript.Echo "Like this?"
    jsx
    var a = File("C:\\Users\\Sahil\\AppData\\Roaming\\CreativeWorx\\1.vbs");
    var b=a.execute();
    Now, variable b returns me true/false; and the output i.e. "Like this?"  is alerted! So my question is-
    1. How to get the output in a variable?
    2. How to avoid the alert
    So, I simply wish to get the output from my vbscript and then perform certain functions accordingly, alos, I dont want  this to be alerted!
    Any help will be highly appreciated!

    The capitalization is app.doScript and not app.doscript that is if you are trying to get a jsx script to run and access a string from from a vbs script.
    When defining the VBscript for multiline scripts the easiest method is to use triple quotes
    VBscript = """dim WMI:  set WMI = GetObject("winmgmts:\\.\root\cimv2")
    dim Nads: set Nads = WMI.ExecQuery("Select * from Win32_NetworkAdapter where physicaladapter=true")
    dim nad
    for each Nad in Nads
        if not isnull(Nad.MACAddress) then Wscript.Echo Nad.description, Nad.MACAddress  
    next"""
    when using the scriptArgs you can either make a loop of them and send the string value of each one something like this
    For (n = 0 .........
    myArg = "myArg" & n
    myStringToPassOver = "Shaddow Fax " & n
    app.scriptArgs.SetValue myArg, myStringToPassOver
    Next
    or probably better to make a long comma or something else separated string and pass it over after the loop
    var VBScript = """myArg = ""
    For n = 0 To 15
    myArg = myArg & "Shaddow Fax " & n & ","
    Next
    app.scriptArgs.SetValue "myResult", myArg
    app.doScript(VBScript, ScriptLanguage.visualBasic);
    var myResult = app.scriptArgs.getValue("myResult").replace(/\,$/,"").split(",");
    // if neaded use "replace" to remove final "," and "split" to convert into an array
    alert(myResult.join("\r")); // alert the array
    The above script is a jsx script that runs a vbs
    If you want a vbs script to run and access a string from from a jsx script then you would use xxx.DoScript see the sample from the manual below.
    Set myInDesign = CreateObject("InDesign.Application")
    myJavaScript = "alert(""First argument: "" + arguments[0] + ""\rSecond argument: "" +
    arguments[1]);"
    myInDesign.DoScript myJavaScript, idScriptLanguage.idJavascript, Array("Hello from
    DoScript", "Your message here.")
    myVBScript = "msgbox arguments(1), vbOKOnly, ""First argument: "" & arguments(0)"
    myInDesign.DoScript myVBScript, idScriptLanguage.idVisualBasic, Array("Hello from
    DoScript", "Your message here.")
    P.s.Please mark the question as answered, thanks

  • How do I add variables to different checkboxes without using the 'Export Value' and then add them together (if checked)?

    Hello,
    I am very new to JavaScript.  I would like to create a checkbox with a numerical value variable activated if the box is checked.  Unfortunately, I cannot use the 'Export Value' because I already need to use it for something else.
    Any help is really appreciated.
    Thanks,
    Robyn

    Brace yourself, here's your solution.
    First of all, the export value of you checkboxes should definitly be the number of hours for the class since you will just add them up further.
    Second, we will use the userName property for our second export value (its the field right under Name and its labeled "tooltip").  You will name the class there.
    Finally, you need to name each checkbox with a number at the end starting with 1 all the way to 190.  This will be used in loops. ("whatever.1", "whatever.2,....."whatever.190")
    In the calculate event of "total hours":
    var sum = 0;  //declaring a variable that will be used in the loop
    for (var i = 1; i <= 190; i++){    //this loop will scan through all your checkboxes
         if (this.getField("whatever."+i).isBoxChecked(0) == true){  //if box is checked....
              sum += Number(this.getField("whatever."+i).value);   //.....add its value to the sum
    event.value = sum;  //display the total
    Now for the course name field, we will use the same pattern in the calculate event
    var courseList = new Array();  //declaring an empty array that will contain the courses
    for (var i = 1; i <= 190; i++){    //this loop will scan through all your checkboxes
         if (this.getField("whatever."+i).isBoxChecked(0) == true){  //if box is checked....
              courseList.push(this.getField("whatever."+i).userName);   //.....add its userName (tooltip) to the array
    event.value = "You are attending these courses:  "+courseList.join(", ")+".";  //display the array by turning it into a string and joining its items with ", "
    You can try it out with just a few checkboxes at first.  Don't forget that the loop mustn't go further than the existing field or you will get an error and the script will stop.  Make sure no error show in the console (ctrl+J).

  • Trying to customize a multiple item lookup field using JSLink

    I'm trying to Customize a multiple item lookup field using JSLink, in SP 2013. This illustrates what I want to do:
    I can replace the ";" with <br /> in the Text column, but not the Lookup column. Here is the JSLink code I'm using for the Text column. 
    (function () {
    var overrideCtx = {};
    overrideCtx.Templates = {};
    overrideCtx.Templates.Fields = {
    'Text': { 'View' : '<#=ctx.CurrentItem.Text.toString().replace(";","<br />")#>' }
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
    How can I display each item on separate lines in the Lookup column?

    You can retrieve the values of the lookup column and reformat their display by replacing the following:
    overrideCtx.Templates.Fields = {
    'Text': { 'View' : '<#=ctx.CurrentItem.Text.toString().replace(";","<br />")#>' }
    with something like this:
    overrideCtx.Templates.Fields = {
    'Lookup': { 'View' : function(ctx) {
    var arr=[];
    var fld=ctx.CurrentItem[ctx.CurrentFieldSchema.Name];
    for (i=0; i<fld.length; i++) {
    arr.push(fld[i].lookupValue);
    return arr.join("<br/>");
    Here we are looping through each lookup value contained in the multi value lookup field and adding it to an array. Once complete, we use join to flatten the array and separate each entry with the <br/>. Note...this will show each value on a new line,
    but it will be the string value without the hyperlink.  If you want the actual hyperlink to the item, you can rebuild the hyperlink and add that to the array instead. You can get the item's display form from ctx.CurrentFieldSchema.DispFormUrl and the
    item's id from fld[i].lookupId for rebuilding the hyperlink.

  • Flex Project Help

    Ok on my flex app I have a place where they create a new
    client with session's, and each client has the ability to buy
    different add ons. I'm using a repeater to pull the add ons from
    the database then when checked, and submitted it will Insert the
    information back to the database. What I have, so far is when you
    click the submit button I get no errors, but it doesn't submit
    anything. My <cfmail looks like this.
    INSERT INTO
    glb_order_details
    (sessions,order_id,hosting_notification,product_id)
    SELECT '1',407,1, id
    FROM glb_products
    WHERE id IN(0)
    As you can see I'm trying to pull the product id from
    glb_products, but its choking on that. Here is my cfc query.
    <cffunction name="NewSessionTotal" access="remote"
    returntype="void">
    <cfargument name="sessions" default="" type="String"
    required="no">
    <cfargument name="order_id" default="" required="no">
    <cfargument name="hosting" default="" required="no">
    <cfargument name="product_idlist" default=""
    required="no">
    <cfquery name="SessionTotal" datasource="omnitrac">
    INSERT INTO
    glb_order_details
    (sessions,order_id,hosting_notification,product_id)
    SELECT
    '#arguments.sessions#',#arguments.order_id#,#IIF(arguments.hosting,DE("1"),DE("0"))#,
    id
    FROM glb_products
    WHERE id IN(#ListAppend(arguments.product_idlist,0)#)
    </cfquery>
    </cffunction>
    And here is my flex app code.
    var SelectedSalesProducts:Array=new Array();
    var SelectedSalesProductslist:String="";
    for (var i:int = 0; i < gsalesproducts.length; i++){
    if(fff0
    .selected){
    SelectedSalesProducts.push(r0.dataProvider.getItemAt(i).id);
    this.dataManager.NewSessionTotal(this.nsessiontotal.text,order_id,hosting.selected,Select edSalesProductslist);
    I know its the product_id code that cause everything to choke
    up, but I been working on this for 4 days and cannot find a
    solutions. Any help would be great.

    I found what was wrong. Here, is the fix :) in the flex app I
    needed to add this line
    SelectedSalesProductslist=SelectedSalesProducts.join(",");
    I forgot to join my string, and array. Also the biggest thing
    I missed was on this line
    SelectedSalesProducts.push(r0.dataProvider.getItemAt(i).id);
    Instead of id it actually needed to be product_id

  • Automatic connection to wireless before login?

    Hi all,
    Can anyone tell me how to make my Mac Mini (old PowerPC version) connect to a wireless network at startup, before the user is required to log in? It is running OS X 10.5.8 with a standard configuration.
    I have tried playing with the network settings, but it does not seem to associate itself with the wireless network until after a user account has logged in. (Once I do log in, though, wireless association happens quickly and normally.)
    Any ideas?
    Thanks!
    - Essd

    Ugh! I was hoping to avoid having to do some UNIX hacking, but since no one else has piped up, I figured out a semi-reasonable way to do it.
    In /Library/LaunchDaemons, create a file called "com.example.airport.plist" and place the following in it:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/
    PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Debug</key>
    <false/>
    <key>Label</key>
    <string>com.example.airport</string>
    <key>KeepAlive</key>
    <false/>
    <key>ProgramArguments</key>
    <array>
    <string>/Users/YOURUSERNAMEHERE/bin/join-wifi.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    </dict>
    </plist>
    This tells it to run the script /Users/YOURUSERNAMEHERE/bin/join-wifi.sh at start-up. Obviously, replace YOURUSERNAMEHERE with your OS X username so that this corresponds to a folder off your home directory.
    Then, in your home directory, make sure that you have a "bin" folder for storing scripts. Create a file therein called join-wifi.sh that contains this:
    #!/bin/bash
    networksetup -setairportpower en1 on
    networksetup -setairportnetwork en1 your-network-name-goes-here 'your-WPA-key-goes-here'
    In this last file, replace the your-network-name-goes-here with the name of the wireless network, and replace your-WPA-key-goes-here with your wireless network's password.
    The next time you reboot, it should join the wireless network automatically.
    That did it for me, but I sure wish there were a more elegant solution!
    - essd

  • How to bind each DataGrid column separately?

    Good day fellow Flex developers!
    Could you please help me out. I am trying to figure out how to bind each DataGrid column separately. I need to bind each column to a separate bindable array variable. Is there a dataProvider property for each DataGridColumn???
    Thanks in advance,
    Eugene

    hopefully nope
    just imagine code complexity for that feature?
    how would you think should behave DataGrid when you'll populate your separate arrays with variable items number each?
    all you are able and should do is to build composite dataProvider source, join all your separate arrays into it, this is your responsibility.
    If you feel this message answers your question or helps, please mark it respectively

  • Converting anchors to simple curve

    I have exported an .ps file from a scientific visualization application (Tecplot) and i want to make some adjustments in illustrator but a have a problem. The exported file contains millions of useless anchor points (i suppose Tecplot export to eps is bad programmed). So a simple ellipse curve is exported as a hundred of simple anchor points that are connected together with straight lines. There are so may anchor points that the final result is a smooth ellipse. The file contains a lot of shapes and as a result there are million of anchor points, so practically cannot be edited because illustrator falters. Does anyone have any idea if there is a way to convert all these useless anchors to a simple curve?
    Thanks in advance for any help!

    Shouldn't that be feature requested?
    It's been requested many times over the years in one way or another.
    It's not that big a deal to press Ctrl and tap U a few times. The only reason I said to Ungroup repeatedly first is because exprorts from CAD programs often come in with the kazillion facet paths associated with a particular curve being grouped. Someone not well familiar with the problem selects such a Group and the display leads him to think it's a single path with a kazillion straight segments. Then he wonders why Simplify doesn't work on it, when in fact it's just a group of a kazillion 2-point paths that cannot be further simplified.
    If, after ungrouping as much as possible it becomes clear that the imported "curves" are really just a huge number of individual facets, then the next step is to resort to some method trying to batch-join them before then trying Simplify. But all methods of joining paths are problematic because the auto routine can't intelligently decide where to stop and start joining. You're left with having to cut stuff after the joins, or tediously select arrays of segments which should be joined, etc. etc.
    It's at that point that one often resorts to flood-filling (LivePaint) the visible voids, and/or flood-stroking the only visibly-connected strokes, Expanding the LivePaint Group, etc., etc. All of which is also problematic.
    With some kinds of files, I'll resort to running an Action which:
    Ungroups, Ungroups
    Compound Path>Release
    Simplify
    Set stroke weight. Round endcaps.
    Outline Stroke
    Uniion
    Copy
    Paste In Front
    Compound Path>Release
    Union
    Fill white, no stroke
    Send To Back
    That results in the line art for a particular discrete part (a bearing, a bracket, etc.) being a compound filled path (outlined along both sides of the original open strokes, rather than consisting of strokes) with a single white-filled path behind the line art. But as always, practicality of that method is also dependent on the consistency of the nature of the incoming file.
    I have been facing files (often clip art) that are made of countless grouped paths.
    There is no way to do a "total" ungroup, or an ungroup everything as you said, besides re-applying the command multiple times?
    The similar problem one often runs into with clipart (and PDF files) is an excruciating conglomeration of nested Clipping Paths and/or Groups. Many of Illustrator's constructs result in sloppy nestings like that, especially when saved as PDF. The confusion and tedium when trying to bust it all down to base paths is compounded by the way Illustrator often shows Ungroup as an available selection (not greyed) when in fact it can't be applied to the selection. Up until just recently, Illustrator's Appearance palette labled a Clipping Path as a Group--further bewildering those not familiar with AI's less-than-intuitive interface.
    JET

  • Joining java array with SQL table in a stored procedure

    Hey,
    I am calling a pl/sql stored procedure from a java program passing two arrays (employees) and (departments) as parameters to the procedure. Within the procedure I have stored the arrays in a table of records like this:
    type t_emp_type is record (employee_id number, department_id number);
    type t_emp_tbl_type is table of t_emp_type index by binary_integer;
    Where all elements in employees are stored in the employee_id column and departments are stored in the department_id column. So basically I've got a table like:
    l_employee_tbl t_emp_tbl_type;
    Looped through the arrays and stored the data like:
    for i in 1..p_employees.count loop
    l_employee_tbl(i).employee_id := p_employees(i);
    l_employee_tbl(i).deparment_id := p_departments(i);
    end loop;
    Now I would like to compare my l_employee_tbl with a SQL table in the database. Basically I would like to join my l_employee_tbl table with a SQL table named departments on department_id, returning all department_id:s that was not found in table departments.
    However, it is not possible to select from a user-defined table type. I have also tried to use the table() function and to cast l_employee_tbl, but found out it can't be done with records. And I would really like to use records or some other type where define my PL/SQL data. I know that you should not mix PL/SQL and SQL but in this case I think it is more efficient to try joining these "tables". Does anyone have a solution for this or advice to try something else out? It would be most appreciated.
    Edited by: 963281 on 2012-okt-04 14:25
    Edited by: 963281 on 2012-okt-05 01:53

    963281 wrote:
    I am calling a pl/sql stored procedure from a java program passing two arrays (p_employees) and (p_departments) as parameters to the procedure. Within the procedure I have stored the arrays in a table of records like this:
    type t_emp_type is record (employee_id number, department_id number);
    type t_emp_tbl_type is table of t_emp_type index by binary_integer;Why do you create an associative array?
    Now I would like to compare my l_employee_tbl with a SQL table in the database. Basically I would like to join my l_employee_tbl table with a SQL table named departments on department_id, returning all department_id:s that was not found in table departments. Of course, not possible as the SQL engine does not support PL/SQL user defined types. PL/SQL however support user defined SQL types. Which makes SQL defined types a lot more flexible.
    However, it is not possible to select from a user-defined table type. I have also tried to use the table() function and to cast l_employee_tbl, but found out it can't be done with records. Never mind SQL and PL/SQL - as a generic programming data structure principle. How do you expect being able to cast an associative array (name-value pairs) to a standard array? The two data structures are very different. So I'm puzzled in how you expect to move a non-scalar name-value pair data structure into a non-scalar value only data structure?
    And I would really like to use records or some other type where define my PL/SQL data. Why exactly? If the Java or PL/SQL data structure is populated using SQL data and database data, and wanting to use that data structure in SQL, what is the point? Why pull SQL data into a client data structure at all then - surely it is far more performant and scalable to rather keep that data in the database, and do the joins/selects/filters/etc using SQL?
    There is also the issue of scalability of local data structures in PL/SQL. The PL/SQL engine runs inside an Oracle server process, consuming private process memory on the server. The bigger the data structures used in PL/SQL, the more server memory needs to be allocated to that server process. This does not scale. Especially not if 10 or more such server processes are running the same PL/SQL code and each server needs to grab large chunks of server memory.
    If the data from Java comes from another source (e.g. keyboard, etc), and you need a means of storing this data server-side for use by PL/SQL and SQL. There are 2 basic choices. PL/SQL arrays for smallish amounts of data - and basing these arrays preferable on SQL data types allowing the array to be used by both SQL and PL/SQL engines. If the amount of data is not smallish, then it should be stored in the SQL engine (database) as that is designed for that exact purpose. And if the data is transient, then a GTT (global temp table) structure can be used (and indexed for optimal access).

  • How to join two arrays together?

    I have the following type
        type TVarcharArr is table of varchar(4000) index by binary_integer;I have a procedure that passes in two separate arrays as:
        p_account_number                 in TVarcharArr,
        p_product_system_code          in TVarcharArrThese arrays are related (they will have the same number of elements), the contents would be as follows:
        Account Number    Product System Code
        123                      ABC
        456                      DEF
        789                      GHII can use TABLE(CAST to turn each of these arrays into a table, but how do I join these two arrays together so that they become a single table with two columns? Or if I CAST them as TABLEs, how can I join these two tables together - is there some way of using the index to facilitate the join?
    Cheers
    Richard

    You are right, I do need to convert the arrays first to use TABLE(CAST, and I do have my concerns about the use of rownum.
    Here's the test case I built to test what I'm doing, incorporating the rownum solution:
    declare
        type TVarcharArr is table of varchar(4000) index by binary_integer;
        v_arr   TVarcharArr;
        v_tab  tchartab := tchartab();
        v_arr2   TVarcharArr;
        v_tab2  tchartab := tchartab();   
    begin
        v_arr(1) := 'ABC';
        v_arr(2) := 'DEF';
        v_arr(3) := 'GHI';
        v_arr2(1) := '123';
        v_arr2(2) := '456';
        v_arr2(3) := '789';   
        v_tab.extend(v_arr.Count);   
        for i in v_arr.first .. v_arr.last
        loop
            v_tab(i) := v_arr(i);
        end loop;   
        v_tab2.extend(v_arr2.Count);   
        for i in v_arr2.first .. v_arr2.last
        loop
            v_tab2(i) := v_arr2(i);
        end loop;   
        for rec in (with w_acct as
                    (select rownum rn, a.column_value acol
                    from table(cast(v_tab as tchartab)) a
                         w_prod as
                    (select rownum rn, b.column_value bcol
                    from table(cast(v_tab2 as tchartab)) b
                    select acol,bcol
                    from w_acct a,
                         w_prod b
                    where a.rn = b.rn) loop
            DBMS_OUTPUT.PUT_LINE ( 'rec = ' || rec.acol || '|'|| rec.bcol );
            null;
        end loop;
    end;It does return the correct result - but can it be trusted to be consistent - does the rownum in an array suffer the same problems as the rownum from a regular select? I'm guessing it's too risky to find out.
    In essence, I'm getting two arrays and I'm trying to join them together so that I can CAST them as a table. (And I know the real question is why isn't it just one array of records with two elements - but sometimes you have to work with what you're given)

Maybe you are looking for

  • Credit block should not prevent service order creation

    An upgrade from 4.7 to  ECC6, without any changes made to the configuration or program change, has lead to the following issue. ECC6 is not creating a service order connected to a sales order, when the customer has exceeded the credit limit. The sale

  • F110_APP_Payment Advice Form_ Very Urgent

    Hi, All I have an very urgent problem which needed to be solved immidiatly, I need to prepare a payment advice form as per the requirement of the client, The problem is, I unble to test the developed form at APP run, I want know where or How I can se

  • Horizontal toolbar

    HI, EVERYONE; I AM NEW DEVELOPER, SO PLZ HELP ME. I WANT TO KNOW "HOW TO PUT THE HORIZONTAL TOOLBAR AT THE BOTTOM OF A FORM?" OR "HOW TO MOVE THE VERTICAL TOOLBAR LEFT OR RIGHT ON FORM?" IF ANYONE KNOWS THEN PLZ HELP ME. I WILL BE VERY GREATFULL. YOG

  • Adobe Flash Player update web address

    I have been prompted to update Flash Player, and then landed at a webpage from which to download the update with an address containing "get3.adobe.com". I checked the web address of the page where you can download Flash Player to begin with by follow

  • Macbook pro not working without battery

    my macbook pro not working if i remove the battery & if the battery is empty my macbook pro not working before charging