How to do "connect" in PL/SQL ?

Hi all
I want to select the 8i database from 11gR2 database.
So I created a middle DB running 10gR2 and made dblinks like below:
DB A(8.1.7) <- DB B(10.2.0) <- DB C(11.2.0)
Now I want select table t from 11.2.
I Can do from C:
connect id/pass@B
select * from t@A;
But I want it in PL/SQL.
How to do connect in pl/sql or there are any solutions?
Thanks.
Jia Lu

See Metalink Note 207303.1 for a compatibility matrix that details support for database links between database versions.

Similar Messages

  • How can i connect to a SQL Server 2000 database usgin JSP?

    I need (URGENT) to connect to SQL Server 2000 databse using JSP. I do not know how to program using JSP, so if anyone has any code snippet please let me see it. What i need is to give my site some login/password security.
    Anyone?
    Thx.

    just create an ODBC of your database from control pannel -> administrative tools -> data sources (ODBC) ,double click it .....
    go to the tab SYstem DSN , click on ADD button. select the driver for your connection. it will be the last one in the list "SQL Server".
    click Next then give ur DSN name there, description and Server Name , on next give your username and password of SQL server. when it will be connected to the server celect your database from there and hence there will be an ODBC bridge same as in case of MS Access.
    code for connecting to ODBC is
    // DSN-NAME same as in System DSN.
    // username and password are of your databse
    try
              url = "jdbc:odbc:DSN-NAME";
              Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
              connect = DriverManager.getConnection( url,"username","password" );
              catch ( ClassNotFoundException cnfex ) {
                        setErrorMsg( cnfex.getMessage() );
              catch ( SQLException sqlex ) {
                        setErrorMsg( sqlex.getMessage() );
              catch ( Exception ex ) {
                        setErrorMsg( ex.getMessage() );
    Now you are connected to the SQL Server ..... use connect object for further processing .........

  • How do I connect to an SQL Server Database from CR XI?

    Hello All,
    I posted previously to this forum but did not get any response. There surely must be a way to connect to SQL Server from CR XI? My problem is that I keep on getting prompted for a PW or get a message saying "Logon Failed"
    Please see my earlier post, with code sample, on Page 4 (or now 5 or 6 .....)
    "How to log on to SQL 2000 programmatically using VB6 RDC and CR XI "
    I would really appreciate a response from someone as I need to get some pressing work finished for a client.
    Thanks so much in advance
    Peter Tyler

    This shoul dbe posted to the Legacy Development forums

  • How to view connected session's SQL history

    Using the below query, I can see whos connected.
    select username,last_call_et,status,machine from v$session
    How can I see the SQL history for a particular connected session?
    DB version 10gR2

    What about using Auditing ?  For historical analysis Audit is the best option.
    Below link may also be of your interest :
    sql - Oracle queries executed by a session - Stack Overflow
    Regards
    Girish Sharma

  • How do I connect to a SQL Server DB?

    I have a menu designed in Flash which has to pull back
    database records, how do I go about that? Every tutorial seems to
    be different and none are exactly what I am looking for.
    thanks
    Em

    Very true. This is a wide open field of decisions you have to
    make.
    First choice you have is sending via URL variable encoding or
    XML. That will define your tasks needed in ASP. As well would you
    want to simply (most beginners would) just have the ASP send the
    URL variables or XML with Response.write or are you planning a web
    service type of app.
    For Flash you will find the examples in the docs are all you
    need to get the data from the ASP and send back if necessary. Still
    the choices depend on the server (ASP) choices.
    For URL Encoding from ASP:
    LoadVars.load
    For URL Encoding to and from ASP:
    LoadVars.sendAndLoad
    For XML from ASP:
    XML.load
    For XML to and from ASP:
    XML.sendAndLoad
    For overall details on data integration
    Many folks like using the Flash 8 Pro DataGrid component for
    a quick UI to display a SQL select result. You would populate it
    using
    DataGrid.addItem.
    You can also bind the DataGrid to data providers such as an
    array so it updates when the data source changes.
    You also can use many of the Flash 8 Pro UI components in a
    data integration that binds them to a data connector component:
    FLash
    8 Pro data binding component approach. You should review
    Data
    Integration in the Flash Docs for this approach.
    If you need some decisions:
    1. Select a scripting language: ASP, PHP, ASP.Net, JSP, Perl,
    ColdFusion
    2. Select the database: mySQL, SQL Server, Oracle
    3. Decide how you want to send data to and from Flash (XML,
    Url variables, Web Services)
    4. Write a server script that can do the database work you
    want and just use html forms to prove those scripts out.
    5. Look up the docs in Flash for #3 and do the Flash UI.
    You might see from this that Flash or HTML would work with
    the same server scripts.

  • How can you connect to MS SQL Server through Oracle 9i?

    i.e. we want to connect through a stored procedure and NOT a form. Our live DB is still in 9i.

    CKPT wrote:
    user12240205 wrote:
    i.e. we want to connect through a stored procedure and NOT a form. Our live DB is still in 9i.we want to connect through a stored procedure -- connect through stored procedire? i never heard. can you please post your views this information is not enough.CREATE PROCEDURE proc1 (p_sqlsever_credentials varchar2, p_status OUT boolean) IS
    BEGIN
    -- Connect to SQL Server using p_sqlsever_credentials
    -- Execute Stored Procedure (SP) in the SQL Server DB passing paras to it.
    -- If SP in SQL Server is successful then SP will COMMIT in SQL Server
    -- If failure it will be rolled back there.
    -- SP will return status
    -- Pass the status to the calling program
    END;
    /

  • How to get Connection string for Sql Server Installed ( using Gallary ) on Azure VM ?

    Installed Azure VM From gallary with Sql Server 2012, even after allowing 1433 port through firewall, still cant get access to Sql Server from outside vm, So please provide steps for getting exact ServerName for connecting Sql Server on VM for connecting
    from Visual Studio Application.
    Thanks.

    Hi,
    You can check the DNS name of the VM in the VM instance page of the Azure management portal.
    In addition, you can also refer to the third-party article below:
    http://thomaslarock.com/2014/02/connect-to-a-windows-azure-vm-using-sql-server-management-studio/
    ( Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please
    make sure that you completely understand the risk before retrieving any suggestions from the above link.)
    Best regards,
    Susie
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How can i connect to SQL Server 7.0 on Windons Using JDBC

    How can i connect to Microsoft SQL Server 7.0 on a windows enviroment ?
    in sql server 2000 some jar files are required that is
    What you need to do is actually add all three jar files to your class path individually. There are three jar files that come with this driver the msbase.jar, msutil.jar, and mssqlserver.jar. for sqlQ server 2000.
    now the problem is that i cant find these files on my system. firstly where these files will be located. secondly are they will be used to connect to SQL Server 7.0. thirdly if not what is the procedure.
    My next Problem is that I have Websphere Studio Application Developer. in which their is this facility of Database Webpages its like a wizard which makes automatically beans servlets and JSP but before that you need a Driver Name and and Class Name for to Connect to the Database.
    Can you tell what is the specific Driver Path for the Microsoft SQL Server 7.0 . secondly is this the class which is used to connect to SQL server 7.0 "com.microsoft.jdbc.sqlserver.SQLServerDriver" where can i find this one. for SQL server 7.0.
    please provide some guidance in this regard.

    You can search for the JDBC drivers at, http://industry.java.sun.com/products/jdbc/drivers
    All the three jars that you specified are part of MsSQL Server jdbc driver. You need them (in the classpath) to get connected to the database.
    "com.microsoft.jdbc.sqlserver.SQLServerDriver" is the class in mssqlserver.jar. This is the driver class which will be used to get connected to the database.
    You can search in this forum for writting jdbc code (for Sql Server). If you don't find these jars, give me your e-mail id.
    Sudha

  • Write java to connect to MS SQL server

    Hello all, I'm working on a project for my class to compare the schema of two MS SQL database which write in Java. I'm doing a module called: Networking, which connect to the database and take out the data from it. So I have two questions to ask: (if someone can give me a sample code, i will be thankful)
    1. How do I connect to MS SQL after the user pass in the parameters as usename, password and ip (or servername)?
    2. After login how do I take the data out of the database?
    3. How do I apply a query to MS SQL by java?
    I'm appreciated if anyone can answers my questions.
    Thank you

    Mr. Nice Guy, this is hardly an advanced topic. Look at the Tutorials link to your left first from now on.
    Here's sample code that will get you started:
    package be;
    import java.sql.*;
    import java.util.*;
    public class DataConnection
        public static final String DEFAULT_DRIVER   = "sun.jdbc.odbc.JdbcOdbcDriver";
        public static final String DEFAULT_URL      = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\Software\\Java\\Forum\\DataConnection.mdb";
        public static final String DEFAULT_USERNAME = "admin";
        public static final String DEFAULT_PASSWORD = "";
        /** Database connection */
        private Connection connection;
         * Driver for the DataConnection
         * @param command line arguments
         * <ol start='0'>
         * <li>SQL query string</li>
         * <li>JDBC driver class</li>
         * <li>database URL</li>
         * <li>username</li>
         * <li>password</li>
         * </ol>
        public static void main(String [] args)
            DataConnection db = null;
            try
                if (args.length > 0)
                    String sql      = args[0];
                    String driver   = ((args.length > 1) ? args[1] : DEFAULT_DRIVER);
                    String url      = ((args.length > 2) ? args[2] : DEFAULT_URL);
                    String username = ((args.length > 3) ? args[3] : DEFAULT_USERNAME);
                    String password = ((args.length > 4) ? args[4] : DEFAULT_PASSWORD);
                    db = new DataConnection(driver, url, username, password);
                    List result = db.query(sql);
                    System.out.println(result);
                else
                    System.out.println("Usage: db.DataConnection <sql> <driver> <url> <username> <password>");
            catch (SQLException e)
                System.err.println("SQL error: " + e.getErrorCode());
                System.err.println("SQL state: " + e.getSQLState());
                e.printStackTrace(System.err);
            catch (Exception e)
                e.printStackTrace(System.err);
            finally
                if (db != null)
                    db.close();
                db = null;
         * Create a DataConnection
         * @throws SQLException if the database connection fails
         * @throws ClassNotFoundException if the driver class can't be loaded
        public DataConnection() throws SQLException,ClassNotFoundException
            this(DEFAULT_DRIVER, DEFAULT_URL, DEFAULT_USERNAME, DEFAULT_PASSWORD);
         * Create a DataConnection
         * @throws SQLException if the database connection fails
         * @throws ClassNotFoundException if the driver class can't be loaded
        public DataConnection(final String driver,
                              final String url,
                              final String username,
                              final String password)
            throws SQLException,ClassNotFoundException
            Class.forName(driver);
            this.connection = DriverManager.getConnection(url, username, password);
         * Clean up the connection
        public void close()
            try
                this.connection.close();
            catch (Exception e)
                ; // do nothing; you've done your best
         * Execute an SQL query
         * @param SQL query to execute
         * @returns list of row values
         * @throws SQLException if the query fails
        public List query(final String sql) throws SQLException
            Statement statement     = this.connection.createStatement();
            ResultSet rs            = statement.executeQuery(sql);
            ResultSetMetaData meta  = rs.getMetaData();
            int numColumns          = meta.getColumnCount();
            List rows               = new ArrayList();
            while (rs.next())
                Map thisRow = new LinkedHashMap();
                for (int i = 1; i <= numColumns; ++i)
                    String columnName   = meta.getColumnName(i);
                    Object value        = rs.getObject(columnName);
                    thisRow.put(columnName, value);
                rows.add(thisRow);
            rs.close();
            statement.close();
            return rows;
    }MOD

  • How can I connect to SQL Server CE?

    Hi!
    How can I connect to SQL Server CE ?
    Any idea?
    I found jdbc driver for SQL Server 6.5,7.0,2000.
    But no driver for SQL CE.
    Thanks for any suggestion....

    I am also searching for same answer.
    I wanna choose Access as a db. but I can't find that so I have a no choice to select SQL2000CE though.
    I am stuck in driver problem. I can't find that.
    Should I use Oracle Lite or PointBase?
    I am under a lot of stress... like you've been...
    I wish you find and post that....

  • How do i connect to sql server 2012 from cmd .

    Hi ,
    I Installed sql server 2008 R2 and 2012 Express and sql server2014 . I can conect to sql server 2008 R2 using
    SQLCMD -L command .
    How do i connect to sql server 2012 express edition from cmd .
    Any Hep appreciated
    Thanks in advance,
    Shravan

    I HAVE ANOTHER INSTANCE NAMED TEST  WHEN I USE THE COMMAND IT GIVES ME THIS ERROR 
    HOW TO RECTIFY 
    C:\Users\HP>SQLCMD -S HP-HP/TEST
    Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Named Pipes Provider: C
    ould not open a connection to SQL Server [67]. .
    Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired.
    Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : A network-related or in
    stance-specific error has occurred while establishing a connection to SQL Server
    . Server is not found or not accessible. Check if instance name is correct and i
    f SQL Server is configured to allow remote connections. For more information see
     SQL Server Books Online..
    PLZ HELP 

  • How do I create a connection string to sql server?

    Hi All,
       I am currently connecting to a SQL Server via ODBC DSN connection. I am wondering how do I create a connection string directly to a sql server without a DSN connection?
    Thank you in advance.

    If you have SQL Server or client installed in your machine you can directly connect to SQL server using native connection. When you create new report you can see the option create new connection, here you can see SQL Server. Expand it and enter the connection details where you will be directly connected to SQL Server without ODBC connection.
    Regards,
    Raghavendra

  • How to connect to a Sql server from Oracle using db link

    Hi All,
    Does anybody have any idea about how to connect to a sql server from oracle database using db link to syncronize the data? I need to pull the data from Sql server table to Oracle tables and relay messages back to the sql server.
    Thank you,
    Praveen.

    we have 2 products - DG4MSQL and DG4ODBC.
    DG4ODBC is for free and requires a 3rd party ODBC driver and it can connect to any 3rd party database as long as you use a suitable ODBC driver
    DG4MSQL is more powerfull as it is designed for MS SQL Server databases and it supports many functions it can directly map to SQL Server equivalents - it can also call remote procedures or participtae in distributed transactions. Please be aware DG4MSQL requires a license - it is not for free.
    Check out Metalink and you'll find notes how to configure both products.
    For a generic overview:
    Note.233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases
    And the setup notes:
    DG4ODBC
    Note.561033.1 How to Setup DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX) :
    Note.466225.1 How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit RDBMS.HS-3-2 :
    Note.109730.1 How to setup generic connectivity (HSODBC) for 32 bit Windows (Windows NT, Windows 2000, Windows XP, Windows 2003) V817:
    Note.466228.1 How to Setup DG4ODBC on Linux x86 32bit
    DG4MSQL
    Note.466267.1 How to Setup DG4MSQL (Database Gateway for MS SQL Server) on Windows 32bit
    Note.562509.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX)
    Note.437374.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) Release 11 on Linux

  • How do I connect Oracle 11g 11.1.0.7 on LINUX 64-bit machine to SQL Server?

    Hi,
    Does anyone know how do I connect from Oracle 11g 11.1.0.7 on LINUX 64-bit machines to SQL Server 2000 DB please so I can set up a regular data extraction job to migrate data? Does this use products I am already licenced for under Oracle Enterprise Edition?
    Thanks,
    Jeremy

    you must be not read it carefully.
    The gateway software is there, in the bottom.
    Oracle Database Gateways 11g Release 1 (11.1.0.6.0)
    for Linux x86-64
        linux.x64_11gR1_gateways.zip (505,401,641 bytes) (cksum - 2593459988)  just download it.
    and this is how to install and configure
    http://download.oracle.com/docs/cd/B28359_01/gateways.111/b31042/partsql.htm#BJEGEBFH

  • How to store jpeg images in SQL server using NI database Connectivity Toolset. Can anyone please help me in this regard.

    Please tell how to store jpeg images in SQL Server using NI Database Connectivity Toolset.

    http://www.w3schools.com/sql/sql_datatypes.asp
    You setup a field as BLOB and store the binary of the picture there. Depending on the database it can be called differently as you can see in the link, in SQL server there's even a Image datatype.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

Maybe you are looking for

  • How do i get a Widget to read from CP4's Library (holly grail of widgets)

    Hi All I'm having a little trouble with one of my widgets. The widget basically creates a simple image tween inside CP4. (something i think is sorely missed in the CP franchise) To make this widget reusable I need to be able to replace the image with

  • How to receipt demand draft(DD) received from customer  ?

    Dear all, Explaining problem in detail,Client has made a scrap sale(ar invoice) to customer for Rs.74025.76, need to collect tax colleceted as source(TCS) for above amount which calculates to Rs.838, Rounding off is Rs.0.24. Customer paid for ar invo

  • Bullet sound effects

    Can you add sound effects to individual bullets in a presentation created with Keynote 3? If so, how?

  • Mail from AOL accounts misidentified as spam

    Mail is sending messages from AOL accounts directly into the trash, even though the mail is correctly addressed to my e-mail account and comes from people who are in my address book. This also happened recently with a message from a non-AOL account h

  • Problem with Uploading files in Web applications with the iPad

    Hello, I have a question. How can I upload a word file in the gmx-Mailserver with my IPad? I can only find the picture library. In this library i cannot upload a word-file or other files-types. I use Safari. The same problem exists by other web appli