sqlplus to connect to remote oracle database server

Hello

I have the server database oracle 10g on solaris 10 and I usually connect using my account to solaris and run sqlplus on the server itself. This works!

I downloaded and installed the client instant oracle for solaris 64 and I can launch sqlplus command but I'm confused on what should be the syntax of the command to connect to remote oracle and solaris 10 database server where I have the system account.

I tried sqlplus help but still I could not correct syntax that may be used to authenticate to the oracle server.

I tried

sqlplus user@hostname:1512/SID

then he asked for password, but when I typed the password and you press on enter, it gave some error

but he still asked as username so I type user@SID and then prompt password - typed password and it works!

so I do not understand what should be the correct syntax for that in the first attempt, I'm able to connect.

If possible, please give the exact command with realworld examples, (I tried with sqlplus - help already)

Thanks in advance.

wonder what if I didn't tnsnames.ora on the client machine, how will be the syntax?

You generally need (or at least strongly want) a file tnsnames.ora on the client machine.

-You could configure Oracle Internet Directory and allow this product provide TNS alias resolution for the Organization (similar to the DNS configuration for a LAN).
-Many tools (I have not personally tried SQL * more and it can be dependent on version) allow you to specify the whole TNS alias in the tnsnames.ora file (i.e. everything that follows the abcd.domain.com = entry) but which is extremely heavy for type
-According to the version of the Oracle file sqlnet.ora, the complexity of your configuration client (that is, if you try to use the more advanced features such as failover), you may be able to use the syntax EZConnect

sqlplus username/password@host:port:SID/service_name

Where host is the server that the database is running, the port is the port the listener (i.e. 1521 default) listening and SID/service_name is the SID or service name, you are trying to connect to.

Justin

Tags: Database

