Need help/info on "database link of same name has an open connection"

Hello,
I am trying to create an application on html db (new in html db) to see if I can move data from one database (oracle 9i) say dbdev to another one called dbtest. I want to be able to select the data from html db app and by clicking on a button move them to dbtest ( right now only looking at data from one table ). This is what I have done so far:
1. created a duplicated table of dbdev into html db with no data.
2. created package with procedures to
A. create a database link
B. delete if there is a record on html db table
C. go trough a loop (cursor) and get the data from dbdev
D. drop the database link
Now, when I do all of the above steps I get an error “database link of same name has an open connection" but when I don’t do the step C. I don’t get this error. So something is wrong in my step C. On my step C, I just open the cursor, do a for loop and insert the records into my html db table.
Any idea!!!
Thanks
More questions to come…..

never mind, I should not drop the database link with in the procedure.
thx

Similar Messages

  • ORA-02018: database link of same name has an open connection

    Hi All,
    Am getting the above error msg from a procedure (packaged or not, doesn't seem to matter), run from a .SQL script through sqlPlus, where I've created a DB link, fired off a bunch of queries against it using dynamic SQL, and then tried to drop the database link. Have tried both through dynamic SQL as well as via as a straight statement in the SQL script and in both cases, get this statement. However, if I then open another connection/session to the DB, am able to drop the link fine. So - it seems related to the session life-cycle? Perhaps some sort of caching going on at the DB level is locking the DB link? Anyone else hit this, and if so, any clues on workarounds?
    Pretty sure this is "new" (10g) behavior as this script used to work fine in older (9i) DBs...
    Thanks,
    Jim

    Check this link. It explains exactly what you are facing.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1253651449550
    Regards
    Raj

  • Need help renaming a file to the same name as folder.

    I am looking to loop through a directory full of folders each containing one file. I am wanting to change each file name in each folder to the same name as the folder. The code compiles fine, it just never actually does anything. Here is my code.
    import javax.swing.JOptionPane;
    import java.io.File;
    public class filing
         public static void main (String [ ] args)
              File dir = new File("C:\\testing");
              File file;
              File cf;
              String dirs[ ] = dir.list();
              String folderName = "";
              if (dirs == null)
                   JOptionPane.showMessageDialog(null, "Directory does not exist", "I can't find it", JOptionPane.WARNING_MESSAGE);
              else
                   for (int i=0; i<dirs.length; i++)
                        folderName = dirs[ i ];
                        file = new File("C:\\testing\\"+folderName);
                        String changeFile[ ] = file.list();
                        cf=new File(changeFile[0]);
                        cf.renameTo(new File("C:\\testing\\"+folderName+".txt"));
              System.exit(0);
    }

    Nevermind. I figured it out.
    Instead of cf=new File (changeFile[0]);
    I added cf = new File ("C:\\testing\\"+folderName+"\\"+changeFile[0]);
    thanks anyway!

  • I need Help with the dynamic link feature in CS3

    Hi I was wondering if anyone could help me with an issue I am having? I have the adobe cs3 master collection. Having watched tutorials on the dynamic link feature my version seems not to have the same options as those I have viewed. I wish to send my premiere video creation to encore using dynamic link, however when I click "file" and then "adobe dynamic link" the only options available are about "adobe after effects". I can export to encore however I am only alloowed to export one premiere sequence to one new encore file, I cannot create an encore file and import several premiere sequence into the same encore project. That means currently I can only have an encore creation with one premiere sequence in it, and I have no adobe dynamic link. Any help anyone could offer would be greatly appreciated.

    Thanks very much for that guys but my premiere media encoder only lets me export as: MPEG1, MPEG1-VCD, MPEG2, MPEG2 blu-ray, MPEG2-DVD, MPEG2-SVCD, H.264, H.264 blu-ray, Adobe Flash Video, Quicktime, Real Media, Windows Media. Are any of these formats DV AVI?
    Am I to export my videos direct to encore or save them elsewhere (e.g desktop). It seems that I cannot export sequences from different premiere projects to the same encore project.
    Sorry if any of these questions seem obvious, I am just new to premiere and keen to do things right from the off.
    Many thanks again guys.
    Date: Tue, 24 Nov 2009 19:32:47 -0700
    From: [email protected]
    To: [email protected]
    Subject: I need Help with the dynamic link feature in CS3
    Harm is correct.  For SD DVD, exporting as a DV AVI file from Pr will give you good results.  Encore's Automatic Transcoding will give you maximum quality for the available disc space.
    -Jeff
    >

  • Need help to find out link between process order and purchase order.

    Hi All,
    Need help to find out link between process order and purchase order.
    We have purchase order, we can find out associated process order in MD09 (No Purchase Requisition found in Purchase order). When I tired to replicate this scenario with same material in system but not able to do.
    Please suggest me what needs to check to get purchase order link to process order.. (this is not subcontracting )
    Edited by: SAP PQ on Sep 26, 2011 5:24 PM
    Thanks,
    SAP PQ
    Edited by: SAP PQ on Sep 26, 2011 5:24 PM

    MD09 is pegging. In SAP pegging is dynamic, meaning that there's no fixed link between purchase order and process order in your case.
    This is why you did not get the same result when you tried again later.
    Such a link can exist only if you do direct procurement for the order.

  • I need help with the photo stream. Everytime I try to open it on my PC it says photo stream is unable and I have tried everuthing to enable it but it doesn't work. Any help, please?

    I need help with the photo stream. Everytime I try to open it on my PC it says photo stream is unable and I have tried everuthing to enable it but it doesn't work. Any help, please?

    Freezing, or crashing?
    ID on the Mac can produce reports that may (or may not) prove helpful in diagnosing the problem. I suspect this is something not directly related to InDesign, and maybe not to any of the Adobe apps directly since you seem to be having a problem in more than one. That often inidcates a problem at the system level.
    Nevertheless, it won't hurt to try to gather the reports. You'll find driections for how to generate them, and to post them on Pastebin.com (then put a link to them here) so we can see what's going on at Adobe Forums: InDesign CS5.5 Not Responding
    Do you happen to run a font manager? If so, which one, and waht version?

  • I buy for mac app but not for the iPad, so how do I reinstall a program that has already purchased? I need help because I bought the imovie'11 but when he opened it only brought 8 movie trailer templates instead of the 15 it says on the program. How do I

    I buy for mac app but not for the iPad, so how do I reinstall a program that has already purchased? I need help because I bought the imovie'11 but when he opened it only brought 8 movie trailer templates instead of the 15 it says on the program. How do I solve this problem? Once paid for a program incomplete. I also liked that the AppStore itself had a button to reinstall programs already bought, because it is very hard to understand how to do this in the store, only option is to install and hide purchase, and how do I reinstall, attention'm talking about reinstalling a computer mac, not an ipad or iphone.
    Thank you.

    Prodesigntools.com , go ahead and download the software from there and use your serial number to serialize it.

  • Is it possible to create a Clone database with the same name of source db ?

    Is it possible to create a Clone database with the same name of source db using RMAN ...
    DB version is 11.2.0.2
    Is it possible to clone a 11.2.0.2 database to 11.2.0.3 home location directly on a new server . If it starts in a upgrade mode , it is ok ....

    user11919409 wrote:
    Is it possible to create a Clone database with the same name of source db using RMAN ...
    yes
    >
    DB version is 11.2.0.2
    Is it possible to clone a 11.2.0.2 database to 11.2.0.3 home location directly on a new server . If it starts in a upgrade mode , it is ok ....yes
    Handle:     user11919409
    Status Level:     Newbie (10)
    Registered:     Dec 7, 2009
    Total Posts:     102
    Total Questions:     28 (22 unresolved)
    why do you waste time here when you rarely get any answers to your questions?

  • New database link gets long name with domain name

    When I create a database link with a name "X", oracle renames it to X.regress.rdbms.dev.us.oracle.com
    Why?

    Check this thread:
    REGRESS.RDBMS.DEV.US.ORACLE.COM  concates to every databaselink name.

  • I am john and I need help downloading a progmmme yesterday and wanted to finish downloading open it and I am not told me that the program was shut down unexpectedly and restart ponia not opened and went back to download it and not opened my back probe to

    i am john and I need help downloading a progmmme yesterday and wanted to finish downloading open it and I am not told me that the program was shut down unexpectedly and restart ponia not opened and went back to download it and not opened my back probe to turn off the computer and there was no case

    i am john and I need your help yesterday bought a program called DJAY when I finish the download and got an error opened and I saw him there was no case to install and thank you for your help anyway

  • Hey i need help my iphone 5 all of a sudden has like an all white border around it and sometimes it has a blank screen what seems to be the problem?

    hey i need help my iphone 5 all of a sudden has like an all white border around it and sometimes it has a blank screen what seems to be the problem?

    Try turning off the following:
    Settings>Mail, Contacts, Calendars>Push>OFF
    Settings>Notifications>Mail>Gmail>Notification Center>OFF
    Settings>Mail, Contacts, Calendars>Fetch New Data>Off

  • Need help in creating Database connection to Apache 4

    I desperately need help for my project. I'm doing a shopping cart project. Created a java bean to establish connection to my sql 7 server database. But the following always appear. I'm using dreamweaver mx to create my webpage and so I use its binding and components feature.
    Here's the error message I always get..
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    An error occurred at line: 36 in the jsp file: /TMP8ouafocg7v.jsp
    Generated servlet error:
    C:\tomcat4\work\Standalone\localhost\ArtGallery\TMP8ouafocg7v$jsp.java:163: Class org.apache.jsp.DBConn not found.
    DBConn connect = null;
    ^
    An error occurred at line: 36 in the jsp file: /TMP8ouafocg7v.jsp
    Generated servlet error:
    C:\tomcat4\work\Standalone\localhost\ArtGallery\TMP8ouafocg7v$jsp.java:166: Class org.apache.jsp.DBConn not found.
    connect= (DBConn)
    ^
    An error occurred at line: 36 in the jsp file: /TMP8ouafocg7v.jsp
    Generated servlet error:
    C:\tomcat4\work\Standalone\localhost\ArtGallery\TMP8ouafocg7v$jsp.java:171: Class org.apache.jsp.DBConn not found.
    connect = (DBConn) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "DBConn");
    ^
    3 errors, 1 warning
    Anyone out there, pls let me know the solution soon. Thanks!

    I was glad I came across this note. I recently started a tutorial on J2EE , and have run into exactly the same error. Have you found a solution? Can you share it with me?
    Thanks.....

  • Need help setting up DB Link from my Oracle 11g XE to SQL Server.

    Hi,
    I'm trying to create a DB Link from my Oracle 11g Express Edition in a Windows XP machine to an SQL Server. Here are the steps I've done so far.
    1. Created and setup an ODBC Connection for the SQL Server DB. Named it SQLSERVER. Windows Authenticated.
    2. Modified listener.ora. See below.
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
          (PROGRAM = extproc)
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
          (PROGRAM = extproc)
        (SID_DESC =
          (SID_NAME = SQLSERVER)
          (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
          (PROGRAM = hsodbc)
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    DEFAULT_SERVICE_LISTENER = (XE)3. Modified tnsnames.ora. See below.
    XE =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(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)
    SQLSERVER =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT=1521))
        (CONNECT_DATA =
          (SID = SQLSERVER)
      (HS = OK)
    )4. Copied C:\oraclexe\app\oracle\product\11.2.0\server\hs\admin\initdg4odbc.ora to C:\oraclexe\app\oracle\product\11.2.0\server\hs\admin\initSQLSERVER.ora and modified it. See below.
    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Database Gateway for ODBC
    # HS init parameters
    HS_FDS_CONNECT_INFO = SQLSERVER
    HS_FDS_TRACE_LEVEL = off
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>5. Restarted listener.
    C:\>lsnrctl stop
    LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 18-SEP-2012 11:33
    :51
    Copyright (c) 1991, 2010, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    The command completed successfully
    C:\>lsnrctl start
    LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 18-SEP-2012 11:33
    :54
    Copyright (c) 1991, 2010, Oracle.  All rights reserved.
    Starting tnslsnr: please wait...
    TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Production
    System parameter file is C:\oraclexe\app\oracle\product\11.2.0\server\network\ad
    min\listener.ora
    Log messages written to C:\oraclexe\app\oracle\diag\tnslsnr\PHAILORTD000012\list
    ener\alert\log.xml
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Produ
    ction
    Start Date                18-SEP-2012 11:33:57
    Uptime                    0 days 0 hr. 0 min. 3 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Default Service           XE
    Listener Parameter File   C:\oraclexe\app\oracle\product\11.2.0\server\network\a
    dmin\listener.ora
    Listener Log File         C:\oraclexe\app\oracle\diag\tnslsnr\PHAILORTD000012\li
    stener\alert\log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
      Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "SQLSERVER" has 1 instance(s).
      Instance "SQLSERVER", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully6. Created database link using the following command.
    create database link sqlserver using 'SQLSERVER';7. Test using
    select * from "dbo.mytable"@sqlserver;
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from SQLSERVER
    select * from dbo.mytable@sqlserver;
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from SQLSERVER
    select * from mytable@sqlserver;
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from SQLSERVERI followed the steps provided in this link but not sure where I went wrong. Can someone help me.
    http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm
    Thanks,
    Allen

    Here's more information on the machines.
    Machine where the Oracle Database 11g Express Edition: IP Address is 10.162.128.67
    Machine where the SQL Server database: IP Address is 142.120.51.30.
    I've modified the tnsnames.ora to the following:
    XE =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 10.162.128.67)(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)
    SQLSERVER =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 142.120.51.30)(PORT=1433))
        (CONNECT_DATA =
          (SID = SQLSERVER)
      (HS = OK)
    )But now I'm getting the following error:
    C:\>tnsping sqlserver
    TNS Ping Utility for 32-bit Windows: Version 11.2.0.2.0 - Production on 18-SEP-2
    012 14:52:59
    Copyright (c) 1997, 2010, Oracle.  All rights reserved.
    Used parameter files:
    C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
    (HOST = 142.120.51.30)(PORT=1434))) (CONNECT_DATA = (SID = SQLSERVER)) (HS = OK)
    TNS-12541: TNS:no listener
    C:\>Regards,
    Allen

  • Database link between the databases with the same name

    Hi,
    I need to establish a db link between two databases that are named the same way on two different servers.
    server 1 has a database dev1 and server2 has a database dev1. The tnsnames on server2:
    DEV1 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server2)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = DEV1)
    DEV1_server1 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = dev1)
    Can anyone let me know a way to create a database link between the two above?
    Thanks.

    Hi,
    Am not sure what problem you are facing in creating a db link
    create database link dev1_server1 connect to x identified by x using "dev1_server1"
    create database link dev1_server2 connect to x identified by x using "dev1_server2"where dev1_server1 and dev2_server2 are the tns entry in tnsnames.ora file of server2 and server1 respectively.
    Regards
    Anurag

  • Database Link on Same Database

    It seems funny to me that If you are importing source metadata from the same database but different schemas you still need to use a dblink. Fetching data over the dblink will require more process overhead than granting select privileges to the owbdesign user.
    Is there anyway I can import metadata from at the same db server without using dblink? Am I missing something?
    Thanks,
    Leo

    A location is a logical entity that describes where a certain OWB object is located. There are several types of locations: an oracle database location refers to an Oracle DB schema, a file location refers to a file on a file system, a SAP location refers to a SAP instance etc. During deployment, the location will have to be 'registered' - i.e.the phisical location parameters will have to be specified (username/password, db instance, port and hostname for the database for example).
    A connector is an object that is created implicitely by OWB once it is established that data will be flowing from one location to the other (for example, if both locations are databases, the connector will represent a database link).
    Regards:
    Igor

