Oracle command line to connect to a database directly from a client machine

Hi,
I need to connect from a Client machine to a database present on the Database server.
Client: Windows 7 32 bit/ 64 bit
Server where DB is installed: Windows 2008, Oracle 11.xg
I need a command line option that will connect to a database say 'Test' from the command line. I want to put that command in a batch file / exe and call it from there.
I have tools like SQL Developer and dbForge but was unable to do it. Could I have some help on this.
I am a fresher with Oracle and I would appreciate detailed steps. Thanks very much in advance.
Vincent

Vincent,
There is a few steps you want to perform, first of all tell me where is your client database server and where you want command line to use Oracle SQL command line.
Regards,
Hunain Khanani

Similar Messages

  • Connecting to the database directly through OS login accont

    Hi..
    Could anyone explain me the steps for connecting to the database directly through OS login account.
    Rgds
    Geeta

    These are the steps to authenticate the user using Operating system.But still i am not able to authenticate user using os.
    Just try it out and let me know if you are able to authenticate.
    1)create user ops$user1 identified by externally;
    2)grant privileges.... to ops$user1;
    3)In pfile edit the following parameter
    os_authent_prefix=ops$
    remote_os_authent=true
    4)restart db;
    5)#useradd -g dba -md /home/user1 user1
    6)#su - user1
    /home/user1/>$sqlplus
    bash:command not found.

  • How to connect to an Oracle database on one machine from another client machine?

    I installed oracle database 11g (server and client) on one machine. It works perfectly. Then I installed oracle client (ODTwithODAC1120320) in another machine. Now I want to connect to the database of the previous machine. I tried to connect but It failed. I think .ORA files should be configured. What should I do to fulfill this.
    thanks...

    thank you for the quick response..
    this link Installing Oracle Database Client for oracle client installation. But the content refers all oracle database installation. could you please get know me that oracle client means only the OdtWithODAC or some thing else? This link Installing Oracle Database Client explain but not the OdtWithODAC. Please let me know clearly.
    Please let me know the exact name of the software that I should download from the oracle website that refers the oracle database client.
    thanks
    Priyashantha hp

  • Cannot connect to database from a client machine (ORA-12154)

    Hi,
    I have installed Oracle XE Server on one of my machines and Oracle XE Client on another. When I try to connect to the server from the client using command line, error ORA-12154 is displayed. I am pasting the data of my .ora files so that you can point out the errors if any in these files.
    Listener.ora
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (ADDRESS = (PROTOCOL = TCP)(HOST = abo-server.abosoftware.org)(PORT = 1521))
    DEFAULT_SERVICE_LISTENER = (XE)
    Sqlnet.ora
    # This file is actually generated by netca. But if customers choose to
    # install "Software Only", this file wont exist and without the native
    # authentication, they will not be able to connect to the database on NT.
    SQLNET.AUTHENTICATION_SERVICES = (NTS)
    Tnsnames.ora
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = abo-server.abosoftware.org)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    I will be very happy if anyone can suggest me a solution.
    Thanks & Regards,
    Harshad

    Harshad,
    CONNECT system/[email protected]
    This was not what I asked you to try, this cannot work ;).
    I asked you to try :
    connect system/[email protected]:1521/XE
    I have also tried accessing the database homepage remotely using the url
    http://abo-server.abosoftware.org:8080/apex
    Per default only local access (from the same machine) is allowed via http.
    You can change that either via the GUI (log in as SYSTEM):
    Home>Administration>Manage HTTP Access
    OR
    connect as SYSTEM via sqlplus and run:
    SQL>exec dbms_xdb.setListenerLocalAccess(false);###
    It is documented at
    http://download-west.oracle.com/docs/cd/B25329_01/doc/install.102/b25144/toc.htm#BABIJBHJ
    And yes, you need to open both ports 1521 and 8080 to access it remotely.
    ~Dietmar.

  • Can't connect to the database server from localhost

    Hi,
    I'm having a problem I hope you can help with please!
    I recently installed mysql and phpmyadmin... I can access mysql perfectly from the command line, and can access it partially through phpmyadmin although there are some restrictions that I haven't figured out how to change yet (despite editing php.ini, configure.inc.php and others), but on the whole inside phpmyadmin I can see all the databases I've uploaded with the command line and all the users are there and can be edited. Unfortunately whenever I try to connect to a mysql database using a username and password that was created in phpmyadmin (or anywhere!), I get a 'cannot connect to the database server error'. I've checked and rechecked the username, the passwords, the database names and the host names a thousand times but nothing I change is working.
    Is there a special prefix my mac could be adding to the database, usernames or host names?
    Thanks!

    Okay, don't worry!
    I finally figured it out...
    it needed to be 127.0.0.1 rather than localhost!

  • Connect to the database straight from the direct access of form builder

    What do i have to put in the direct access of form builder and procedure builder to connect to the database without have to do it once i4ve enter into form or procedure builder, I know i have to put user/password and connect string but in which order or which characters do i have to use.
    Thanks in advance.

    thanks jdendas, that works with forms but not with procedure builder, if i put that it does not start the session with the procedure builder.
    Thanks anyway-

  • How to use command line with acrobat to extract page(s) from pdf file?

    I have adobe acrobat, and have a pdf file with over 500 pages. I need to extract small chunks of pages from it as seperate pdf files. I was hoping I could use command line interface to do this faster.
    Something like:
    acrobat src des start end
    so for example
    adobe file.pdf my_folder 3 5
    Is this possible? There are many chunks and I don't want to manually do it for every chunk. Command line would be much easier...
    Thanks

    I can't find any programs... sorry.
    Can you create one for me please.
    It should at least have these 5 arguments: (well the first one is not neccessary since were not using acrobat anymore...)
    [program] [src path/src file] [destination path/file name] [start page (inclusive)] [end page (inclusive)]
    for example:
    acrobat ./my_file.pdf ./my_folder/chunk1.pdf 3 5
    if start page == end page, then it only extracts that one page.
    So this way I can just stack these comands on a .bat file or something (maybe like 100 commands), then run the bat file, and it will create all the files.
    Thanks for doing this, it is appreciated.

  • ORA-03135: connection lost contact - all apart from one working machine!

    Two servers, both with Oracle 32bit client 10.2.0.3, both with identical sqlnetora, both connecting to same oracle DB using same credentials.
    issue identical SQL from sqlnet client on both machines - one succedes after 60mins with the resultset returned - one errors after around 45mins with ORA-03135: connection lost contact.
    I actually have a dozen of so other boxes that generate the same error and just one where in runs perfectly every time.
    All are in same data center on similar phisical hardware with same windows OS. Only difference I can see is a folder with instaclient 11 on the machines where it fails.
    Any idea's what this could be?
    Thanks for any suggestions,
    Jez

    953733 wrote:
    Two servers, both with Oracle 32bit client 10.2.0.3, both with identical sqlnetora, both connecting to same oracle DB using same credentials.
    issue identical SQL from sqlnet client on both machines - one succedes after 60mins with the resultset returned - one errors after around 45mins with ORA-03135: connection lost contact.
    I actually have a dozen of so other boxes that generate the same error and just one where in runs perfectly every time.
    All are in same data center on similar phisical hardware with same windows OS. Only difference I can see is a folder with instaclient 11 on the machines where it fails.
    Any idea's what this could be? Firewall inactivity timeout

  • Database Name from Full Client

    How can we know the Universe parameters from Full Client. I donu2019t have an access to Designer and Supervisor(BO 6.5). I am using desktop Intelligence to run a particular report and I want to know from which database(schema) the report is fetching the data.

    Hello,
    the Data Provider function "Connection" returns a string with various parameters.
    Parse/search for the substring "DATABASE=".
    HTH, best regards
    Thomas

  • DI Server is Not Connected from the Client Machine

    Hi all,
    There was a problem to connect DI Server.But It runs on the Server Correctly.When we run on the Client Machine to connect the SAP DB, It throws an error: -111.
    Code :
            cmp = New SAPbobsCOM.Company
            cmp.Server = "Sap-Server"
            cmp.CompanyDB = "FAST"
            cmp.UserName = "manager"
            cmp.Password = "manager"
            cmp.language = SAPbobsCOM.BoSuppLangs.ln_English
            cmp.UseTrusted = True
            mretcode = cmp.Connect
            If mretcode <> 0 Then
                cmp.GetLastError(merrcode, merrmsg)
                MsgBox(merrmsg)
            Else
                MsgBox("SAP B1 - Data base Connected Successfully!")
            End If
    Thanks in Advance
    Regards,
    Suresh.G

    you are not using DI server to connect, your using DI API.  Check if your client machine has the DI API installed.  If not you can get from the installation cd or the lastest patch installed under packages/DI API folder.

  • Trouble connecting to RDP from single client machine.

    I have a Server 2012 machine running remote desktop services.  Users at our branch offices connect to it over the corporate VPN.
    It has been running for over a year now with no significant issues, until this past Tuesday.
    I have exactly one client machine that immediately disconnects upon connecting to the machine.  This does not generate very helpful error codes - On the server side, just a generic 4005 - The Windows logon process has unexpectedly terminated.
    All other client machines can connect to the server without issue, including other client machines in that branch office.  Furthermore, attempting to simply remote desktop into another 2012 server produces the same results on this machine, while remote
    desktop to another windows 7 client machine seems to work just fine.
    I have seen some similar problems mentioned, but they typically involve a server that consistently fails with all clients, whereas I have a single client machine that suddenly cannot RDP to Server 2012 machines.  Any ideas?

    Hi,
    Thank you for posting in Windows Server Forum.
    Have you check with other user account on that client machine?
    Does ping response successfully to the server?
    Firstly please try to run sfc /scannow, check performance for that system, check event viewer whether can find any particular error\event id. For more information you can refer below article.
    Fix “The Windows Logon Process has Unexpectedly Terminated”
    Hope it helps!
    Thanks.
    Dharmesh Solanki

  • Oracle 11g is not connecting from network client machine.

    Oracle 11g was installed on windows server 2003.
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor ._
    we are getting the above oracle exception when we give the following command:
    LSNRCTL> services oracle11g_listener
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=CBR-SRV-HPORA.CIBER-INDIA.IN)(PORT=1522)))
    The listener supports no services_
    The command completed successfully.
    C:\Documents and Settings\oracle>sqlplus scott/tiger@oracle11g_netservice
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 28 18:10:40 2010
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor
    Please advice what could be the problem.
    Thanks.

    Your Lstener doesn't know anything about services. You must configure the dynamic registration of the service in your database, e.g.
    alter system set local_listener="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=CBR-SRV-HPORA.CIBER-INDIA.IN)(PORT=1522)))";
    (for permanent setting don't forget pfile or spfile)
    After that the database will register the services at thie address und you will see the service when asking 'srvctl services oracle11g_listener'
    Regards,
    dojo

  • Can I connect to SAP database directly with ODBC?

    I need to read data from SAP and write them into ms sqlserver. I wrote a RFC in SAP and used VB.NET to call RFC. I wonder that the RFC efficency is very slow while reading a great lot data. RFC also cannot support complex condition string, and it cannot fetch my data flexibly.
    I found that the user who was included in a user group "db<sid>adm" could connect to db2 udb with ODBC in VB6.0 or VB.NET. I also can use the SQL sentence to get data flexibly.
    Please tell me whether I can use this user to read (just using select sentense) data from DB2 UDB directly, or whether I can use the newly created user to get data. Will this method cause any problem ?

    > Will this method cause any problem ?
    Pretty likely: yes, it will.
    You may want to read this thread Retrive Data From SAP Using C Language first (and the blogs I refered to in it).
    What it boils down to is: you're trying a super-low-level access to data in order to perform a high-level business data exchange.
    You could as well hex-read the data files of the database or the blocks from your hard disks.
    There are a bunch of options to remote access data in SAP systems and maybe your RFC can be tuned to better support your needs.
    But don't move over to the 'dark side' of direct database access
    regards,
    Lars

  • Connecting to two database instances from the same TopLink

    Hi,
    We are trying to create a process using BPEL where data from one database instance needs to be passed to the other. The process is compiling properly and we could deploy it in BPEL Process Manager. But when we try to run the process, the data is not getting inserted into the second instance. There is no error /exception being thrown at most of the time, but at times we are getting a 'Unique constraint error' eventhough there is no duplication of data.
    Can we connect to two different instances using the same toplink. How can we achieve this.
    Thanks in advance
    Pratheusha

    You need to use two different sessions with two different mapping descriptors

  • Connect to VM console directly with VNC client

    I used to be able to connect to a VM's console with the VNC client by logging onto the OVM server where the VM was running and discovering what port the VM's VNC server is listening on (xm list -l | grep location). Now it seems that doesn't work anymore. Is there still a way to do this with OVM 3.1.1?

    It appears they have disabled this feature in 3.1
    If you look at the vm.cfg file on an old 2.x server it is of the format
    bootloader = '/usr/bin/pygrub'
    disk = ['file:/var/ovs/mount/3D2FD7081A3D49FCBA309AF1316E028F/running_pool/212_ThisServer/System.img,xvda,w',
    'file:/var/ovs/mount/3D2FD7081A3D49FCBA309AF1316E028F/running_pool/212_ThisServer/thisDisk_1.img,xvdb,w',
    disk_other_config = []
    maxmem = 2048
    memory = 2048
    name = '212_ThisServer'
    on_crash = 'restart'
    on_reboot = 'restart'
    uuid = 'f1bb3127-751f-4224-b348-5f7f3bc0d30a'
    vcpus = 2
    vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=thispassword']
    vif = ['bridge=xenbr0,mac=00:46:3E:79:C2:9F,type=netfront']
    vif_other_config = []
    Then on a 3.1 vm.cfg
    vif = ['mac=00:21:26:45:22:68,bridge=192.168.64.0']
    OVM_simple_name = 'XP Base Install'
    vnclisten = '127.0.0.1'
    disk = ['file:/OVS/Repositories/0005dbc00003ba00125c62ddc69f963a/VirtualDisks/0005dbc000120000caecb0faa3a25145.img,xvda,w', 'file:/OVS/Repositories/0005dbc0000300003ba20155bc480b24/ISOs/0005dbc0001500003442da06ad201438.iso,xvdb:cdrom,r']
    vncunused = '1'
    uuid = '0005dbc0-0006-0000-d77c-20e2f718bdd0'
    on_reboot = 'restart'
    boot = 'dc'
    name = '0005dbc000060000d47830e2f718bdd0'
    cpu_weight = 27500
    memory = 2048
    cpu_cap = 0
    maxvcpus = 1
    OVM_high_availability = False
    maxmem = 2048
    vnc = '1'
    OVM_description = ''
    on_poweroff = 'destroy'
    on_crash = 'restart'
    guest_os_type = 'windows'
    usbdevice = 'tablet'
    builder = 'hvm'
    vcpus = 1
    keymap = 'en-us'
    OVM_os_type = 'Other Microsoft Windows'
    OVM_cpu_compat_group = ''
    OVM_domain_type = 'xen_hvm'
    I have tried replacing
    vnclisten = '127.0.0.1'
    with
    vnclisten = '0.0.0.0'
    and it opened up the port but I could not connect successfully with tightVNC. Tight VNC appears to make a connection but you cannot see anything.
    You can see what ports by running a 'netstat -nat' on the VM server (command below I removed unimportant results)
    [root@ovs-c9-28-2c VirtualMachines]# netstat -nat
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State
    tcp 0 0 127.0.0.1:5900 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:5901 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:5902 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:6900 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:6901 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:6902 0.0.0.0:* LISTEN
    As you can see above the port 5902 is listening while the others are set to localhost and used by the VM Manager for VNC connections.
    I also tried adding in the vncpasswd line like below and was prompted for a password but the VNC session failed. Note it also broke the VNC access from the manager.
    vnclisten = '0.0.0.0'
    vncpasswd = 'letmein'
    That said Oracle do not support manual modification of the vm.cfg file (unless pinning CPUs) so going in there is probably not a good idea.
    I think the only solution is to install a VNC server on the VM directly.
    Edit:
    Further to this you will note that there are also ports 6900 - 6902 which are definitely related to the VNC connection. I tried connection to these ports with no success however.
    It appears the manager is acting as a tunnel for the VNC as when I have a valid connection (from manager) to the server on port 5901 I see the following
    [root@ovs-c9-22-2c VirtualMachines]# netstat -nat
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State
    tcp 0 0 127.0.0.1:9020 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:7901 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:7903 0.0.0.0:* LISTEN
    tcp 0 0 192.168.64.125:7777 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:8002 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:8899 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:8003 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:5900 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:5901 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:5902 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:753 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:6900 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:6901 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:6902 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
    tcp        0      0 192.168.64.125:6901         192.168.64.120:44014        ESTABLISHED
    tcp 0 0 192.168.64.125:37298 192.168.64.64:3260 ESTABLISHED
    tcp 0 0 192.168.64.125:8899 192.168.64.125:41445 TIME_WAIT
    tcp 0 0 192.168.64.125:8899 192.168.64.125:41454 TIME_WAIT
    tcp 0 0 127.0.0.1:46117 127.0.0.1:5901 ESTABLISHED
    tcp 0 0 192.168.64.125:8899 192.168.64.125:41448 TIME_WAIT
    tcp 0 0 127.0.0.1:9020 127.0.0.1:56940 ESTABLISHED
    tcp        0      0 127.0.0.1:5901              127.0.0.1:46117             ESTABLISHED
    tcp 0 0 192.168.64.125:8899 192.168.64.125:41456 TIME_WAIT
    tcp 0 0 127.0.0.1:56940 127.0.0.1:9020 ESTABLISHED
    tcp 0 0 192.168.64.125:8899 192.168.64.125:41450 TIME_WAIT
    Then a netstat on the manager shows the pipe is definitely connecting through 6901 (on server) and 15901 (on manager)
    Notable IPs
    Machine I am VNCing from 192.168.64.50
    VM Manager 192.168.64.120
    VM Server 192.168.64.125
    I have bolded the connections that disappeared after disconnecting the VNC connection.
    [root@manager ~]# netstat -nat | grep .50
    tcp 0 0 192.168.64.120:22 192.168.64.50:58858 ESTABLISHED
    tcp 0 52 192.168.64.120:22 192.168.64.50:50838 ESTABLISHED
    tcp 0 0 ::ffff:127.0.0.1:63350 ::ffff:127.0.0.1:54321 ESTABLISHED
    tcp 0 0 ::ffff:192.168.64.120:7001 ::ffff:192.168.64.50:53327 ESTABLISHED
    tcp 0 0 ::ffff:127.0.0.1:54321 ::ffff:127.0.0.1:63350 ESTABLISHED
    tcp        0      0 ::ffff:192.168.64.120:15901 ::ffff:192.168.64.50:49503  ESTABLISHED
    [root@manager ~]# netstat -nat | grep .125
    tcp 0 0 ::ffff:192.168.64.120:7001 ::ffff:192.168.64.125:46983 TIME_WAIT
    tcp 0 0 ::ffff:192.168.64.120:7001 ::ffff:192.168.64.125:46976 TIME_WAIT
    tcp 0 0 ::ffff:192.168.64.120:7001 ::ffff:192.168.64.125:46986 TIME_WAIT
    tcp 0 0 ::ffff:192.168.64.120:7001 ::ffff:192.168.64.125:46977 TIME_WAIT
    tcp 0 0 ::ffff:192.168.64.120:7001 ::ffff:192.168.64.125:46982 TIME_WAIT
    tcp 0 0 ::ffff:192.168.64.120:7001 ::ffff:192.168.64.125:46978 TIME_WAIT
    tcp 0 0 ::ffff:192.168.64.120:7001 ::ffff:192.168.64.125:46974 TIME_WAIT
    tcp 0 0 ::ffff:192.168.64.120:7001 ::ffff:192.168.64.125:46981 TIME_WAIT
    tcp        0      0 ::ffff:192.168.64.120:44014 ::ffff:192.168.64.125:6901  ESTABLISHED
    tcp 0 0 ::ffff:192.168.64.120:7001 ::ffff:192.168.64.125:46985 TIME_WAIT
    tcp 0 0 ::ffff:192.168.64.120:7001 ::ffff:192.168.64.125:46987 TIME_WAIT
    Edited by: phoenixdigital on Sep 24, 2012 4:30 PM

Maybe you are looking for