Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2004
    Oklahoma City OK -

    Unanswered: Need a method to compare 2 different views

    I have a collection of views in production and several proposed view scripts. I want to compare the existing views with the proposed views (quite a large number of columns), to determine if the columns in each differ. I want to use a method other than paper , pencil and highlighter.

    I could first create the 'proposed' views on our development instance.

    then spool the column names from each view , proposed and existing, to individual text files.

    Then use something like Textpad, compare tool to determine similarity or differences.

    My problem is, I do not know if there are system table(s) or views that contain the information I need.

    Thanks in advance.

  2. #2
    Join Date
    Nov 2005
    user_views contain the name and associated sql
    user_tab_columns (yeah it's more than just table columns) contains the column information

    SQL> BREAK ON view_name
    SQL> SELECT x.view_name, y.column_name
      2  FROM user_views x, user_tab_columns y
      3  WHERE x.view_name = y.table_name
      4  ORDER BY 1;
    VIEW_NAME                      COLUMN_NAME
    ------------------------------ ------------------------------
    EMPHIRED_VU                    SAL
    EMP_VU                         JOB
    Before you get carried away with the text editor, you can do your comparison with SQL.

  3. #3
    Join Date
    Dec 2003
    TOAD has both Schema and Object compare across instances.

  4. #4
    Join Date
    Jul 2004
    You can use PL/SQL Developer.
    This is an useful tool for oracle.
    Use this menu "<Tools>---<Compare User Objects>" in PL/SQL Developer You can Compare user's Objects from one Instance to another Instance.

Posting Permissions

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