Maybe you are looking for

  • I attempted to download the "lastest version" and it infected my laptop with a virus

    Last week I was given a prompt from Firefox that I needed to update to the latest version 4.01 and I did so and after it finished downloading my computer prompted me that it was an infected file. My computer has now crashed several times and is infec

  • MRP abatement on the material

    Hello All, We have scenario depot wherein,  we buy the material at base price say 60 , and we have a MRP on which to be sold to the customer. and organisation is entitled for 31.5% abatement. Now we will get the excise duty as MRP - 20% abatement on

  • Relation between msg type & Idoc type

    i have a X msg type which is already assigned to Y idoc type. can I assign the same X msg type to a new Z Idoc type. If yes, what is the effect on the old assignment? note: Y & Z have no relation at all. both of then are two different Idoc types.

  • Illustrator cc 2014 can't save files

    Hi! I Have a lot of problems with the Illustrator CC 2014. And it freaks me out. I have no idea how to reach Adobe. I've tried another Adobe forum but haven't heard anything.. I would appreciate some sort of help. Or if someone knows where to post th

  • Where do I find pages on my macbook if it was preinstalled?

    I am unable to find pages '08 on my macbook. I just got this yesterday. I've never had one, my last laptop was a sony and it is extremely different! So if anyone can help me find pages it would be greatly appreciated.