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

Thread: Executing Oracle Specific Commands Through JDBC OCI

  1. #1
    Join Date
    Sep 2005
    Posts
    13

    Executing Oracle Specific Commands Through JDBC OCI

    Hi

    Iam using JDBC OCI Driver,
    How can i execute the oracle specific statements like "recover
    automatic"
    What parameters are to be set to do this.
    Any suggestion will be appriciated.
    Thanx in advance.

    With Regards
    Vara Prasad

  2. #2
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,587
    Did you try the executeUpdate method?
    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

  3. #3
    Join Date
    Sep 2005
    Posts
    13

    Tried executeUpdate and it's giving errors

    Hi ,

    executeUpdate() is giving following Error

    java.sql.SQLException: ORA-00900: invalid SQL statement


    With Regards
    Vara Prasad

  4. #4
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,587

    Try this...

    Try to use it in this try/catch block.

    Code:
    try {
             con.setAutoCommit(false) ;
             stmt.executeUpdate("RECOVER AUTOMATIC DATAFILE  " +
                                "'/u01/dbs/mydatafile.dbf'") ;
             con.commit() ;
             con.setAutoCommit(true) ;
    
          }catch(SQLException ex) {
             System.err.println("SQLException: " + ex.getMessage()) ;
             con.rollback() ;
             con.setAutoCommit(true) ;
          }
    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

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