Similar Questions

  • Unable to connect to remote oracle database!  Help, please!

    Hi all-

    I am a new user Oracle and you are allowed to access a remote Oracle database, however I have problems with the installation/configuration program! I downloaded the driver Oracle and the Instant Client (11.2.0.2.0) because I need to use Microsoft Access for the data access (the Access database is already configured to the correct Oracle database). I'm under the impression that, to do this, I need to be able to use the ODBC Administrator to get all set up. Note: Im working on Windows XP.

    I have questions:

    -I don't seem to have installed Netca (which seems to be the recommended method to configure a connection). I have manually adjusted the TNSNAMES file. ORA file so it matches the database, but I'm not sure what would be my next step.

    -When I open SqlPlus it wants a username and password, and I tried the default settings and got an error each time. I must first use SqlPlus, or establish a connection via ODBC first?

    -Also: ODBC requires a TNS Service name, and I'm not sure, where this is established; something that would give the database manager?

    I really just do not know how to configure this remote connection! I continue to run with obstacles and really want a reference "step by step" on the way to do it, if there is such a thing. Any help or additional reference material would be appreciated! I ran by the content of the forum, but have not been able to decode the jargon! Thank you very much in advance.

    Marilyn

    MsMonroe wrote:
    Hi Ed-

    I use the Oracle's ODBC driver. I think there may be a problem with the TNSnames file because I tried to add this file as a"Data Source", and he also said that a connection could not be established. What do you mean by the MS implemented? A configuration of Data Source?

    By MS implemented, I was referring to the MS ODBC for Oracle driver, against the Oracle ODBC for Oracle driver.

    The "source of data file' has nothing to do with the tnsnames file. The ODBC Manager retains its DSN definitions in one of three places. "User DSN" is stored in the HKEY_LOCAL_USER registry, the "System DSN" definitions are stored in the HKEY_LOCAL_MACHINE registry and 'FILE DSN"definitions is stored in a file... I don't remember exactly where or what it's name is as I have (when he is forced to deal with odbc) just keep things simple and use "system dsn". But these aren't all the definitions of ODBC, Oracle tnsnames file.

    The link between the ODBC DSN and the tnsnames.ora presents itself as a property of the ODBC definition. Suppose you have this for a tnsnames.ora entry:

    houston =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = vmlnx01)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
        )
      )
    

    Then
    -When you set up your odbc dsn, if you use the MS for Oracle driver, you must specify 'houston' as the 'server '.
    -When you set up your odbc dsn, if you use the Oracle odbc driver, you must specify "houston" as "the TNS Service name".

    >

    Im going to try to post a modified version of the content of my TNSnames.ora file (for some reason any the "content is not allowed ' by the forum), but I would like to get some comments on whether the structure of the content may be the problem.

  • Unable to connect to remote oracle database

    Hello

    I am trying to connect to the database on a remote server oracle in visual studio 2005 by using instant client for windows.

    In visual studio 2005 Server Explorer, I clicked on add a connection
    Server name: I entered the server ip:1521@my instance name
    then user and password.

    It gives me the error: ORA-12546 TNS permission denied.

    I tried searching for lsnrctl status on the remote server, it works fine, and I can connect using sqlplus.

    I also disabled the firewall to avoid the risk of blocking, however tried my windows box: telnet ip 1521, it just does not respond and seems to timeout.

    should I set in the remote server first to accept connecting from outside?

    To connect via .NET with Instant Client, you will need the version 11 ODAC, see
    http://www.Oracle.com/technology/software/tech/Windows/odpnet/utilsoft.html

    The regular customer Instant download from http://www.oracle.com/technology/software/tech/oci/instantclient/index.html
    does not contain the provider .NET.

    If telnet hangs without error message, this is of course no evidence that you can successfully connect to the database.
    It only means that you have reached the listening process, which is the best you can do with telnet.

    Yours,
    Laurenz Albe

  • Check the connection to a remote Oracle database


    Hello

    I have an application that runs on a server that connects to an Oracle database on another server.  The application uses Java and JNDI to connect, there is no Oracle client installed on the server hosting the application.  The application seems to have been to connect to the database on the other server.  How can I check that the connection to the database still work from the server hosting the application?  Is there a software tool that I use does not require Oracle client must be installed.

    Thanks in advance

    Alanjo

    the connection request is saved in the file listener.log on the DB server

  • How to connect to remote Oracle through shell script server.

    Hi, I'm new to Shell scripting. I try to connect to remote oracle system, but I think Sqlplus not found error. I have sqlplus executable inside bin under oracle home, but still, I get the same error. can someone guide me to get this thing done.

    export ORACLE_HOME=/opt/oracle/oracle11g/product/11.2.0
    export NLS_LANG = American_America.US7ASCII
    export LD_LIBRARY_PATH = $ORACLE_HOME/lib: $LD_LIBRARY_PATH
    Export ORACLE_PATH = $ORACLE_HOME/bin
    export PATH = $ORACLE_HOME/bin: $PATH

    sqlplus-s/nolog < < EOF
    connect wcadmin / [email protected]:1521 / wctest98
    Select * twice;
    output
    EXPRESSIONS OF FOLKLORE

    Please describe in more detail what you are doing. You run scripts 2 or is it in a script? If you set the variables of Oracle in a separate script, you need to run the script.

    Source to run a script, the commands in the script are executed as if you type to the current command prompt. A script that is not executed source will lose the variables that you define in the script when the script stops. You can source run a script using the '. '. " script" or "source" (bash). The export command adds variables to the environment of the executed orders later.

    See the following examples:

    cat > shelltest <
    
    Test1:
    $ a=a
    $ ./shelltest
    
    $ echo $a
    a
    
    Test2:
    $ export a=a
    $ ./shelltest
    a
    $ echo $a
    a
    
    Test3:
    $ . ./shelltest
    a
    $ echo $a
    b
    
  • Connect to the Oracle database fails when you use Microsoft ODBC or OLE DB Driver

    There was a problem when you apply the KB3126587 hotfix where connections to an Oracle database using the Microsoft ODBC driver fails if run from automated processes. Running the same process manually would succeed. The update issued KB3147071 solved the problem successfully.

    Yesterday, several patched have been applied and the problem came back. The patches are: KB2862152, KB2868626, KB3163244, KB3168965, KB3170455, KB3163251.

    I saw yet no acknowledgement or difficulty of Microsoft. I prefer not to uninstall security patches, but it is a problem of production.

    Any ideas what specific patch maybe breaking it again?

    Thank you

    Josh

    Server: Windows 2008 R2

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • Deploy the adf on glassfish with oracle database server.

    I am trying to create a connection from the pool on glassfish 4 oracle database server.

    but I could not. I was trting to ping and show this error ping Connection Pool failed for audio. Class name is incorrect or classpath is not set to: oracle.jdbc.pool.OracleDataSource

    GlassFish 3.1 is supported, 4.x is not.

    Oracle JDeveloper and ADF 12 c (12.1.3) supported systems

  • How to find the name of the Oracle database server?

    People,

    Hello. I installed Oracle Database 11 g 2 OS Oracle Linux 5. The installed directory is/home/user/OracleDB_Home and/home/user/OracleDB_Base.

    Host name is "mylinux". Name of the database instance is PT853.

    I use "mylinux" as the name of the database server, it does not work. I use another way to do as below:

    Export ORACLE_HOME = / home/user/OracleDB_Home

    Can I use "mylinux ORACLE_HOME" as the name of the database server, it does not work either.


    My question is:

    How to find the name of the database server Oracle with Oracle Linux 5 OS?


    Thank you.

    You must learn the basic of database Oracle.

    Please don't regard it not same as SQL server in terms of configuration.

    You never specify the database server name in Oracle.

    You specify the host name in only two places, 1) Tnsnames.ora/JDBC/ODBC (or any client you want to connect) and listener.ora) 2.

    There was nothing called specify the name of the Oracle database from an oracle database server.

    Concerning

    Anurag.

  • You are not currently connected to the Oracle BI server

    Hi I am facing problem while that connection in the page of answers... Here is the message I get... Please someone help, what could be the matter, thank you

    You are not currently connected to the Oracle BI server.

    If you have already logged in, your login may have expired, or a communication or a server error occurred.

    To reconnect, click here. If the problem persists, please contact the site administrator. »






    Hi Ram,

    My question was resolved, it happened because of OPMN services are low.

  • To connect to an Oracle database using oracle.jdbc.OracleDriver: error

    Hello

    I am trying to connect to an Oracle database so that we can extract information on tables, views, and packages.

    Using the Data Modeler (transformation script) API, we will add these notes to the corresponding objects in the Data Modeler.

    I'll start with this:

    importPackage (java.lang);

    importPackage (java.awt);

    importPackage (java.sql);

    java.lang.Class.forName ("oracle.jdbc.OracleDriver");

    An error occurs when I run this code:

    test.png

    It must be something of Java...

    Someone at - it a suggestion?

    Problem solved! A colleague of mine referred to in this post: import def properties from Oracle Designer

    More in detail: it's this couple of lines:

    Copy the file ojdbc6.jar for... Directory of \datamodeler-home\jlib

    Add this line to datamodeler.conf

    AddJavaLibFile... /... /jlib/ojdbc6.jar

    I changed my file datamodeler.conf, DM rebooted and now is no longer an error when I try to use the Oracle JDBC drive.

  • Remote Oracle database import table

    We want to create a local copy of a remote Oracle database table, because we will use this table at about 14 locations to update other local tables. The table contains about 1 million records and does not change frequently. We can say that a row has changed in a month, but that's just guessing there is no guarantee.

    The contract synchronization process he uses begins everyday. He gets the new copy of this table, update other tables based on this table and then clean the intermediate table. I want to know how can I copy data this staging table in my local machine. I have following options:

    (1) using the Materialized view, do a full refresh every day before the process starts every day. (we cannot use fash refresh because we cannot change anything on the remote oracle database)

    2) Insert like the select statement, but what happens if the user started two processes at the same time by mistake.

    (3) just join with the remote table in each query, instead of making the local copy.

    (4) use the temporary table and insert as the select statement.

    BANNER

    ----------------------------------------------------------------

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - production

    PL/SQL Release 10.2.0.4.0 - Production

    CORE 10.2.0.4.0 Production

    AMT for Linux: release 10.2.0.4.0 - Production

    NLSRTL Version 10.2.0.4.0 - Production

    I suggest also using a synchronization logic to only transfer new data in the remote table.

    If data it does not change often (as you mentioned) then you can copy the table overall once, and after that the transfer only changed using some sort of regular job data.

    This will not work if you have a mechanism to understand when a record has been changed in the table.

    For example, if you have a timestamp column, which is always filled to insert and update you will be able to extract only the difference.

    You will have a brief fight with deleted records but still doable

  • How to connect to an Oracle database using acrobat form field java script actions

    I have a PDF template with buttons and form fields. One requirement is that when a key is pressed, I want to connect to an Oracle database to change the data of the table inside the DB.

    I wrote "Mouse Up" event and set a Java script to run on this event. Java script I am trying to connect to the DB and Transact on the DB.

    Any ideas how to achieve this.

    Thank you.

    Assuming you are using Acrobat (or reader) XI or newer, it is no longer possible.

    There used to be a way to connect to a PDF file using a script and ADBC, a DB defined locally, but Adobe removed in favour of this option progressively and now it is completely obsolete.

    The only type of PDF files that can still do are those created using LiveCycle Designer.

  • Need information of the oracle database server

    Hi all

    I don't know if I'm right to post in this forum, but I need some information. I am doing a project at the University who needs couple of oracle database server that are online. I have a cloud application that would access this server. I tried to find online if I could rent servers for a week for the test database with no luck. Is someone could provide some info on where I could rent of oracle database servers.

    Thank you
    Shashi

    Maybe http://aws.amazon.com/solutions/global-solution-providers/oracle/?

    If you want only a small diagram to build an application using APEX try free http://apex.oracle.com/i/index.html

  • Using Oracle ODBC connection to a remote Oracle database gateway

    Oracle 11 g 2

    RHEL 6.4

    Someone at - it use the Oracle ODBC gateway to connect to a different Oracle database?  Problems with this configuration?  Where can I get the drivers for Linux ODBC?

    (I know, "why not use a dblink?" -Well that would be against the strategies of enterprise security)

    Thanks for your reply.  What I wanted was 'just' a dblink of 1 db Oracle to another Oracle db w/o the use of the ODBC bridge.

  • Default connection to the Oracle shared server

    We are currently trying to use the server shared on an Oracle 11.1.0.7 server standard edition.

    We have no problem with the settings or performance. We can connect with a dedicated or shared connection.

    Our problem or issue is with tnsnames.ora.

    DRAMA =
    (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = X.X.X.X)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SID = orcl)
    )
    )

    We don't identify if this connection is shared or dedicated. Default login is dedicated and we want to force users connect to a shared server connection.
    It would be really useful to avoid having to go customer by customer at the remote sites. We don't have any tool for centralized management to modify the file (and not on remote sites).

    We could, of course, apply to distribute a new file, but given that each client is unique, it could be risky.

    Try to use SERVICE_NAME instead of SID in tnsnames.ora and make sure that this service is mapped to a dispatcher in init of the database. file.
    Example with the 11.2.0.1:

    1. setting of DISPATCHERS

    SQL> show parameter dispatchers
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    dispatchers                          string      (PROTOCOL=TCP) (SERVICE=DB112XDB)
    max_dispatchers                      integer
    

    2 TNSNAMES. ORA:

    $cat tnsnames.ora
    DB112 =
     (DESCRIPTION =
       (ADDRESS_LIST =
         (ADDRESS = (PROTOCOL = TCP)(HOST = lx01.localdomain)(PORT = 1521))
       )
     (CONNECT_DATA =
       (SERVICE_NAME = DB112XDB)
     )
    )
    

    3. test with SQL * more:

     sqlplus  system/xxx@DB112 @tss
    
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Feb 15 21:37:35 2010
    
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> select username, program, server, service_name
      2  from v$session
      3  where server<> 'DEDICATED';
    
    USERNAME                       PROGRAM
    ------------------------------ ------------------------------------------------
    SERVER    SERVICE_NAME
    --------- ----------------------------------------------------------------
    SYSTEM                         [email protected] (TNS V1-V3)
    SHARED    DB112XDB
    

Maybe you are looking for