Problem with database links (naming) Windows/Linux

Hi
Windows xp SP3_
SQL*Plus: Release 11.2.0.1.0 Production on Wed Nov 21 10:28:21 2012
Connected to:
Oracle Database 11g Release 11.2.0.1.0 - Production
name is PORCL30
Linux (Ubuntu 12.04 LTS)_
SQL*Plus: Release 11.2.0.1.0 Production on Wed Nov 21 10:28:21 2012
Connected to:
Oracle Database 11g Release 11.2.0.1.0 - Production
Name is GWORCL
My domain is Initial-Surname.co.uk (I-Surname.co.uk)
Tnsnames.ora
PORCL30 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = home1.I-Surname.co.uk) (PORT = 1521) )
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = PORCL30)
(SERVICE_NAME = PORCL30.I-Surname.co.uk)
GWORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = freds-server.I-Surname.co.uk) (PORT = 1521) )
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = GWORCL)
(SERVICE_NAME = GWORCL.I-Surname.co.uk)
From Windows to Linux
DROP DATABASE LINK "GWLINK4";
CREATE DATABASE LINK "GWLINK4"
CONNECT TO "SYSTEM" IDENTIFIED BY VALUES '051BDCE........D55BB704DA'
USING 'GWORCL';
results in a working database link named 'GWLINK4.I-Surname.co.uk'
Where as
Linux to Windows
DROP DATABASE LINK "PLINK4";
CREATE DATABASE LINK "PLINK4"
CONNECT TO "SYSTEM" IDENTIFIED BY VALUES '0550AA0F39......AE5EF62220FE5A323'
USING 'PORCL30';
name is PLINK4 as determined by
select DB_LINK from user_db_links;
So what is different between the two databases other than the operating systems they run on? What should I examine?
I should add that the linux PC is Internet facing and has a Public IP address (USB mobile broadband Modem) to which I-Surname.co.uk resolves via (ZoneEdit.com and ddclient). The ethernet lan port 10.10.1.35 connects to a switch where 10.10.1.30 (home1) is also connected (10.10.1.10 is the AD server)
Thanks for your time
Edited by: Neill_R on Nov 21, 2012 1:09 PM

The problem is that the databases do not work in the same way. As I have said one produces DBLINK.i-surname.co.uk and the other DBLINK. Both machines are members of the i-surname.co.uk domain.
In Sqldeveloper one can not alter the DBLINK since it has a "-" character (.I-Surname.co.uk)
Why the difference?
connect system@TNSGWORCL
CREATE DATABASE LINK PLINK
CONNECT TO SYSTEM IDENTIFIED BY
USING 'TNSPORCL30';
Connect system@tnsporcl30
CREATE DATABASE LINK GWLINK
CONNECT TO SYSTEM IDENTIFIED BY
USING 'TNSGWORCL';
connect system@tnsgworcl
Enter password:
Connected.
select 1||' - '||db_link from sys.user_db_links
union
select 2||' - '||db_link from sys.user_db_links@PLINK
DB_LINK
1 - PLINK
2 - GWLINK.I-SURNAME.CO.UK
SQL> connect system@tnsporcl30
Enter password:
Connected.
select 1||' - '||db_link from sys.user_db_links
union
select 2||' - '||db_link from sys.user_db_links@GWLINK
DB_LINK
1 - GWLINK.I-SURNAME.CO.UK
2 - PLINK
Tnsnames.ora
# tnsnames.ora Network Configuration File: /opt/oracle/11g/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
TNSGWORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = freds-server.i-surname.co.uk)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = GWORCL)
(SERVICE_NAME = GWORCL.i-surname.co.uk)
TNSPORCL30 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = home1.i-surname.co.uk)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = PORCL30)
(SERVICE_NAME = PORCL30.i-surname.co.uk)
)

