Results 1 to 14 of 14
  1. #1
    Join Date
    Jun 2006
    Location
    NY
    Posts
    14

    Unanswered: Oracle 7 on UNIX

    Hi,

    I'm trying to view the tables on oracle7 database installed on UNIX. Does anyone know if there is any such tool to visualize the tables on a unix machine, or alternatively, what are the commands to access the database and view the tables?

    I can log into the terminal (sorry, windows user) but not sure what are the command to view the tables (such in: show databases/ select X database)

    thanks for any pointers

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I'm not a UNIX user either, but: once you are logged on and cursor blinks at the UNIX commanad prompt, there *must* be SQL*Plus available. It is a tool - command line, though - which will enable you to do whatever you need. Connect to it using

    OS> SQLPLUS username/password@database_you_are_connecting_to

    If the database name isn't known (i.e. you don't know it), you might try to connect using only username and password. If it is the only database or is a default one, you'll succeed. Also, if this Oracle user is created as OPS$username, it will accept operating system credentials, so you'd simply connect as

    OS> SQLPLUS /

    Once in SQL*Plus, run

    SQL> SELECT * FROM tab;

    It will - on Oracle 7 - show tables, views and synonyms accessible by 'username' you connected to.

    However: as a (MS) Windows user, you could install GUI tool which would help you to easier accomplish your task. Doesn't matter the fact that database is on some UNIX server - just make sure your PC is on the same LAN as database server. There is TOAD (product of the Quest software) - they offer free trial download. Or, you might also try with Oracle's free tool called SQL Developer (downloadable from the Oracle Technology Network.

    I'm not sure will those tools be able to successfully connect to (an obsolete) Oracle 7 database.

  3. #3
    Join Date
    Nov 2003
    Posts
    2,934
    Provided Answers: 12
    Quote Originally Posted by Littlefoot
    Or, you might also try with Oracle's free tool called SQL Developer (downloadable from the Oracle Technology Network.
    I'm not sure will those tools be able to successfully connect to (an obsolete) Oracle 7 database.
    SQL Developer does not even support 8i and V1.1 does not even seem to connect to 8i, so I doubt that it will work with 7.

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Hm, I *remember* (OK, we could discuss about it) that Oracle Raptor did manage to connect to 8i. So Oracle decided to change its name (BTW, I liked "Raptor" name better than tasteless "SQL Developer") and forgot to obtain support for 8i.

    But never mind me and my remembrance - all this can be found in the documentation. Of course, it requires some effort, but ...

  5. #5
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    The problem is that sql developer uses sql net 2 and oracle 7 used sql net 1 and they are not compatible, sorry.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  6. #6
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    I just connected to an 8i (8.1.7.0.0) db from sql developer (after upgrading it), and it lets me query the db just ok.

  7. #7
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    That is because 8 can only talk sql net 1 and 8i can talk sql net 1 or 2 and 9i can only talk sql net 2.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  8. #8
    Join Date
    Jun 2006
    Location
    NY
    Posts
    14
    thank you all (and littlefoot in aprticular)
    I managed to get access as you described. I'm trying to visualize it and I did try to connect with sqldeveloper...mmm, not sure how to.
    remtly i do this: telnet xx.xx.xxx.xx
    username + password
    and sqlplus
    username + password (diff from above)

    so, how can connect if the fields are in sqldeveloper:
    username, password
    hostname ? telnet x.x.x.x???)
    SID ????
    port???

    thanks

  9. #9
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >so, how can connect if the fields are in sqldeveloper:
    The fields are in a TABLE which is a database instance; not in some GUI tool such as sqldeveloper.
    Again why is using SQL*Plus not an acceptable solution?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  10. #10
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    The easiest way to connect through SQL Developer would be if you have access to the TNSNAMES.ORA file. It can containt one or more entries - aliases to all databases available to you. One of them might look like this:
    Code:
    ORA8 =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = prod_db)(PORT = 1522))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
        )
      )
    Note that "HOST = prod_db"; "prod_db" is again an alias - its IP address can be found in the 'hosts' file (on MS Windows, it is located in C:\WINDOWS\system32\drivers\etc\ directory). If not, you'll find its IP address at the command prompt by running "ping prod_db". It would look like this (I'm not on the network at the moment, so I'm pinging myself - localhost):
    Code:
    C:\>ping localhost
    
    Pinging nx8220sd [127.0.0.1] with 32 bytes of data:
    
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    
    Ping statistics for 127.0.0.1:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 0ms, Average = 0ms
    
    C:\>
    After you find all elements you need: username, password, SID (or SERVICE_NAME) and port from the TNSNAMES.ORA, you *should* be able to connect to the database.

    Once again: Oracle 7 is quite old and I'm not sure SQL Developer (or TOAD or ...) will be able to successfully connect to it.

    But you still have good old SQL*Plus to work with (just like Anacedent said).

  11. #11
    Join Date
    Jun 2006
    Location
    NY
    Posts
    14
    thanks, is there anyway to dump all db content into a file and have it 'rebuilt' on a different database (mysql?)

    by dump, i mean the ability to make a file with all sql commands (build + insert).

    thanks

  12. #12
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Different database yes, but Oracle - using Export (and Import) utilities.

    Otherwise, possibly ... it would require some coding. If you had TOAD, for example, it could do it all for you in a matter of several clicks. However, it would require that MySQL knows how to read and interpret Oracle's CREATE TABLE/VIEW/SEQUENCE/TRIGGER/PROCEDURE/PACKAGE/etc. along with INSERT INTO statements. Unless, of course, you modify it all during coding session I previously mentioned.

  13. #13
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >is there anyway to dump all db content into a file and have it 'rebuilt' on a different database (mysql?)
    Some data types exist in Oracle which do NOT exist in MYSQL; which may present a problem in migration.
    Some SQL syntax differences exist between Oracle & MYSQL; which may present a problem in migration.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  14. #14
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I'd say that @xianwinwin has to do something with Oracle, but - after several days of trying to figure out how to do it and seeing that, actually, there's no help of a GUI (= 'don't think, just click), he/she'd like to migrate it to MySQL which he/she knows better and, also, owns a working copy of some GUI tool.

    Am I far from the truth?

Posting Permissions

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