How do i count number of table being used in a view

Hi All,
I will be really thankful if anyone please let me know about the count of number of tables being used in a view. I am using Oracle 10g Release 2 on HP-UX(11.31).
In actual I have to find views in my database with more than 5 table in join.
Thank you
Gursimran

Try :
select count(*) from dba_dependencies
where name ='<view name>'
and owner = '<view owner>'
and referenced_type= 'TABLE';Example:
SQL> select * from v$version;
BANNER
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> show user;
USER is "HR"
SQL>
SQL> drop table t1 purge;
Table dropped.
SQL> drop table t2 purge;
Table dropped.
SQL> drop table t3 purge;
Table dropped.
SQL> drop view v;
View dropped.
SQL>
SQL> create table t1(x int);
Table created.
SQL> create table t2(y int);
Table created.
SQL> create table t3(z int);
Table created.
SQL> create view v as select x,y,z from t1,t2,t3;
View created.
SQL>
SQL> connect / as sysdba
ConnectÚ.
SQL> alter session set nls_language=english;
Session altered.
SQL>
SQL> select count(*) from dba_dependencies
  2  where name ='V'
  3  and owner = 'HR'
  4  and referenced_type= 'TABLE';
  COUNT(*)
         3
SQL>Edited by: P. Forstmann on 26 juil. 2010 17:45

