Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2008
    Location
    Ireland
    Posts
    11

    Unanswered: A few beginner questions...

    Hi,

    I am pretty new to Oracle PL/SQL. I have been working on a Teradata system for the last few years and the switch over is causing a few headaches, mostly with things Im sure are second nature to Oracle Aficionados like yourselves. If you wouldnt mind offering some advice I'd be grateful.

    1) How do I view the structure of a table, or the create script used?
    (From SQL*Plus, I can do this in TOAD but this isnt always available so I need to know the sql statement).

    2) How can I view the session data? I.e. if running a proc how can I see what bit of code its currently working on or more than likely stuck on!!!

    3) Teradata had a very useful explain tool, you could submit an UPDATE for example and it would give you a detailed list of the steps involved and joins that would be used - good for identifying potential PRODUCT joins. Has Oracle got anything similar or a command that gives similar data?

    4) When running a proc that is taking a lifetime to complete, is there a command to kill the process, or to stop it and rollback? (TOAD or SQL*Plus)

    I hope I havent asked anything too nonsenical in here, if anything needs clarified please just ask. Also if there are any Tools from Oracle or internet sources which people have found useful, links would be welcomed.

    Thank You.

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by GerardMcL_1
    1) How do I view the structure of a table, or the create script used?
    See the SQL*Plus manual
    2) How can I view the session data? I.e. if running a proc how can I see what bit of code its currently working on or more than likely stuck on!!!
    You can't. The only option you have is to run the stored procedure in a debugger (e.g. using SQL Developer)

    3) Teradata had a very useful explain tool, you could submit an UPDATE for example and it would give you a detailed list of the steps involved and joins that would be used - good for identifying potential PRODUCT joins. Has Oracle got anything similar or a command that gives similar data?
    See the Oracle SQL Manual for EXPLAIN PlAN. TOAD and SQL Developer will also display the execution plan.

    4) When running a proc that is taking a lifetime to complete, is there a command to kill the process, or to stop it and rollback?
    The enterprise manager can do this. Or you could use ALTER SYSTEM KILL SESSION

    Also if there are any Tools from Oracle or internet sources which people have found useful, links would be welcomed.
    Most important: http://www.oracle.com/pls/db102/db102.homepage

  3. #3
    Join Date
    Jun 2004
    Posts
    796
    Provided Answers: 1
    How can I view the session data?
    This can be done using DBConsole (also called Enterprise Manager).
    90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.

  4. #4
    Join Date
    Jul 2008
    Location
    Ireland
    Posts
    11

    Cheers

    Thanks lads, your replys have been very helpful.

Posting Permissions

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