Similar Messages

  • Problem connecting DataBase Link from windows oracle to oracle on Linux

    I'm facing a problem with database links from windows oracle to Oracle hosted on Linux server.
    I'm able to successfully create the Database Link using the following query on oracle database hosted on a windows server
    CREATE DATABASE LINK SampleDB
    CONNECT TO myuser IDENTIFIED BY password
    USING 'sample';
    The tns names entry on windows for database in Linux server is as follows
    DSOFT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = sample)
    But while executing the query "select count(*) from doctor@SampleDB;" in sql developer on windows, I'm getting the following error
    SQL Error: ORA-12154: TNS:could not resolve the connect identifier specified
    12154. 00000 - "TNS:could not resolve the connect identifier specified"
    *Cause:    A connection to a database or other service was requested using
    a connect identifier, and the connect identifier specified could not
    be resolved into a connect descriptor using one of the naming methods
    configured. For example, if the type of connect identifier used was a
    net service name then the net service name could not be found in a
    naming method repository, or the repository could not be
    located or reached.
    Using the above tns entries, i'm successfully able to connect to the database in Linux server through sql developer installed on the windows machine. Then why i'm getting this error while executing the query on Database Link?. Can any one help me?

    1005745 wrote:
    I'm facing a problem with database links from windows oracle to Oracle hosted on Linux server.
    I'm able to successfully create the Database Link using the following query on oracle database hosted on a windows server
    CREATE DATABASE LINK SampleDB
    CONNECT TO myuser IDENTIFIED BY password
    USING 'sample';
    The tns names entry on windows for database in Linux server is as follows
    DSOFT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = sample)
    But while executing the query "select count(*) from doctor@SampleDB;" in sql developer on windows, I'm getting the following error
    SQL Error: ORA-12154: TNS:could not resolve the connect identifier specified
    12154. 00000 - "TNS:could not resolve the connect identifier specified"
    *Cause:    A connection to a database or other service was requested using
    a connect identifier, and the connect identifier specified could not
    be resolved into a connect descriptor using one of the naming methods
    configured. For example, if the type of connect identifier used was a
    net service name then the net service name could not be found in a
    naming method repository, or the repository could not be
    located or reached.
    Using the above tns entries, i'm successfully able to connect to the database in Linux server through sql developer installed on the windows machine. Then why i'm getting this error while executing the query on Database Link?. Can any one help me?A database link is acting as a client to the target, remote database in exactly the same fashion and using exactly the same tns infrastructure as any other client trying to connect to that remote database. your ORA-12154 when querying a db link means exactly the same as if you had gotten it trying to connect with sqlplus, from the same server. Check the link SB provided. Keep in mind that the tnsnames file of concern is the one on the source database server.

  • Strange problem with Database LInk

    Hi Everyone,
    I have strange problem with Database Link in Oracle 11g Express Edition;
    There are two computers: computer-server and computer-client. Tnsnames.ora are the same on both computers ie.
    CT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof)(PORT = 1521))
    (CONNECT_DATA = (SERVICE_NAME = XE)
    I created database link :
    Create database link zdalny
    Connect to <user_id> identified by <password>
    using ‘CT’;
    Client can’t connect with server when I am using above command. But when I change “using” for using ‘krzysztof:1521’ or using ‘krzysztof’ or using ‘server IP:1521’ – everything is ok.
    Why I am asking. Because in all materials which I am reading about Oracle command with using ‘CT’ should be working correct. But there is not. Do you know, why?
    Thanks in advance and apologize for my English.
    Rgds
    Krzysztof

    Krzysztof Szymaniak wrote:
    Thanks for all replies.
    Below is server's tnsnames.ora
    CT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    SQL Error: ORA-12154: TNS:could not resolve the connect identifier specified
    12154. 00000 - "TNS:could not resolve the connect identifier specifie
    Rgds
    Krzysztof
    PS. I tried with using 'XE' - not working.Assuming that is the correct tnsnames, of course XE is not working. You don't have a tnsnames entry for 'XE'.
    You need to be aware that when using a dblink, the client is the db in which the link is defined, not the desktop from which you connect to that database.
    I think you need to start here:
    http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/
    http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/ (Help! I can’t connect to my database )
    http://edstevensdba.wordpress.com/2011/02/16/sqlnet_client_cfg/ (Help! I can’t connect to my database (part duex) )
    The fact that your client (db link) is a database doesn't change anything taught in the above.

  • Ora-12154  problem with database link and transparent gateway

    Hello,
    I’m trying to make a communication between oracle and SQL server 2005.
    I use oracle 10g E.E Release 10.2.0.3.0 and the transparent gateway for SQL server 10201_gatway_win32.zip.
    Install:
    The oracle database is installed into a server named ss-serv. This server has two partition disk C and E. Oracle database is installed in E and the gateway in C. There is already a database (instance) running in the oracle home (in E).
    I configured the gateway as described into: http://download.oracle.com/docs/cd/B...3/conf_sql.htm.
    In sql server 2005, there is a database running named ClientTricks.
    I created a user named Avogadro with a login.
    In the partition C where the gateway is installed, the file inittg4msql.ora is like this:
    HS_FDS_CONNECT_INFO= ss-serv. ClientTricks
    The file sqlnet.ora where the gateway is installed is configured like this:
    SQLNET.AUTHENTIFICATION_SERVICES=(NTS)
    NAMES.DIRECTORY_PATH = (TNSNAMES, EZCONNECT)
    I configured the listener that is in the C partition where the gateway is installed, and the tnsnames that is in the oracle database in E partition disk like this:
    Listener :
    LISTENER=
    (ADDRESS=
    (PROTOCOL=TCP)
    (HOST=ss-serv)
    (PORT=1521))
    SID_LIST_LISTENER=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=tg4msql)
    (ORACLE_HOME=C:\oracle\product\10.2.0\tg_1)
    (PROGRAM=tg4msql)
    tnsnames:
    mytg4msql=
    (DESCRIPTION=
    (ADDRESS=
    (PROTOCOL=TCP)
    (HOST=ss-serv)
    (PORT=1521)
    (CONNECT_DATA=
    (SID=tg4msql))
    (HS=OK))
    After edited the listener, I stop and start the listener for the transparent gateway from administrative tools in the services.
    Then, connected in oracle (in a database named fakeclient) I created a database link in sqlplus.The the dblink were created, but when I tried to querry some data from ClientTricks by executing the following instructions:
    select * from s_client@dblink
    i got this fatal and terrible error :
    ora-12154 TNS:could not resolve the connect identifier specified
    I verified all my procedure and stapes, all seems to be good. I did a tnsping of mytg4msql
    I got this error in the command prompt:TNS-03505 fail to resolve name
    Could someone help me ?
    Sorry for my English ,I’m French
    best regards

    Hi Mkirtley,
    i clarify you what i've done:
    Pease have a look in the link in my first post. Then, i said that in oracle database home the listener is in port 1521
    here is this listener:
    SID_LIST_LISTENER=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=PLSExtproc)
    (ORACLE_HOME=E:\oracle\production\10.2.0\db_1)
    (PROGRAM=extproc)
    LISTENER=
    (DESCRIPTION_LIST=
    (DESCRIPTION=
    (ADDRESS= (PROTOCOL=TCP)(HOST=ss-serv)(PORT=1521))
    (ADDRESS= (PROTOCOL=IPC)(KEY=EXTPROC0))
    Here is the tnsnames.ora in oracle database home:
    N.B in this ora file, there's already some descriptions for the database running, so i just add these lines under the description in ora file.Here is:
    Jest=
    (DESCRIPTION=
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=TCP)(HOST=ss-serv)(PORT=2000))
    (CONNECT_DATA=
    (SID=tg4msql)
    (HS=OK)
    for the listener of the gateway (installed in C partition):
    SID_LIST_LISTENER=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=tg4msql)
    (ORACLE_HOME=C:\oracle\production\10.2.0\tg_1)
    (PROGRAM=tg4msql)
    LISTENER=
    (DESCRIPTION_LIST=
    (DESCRIPTION=
    (ADDRESS= (PROTOCOL=TCP)(HOST=ss-serv)(PORT=2000))
    (ADDRESS= (PROTOCOL=IPC)(KEY=EXTPROC1))
    here are all i did.
    Best regards

  • Problems with Database Link in query

    When I run this code:
    SELECT NVL2(wbs1.wbs1_seq, wbs1.wbs1, pcn.pron) AS pron
         , h.fy AS data_fy
    FROM pcn_list@THE_LINK pcn
         JOIN project@THE_LINK x
         ON x.pcn_seq = pcn.pcn_seq
         JOIN
           SELECT h.project_seq
                , EXTRACT(year FROM (h.data_dt + 92)) AS fy
           FROM pcn_data@THE_LINK h
                JOIN setup@THE_LINK
                ON (
                     setup.data_dt = h.data_dt
                     OR (
                          EXTRACT(year FROM h.data_dt) > DECODE(setup.site, 'TYAD', 2006, 2007)
                          AND h.data_dt < setup.data_dt
                          AND TO_CHAR(h.data_dt, 'MMDD') = '0930'
                     OR (
                          EXTRACT(year FROM h.data_dt) BETWEEN 2000 AND DECODE(setup.site, 'TYAD', 2006, 2007)
                          AND TO_CHAR(h.data_dt, 'MM') = '09'
                          AND h.data_dt = NEXT_DAY(LAST_DAY(h.data_dt) - 7, 'FRIDAY')
           WHERE h.data_dt BETWEEN '01-SEP-06' AND '31-OCT-08'
         ) h
         ON h.project_seq = x.project_seq
         LEFT JOIN wbs1_list@THE_LINK wbs1
         ON (
                wbs1.fiscal_yr = pcn.fiscal_yr
                AND (
                      wbs1.legacy_pron = pcn.pron
                      OR SUBSTR(wbs1.legacy_pron, 1, 2) || SUBSTR(wbs1.legacy_pron, 4) = pcn.pron
              OR (
                   TRIM(wbs1.legacy_pron) IS NULL
                   AND wbs1.wbs1 = SUBSTR(pcn.pron, 1, 2)
                                   || SUBSTR(TO_CHAR(wbs1.start_dt + 92, 'YY'), 1, 1)
                                   || SUBSTR(pcn.pron, 3, 1)
                                   || SUBSTR(pcn.mission, 1, 1)
                                   || SUBSTR(pcn.pron, 4, 5)
                                   || DECODE(
                                              SUBSTR(pcn.pron, 12, 1)
                                            , '0', SUBSTR(pcn.pron, 13, 2) || SUBSTR(pcn.pron, 13, 2)
                                            , SUBSTR(pcn.pron, 11, 4)
         LEFT JOIN xref_pron_command cmd1
         ON cmd1.command_cd = SUBSTR(pcn.pron, 11, 2)
         LEFT JOIN xref_pron_command cmd2
         ON cmd2.command_cd = SUBSTR(pcn.pron, 1, 2)
         LEFT JOIN mdms@THE_LINK mdms
         ON mdms.pron = SUBSTR(pcn.pron, 1, 8) || SUBSTR(pcn.pron, 11, 1)
         LEFT JOIN if_fedlog fedlog
         ON fedlog.fsc || fedlog.niin = SUBSTR(pcn.nsn, 1, 13)
         LEFT JOIN awpsammo@THE_LINK ammo
         ON ammo.pron = pcn.pron
         LEFT JOIN if_core_workload c
         ON (
              c.site = 'SITE'
              AND NVL2(wbs1.wbs1_seq, wbs1.wbs1, pcn.pron) = c.pron
              AND h.fy = c.data_fy
    WHERE pcn.mission != 'NOP'
    AND   x.pmc_cancel_fg = 'F'
    AND   NVL(wbs1.cancel_fg, 'F') = 'F'
    AND   NVL2(wbs1.wbs1_seq, wbs1.wpc, pcn.wpc) <> 'ZZ'I get:
    ORA-00904: "SETUP"."SITE": invalid identifier
    ORA-02063: preceding line from THE_LINK
    However, if I remove any of the cmd1, cmd2, fedlog, mdms, or ammo joins, it runs properly.
    It also runs properly if I remove both "WHERE h.data_dt BETWEEN '01-SEP-06' AND '31-OCT-08'" (line 25) and "AND x.pmc_cancel_fg = 'F'" (third line from the end).
    Also, there are three different external sites; the problems happen on two of them, but on a third, the code works as is.
    The query also works if:
    * I remove the links and run it directly on the external sites
    * I add something that makes it return no rows immediately (for example, "AND 0 = 1" as the last line)
    * "WHERE h.data_dt BETWEEN '01-SEP-06' AND '31-OCT-08'" is replaced by "WHERE h.data_dt = '30-SEP-09'" (which returns rows)
    * For that matter, at one of the problem sites, changing the first date in that WHERE clause to anything between '19-JUN-09' and '29-SEP-09' works, but '18-JUN-09' and earlier causes the error; at the other, the earliest working date is '02-NOV-08'.
    All three external databases, as well as the database on which this is run, are running 11.2.0.1.0 64-bit Production.
    Any ideas as to what is happening?

    sb92075 wrote:
    WHERE h.data_dt BETWEEN '01-SEP-06' AND '31-OCT-08'With Oracle characters between single quote marks are STRINGS!
    'This is a string, 2009-12-31, not a date'
    When a DATE datatype is desired, then use TO_DATE() function.Actually, usually I do (since there's no guarantee as to what the "default" date format will be - besides, the default tends to be 2-year dates). The one line where I don't is really just something I added to speed up the query when testing for the error.
    However changing that line to:
    WHERE h.data_dt BETWEEN TO_DATE('09/01/2006', 'MM/DD/YYYY') AND TO_DATE('10/31/2008', 'MM/DD/YYYY')causes the same results.

  • Problems with shutdown, expose and window switching

    Hi there,
    Recently I've been having a few issues with OS X. First of all it wasn't shutting down properly -- the menu bar would disappear and it would look like it was going to shutdown, but it never did. I could move down to the dock (on auto-hide) and it would re-appear, at which point I can bring up a terminal window and use 'shutdown' to do the job. On startup I'd reset the PRAM, and then do a disk-check, but the problem keeps coming back.
    Subsequently, I've also been having problems with expose and switching windows (i.e. command-tab). Namely, neither of them work. Expose won't fire from either hot corners or the keyboard, and if I re-launch the app from the Apps folder (without trying to kill it first, I should say), it does nothing. Cmd-tab gets interpreted as just tab, and the keyboard shortcut for dashboard also fails (although I can start the dashboard from the dock).
    I read in another post about an invalid jpeg in the downloads folder being able to cause the Expose problem (seems like a most unlikely bug?). Anyway, I cleared all pictures from my downloads folder and functionality came back, but now it's gone again. It's really very frustrating as it makes moving between windows a lot more hassle.
    Any thoughts would be gratefully received.
    TIA,
    Mat

    This sounds interesting.
    Can you post a copy for the rest of us to see?
    As for actually helping you, and not just satisfying our curiousity, if you start cutting pieces of the code you will probably end up finding the source of the problem (and we won't have too big a program to handle). Since DSC is a likely suspect, you may want to start there.
    Also, are you creating an installer and using that to install? If not, you may wish to try that.
    Try to take over the world!

  • Interactive report performance problem over database link - Oracle Gateway

    Hello all;
    This is regarding a thread Interactive report performance problem over database link that was posted by Samo.
    The issue that I am facing is when I use Oracle function like (apex_item.check_box) the query slow down by 45 seconds.
    query like this: (due to sensitivity issue, I can not disclose real table name)
    SELECT apex_item.checkbox(1,b.col3)
    , a.col1
    , a.col2
    FROM table_one a
    , table_two b
    WHERE a.col3 = 12345
    AND a.col4 = 100
    AND b.col5 = a.col5
    table_one and table_two are remote tables (non-oracle) which are connected using Oracle Gateway.
    Now if I run above queries without apex_item.checkbox function the query return or response is less than a second but if I have apex_item.checkbox then the query run more than 30 seconds. I have resolved the issues by creating a collection but it’s not a good practice.
    I would like to get ideas from people how to resolve or speed-up the query?
    Any idea how to use sub-factoring for the above scenario? Or others method (creating view or materialized view are not an option).
    Thank you.
    Shaun S.

    Hi Shaun
    Okay, I have a million questions (could you tell me if both tables are from the same remote source, it looks like they're possibly not?), but let's just try some things first.
    By now you should understand the idea of what I termed 'sub-factoring' in a previous post. This is to do with using the WITH blah AS (SELECT... syntax. Now in most circumstances this 'materialises' the results of the inner select statement. This means that we 'get' the results then do something with them afterwards. It's a handy trick when dealing with remote sites as sometimes you want the remote database to do the work. The reason that I ask you to use the MATERIALIZE hint for testing is just to force this, in 99.99% of cases this can be removed later. Using the WITH statement is also handled differently to inline view like SELECT * FROM (SELECT... but the same result can be mimicked with a NO_MERGE hint.
    Looking at your case I would be interested to see what the explain plan and results would be for something like the following two statements (sorry - you're going have to check them, it's late!)
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two),
    sourceqry AS
    (SELECT  b.col3 x
           , a.col1 y
           , a.col2 z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5)
    SELECT apex_item.checkbox(1,x), y , z
    FROM sourceqry
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two)
    SELECT  apex_item.checkbox(1,x), y , z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5If the remote tables are at the same site, then you should have the same results. If they aren't you should get the same results but different to the original query.
    We aren't being told the real cardinality of the inners select here so the explain plan is distorted (this is normal for queries on remote and especially non-oracle sites). This hinders tuning normally but I don't think this is your problem at all. How many distinct values do you normally get of the column aliased 'x' and how many rows are normally returned in total? Also how are you testing response times, in APEX, SQL Developer, Toad SQLplus etc?
    Sorry for all the questions but it helps to answer the question, if I can.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Performance problems with jdk 1.5 on Linux plattform

    Performance problems with jdk 1.5 on Linux plattform
    (not tested on Windows, might be the same)
    After refactoring using the new features from java 1.5 I lost
    performance significantly:
    public Vector<unit> units;
    The new code:
    for (unit u: units) u.accumulate();
    runs more than 30% slower than the old code:
    for (int i = 0; i < units.size(); i++) units.elementAt(i).accumulate();
    I expected the opposite.
    Is there any information available that helps?

    Here's the complete benchmark code I used:package test;
    import java.text.NumberFormat;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.LinkedList;
    import java.util.Vector;
    public class IterationPerformanceTest {
         private int m_size;
         public IterationPerformanceTest(int size) {
              m_size = size;
         public long getArrayForLoopDuration() {
              Integer[] testArray = new Integer[m_size];
              for (int item = 0; item < m_size; item++) {
                   testArray[item] = new Integer(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (int index = 0; index < m_size; index++) {
                   builder.append(testArray[index]);
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getArrayForEachDuration() {
              Integer[] testArray = new Integer[m_size];
              for (int item = 0; item < m_size; item++) {
                   testArray[item] = new Integer(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (Integer item : testArray) {
                   builder.append(item);
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getArrayListForLoopDuration() {
              ArrayList<Integer> testList = new ArrayList<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testList.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (int index = 0; index < m_size; index++) {
                   builder.append(testList.get(index));
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getArrayListForEachDuration() {
              ArrayList<Integer> testList = new ArrayList<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testList.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (Integer item : testList) {
                   builder.append(item);
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getArrayListIteratorDuration() {
              ArrayList<Integer> testList = new ArrayList<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testList.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              Iterator<Integer> iterator = testList.iterator();
              while(iterator.hasNext()) {
                   builder.append(iterator.next());
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getLinkedListForLoopDuration() {
              LinkedList<Integer> testList = new LinkedList<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testList.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (int index = 0; index < m_size; index++) {
                   builder.append(testList.get(index));
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getLinkedListForEachDuration() {
              LinkedList<Integer> testList = new LinkedList<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testList.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (Integer item : testList) {
                   builder.append(item);
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getLinkedListIteratorDuration() {
              LinkedList<Integer> testList = new LinkedList<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testList.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              Iterator<Integer> iterator = testList.iterator();
              while(iterator.hasNext()) {
                   builder.append(iterator.next());
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getVectorForLoopDuration() {
              Vector<Integer> testVector = new Vector<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testVector.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (int index = 0; index < m_size; index++) {
                   builder.append(testVector.get(index));
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getVectorForEachDuration() {
              Vector<Integer> testVector = new Vector<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testVector.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (Integer item : testVector) {
                   builder.append(item);
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getVectorIteratorDuration() {
              Vector<Integer> testVector = new Vector<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testVector.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              Iterator<Integer> iterator = testVector.iterator();
              while(iterator.hasNext()) {
                   builder.append(iterator.next());
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
          * @param args
         public static void main(String[] args) {
              IterationPerformanceTest test = new IterationPerformanceTest(1000000);
              System.out.println("\n\nRESULTS:");
              long arrayForLoop = test.getArrayForLoopDuration();
              long arrayForEach = test.getArrayForEachDuration();
              long arrayListForLoop = test.getArrayListForLoopDuration();
              long arrayListForEach = test.getArrayListForEachDuration();
              long arrayListIterator = test.getArrayListIteratorDuration();
    //          long linkedListForLoop = test.getLinkedListForLoopDuration();
              long linkedListForEach = test.getLinkedListForEachDuration();
              long linkedListIterator = test.getLinkedListIteratorDuration();
              long vectorForLoop = test.getVectorForLoopDuration();
              long vectorForEach = test.getVectorForEachDuration();
              long vectorIterator = test.getVectorIteratorDuration();
              System.out.println("Array      for-loop: " + getPercentage(arrayForLoop, arrayForLoop) + "% ("+getDuration(arrayForLoop)+" sec)");
              System.out.println("Array      for-each: " + getPercentage(arrayForLoop, arrayForEach) + "% ("+getDuration(arrayForEach)+" sec)");
              System.out.println("ArrayList  for-loop: " + getPercentage(arrayForLoop, arrayListForLoop) + "% ("+getDuration(arrayListForLoop)+" sec)");
              System.out.println("ArrayList  for-each: " + getPercentage(arrayForLoop, arrayListForEach) + "% ("+getDuration(arrayListForEach)+" sec)");
              System.out.println("ArrayList  iterator: " + getPercentage(arrayForLoop, arrayListIterator) + "% ("+getDuration(arrayListIterator)+" sec)");
    //          System.out.println("LinkedList for-loop: " + getPercentage(arrayForLoop, linkedListForLoop) + "% ("+getDuration(linkedListForLoop)+" sec)");
              System.out.println("LinkedList for-each: " + getPercentage(arrayForLoop, linkedListForEach) + "% ("+getDuration(linkedListForEach)+" sec)");
              System.out.println("LinkedList iterator: " + getPercentage(arrayForLoop, linkedListIterator) + "% ("+getDuration(linkedListIterator)+" sec)");
              System.out.println("Vector     for-loop: " + getPercentage(arrayForLoop, vectorForLoop) + "% ("+getDuration(vectorForLoop)+" sec)");
              System.out.println("Vector     for-each: " + getPercentage(arrayForLoop, vectorForEach) + "% ("+getDuration(vectorForEach)+" sec)");
              System.out.println("Vector     iterator: " + getPercentage(arrayForLoop, vectorIterator) + "% ("+getDuration(vectorIterator)+" sec)");
         private static NumberFormat percentageFormat = NumberFormat.getInstance();
         static {
              percentageFormat.setMinimumIntegerDigits(3);
              percentageFormat.setMaximumIntegerDigits(3);
              percentageFormat.setMinimumFractionDigits(2);
              percentageFormat.setMaximumFractionDigits(2);
         private static String getPercentage(long base, long value) {
              double result = (double) value / (double) base;
              return percentageFormat.format(result * 100.0);
         private static NumberFormat durationFormat = NumberFormat.getInstance();
         static {
              durationFormat.setMinimumIntegerDigits(1);
              durationFormat.setMaximumIntegerDigits(1);
              durationFormat.setMinimumFractionDigits(4);
              durationFormat.setMaximumFractionDigits(4);
         private static String getDuration(long nanos) {
              double result = (double)nanos / (double)1000000000;
              return durationFormat.format(result);
    }

  • Problem With Captivate 4 and Windows 8

    Hi,
    I've a problem with Captivate 4 on Windows 8 projects :
    The mouse is not tracked.
    I've applied the last patch for this version (11/15/2011).
    Is there another patch for this ?
    Thanks a lot.

    Hi there
    I know this will come off as sounding snarky, but please know it's honestly not intended that way,
    Windows 8?
    I never was able to make Captivate 4 run successfully on Windows 7. So I'm not the least bit surprised to hear it has issues with Windows 8!
    Personally, I'm thinking you are due for an upgrade to Captivate if you want it to work on Windows 8. But then again, I'm not even certain if Captivate 6 is Windows 8 compatible.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Problem with national characters on windows client

    Hello there,
    I'am having problem with national characters on windows client.
    All national data stored in NVARCHAR2 colums, applications (.net) works fine,
    but in sqlplus:
    select city from test_table;
    - everything ok, sqlplus shows national characters
    select dump(N'<national symbols>') from dual
    - returns
    Typ=96 Len=12: 0,191,0,191,0,191,0,191,0,191,0,191
    select * from test_table where city = N'<national symbols> '
    - always returns nothing
    As i understand the problem in
    sql query text (and national literals) convertion
    to servers "WE8ISO8859P1" encoding, Is it possible
    to solve the issue?
    Thanks in advance
    PS.
    Console in right mode (chcp=1251)
    sqlplus shows russian messages well
    Server (oracle 9 on solaris):
    select * from nls_database_parameters
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_SAVED_NCHAR_CS WE8ISO8859P1
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET WE8ISO8859P1
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_RDBMS_VERSION 9.2.0.6.0
    Client (windows server 2003, oracle client 10):
    NLS_LANG = RUSSIAN_CIS.CL8MSWIN1251

    N'<national symbols>', being part of an SQL statement, will be converted to the database character set (WE8ISO8859P1) before being parsed. Only if the client and the database are both 10.2 or higher, the client can encode the literal appropriately so that it survives this conversion.
    In earlier versions, you can do the encoding yourself. Instead of the N'<national symbols>' literal use the UNISTR function: UNISTR('\xxxx\yyyy\zzzz'), where U+xxxx, U+yyyy, U+zzzz are Unicode code points of your national characters.
    -- Sergiusz

  • I have problem with data transfer between Windows Server 2012RT and Windows7 (no more than 14kbps) while between Windows Sever 2012RT and Windows8.1 speed is ok.

    I have problem with data transfer between Windows Server 2012RT and Windows7 (no more than 14kbps) while between Windows Sever 2012RT and Windows8.1 speed is ok.

    Hi,
    Regarding the issue here, please take a look at the below links to see if they could help:
    Slow data transfer speed in Windows 7 or in Windows Server 2008 R2
    And a blog here:
    Windows Server 2012 slow network/SMB/CIFS problem
    Hope this may help
    Best regards
    Michael
    If you have any feedback on our support, please click
    here.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Problems with Dinamic Link between Premiere pro CC and After Effects CC

    I'm having serious problems with dinamic link between premiere pro and after effects, really serious problems that have 2 big projects in trouble (a documentary and a video clip) and I had to redo all the work pipeline to the consumer.
    The documentary for a spanish TV was made on CC 2014 and a video clip was made on CC. Both of them with a lot of after effects composition in the premiere pro timeline. Render freeze, a lot of playback issues, and many more problems... Until I decided to remove these links between premiere and after effects and render out all the after effects compositions one by one and insert as clips in premiere pro. 1 week working away with back and fourth.
    I've got a huge workstation:
    i7 4990
    32Gb ram
    GTX780 3gb
    256 gb system ssd
    2 Tb project storage
    *All my hardware and software are update.
    I know that a lot of folks are on the same huge problem and I want to ask everyone:
    How do you save this?
    What is your pipeline?
    Are there any solution?
    Best practice to use dinamic link in a huge project?
    Thanks,
    Ruben Gimenez.
    R&D iceblink.es
    www.rambot.es

    Thank You, Jim -
    Unfortunately that specifically did not work.
    Based on another comment sent to me, here is what did.
    In PProCC
    File > Adobe Dynamic Link > New After Effects Composition
    In AECC
    From that composition created from PPro, I imported the project (aep) initially created in AECC from another team member. Saved the file.
    Back in PProCC
    File > Adobe Dynamic Link > Import After Effects Composition
    Magic.

  • Problem with photshop cc on windows 8.1 and 4k monitor at 3840x2160 resolution

    can anyone help
    i have a problem with photshop cc on windows 8.1 and 4k monitor at 3840x2160 resolution when i lauch photoshop cc everything is very small and i dont know how to get the program at the right size

    Search the forum for similar topics dealing with high-DPI displays. 4k is insane, though. I don't think even CC 2014 is up to it.
    Mylenium

  • I have bought Adobe Photoshop Elements 10 last August 2013 and having problems with installing it on Windows 8.1?

    I have bought Adobe Photoshop Elements 10 last August 2013 and having problems with installing it on Windows 8.1.  Why am I having this problem?

    You can check you Adobe account online to see if the serial number is registered under your account.  If not then your only option will likely be to contact Adobe Support directly thru chat to see if they can provide you with a/the serial number. For them to do so will require you being able to prove ownership.
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • Problem with database schema objects in the entity object wizard

    Hi All,
    When creating a new entity object, I am facing a problem with database schema objects in the entity object wizard, database schema objects (check boxes for tables,synonyms...) are disabled. Actually I am using a synonym but I am not able to select the synonym check box.
    Can any of you folks tell me how to enable the database schema objects (check boxes for tables,synonyms...).
    Thanks in Advance.
    Raja.M

    Make sure your using rite version of jdeveloper..
    Make sure your using apps schema and check whether your able perform DML operations in the schema vis sql developer.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Inserting a Div in a Div

    Is it possible to insert a div tag (or two) inside another div tag. I have a background image I want to be in the background of a section that will have 2 or 3 div tags in it. I know I can go with a table, but I am trying to get away from them. Thank

  • How do i save my word files so i can open them in windows?

    Im doing some work on my MAC and saving it to my pendrive. Whats the best format to save them so i can open and edit them in windows?

  • Can I upgrade version 5.5 to 6.5?

    Hello, I'm only basic on computers so please forgive my ignorance. Is it possible to upgrade from After Effects version 5.5 to 6.5? How do I do it? Does it cost? Do I pay shipping and get a CD or is it a download? Must I have the old version installe

  • Reporting FAGLFLEXA document level data

    Hi SCN my client is reporting GL balances off 0FIGL_C10 fed from 0FI_GL_10 which is reporting FAGLTEXTT and wants document level data. Can I use 0FI_GL_4 to deliver this or must I use a newer extractor e.g. 0FI_GL_14?  I don't see 0FI_GL_14 in RSA5 i

  • Reinstalling after crash

    Hi, yy Macbook pro crashed, i did internet recovery and now id like to reinstall lion, but i cant do anything - erase disk,repair disk, nothing. I havent made any backup so i need to reinstall it completely. Can anybody help me please? Thank you, id