Similar Messages

  • How to read line number text from PDF using plugin?

    Hi, I would like to know how to read line number text from PDF using plugin?
    Thanks in advance.

    Ok, some background reading of the PDF Reference will help you understand why this is so difficult. PDF files are not organised into lines. It is best to think of each word or character on the page as being a graphic with its own position. The human eye sees lines where a series of graphics (words) are roughly in the same horizontal region.
    In the general case it is difficult or even impossible to answer this. You may have columns with different spacing (but the PDF stores no information on what is a column). You may have subscripts and superscripts. You may have text in graphics coinciding with other text. Commonly, there may be titles, headings or page numbers which are just ordinary text and might count as lines.
    That said, what you need to do is extract the text on the page and its positions. The WordFinder APIs are the way to do that. Now, sort all the words out, using the Y coordinates and size to try and guess what makes a "line". Now you are in a position to find the text (divided into words, not strings) and report the "line number" you have estimated.

  • How can I find out whitch table are used in whitch document?

    How can I find out whitch table are used in whitch document?
    In the table EUL5_DOCUMENTS are stored the Documents and in the table EUL5_OBJS are stored the tables. How can I query these tables together?
    Are there other possiblities?
    Thanks

    Hi Dierk
    Please take a look at this thread: Re: An EUL query to list out All the Columns  (Fileds) for each Workbook
    I think you may well find what you are looking for in the answer that I gave there.
    Best wishes
    Michael

  • How can I work lsmw with table control using mm01 appl?

    Hi
    How can I work lsmw with table control using mm01 appl?
    Is it difefrent the way we handle table control in BDC?
    Thank You

    Hi
    How can I work lsmw with table control using mm01 appl?
    Is it difefrent the way we handle table control in BDC?
    Thank You

  • How to set request number of info package using start routine

    Hi All,
    I have a specific requirement in which I need to upload only selective request nos from PSA to DSO.
    Any one can suggest how to set request number of info package using start routine or any other mode so that only selective request should proceed using DTP?
    Thanks
    Sangita

    You'll probably want to do this in a start routine.  It is probably not advisable to hard-code the technical name of the InfoPak.  They seem to remain the same upon transport, unlike DTP technical names which are locally generated.
    I would do a SQL select like this in a start routine, and then filter based on the results of the SQL.  You'll probably want to sort the results by date and time, both descending.  Or do a MAX in the SQL.
    Please let me know if this isn't clear.
    select q~rnr q~logdpid q~tdatum q~tuzeit
    from rsreqdone as q
      inner join rsldpio as p
        on p~logdpid = q~logdpid
    where p~objvers = 'A'
    and p~logdpid like 'ZPAK%'
    and p~source = 'your data source'

  • Your Apple ID and phone number are now being used for iCloud on a new iPhone. Why did this pop up today?

    Why did this pop up today?
    Your Apple ID and phone number are now being used for iCloud on a new iPhone.

    Turned on my Mac Pro a few minutes ago and I got the following "POP-UP" message.
    " Your Apple ID and phone number are now being used for iCloud on a new iPhone. "  ( my iPhone is not new. )
    " If you recently signed into "xxxxx  iPhone" you can ignore this notification."
    On the bottom of this pop-up window is an "OK" button.  Well it's NOT "OK"  No option is offered if it is not "OK".
    I have made no changes to my iPhone whatsoever.  Just normal use today.  In my iCloud settings everything is turned off except sharing Contacts.
    I'd suggest you log on to iCloud.com with your Apple ID, and then go to Settings and look in the "My Devices" settings for anything you don't recognize.
    I just did this. All of the devices are iPhones, iPads, and Macintoshes that I own and am familiar with.

  • The following message popped up on my MacBook Air: Your Apple ID and phone number are now being used for ICloud on a new IPhone.   What does it mean?  Should I worry?

    The following message popped up on my MacBook Air: Your Apple ID and phone number are now being used for iCloud on a new iPhone. What does it mean?

    Hi SLCfromMadison,
    This is the message that you'll receive when your Apple ID is signed into on an iPhone. If you haven't done so, the article linked below details a number of steps that can help verify the security of your Apple ID should you think that an unauthorized person has access to it.
    If you think your Apple ID has been compromised
    http://support.apple.com/en-us/HT204145
    Cheers,
    Allen

  • How many times is my Translation Pattern being used?

    I am running CUCM 8.5.1.  I have about 50 or so translation patterns.  Is there a report that can tell me how many times each translation pattern is being used daily or weekly?

    Here is the entire setup and my problem.
         Service Provider is sending 9725 and 3131. 
         Voice Gateway is doing a Num-Exp to 2604 and 2403  (respectively)
         Then, the Call Manager is doing a translation on both numbers to Route Point 7824 which then triggers UCCX.
    Two numbers for one purpose.  I would like to remove 9725 / 2604 but I'm not sure how many times it is being used.  Are the calls that are hitting my route point coming from 9725 or 3131?  I can't tell since they both are being translated to the same Route Point.
    Whats the best way of finding out?  Thanks for your time guys!!

  • How to reduce the number of data blocks used by table

    Hi,
    I was trying to reduce the space usage of a particular table of my apex application which stores blob content and therefore deleted many records from it.
    However, the data block usage remained the same as before.
    I have tried to 'analyze' the table and validate the structure,but am unable to overcome this problem.
    Could someone throw some light on what needs to be to reduce the number of data blocks used by this table?
    Best Regards,
    Priya Jetley

    Priya:
    It is likely that the BLOB content defined in your table is being stored 'Out-of-Line'. This means that the LOB columns are stored in segments of their own. These then are the segments that may need shrinking.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14249/adlob_tables.htm#i1006363
    Varad

  • How do you count number of changes?

    I know lots of threads out there address counters.  I am trying to count number of changes for example.
    T,T,T,F,F,T,T,T,F,F,F.
    This would give give me count of 3.  I have done several renditions, but it would give me number of T or number F.  I am not sure what would be the best option.
    Henry 

    Here's a faster routine:
    Ton
    Message Edited by TonP on 09-25-2008 07:03 PM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    ArrayCount.PNG ‏5 KB

  • How to tell if a file is being used by another process?

    Thanks to nrlz for helping me with my last question http://forum.java.sun.com/thread.jsp?forum=31&thread=387999&tstart=15&trange=15 i have been able to make my virtual folder containing folders :) sort of a tounge twister :)
    However i have had to put in a 1 second delay before running the script after i create it otherwise the script will fail as it thinks the file is still being used by the java program.
    I wish to know how to test for wether a file is currently locked by a process (with out trying to create a File() instance in a try/catch block as this would lock the file again :/ )
    the program is below.
    If you are using win98 you may need to change:
    Runtime.getRuntime().exec("c:\\winnt\\system32\\wscript.exe \"createShorcut.vbs\"");
    to
    Runtime.getRuntime().exec("c:\\windows\\system32\\wscript.exe \"createShorcut.vbs\"");
    you will need a file called directories.ini with the following format:
    <directory that will hold the shortcuts>
    <directory 1>
    <directory 2>
    <directory n>
    END
    example
    --->file start<---
    c:\root
    c:\
    d:\
    f:\apps\
    g:\games\
    END
    --->file end<----
    import java.io.*;
    class winVirtualFolder
         public static void main (String args[]) throws IOException, InterruptedException
               File inFile = new File("directories.ini");
             FileReader fileReader = new FileReader(inFile);
             BufferedReader bufReader = new BufferedReader(fileReader);
             String str="";
                   String home="";
                   winVirtualFolder wVF=new winVirtualFolder();
             home= bufReader.readLine();
                   str=bufReader.readLine();
                   System.out.println("HOME DIR: "+home);
                   while (!str.equals("*END*"))
                        System.out.println("***STR: "+str);
                        wVF.createShortcuts(str,home);
                        str=bufReader.readLine();
         void createShortcuts(String path,String home) throws IOException, InterruptedException
              File directory= new File(path);
              String[] listing =directory.list();
              File[] fileListing =directory.listFiles();
              String[] directories= new String[listing.length];
              for (int i=0;i<listing.length;i++)
                   System.out.print(listing);
                   if (fileListing[i].isDirectory())
                        System.out.println(" DIRECTORY");
              File outFile = new File("createShorcut.vbs");
              FileWriter fileWriter = new FileWriter(outFile);
                   BufferedWriter bufWriter = new BufferedWriter(fileWriter);
                        bufWriter.write("set WshShell = WScript.CreateObject(\"WScript.Shell\")\r\n");
                        bufWriter.write("set oShellLink = WshShell.CreateShortcut(\""+home+""+listing[i]+".lnk\")\r\n");
                        bufWriter.write("oShellLink.TargetPath = \""+path+""+listing[i]+"\\\"\r\n");
                        bufWriter.write("oShellLink.Description = \""+listing[i]+"\\\"\r\n");
                        bufWriter.write("oShellLink.Save\r\n");
              bufWriter.close();
                        sleep(1000);
                        Runtime.getRuntime().exec("c:\\winnt\\system32\\wscript.exe \"createShorcut.vbs\"");
                   else System.out.println("");
         void sleep (long time)
              long waitValue=System.currentTimeMillis()+time;
              while (System.currentTimeMillis()<waitValue){}

    I have over come my problem by creating a seperate script for each shortcut first and then running the scripts later. This does mean that there needs to be space for the temporary script files... but since each of those are under 1K each i do not suppose that it is much of an issue. It has however remakably increased performance by over 100 fold!
    here is the code if anyone is interested:
    import java.io.*;
    import java.util.*;
    class winVirtualFolder
         public static void main (String args[]) throws IOException
               File inFile = new File("directories.ini");
             FileReader fileReader = new FileReader(inFile);
             BufferedReader bufReader = new BufferedReader(fileReader);
             String str="";
                   String home="";
                   int count=0;
                   winVirtualFolder wVF=new winVirtualFolder();
             home= bufReader.readLine();
                   str=bufReader.readLine();
                   System.out.println("Home Directory: "+home);
                   Vector createdDirectories = new Vector();
                   File directory= new File(home);
                   String[] listing =directory.list();
                   for (int i=0;i<listing.length;i++)
                        if (wVF.isAlink(listing))
                             createdDirectories.add(listing[i].substring(0,listing[i].length()-4));
                             count++;
                   int startCount=count;
                   while (!str.equals("*END*"))
                        System.out.println("Creating shortcuts scripts of directories from "+str);
                        count=wVF.createScripts(str,home,createdDirectories,count);
                        str=bufReader.readLine();
                   System.out.print("Running Scripts");          
                   wVF.runScripts(startCount,count,home);
                   int dirCount=0;
                   File file;
                   while (dirCount<count-1)
                        dirCount=0;
                        String str1;
                        for (int i=0;i<createdDirectories.size();i++)
                             str1=(String) createdDirectories.get(i);
                             file = new File(home+""+str1+".lnk");
                             if (file.exists()) dirCount++;
                        System.out.print(".");
                        wVF.sleep(100);
                   System.out.println("Done!");
                   System.out.println("Deleting Scripts");
                   wVF.deleteScripts(startCount,count,home);
         int createScripts(String path,String home,Vector createdDirectories, int count) throws IOException
              File directory= new File(path);
              String[] listing =directory.list();
              File[] fileListing =directory.listFiles();
              String[] directories= new String[listing.length];
              for (int i=0;i<listing.length;i++)
                   if (fileListing[i].isDirectory())
                        int no=0;
                        String number="";
                        while(exists(listing[i]+""+number,createdDirectories))
                             no++;
                             number="-"+no;
                        createdDirectories.add(listing[i]+""+number);
                        File outFile = new File(home+"createShorcut"+count+".vbs");
              FileWriter fileWriter = new FileWriter(outFile);
                   BufferedWriter bufWriter = new BufferedWriter(fileWriter);
                        bufWriter.write("set WshShell = WScript.CreateObject(\"WScript.Shell\")\r\n");
                        bufWriter.write("set oShellLink = WshShell.CreateShortcut(\""+home+""+listing[i]+""+number+".lnk\")\r\n");
                        bufWriter.write("oShellLink.TargetPath = \""+path+""+listing[i]+"\\\"\r\n");
                        bufWriter.write("oShellLink.Description = \""+listing[i]+"\\\"\r\n");
                        bufWriter.write("oShellLink.Save\r\n");
              bufWriter.close();
                        count++;
              return count;
         void runScripts(int startCount,int count,String home) throws IOException
              for (int i=startCount;i<count;i++)
                   Runtime.getRuntime().exec("c:\\winnt\\system32\\wscript.exe \""+home+"createShorcut"+i+".vbs\"");
         void deleteScripts(int startCount,int count,String home) throws IOException
              for (int i=startCount;i<count;i++)
                   File outFile = new File(home+"createShorcut"+i+".vbs");
                   outFile.delete();
         void sleep (long time)
              long waitValue=System.currentTimeMillis()+time;
              while (System.currentTimeMillis()<waitValue){}
         boolean exists(String str,Vector createdDirectories)
              for (int i=0;i<createdDirectories.size();i++)
                   if (str.equals((String) createdDirectories.get(i))) return true;
              return false;
         boolean isAlink(String str)
              if (str.endsWith(".lnk"))
                   return true;
              return false;

  • How to get page number from the PDF using Javascript

    Hi,
    We are having list of Single page PDF. The pdf are named in the order,
    ISBN_Author_01.PDF  (with real page number as i)
    ISBN_Author_02.PDF  (with real page number as ii)
    ISBN_Author_03.PDF  (with real page number as iii)
    ISBN_Author_04.PDF  (with real page number as 1)
    ISBN_Author_05.PDF  (with real page number as 2)
    ISBN_Author_06.PDF  (with real page number as 3)
    ISBN_Author_nn.PDF  (with real page number as 500)
    Here each pdf has a page number and in sequential order.
    The task is to check whether all the pdfs are in sequential order (i.e i, ii, iii, 1, 2, 3). If any page is missing, the script should throw an error report.
    To do this task, I am writing a Javascript to get the real page number from the PDF.
    Can anybody help me how to get the page number from the PDF using Javascript.
    Thanks,
    Gopal

    The "real" page number within a PDF is the count of the physical page starting at 0, zero.
    pageNum numPages
    The number printed on each page is the page label.
    setPageLabels  getPageLabel
    You will have to open each PDF and your script would need to know the page label for that file. I would expect you would need to build a 2 dimensional  array of the file names and the page label for the page within that array.

  • How to find out which queries are being used ?

    We have a number of InfoSet Queries which the users are calling from SQ00. Some of them are very old.
    I would like to find out which queries are being used, so we can have the idle queries decommissioned.
    How can this be done ?
    Best regards,
    Peter

    Hi,
    It's been a while since I've done this but one method is to use ST03N & look for the execution of programs with an AQ* prefix.  The general structure is AQZZ/<query user group><query name>.
    You could probably get the same info from the audit log but I've not checked that.
    Cheers,

  • How to tell which Indexes are not being used?

    We are a large development shop and have many customers. Our database design is very generic so that it works for all of our customers. Each night we use an SSIS ETL process to bring down large amounts of data from the iSeries into SQL. One
    particularily large customer takes a very long time and we are looking for ways to speed up thier data import and transformation. I would like to see which indexes he does not use and possibly remove them. Each night we fully repopulate hundreds of staging
    and ods tables and incrementally delete and repopulate the days work for a handful of history type tables. Removing some indexes off of the large tables could make a big impact. 
    How can i tell which indexes the customer does not use?

    > IDENTIFYING UNUSED INDEXES IN A SQL SERVER DATABASE 
       Just because an index is not being used does not necessarily mean it should be removed.
    > Index This: All About SQL Server Indexes
    sp_BlitzIndex
    José Diz     Belo Horizonte, MG - Brasil

  • HT5878 how to check the detail of font being used for reading the file received by an email

    I received word file as an attachment with email on my iphone. I want to check the detail on font being used for reading the word file received as attachment in an email.
    Thanks

    You don't need to copy the cert out of your configuration. OpenSSL has an "s_client" subcommand which can open an SSL connection and verify the cert for you. It even knows how to do STARTTLS. Something like this ought to do it:
    openssl s_client -starttls smtp -CAfile /path/to/ca/file -connect your.ironport:25
    The /path/to/ca/file is necessary to provide openssl with a cache of root CA certs. You could use -CApath instead of -CAfile if you have a hashed directory of root CA certs instead of a single file containing them all.
    You can also point this at your partner's SMTP server as well.

Maybe you are looking for

  • Where can I find this file f90servlet.exe

    Where can I find this file f90servlet.exe

  • NOKIA N8 KEEP RESTARTING AND THEN DEAD

    HI I PURCHASED N8 AND WITHIN A WEEK IT IS GIVING SO MUCH PROBLEM .FIRST IT KEPT RESTARTING  AND THEN WHEN I WAS TRASFERING SOME MEDIA FILES FROM MY LAPTOP IT RESTARTED AND THEN WENT BLANK  . IT WONT POWER ON . I TOOK IT TO NOKIA CARE WHO UNSUCESSFULL

  • IPhone 6 - Crescentgate

    Hi, new to this Why aren't Apple announcing about the problem with the iPhone 6 re: front camera with Crescentgate?

  • Macbook Appletalk Printing Problem

    I am having a problem locating printers on our network using Appletalk on a Macbook 2Ghz laptop. The only thing that will come up in the "available printers" windows is "Adobe PDF". Has anyone else seen this, or know how to fix this problem? We are t

  • Apps won't activate after subscription renewal.

    My Creative Cloud subscriotion lapsed. I renewed it and and now my apps won't activate. The application manager is asking me for a serial number...