EXECUTING ORACLE SQL COMMANDS IN UNIX
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: EXECUTING ORACLE SQL COMMANDS IN UNIX

  1. #1
    Join Date
    Jan 2001
    Posts
    91

    Post

    I know this might be a crazy question but I will ask anyway. Can you connect to a Oracle database via telnet and execute commands SQL commands the same as you would do in SQLPLUS to export a database or do you have to use SQLPLUS to do it??

    Could someone you point me to the right resources tech sheets etc..

    any information will be helpful


    Thanks

    DBA Want to be.

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,136
    Yes . You can do it.

  3. #3
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    EXPORT/IMPORT are utilities at OS level just like SQL*Plus utility. You basically invoke these utilities at OS command line.
    exp/imp nothing to do with Sqlplus at all.

    With SQL*Plus you run Sql commands.
    With exp/imp you take the whole database into a dump file and import it to where you want.

    Seems you are confused. I take back that.
    I was confused with the words usage.

    As others said you can use

    exp system/****@xyz
    imp system/****@xyz



    [Edited by sreddy on 02-01-2001 at 01:43 PM]

  4. #4
    Join Date
    May 2000
    Location
    Portsmouth, NH, USA
    Posts
    378

    Thumbs up yup yup


    Sounds like you are asking if you can connect to databases, connect to SQL, and export/import remotely. If that is the case then sure you can. All you gotta do is configure the listeners on each server you want to connect to and also configure your tnsnames file to connect to those listeners.

    when you say telnet, you are actually referring to connecting remotely through listener/tnsnames. At least that is the impression I get.

  5. #5
    Join Date
    Jan 2001
    Posts
    91

    Post EXECUTING ORACLE SQL COMMANDS IN UNIX

    Ok Sreddy or anyone else

    Which directories will the databases be stored in??

    this is what I see when login by telnet



    SunOS 5.6

    login: oracle
    Password:
    Last login: Thu Feb 1 14:20:17
    Sun Microsystems Inc. SunOS 5.6 Generic August 1997
    You have new mail.
    $ ls
    app dbstart.log mbox sqlnet.log
    dbshut.log dead.letter profile.bak
    $ cd app
    $ ls
    oracle
    $ cd oracle
    $ ls
    admin doc local product
    $ cd admin
    $ ls
    AUAF FORU IMPR NETP NETT OEM SQLZ TPRO TTST orcl
    $ cd auaf
    auaf: does not exist
    $ exit


    The database I want to export for testing would be TTST.

    How would I format the export command

    Do have to list the database name

    example

    exp oracle/****@TTST full=y file=TTST.dmp

    let me know if this works

  6. #6
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    The databases will not be stored in one particular location.
    Oracle binaries which include thses utilities will be in one location and datafiles thats associated with database will be on different file systems.

    If Oracle binaries or in your unix userid path, you can invoke thses utilities by typing in at the prompt. Otherwise it will be in the bin directory of oracle home.

    That syntax is right. But make sure you have to use the right version binaries to export that version of database.*for 805 version use 805 exp)

    Use unix 'find' command to locate the executables.

    $find / -name 'exp' -print

    If you further want to use any options of exp type in @ the prompt

    $exp help=y


  7. #7
    Join Date
    Jan 2001
    Posts
    91
    Ok sreddy

    this is the version of Export we are using

    Export: Release 8.1.6.0.0 - Production on Thu Feb 1 15:04:31 2001

    (c) Copyright 1999 Oracle Corporation. All rights reserved.

    This should work right??

  8. #8
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    Thats should be OK. What I meant was, if you have 7x,8x,81x binaries on the same box you have to use the binaries that match with your db version. I am not sure howmany versions you have on the box. I have all the versions on couple of boxes.

    I just mentioned assuming you might have couple of versions.

  9. #9
    Join Date
    Jan 2001
    Posts
    91
    Thanks for your Help Sreddy

    I will probably start my export after working hours so I won't cause any of performance gliches






Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width