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

Thread: PRO C

  1. #1
    Join Date
    Sep 2000
    Posts
    12
    can anyone give me a good starting place to learn how to work with PRO C. Not quite sure what it is or what performance gains/restrictions are associated with it.
    Any help would be appreciated..

  2. #2
    Join Date
    Dec 1999
    Location
    Alpharetta, GA, US
    Posts
    192
    PRO * C is nothing but C and embeded SQL.
    if has got its own advantages.
    Chan
    OCP7.3/8.0/8i/9i
    Sun Certified Sys. Admin

  3. #3
    Join Date
    Sep 2000
    Posts
    19
    Its is mainly used in batch processing, reading from a flat file validating the record before taking them into oracle database.

    You can find sample file with .pc extension .

    If need more on these let me know.

    Rgds
    BMV

  4. #4
    Join Date
    Sep 2000
    Posts
    12

    PRO C

    thanks for the replies. one further question on this.
    currently I use sqlldr/utl_file and a few perl scripts
    I've written to do all my flat file processing and moving
    of data. I've become very familiar with these processes.
    I'm still learning oracle, is PRO * C something I should
    dive into to further my performance and efficiency. I have
    some C background(not much but I can get by).

    Thanks again.

  5. #5
    Join Date
    Nov 2000
    Location
    Israel
    Posts
    268
    Hi,
    I am a newbie Oracle DBA and a very experienced C/C++/JAVA developer.
    We use PRO*C in our Application for DML purposes.

    Pro*C is a great tool for writing DML phrases without knowing the structure of SQL in C/C++.
    For Example:

    EXEC SQL BEGIN DECLARE SECTION;
    char chr[10];
    short srt;
    EXEC SQL END DECLARE SECTION;

    EXEC SQL AT <db_name>
    SELECT <VAL1>,<VAL2> into :chr,srt
    from <some_table>;

    EXEC SQL COMMIT;

    .
    .
    .
    This is an example for using Pro*C to write DML.
    You can use Pro*C to execute packages and procedures directly from the database.

  6. #6
    Join Date
    Jun 2000
    Posts
    417
    Pro*C is probablly more geared twoards large, repeated production batch processes where performance is an issue.

    If you're just parsing a few flatfiles and inserting into your database once or twice, I would also just use Perl and dump it to sqlplus. Pro*C is overkill and much more work for quick things like this.

    However if say you have 200,000 record flatfiles sent from a customer every day/week/etc which need to be validated and imported into your database, or a large program which generates a 200,000 record flatfile to be sent to some other customer, Pro*C is probablly the way to go.

    Check out oracle's documentation at technet for examples, and other places where Pro*C would be useful.

  7. #7
    Join Date
    Sep 2000
    Posts
    12

    Wink PRO C

    Thanks for all the information everyone. This is exactly what I was interested in. Much appreciated.

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