How to find the largest and the widest tables in Oracle 10g ?

Hi Folks,
Environment: 10g Rel 2
Can somebody please suggest the data dictionary view(s) that I can query to get a list of the longest (rows) and the widest (columns) tables in any schema ?
Thanks in advance
rogers42

rogers42 wrote:
Hi,
Thanks for the replies.
By the "longest" table, I had meant a table with most number of rows. And few people had wisely pointed out the dba_tables view.
By the "widest table", I had meant a table with the most number of columns. Is there a view that can give me this info ?
Thanks
rogers42if your statistics are updated :
SELECT D.OWNER , D.TABLE_NAME
FROM DBA_TABLES D
WHERE D.OWNER NOT IN ('SYSTEM', 'SYS')
ORDER BY D.NUM_ROWS DESC
and try this code, for the second :)
DECLARE
CURSOR cur_tab
IS
SELECT D.OWNER AS OWNER , D.TABLE_NAME AS TABLE_NAME
FROM DBA_TABLES D
W_TABLE VARCHAR2(30);
W_OWNER VARCHAR2(30);
w_count_col NUMBER;
w_col_max NUMBER;
BEGIN
w_count_col := 1;
w_col_max := 1;
W_TABLE := 'TEST';
W_OWNER := 'TEST';
FOR c IN cur_tab LOOP
  SELECT COUNT(*) INTO w_count_col
  FROM DBA_TAB_COLS t
  WHERE t.owner = c.OWNER
  AND t.TABLE_NAME = c.TABLE_NAME
  IF w_count_col >= w_col_max THEN
    w_col_max := w_count_col;
    W_TABLE := c.TABLE_NAME;
    W_OWNER := c.OWNER ;
  END IF;
END LOOP;
dbms_output.put_line(' w_col_max : '||w_col_max) ;
dbms_output.put_line(' W_TABLE: '||W_TABLE) ;
dbms_output.put_line('W_OWNER : '||W_OWNER) ;
END;

