Forum Stats

  • 3,752,512 Users
  • 2,250,512 Discussions
  • 7,867,862 Comments

Discussions

Deleting Archive Log Using OCI API

3373108
3373108 Member Posts: 7
edited Jan 3, 2017 8:49AM in Oracle Call Interface (OCI)

When I try to execute the " delete noprompt archivelog until time ‘SYSDATE-1’ " command using "OCIStmtExecute()" function ,

I am getting an error like

"ORA-00933: SQL command not properly ended"

Is this the correct command to delete ARCHIVE logs?

Whether it is possible to execute RMAN commands using OCI API ? Are there any OCI functions to delete ARCHIVELOGS (log truncation) ?

Tagged:

Answers

  • AndrewSayer
    AndrewSayer Member Posts: 12,998 Gold Crown
    edited Jan 3, 2017 8:06AM
    3373108 wrote:When I try to execute the " delete noprompt archivelog until time ‘SYSDATE-1’ " command using "OCIStmtExecute()" function , I am getting an error like"ORA-00933: SQL command not properly ended" Is this the correct command to delete ARCHIVE logs?Whether it is possible to execute RMAN commands using OCI API ? Are there any OCI functions to delete ARCHIVELOGS (log truncation) ?

    The correct way would be to use RMAN directly. Why do you want to use OCI for this?

  • 3373108
    3373108 Member Posts: 7
    edited Jan 3, 2017 8:42AM

    Since I am developing OCI application to delete Archive logs , I would like to know whether it is possible to run RMAN commands through OCI API without connecting to RMAN directly ?

  • AndrewSayer
    AndrewSayer Member Posts: 12,998 Gold Crown
    edited Jan 3, 2017 8:43AM
    3373108 wrote:Since I am developing OCI application to delete Archive logs , I would like to know whether it is possible to run RMAN commands through OCI API without connecting to RMAN directly ? 

    It's not

  • 3373108
    3373108 Member Posts: 7
    edited Jan 3, 2017 8:49AM

    Thank you boss . I will use RMAN in my application .

This discussion has been closed.