Sqlplus to connect to remote oracle database server

Hi,
I have oracle 10g database server on solaris 10 and I usually connect using my solaris account and run sqlplus on the server itself. this works !
I have downloaded and installed oracle instant client for solaris 64 and I can run sqlplus command but I am confused on what should be the syntax on the command to connect to remote solaris 10 databse server where I have both system and oracle account.
I have tried sqlplus help but still I could not get correct sysntax which could be used to authenticate myself to oracle server.
I tried
sqlplus user@hostname:1512/SID
then it asked for password but when I typed password and pressed enter, it gave some error
but it again asked for username so I type user@SID and then password prompt - typed password and this works!
so I don't understand what should be the correct syntax so that in the first attempt only I am able to connect.
if possible please give the exact command with realworld examples,(I have tried with sqlplus -help already)
Thanks in advance.

wonder what if I did not have tnsnames.ora on the client machine, how will be the syntax?You generally need (or at least strongly want) a tnsnames.ora file on the client machine.
- You could configure Oracle Internet Directory and let that product provide TNS alias resolution for the organization (similar to setting up DNS for a local network).
- Many tools (I haven't personally tried SQL*Plus and it may be version dependent) allow you to specify the entire TNS alias from the tnsnames.ora file (i.e. everything after the abcd.domain.com = entry) but that is hugely cumbersome to type
- Depending on the Oracle client version, the sqlnet.ora file, the complexity of your configuration (i.e. if you are trying to use more sophisticated features like failover), you may be able to use the EZConnect syntax
sqlplus username/password@host:port:SID/service_nameWhere host is the server that the database is running on, port is the port the listener is listening on (i.e. 1521 by default) and SID/service_name is the SID or service name you're trying to connect to.
Justin

Similar Messages

  • Connect to Remote Oracle Database

    I am unsuccessfully trying to connect to remote Oracle database using OleDB/ODBC/Oracle Client.
    Do I have to install Oracle Client in order to use those drivers and which version?
    I would really appreciate any help. THANK YOU!

    Marina,
    Please refer this question to the general Installation forum. Thanks!
    The short answer is yes, you need to have the Oracle client software installed.

  • Software to connect to a Oracle database server.

    Does anyone know of software that enables me to connect to a Oracle database server, and check out the content? Doesn't need to have a gui.
    Orjanp...

    JAVA + JDBC type 4.

  • Trouble connecting to remote oracle database

    Hi,
    i'm having trouble connecting to an oracle database (Release 9.2.0.6.0) using the ojdbc14.jar from the oracle website. Can anybody spot the problems that i need to sort out to get it working? Code and error stack below.
    Thanks,
    Pat
    Code:
    import java.sql.*;
    public class Query1 {
    public static void main (String[] args) {
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String url = "jdbc:oracle:thin:@175.3.41.248/KNWAPROD";
    String user = "username";
    String password = "password";
    Connection conn = DriverManager.getConnection(url,user,password);
    Statement stmt = conn.createStatement();
    ResultSet rs;
    rs = stmt.executeQuery("select count(*) from FACT_FAULT;");
    while ( rs.next() ) {
    // String lastName = rs.getString("Lname");
    System.out.println("In while loop!");
    conn.close();
    } catch (Exception e) {
    e.printStackTrace();
    System.err.println("Got an exception! ");
    System.err.println(e.getMessage());
    Error stack:
    java.sql.SQLException: Io exception: SO Exception was generated
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:319)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:344)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:148)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:545)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at Query1.main(Query1.java:13)
    Got an exception!
    Io exception: SO Exception was generated

    You have:
    String url = "jdbc:oracle:thin:@175.3.41.248/KNWAPROD";Example URLs I've seen/used are:
    String url = "jdbc:oracle:thin:@//myhost:1521/orcl";
    String URL = "jdbc:oracle:thin:scott/tiger@//myhost:1521/orcl"In other words, I think you've munged your URL; you need some slashes and a port number (1521 is the default).

  • Error while making connection with remote oracle database

    Dear,
    I am trying to make connection with oracle database but when i run java file it's raise an error "classnotfoundexception oracle.jdbc.driver.oracledriver"
    DriverManager.getConnection(
      "jdbc:oracle:thin:@erp:1521:ORCL", "apps",
      "apps");
    Pls any body have idea.
    Thanks.

    Thanks for support.
    Below is error which i am getting while making connection with remote database.
    C:\Program Files\Java\jdk1.7.0_05\bin>java OracleJDBC
    -------- Oracle JDBC Connection Testing ------
    Where is your Oracle JDBC Driver?
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
            at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:186)
            at OracleJDBC.main(OracleJDBC.java:13)
    Advice.

  • How to connect to remote Oracle Database 10g Express Edition

    Hi,
    I am very new to Oracle. I have created a successful application using OCCI call (createConnection()) to connect to local (resided on the same PC) Oracle Database. Now I would like to move the application to resided on a different PC and try to connect to Oracle Database. Can anyone points me to the right direction in doing this?
    Thanks in advance.

    Can anyone points me to the right direction in doing this? Well at least for me, self study on OCCI documentation is pointing to the right direction ;-)
    OCCI requires only four shared libraries (or dynamic link libraries, as they are called on some operating systems) to be loaded by the dynamic loader of the operating system.
    Installing Instant Client resolve this.
    Cheers!

  • How to connect to an oracle database server from a linux server?

    Hi,
    I am a total newbie to oracle. At my work, I only know that there is a server with an oracle 10g database set up.
    I was provided with the hostname, oracle sid, port, username and password but i don't know how to connect to it, log on to it and do things on the database.
    Can anyone give me a pointer on how to get started (like how to log on to the server and start doing some simple things. )
    Any help is appreciated :)
    Thank you

    Goto your local Oracle install directory and then goto folder NETWORK/ADMIN
    cd ${ORACLE_HOME}/network/admin
    do you see a tnsnames.ora file there? If you edit that file in your favorite editor, you would hopefully see some entries there already setup. See if one of those entries contain the hostname, sid, port that was given to you. if it does, that name is what you will use:
    $ sqlplus username/password@name_of_tns_entry_you_found_aboveif not, then just duplicate an existing entry and change the relevant settings for your database, give it a new name and use it to connect.
    alternatively you can also use the "Net Configuration Assistant" application.

  • How to connect to remote Oracle database

    hi everybody!  
     i am using LabVIEW with LabSQL locally and Oracle 10.2 database remotely.The remote computer's name is zkz,IP is 192.168.1.2,database name is 'test',TNS listener name is 'listener'.On local computer i have a instantclient.The problem is i can not connect to the database from local computer.What should be the connection string?
    thanks      

    help me please!

  • Not able to connect remote oracle database over VPN

    I can not connect remote oracle database over VPN. tnsping is ok and it shows the server information of remote database. i can also telnet the 1521 port of remote database server. I can connect the same server when it is located in the same LAN. Please help me out this is very urgent.

    6b6c669e-6baa-45c4-a6dc-444aef2d5e7a wrote:
    I can not connect remote oracle database over VPN. tnsping is ok and it shows the server information of remote database. i can also telnet the 1521 port of remote database server. I can connect the same server when it is located in the same LAN. Please help me out this is very urgent.
    First, this is a forum of volunteers.  There is no "urgent" here.
    "Urgent" means one of two things -
    1) people are dying, or
    2) you have a customer-facing, revenue-producing production system that is down.
    (And to get some perspective on the second case, keep the first in mind.)
    For the first, you call whatever civil emergency service seems appropriate.
    For the second, you open an SR with Oracle - which requires a paid-up support contract. For *them* to consider your problem "urgent", you will need to demonstrate that your problem falls under item #2. I seriously doubt your problem fits that criteria.
    You don't have a support contract?  Now you know the exact dollar figure that your company places on the data.
    That said, you need to understand a few things about your specific problem,
    First, port 1521 is only used by the listener to accept a connection request.  Once it gets that request (and finds that it is for a service (sid) that it knows about, it will fork a server process and tell the requesting client that it can communicate with that server process over some other port .. a randomly chosen port number in the "high" range.  It could be your vpn is blocking that other port, whereas your internal firewall is not.
    But this is just an educated guess since I cannot find "can not connect remote oracle database over VPN" in any error message manual. If you had mentioned the VPN along with an actual oracle error message we could be much more precise in our diagnoses and recommendations.
    ---- edit 22 Sep
    It occurred to me that I just assumed you were using the same client machine in both cases ... a laptop that you use both at work (local network) and home (vpn).  If that assumption is false, there are probably problems with your tns setup on the home (vpn) machine.
    But again, it would be much easier to help if you gave us an actual error message.

  • Connecting To Remote Oracle Server

    Hi All,
    I'm new to Oracle and have been given the task of migrating photographs stored as BLOBs in Oracle to Fedora Commons.
    At the moment I'm having problems using SQL-PLUS to connect to the remote database.
    So far this is what I've done:
    1 .Downloaded:
    instantclient-basiclite-win32-11.1.0.7.0.zip
    instantclient-sqlplus-win32-11.1.0.7.0.zip
    2. Extracted the above to C:\Program Files\Oracle Instant Client
    3. Added C:\Program Files\Oracle Instant Client to the start of my PATH variable
    4. Created a tnsnames.ora file in the above directory with the following contents:
    RDF = (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.209.2.40)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = orcl)
    5. Added a new environment variable called TNS_ADMIN and set it to C:\Program Files\Oracle Instant Client
    I then checked the setup by opening cmd and running sqlplus [username]/[password]@rdf which results in this error:-
    SP2-1503 Unable to initialize Oracle call interface
    SP2-0152 ORACLE may not be functioning properly.
    I have Googled this and most suggestions point to setting the ORACLE_HOME variable. However, I want to connect to a remote Oracle database so I don't see why this causes the problem and also even if I had to set that variable what would I set it to?
    Any help is appreciated,
    Keith
    PS:
    I followed this tutorial (it is 2 years old however): http://www.bernzilla.com/item.php?id=784

    is your tns listener up?
    goto command prompt
    type
    lsnrctl
    in the listener control utility type
    status
    and it copy paste the data here

  • Connect to Remote Oracle Server?

    Hi all,
    What is the recommended method for connecting a Windows 2000 web server to a remote Oracle database? Ideally, a driver could add the remote Oracle database to our local list of ODBC datasources.
    We're using ColdFusion (web application development package) to connect to local ODBC datasources. A prospective client of ours would like to use our ColdFusion web server, but with their own Oracle server providing the back-end database, rather than use our native Access or SQL databases. I'm happy to do this, provided a simple, secure and free solution is available.
    The ColdFusion support forums talk about an "Oracle Client" though I can find no reference to it -- let alone, a download page -- on Oracle.com.
    Any help is greatly appreciated.
    Dave

    The general procedure for connecting a web server to an Oracle database via ODBC is as follows:
    1) Install the Oracle client on the web server machine. You can download the Oracle client from OTN by going to "Software" and choosing "Oracle 8i EE". If you have an Oracle CD, "client-only" is an installation option. Note that the 8.1.7.0 ODBC driver will be installed automatically when the Oracle client is installed. You may want to download and install the updated 8.1.7.2 ODBC driver.
    2) Use the Net8 Configuration Assistant to provide the Oracle client with the connection information for the remote Oracle database.
    3) Create a new ODBC DSN for the Oracle database (alternately, your application can make a DSN-less connection)
    4) Now, your application should be able to connect with the Oracle database.
    Justin

  • Using Oracle ODBC Gateway connecting to a remote Oracle database

    Oracle 11gR2
    RHEL 6.4
    Has anyone use the Oracle ODBC Gateway to connect to another Oracle database?  Any issues with that configuration?  Where do I get the ODBC drivers for Linux?
    (I know, "why not use a dblink?" -- well that would be against company security policies)

    Hi,
       From the Oracle point of view we support using DG4ODBC for Oracle to Oracle connections. However, we have not actually tested it as DG4ODBC is primarily designed for access to non-Oracle databases.
    How DG4ODBC will work between Oracle databases depends on the ODBC driver and what that supports. You will need an ODBC Oracle driver which you can get from various suppliers including Oracle but also vendors such as DataDirect, Easysoft etc. You could try a Google search.
    You say you do not want to use database links but that is how DG4ODBC is used, You cannot do -
    sqlplus user/password@dg4odbc_oracle
    Once Dg4ODBC is setup and configured as in this note - if you are using Linux 64-bit -
    How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install (Doc ID 561033.1)
    then in the Oracle database you create a database link and select from tables in the other Oracle database -
    select * from table@dg4odbc_db_link ;
    Regards,
    Mike

  • How to create connection to cluster of Oracle database server?

    Hi, all!
    I have to create connection to Oracle cluster. How to do that?
    I can make a connection to one server but to cluster ....
    I saw many documents but without any result.

    Hello
    Two servers with oracle database server installed organized as a cluster.
    Both server work in parallel, when one of them stop work the other takes connection automaticaly.
    The connection to the cluster is not usual as a one server.
    I have to specify both servers.Any time i can make a connection to one of them but when he stop work my connection will be broken.
    Because of that the servers work under oracle server software.
    So i can make a connection to one of them and both.
    This is made because it is for production firm with many test computers that work 24/7 and send information to this oracle server.
    So i have to make a connection to the general oracle cluster (the two servers simultaneously).
    I saw some connection strings to do tha written on Visual Basic but i have no idea how to do that in C/C++.
    There is no information about that in the Oracle tutorials and manuals.
    I need this explanation because i make a connection without TNS config file.
    Can you help me?
    I will be very appreciated.

  • Connect to Oracle Database Server.

    how can i connect to Oracle Database Server without Oracle Client?

    user11204430 wrote:
    i don't want to connect with web application.i want to connect desktop application.You want to use an Oracle desktop client, without using a client driver that provides the communication layer between the client and the database server?
    You need to install warp flux capacitors - and not only one, but two. Dual warp flux capacitors.

  • How to setup my c# command line application to a remote oracle database?

    Hi all,
    I will like to ask, how do I setup my C# program to be able to connect to a remote oracle database?
    More information:
    - I have an oracle database express version running on my PC.
    - I am able to run and get data from the database on the same PC.
    - But when I bring my application over to another PC within the same LAN. It does not run and given me an error stating "The provider is not compatible with the version of Oracle client".
    What do I need to do on the Client PC so that I am able to communicate back to the server database?
    Many thanks!

    This is the XE forum, not the .NET programming forum, but this might be helpful:
    http://www.codeproject.com/Articles/18692/Instant-Oracle-Using-C