Similar Messages

  • How to find exception occured while using LOGON function in oracle 10g

    Hi,
    I am using LOGON function to login with a different user name in oracle 10g forms.
    LOGON ( User, Pass@tns, FALSE)
    The third parameter is passed as 'FALSE' to avoid the login screen to be opened. If any of the other parameter ( User Name, Password, TNS) is passed wrong, connection is not established but no exception is occurred. The value for 'FORM_FAILURE' is set to 'TRUE'.
    What i need is the ORA error for connection failure. The error message related to user name/password (ORA-01017) or connection identifier (ORA-12155).
    How i can get this error code if connection is failed. Is there any other way to login in oracle forms other than 'LOGON'.
    Habib

    Habib Ahmad wrote:
    Hi,
    I am using LOGON function to login with a different user name in oracle 10g forms.
    LOGON ( User, Pass@tns, FALSE)
    The third parameter is passed as 'FALSE' to avoid the login screen to be opened. If any of the other parameter ( User Name, Password, TNS) is passed wrong, connection is not established but no exception is occurred. The value for 'FORM_FAILURE' is set to 'TRUE'.
    What i need is the ORA error for connection failure. The error message related to user name/password (ORA-01017) or connection identifier (ORA-12155).
    How i can get this error code if connection is failed. Is there any other way to login in oracle forms other than 'LOGON'.As salamu alikum, Habib
    If you pass FALSE in login you can't catch anything. Want to catch the error ?
    Then change
    LOGON ( User, Pass@tns, FALSE)
    to
    LOGON ( User, Pass@tns, TRUE) Now Create On-Error trigger at form level
    and try the following code
    if error_code=01017 then
         message('invalid user name or password');
         message('invalid user name or password');
         raise form_trigger_failure;
    elsif error_code=12154 or error_code=1215 then
         message('invalid connection string');
         message('invalid connection string');
         raise form_trigger_failure;
    end if;Hopes this helps
    If someone's response is helpful or correct, please mark it accordingly.

  • How to find a badi and how to find the method/methods for a transaction?

    Hi all,
    i need to give a text either while creating customer (vd01) or changing customer(vd02)...thsi is via extras->texts.....then I have to double clik the text and go to change editor...and then i have to clik on insert line and then choose text element radiobutton on screen and then give it a name and then save it..this should be done for all customers....my problem is i am unable to find a badi and the appropriate method for thsi..i have placed break point in method read_add_on_data in the badi customer_add_data....i tested both by transactions va01 and va02 but of no use..also there are so many methods..can u tell me how do i find the appropriate method of the appropriate badi.....

    Hi,
       For XD01/XD02/XD03 The following BADI's are useful
    business Add-In CUSTOMER_ADD_DATA  and  business Add-In CUSTOMER_ADD_DATA_CS .
    *<b>Reward points</b>
    Regards

  • I have forgot my Iphone passcode. Itunes will not let me restore it, i do not have icloude,or find my iphone,and the closest itunes store is 4 hours away how can i unlock, or reset my phone?

    I have forgot my Iphone passcode. Itunes will not let me restore it, i do not have icloude,or find my iphone,and the closest itunes store is 4 hours away how can i unlock, or reset my phone?

    Try this:
    Placing your device into recovery (DFU-Device Firmware Upgrade) mode:
    Follow these steps to place your iOS device into recovery mode. If your iOS device is already in recovery mode, you can proceed immediately to step 6.
       1. Disconnect the USB cable from the iPhone, iPad, or iPod touch, but leave the
           other end of the cable connected to your computer's USB port.
       2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds
           until the red slider appears, then slide the slider. Wait for the device to turn off.
                  * If you cannot turn off the device using the slider, press and hold the
                    Sleep/Wake and Home buttons at the same time. When the device turns off,
                    release the Sleep/Wake and Home buttons.
      3. While pressing and holding the Home button, reconnect the USB cable to the
           device. The device should turn on. Note: If you see the battery charge warning,
           let the device charge for at least ten minutes to ensure that the battery has some
           charge, and then start with step 2 again.
      4. Continue holding the Home button until you see the "Connect to iTunes" screen.
           When this screen appears you can release the Home button:
      5. If necessary, open iTunes. You should see the following "recovery mode" alert:
      6. Use iTunes to restore the device.
    If you don't see the "Connect to iTunes" screen, try these steps again. If you see the "Connect to iTunes" screen but the device does not appear in iTunes, see this article and its related links.
    Additional Information:
    If you have a problem getting into recovery mode then try: RecBoot: Easy Way to Put iPhone into Recovery Mode.
    Note: When using recovery mode, you can only restore the device. All user content on the device will be erased, but if you had previously synced with iTunes on this computer, you can restore from a previous backup. See this article for more information.

  • How to find what are all the rules and events are monitoring for specific server in SCOM 2007

    how to find what are all the rules and events are monitoring for specific server in SCOM 2007.
    I need to know what are all the events, services, and rules are monitored for the specific server.
    Kindly help me friends.

    how to find what are all the rules and events are monitoring for specific server in SCOM 2007.
    I need to know what are all the events, services, and rules are monitored for the specific server.
    Kindly help me friends.
    Thanks for the question Sandoss. This is something that we all come across at sometime.
    Thanks & regards, Sumit Agrawal
    The lack of this feature is an inexcusable oversight for an enterprise management product.  They have some serious lightweights making design decisions on the SCOM team. 5 thumbs down. 
    BTW the answer is probably LOTS of stuff. Literally 100's of workflows are running on any server. 
    The following OpsMgr DB query will list all running monitors on a server. Change the name of @srv. I think this works pretty well.  I'd like some feedback if something is missing.
    DECLARE @srv varchar(30)
    SET @srv = 'your name here'
    SELECT mon.displayName as monitor, bme.FullName,bme.DisplayName as object,
    case
        when s.HealthState = 1 then 'healthy'
        when s.HealthState = 2 then 'Warning'
        when s.HealthState = 3 then 'Critical'
        else 'N/A'
    end as Health
    FROM state AS s WITH (NOLOCK)
    left join BaseManagedEntity as bme WITH (NOLOCK) on s.basemanagedentityid = bme.basemanagedentityid
    left join dbo.MonitorView Mon WITH (NOLOCK) on Mon.ID = s.monitorid
    where
    bme.FullName like '%' + @srv + '%'
    and s.HealthState <> 0
    and mon.IsInternalRollupMonitor = 0
    and mon.IsExternalRollupMonitor = 0
    order by bme.DisplayName, mon.displayName

  • I find I am unable to print any photo because the program "Can't find a theme and the Print command wont work without at least one theme. How can I overcome this problem?

    I find I am unable to print any photo because the program "Can't find a theme and the Print command wont work without at least one theme. How can I overcome this problem?

    reinstall iPhoto
    see this discussion down a few from your post
    https://discussions.apple.com/thread/5426566?tstart=0
    LN

  • HT1391 Hi can anyone tell me how to find out what and when my last purchases were made from the App Store ? I think my kids used all my credit

    Hi can anyone tell me how to find out what and when my last purchases were made from the App Store ? I think my kids used all my credit

    .from iTunes, go to View > Show sidebar
    From sidebar > Itunes Store > Click top left on your Apple ID email address > Account > ...scroll down > Purchase History > View All

  • How do I find BOTH the raw and the cameras jpeg files?

    I've got Aperture 3 importing raw plus jpegs from my Nikon D600 camera. The D600 produces amazing jpegs!
    Aperture is set to use the raw file as the master.
    I'd hoped that I'd have access to both the raw AND the camera jpeg but I only see the raw file and as soon as I open it, the cameras jpeg is replaced by something that aperture generates. It's quite frustrating because the jpegs from my Nikon look fantastic but only for a couple of seconds before aperture replaces them with a horrible, jpeg.
    I want to have access to both the camera's jpeg and the raw file. Aperture's jpegs just aren't that good compared to the Nikon original jpegs. Not even close!
    Is there any way that I can get back my Nikon camera's jpegs or are they gone, forever?
    Thanks in advance!

    Roy Martin German wrote:
    For some unknown reason, although I can see both the "Use JPEG as Original" and the "Use RAW as Original", both of these menu items are grayed out?
    A couple of ways this can happen is (1) if only one format is actually on the  camera's card (i.e., the camera's Quality setting is incorrect), or (2) if "Import RAW files only" or "Import JPEG files only" was selected in the RAW+JPEG Pairs panel in the import dialog. So (1) are you sure the card contains RAW and JPEG images (e.g., have you looked at it with Finder), and (2) what setting was used during import?
    Roy Martin German wrote:
    but I only see the raw file and as soon as I open it, the cameras jpeg is replaced by something that aperture generates.
    Not sure what you mean by this statement. By design Aperture doesn't "replace" anything. Can you clarify?

  • How to log in with my old Apple account? I forgot my pass and I did change my apple ID before canceling first?? I am from Croatia so did folow al the discussion and the to resolve the problem but no luck. Can not call from Croatia the Apple help desk

    How to log in with my old Apple account? I forgot my pass and I did change my apple ID before canceling first?? I am from Croatia so did folow al the discussion and the to resolve the problem but no luck. Can not call from Croatia the Apple help desk.i did try all the options but I can not find the phone number to call from Croatia,
    I can not change my Apple ID to the old mail (not possible!)
    The old mail don't accept the new password..
    I can not delete the Icloud all the time asking my the password of the old mail!
    I realy need help

    You can not merge accounts.
    Apps are tied to the Apple ID used to download them, you can not transfer them.

  • How to find workarea ID for the work area name.

    Hi Experts..
    How to find workarea ID for the work area name.(Work area name CCIHT_WAH-WAID and I want to fetch characteristic data from table AUSP matching the OBJEK field,but I only have Work area name).Can anybody help me to find tables or relationship between Workarea ID and Workarea name for the same.I am using TCODE - CHIB02.Once I select a workarea and click on IHS Data button,I get data for that workarea.I need to find where this data comes from and How is this fetched.
    Points would be rewarded for helpful answers..
    Thanks
    Kunal Halarnakar

    U want to fetch the workarea description ?
    we can fetch it from CCIHT_WALD table with the RECN value.
    The informations are stored in AUSP table with the characterstic(ATINN) value.

  • HT2534 how do i use itunes and the app store without any credit card or gift card?

    i just got my iphone and i used to use itunes all the time before when downloading all songs were completly free, how do i use itunes and the app store to find free stuff to download without having to add a credit card or gift card with my account?

    Create a NEW account/ID for her using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before. Make sure you specify a birthdate that results in being at least 13 years old
      Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    More details of how:
      http://ipadhelp.com/ipad-help-tips-tricks/how-to-get-free-apps-from-the-app-stor e-without-a-credit-card/

  • How to find out what are the functions supported by string class

    Hi,
    Can any one let me know how to find what are all the functions supported by the string class in standard(STL) library on solaris.
    Regards,
    Vignesh

    1. Any C++ textbook that covers the Standard Library will tell you about the standard string class. A good tutorial and reference for the entire Standard Library is "The C++ Standard Library" by Nicolai Josuttis, published by Addison Wesley.
    2. WIth Sun C++, the command
    man -s3C++ basic_string
    provides documentation for the default libCstd version of the Standard Library.
    3. You could look at the <string> header itself. I don't recommend that approach.

  • How to find out what is the lock key for the computer

    How to find out what is the lock key for the computer?

    You don't.
    If you forgot or lost the password, all you can practically do is reset it.
    The manner in which you do so depends on what version of OS X you are running. The older versions utilize the reset password utility on your recovery/re-installation disk/drive.
    On Lion, you use the following technique to reset the Administrators password:
    Boot to your Lion Recovery Partition, by holding down the Option key while starting, and then selecting the Recovery HD as the boot choice.
    Once booted, at the top of the screen is a menu ..., select Utilities / Terminal from the menu bar.
    In the Terminal window, type “resetpassword” (without the quotes) and press return. A “Reset Password” window will open. Select your boot volume (your SSD drive) if it is not already selected. Select your administrators username from the menu labeled “Select the user account” if it is not already selected. Follow the prompts to reset the password. Restart the computer from the apple menu.

  • How to find latest entry in the table according to time

    how to find latest entry in the table according to the time
    is there any function module to do so
    \[removed by moderator\]
    Regards
    Shashi
    Edited by: Jan Stallkamp on Aug 25, 2008 4:39 PM

    Hi,
    If you want to read the entry from an internal table,
    sort the internal table in the descending order by the time and
    delete adjacent duplicates by comparing the fields other than time and the internal table will have the latest record.
    Suggestion: instead of only time try to have one more field called date with the time combination
    Regards,
    Ramesh

  • How to check/find the size of current ROLLBACK segment in oracle 10g

    How to check/find the size of current ROLLBACK segment in oracle 10g ? Kindly help

    A rollback segment name like "_SYSSMU231$" is used when you have Automatic Undo Management enabled.
    The only relevant parameters are :
    1. UNDO_MANAGEMENT=AUTO
    2. UNDO_RETENTION=n minutes ==> this is what everyone should be interested in
    3. The sizes of the Undo Tablespace datafiles and whether AUTOEXTEND is ON or OFF
    No one should be interested in the size of a single undo segment when Automatic Undo Management is enabled.
    Possible causes of ORA-01555 errors in Automatic Undo Management
    a. UNDO_RETENTION is too low
    b. Undo tablespace is too small
    Hemant K Chitale

