DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: Getting Metadata from Oracle databases !

  1. #1
    Join Date
    Dec 2000
    Posts
    32

    Unhappy

    Hi All,

    My focus is to get Capacity and consumption of Oracle databases. Which the best way to do it ? I am focusing on OCI,but how to get the metadata without using sql statements ? For databases we say select * from v$database;But is there any other programatic way to do it.I am really stuck here.I would appreciate if I get help here.

    Thank you very much.

    ---Radha

  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    If you need to view any of the views then you have no other option other than invoking sqlplus. One of the other ways is you could come up with a script that would go through the

    $ORACLE_BASE/oradata/<SID>/ *.* files and $ORACLE_BASE/admin/<SID>/arch/ *.arc
    ?/rdbms/audit/

    to find out the growth rate.


    Other than these, I couldn't think of a way.

    Sam

  3. #3
    Join Date
    Jun 2000
    Posts
    417
    What would you use OCI for if not for executing SQL statements? You can use OCI from whatever language you're using that has a library, but to get information out of the database you have to write a sql query and have it executed somehow.

  4. #4
    Join Date
    Dec 2000
    Posts
    32

    OCI function calls

    pwoneill,

    I am not clear enough. What I meant was when I am in my c++ application, if I use any OCI function calls ,do they take care of sql statements rather than I am putting them in my C++ code ? I used SQLServer before and I know that we can used DMO API to get the data from the database without using any sql statements.

    Thanks.

  5. #5
    Join Date
    Jun 2000
    Posts
    417
    You use OCI to execute the sql statements and return them to your application. I don't know the exact syntax of the C++ library but it's probablly something like


    $c1 = OCIlogon("scott","tiger",$db);
    $stmt = OCIparse($c1,"select yourinfo here");
    OCIexecute($stmt,OCI_DEFAULT);
    while (OCIfetch($stmt)) {
    // loop through rows returned
    }

    that's the library for a scripting language so types and arrays are a lot less strict than c++ but that's the general idea. Parse, Execute, Fetch.

    You could also use Pro*C but I'm not sure offhand if it compiles C++ as well as C.

  6. #6
    Oracle is very strict in the rule Todd said.
    RDBMS must be accesed through SQL.
    Apparentely SQLServer not :)
    The only tool I know don't use SQL is Precise which accesses the SGA (Memory) directly (A hard work)
    Ramon Caballero, DBA, rcaballe@yahoo.com

  7. #7
    Join Date
    Nov 2000
    Posts
    6

    Thumbs up

    May be u can create a function or procedure in database. then u just call
    those procedures.

    Have u ever use TODD software try it

  8. #8
    Join Date
    Dec 2000
    Posts
    32

    Getting Metadata

    Ramon,

    "The only tool I know don't use SQL is Precise which accesses the SGA (Memory) directly (A hard work)" ,This is your reply,
    Could you give me some more info about the tool that doesn't use SQL ? I would appreciate.

    Thanks.


  9. #9
    About Precise:
    [url]http://www.precise.com[/url]

    We are evaluating this tool because don't generate extra load to the database.
    It has a very cool Repository to track changes.
    And it can sample at very high rates, 10 or more samples by second.
    Ramon Caballero, DBA, rcaballe@yahoo.com

Posting Permissions

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


Click Here to Expand Forum to Full Width