Maybe you are looking for

  • Problem with installing driver

    I have a Webcam Live! PRO. I have downloaded the driver for it and installed it but it isn't working. I plug in the camera when it tells me to, but it's not working. I'm trying to use it on yahoo messenger. I've gotten a new computer. I doubt that is

  • File to IDOC- Status 51:Application document not posted

    Hi Experts, I'm doing a File to IDOC scenario. The Idoc is getting added and then it is trying to post it to the application but i get the error saying that "Fill all required fields SAPMF02D 0111 ADDR1_DATA-COUNTRY". The idoc type i'm using here is

  • Batch Compress without Name Change

    If I wanted to take 300 clips from a DSLR and compress them to ProRes (and save in a new destination folder) without changing the names (i.e. appending the transcode type) how would I do this without having to edit the name of each clip individually?

  • Identify failed subscriptions in a data driven subscription batch

    Hi, I have a single data driven subscription that is a batch of 250 subscriptions running on SQL Server 2008 R2. All the parameter values for the report are sourced from a database table. During the execution of the data driven subscription 5 of thos

  • [svn] 4001: Adding support for asdoc in flex ant tasks

    Revision: 4001<br />Author:   [email protected]<br />Date:     2008-11-03 13:46:13 -0800 (Mon, 03 Nov 2008)<br /><br />Log Message:<br />-----------<br />Adding support for <asdoc> in flex ant tasks<br /><br />QE Notes: Tests need to be added to the