Maybe you are looking for

  • New MBP 15 can't work 8-9 hours

    Just bought a 15' MBP 2.4GHz online. Everything is excellent, except for the battery. It seems to only work for 4-5 hours without AC, not 8-9 hours like said on the website. The full charge capacity is 6899. I have no idea about these numbers, so ask

  • Nvidia on T61p - resolution problems

    Hardware: T61p, 16:10, 1920x1200 Pixel Even with nvidia-settings, I can't change to 1920 resolution, I only get 1680x<something>. Even the framebuffer is only around this level (some lines are a bit strange). I used nvidia-xconfig to write xorg.conf.

  • Tecra S1: It is possible to upgrade the HDD to 80GB

    It is possible to upgrade the hard disk on my Tecra S1 to a 80GB+ disk drive. If so What's the maximum size and can anyone recommend a disk.

  • Check out the command line program for xmobar

    I wrote a program for use with xmobar. This program shows the battery charge as the text graphic icon like this: [▉▉▉__} 1:15 Xmobar has the battery monitor plugin but this plugin shows the battery charge as digits. I think it will be nice to see the

  • Can't open some Programs, Shared Lib Error

    Just ran the latest security update (2009-004), which didn't finish. That's the first problem. I tried repairing permissions etc, but it still wouldn't finish. Now, when I try to open some programs, notably Quicken and TechTools Deluxe, I get the fol