DDL Statement Audit

Dear All,
My database version is 10Gr2 and Operating System is Solaris 10.
In database level two parameters are set for auditing -
Audit_sys_operation=true
audit_trail=db
I'm having some queries as follows -
Is any database audit related information stored in the Os files, if it is then from where I can check it. As an example in case of Windows 'eventlog'.
how to find whether the DDL audit is set or not in the current database. My intention is that if any ddl statement fired in the database I can find the user who has fired the statement and time when he/she has fired.

H,
DDl auditing is pretty simple, and you can set the audit log tobe either on disk, by setting audit_trail to OS and audit_file_dest to a valid directory or to atable in the DB (sys.aud$) by setting the audit_trail parameter to DB.
After setting the parameters you would have to configure what and how to audit.
You can start by reading the information here:[http://www.oracle-base.com/articles/8i/Auditing.php]
Regards,
Yuri

Similar Messages

  • How to know which user has executed which ddl statement

    Hi All,
    Last week i faced some problem, like some one has truncated the table , so luckily i have the schema backup so i restored it till the last backup taken.
    but i want to know who has executed this ddl statement.
    i know there are some utilities are avaible with oracle, so please describe me the easiest and quickest way to get this.
    Regards
    Asif

    In order of descending simplicity
    - Use the principle of least privilege to restrict the privileges users have in the database to ensure that they cannot do things like truncating a table
    - Enable auditing of potentially problematic statements. This has to be done before the damage is done, though
    - Create a DDL trigger that logs when users issue DDL. This also must be done before the damage is done.
    - Use LogMiner to go through the archived log files that were generated at the time the table was truncated. This assumes that the database is in ARCHIVELOG mode and that you have the archived logs from last week. Using LogMiner to track down the culprit is also likely to be relatively time-intensive
    Justin

  • Track DDL statement

    Hi all
    I want to track all DDL statements fiered on the database like Drop, Alter, Truncate, Create.
    I tried looking in metalink and found out that I have to right a trigger for it.
    but couldn't find any script for it.
    Can anyone help me with this.

    Writing triggers would be one way. The other ways is to enabling DDL auditing. Refer oracle docs. also search in this forum or http://www.asktom.oracle.com site.
    Jaffar

  • DDL statements and dynamic  sql  in stored procedure

    I created a stored procedure to create and drop tables, using dynamic sql.
    When I try to do the inserts using dynamic sql, i.e
    v_string := 'INSERT statement';
    EXECUTE IMMEDIATE v_string;
    I get the following error message:
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at line 63
    Line 63 happens to be the line that the EXECUTE IMMEDIATE v_string; statement is in.
    I am able to describe the table that the inserts are being made into, so I know that the table exists.
    Any idea why I'm getting this error message would be appreciated.

    Yes I do and I have been able to create other tables using dynamic sql.
    The table that I am having problems with SELECTs data from another table to get its column values; within the SELECT statement, the CAST function is used:
    ie. CAST(CASE SUBSTR(CAST(E_MOD AS VARCHAR(7)),2,3)
    WHEN 'AAA' THEN 'A55'
    ELSE ............
    I get the following error message:
    ERROR at line 18: (this line starts the CAST statement)
    ORA-06550: line 18, column 13:
    PLS-00103: Encountered the symbol "AAA" when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod not rem return
    returning <an exponent (**)> <> or != or ~= >= <= <> and or
    like between into using || bulk
    When I remove the quotes or add another single quote, the same error cascades to 'A55'.
    After doing the same for the next error, I get the error message below:
    ERROR at line 1: (this line has the EXECUTE IMMEDIATE statement)
    ORA-00936: missing expression
    ORA-06512: at line 6
    Any idea what the problem could be?
    Also is there another way to have DDL statements as stored procedures other than using dynamic sql or the DBMS_SQL package?

  • ABAP Import Phase DDL Statement Error

    Hi Experts!
    I am installing SAP Netweaver PI 7.3 EHP1 and encountered an error in the ABAP import phase.
    I checked the import monitor logs and found a clue about SAPVIEW.log.
    I have checked the SAPVIEW.log and found out the following:
    ERROR: DDL statement failed
    ( DROP VIEW "APPL_MODS" )
    dsql_exec_immediate returned DS_DBOBJECTUNKNOWN
    (IMP) INFO: a failed DROP attempt is not necessarily a problem
    (DB) ERROR: DDL statement failed
    ( CREATE VIEW "APPL_MODS" ( "NAME", "TYP", "MEMBER", "DEVCLASS" ) AS SELECT T0001."NAME", T0001."TYP", T0001."MEMBER", T0002."DEVCLASS" FROM "MODSAP" T0001, "MODSAPA" T0002 WHERE T0001."NAME" = T0002."NAME" AND T0002."MIGRATED" <> 'X' )
    dsql_exec_immediate returned DS_DBOBJECTUNKNOWN
    (DB) INFO: disconnected from DB
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: job finished with 1 error(s)
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: END OF LOG:
    Please help!
    Also please let me know if any further detail is required.
    Regards,
    Ayan

    Gaurav,
    Please find the below pasted trace from SAPVIEW.log
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: START OF LOG: 20140823014048
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: sccsid @(#) $Id: //bas/721_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: version R7.20/V1.6 [UNICODE]
    Compiled Dec  4 2013 12:54:08
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load -ctf I /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DATA/SAPVIEW.STR /tmp/sapinst_instdir/NW731/DB6/INSTALL/STD/AS/DDLDB6.TPL SAPVIEW.TSK DB6 -l SAPVIEW.log
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: job completed
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: END OF LOG: 20140823014048
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: START OF LOG: 20140823014048
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: sccsid @(#) $Id: //bas/721_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: version R7.20/V1.6 [UNICODE]
    Compiled Dec  4 2013 12:54:08
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load -i SAPVIEW.cmd -dbcodepage 4102 -l SAPVIEW.log -stop_on_error -loadprocedure fast LOAD:DEF_CRT
    (DB) INFO: connected to DB
    (SQL) INFO: Searching for SQL file SQLFiles.LST
    (SQL) INFO: SQLFiles.LST not found
    (SQL) INFO: Searching for SQL file /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/SQLFiles.LST
    (SQL) INFO: /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/SQLFiles.LST not found
    (SQL) INFO: Searching for SQL file .SQL
    (SQL) INFO: .SQL not found
    (SQL) INFO: Searching for SQL file /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/DB6/.SQL
    (SQL) INFO: /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/DB6/.SQL not found
    (DB) INFO: /BI0/MHIER_VERS created #20140823014054
    (DB) INFO: /BI0/RALEAFNODCH created #20140823014054
    (DB) INFO: /BI0/RALEAFNODSP created #20140823014054
    (DB) INFO: /BI0/RBUCKET created #20140823014054
    (DB) INFO: /BI0/RCALMONTH created #20140823014054
    (DB) INFO: /BI0/RCALMONTH2 created #20140823014054
    (DB) INFO: /BI0/RCALQUART1 created #20140823014054
    (DB) INFO: /BI0/RCALQUARTER created #20140823014054
    (DB) INFO: /BI0/RCALWEEK created #20140823014054
    (DB) INFO: /BI0/RCALYEAR created #20140823014054
    (DB) INFO: /BI0/RCHNGID created #20140823014054
    (DB) INFO: /BI0/RCURRENCY created #20140823014054
    (DB) INFO: /BI0/RDATE created #20140823014054
    (DB) INFO: /BI0/RFISCPER created #20140823014054
    (DB) INFO: /BI0/RFISCPER3 created #20140823014054
    (DB) INFO: /BI0/RFISCVARNT created #20140823014054
    (DB) INFO: /BI0/RFISCYEAR created #20140823014054
    (DB) INFO: /BI0/RHALFYEAR1 created #20140823014054
    (DB) INFO: /BI0/RHIENM created #20140823014054
    (DB) INFO: /BI0/RHIER_HIEID created #20140823014054
    (DB) INFO: /BI0/RHIER_NODE created #20140823014054
    (DB) INFO: /BI0/RHIER_VERS created #20140823014054
    (DB) INFO: /BI0/RINFOPROV created #20140823014054
    (DB) INFO: /BI0/RIOBJNM created #20140823014054
    (DB) INFO: /BI0/RLANGU created #20140823014054
    (DB) INFO: /BI0/RLOGSYS created #20140823014054
    (DB) INFO: /BI0/RNODEPOSIT created #20140823014054
    (DB) INFO: /BI0/RNORESTNODE created #20140823014054
    (DB) INFO: /BI0/RRATE_TYPE created #20140823014054
    (DB) INFO: /BI0/RRECORDMODE created #20140823014054
    (DB) INFO: /BI0/RRECORDTP created #20140823014054
    (DB) INFO: /BI0/RREQUID created #20140823014054
    (DB) INFO: /BI0/RSIGNCH created #20140823014054
    (DB) INFO: /BI0/RSOURSYSTEM created #20140823014054
    (DB) INFO: /BI0/RTIME created #20140823014054
    (DB) INFO: /BI0/RTXTLG created #20140823014054
    (DB) INFO: /BI0/RTXTMD created #20140823014054
    (DB) INFO: /BI0/RTXTSH created #20140823014054
    (DB) INFO: /BI0/RUNIT created #20140823014054
    (DB) INFO: /BI0/RWEEKDAY1 created #20140823014054
    (DB) INFO: /BI0/ZBUCKET created #20140823014054
    (DB) INFO: /BI0/ZCALMONTH created #20140823014054
    (DB) INFO: /BI0/ZCALMONTH2 created #20140823014054
    (DB) INFO: /BI0/ZDATE created #20140823014054
    (DB) INFO: /BI0/ZFISCPER created #20140823014055
    (DB) INFO: /BI0/ZHALFYEAR1 created #20140823014055
    (DB) INFO: /BI0/ZINFOPROV created #20140823014055
    (DB) INFO: /BI0/ZIOBJNM created #20140823014055
    (DB) INFO: /GC1/VXXX created #20140823014055
    (DB) INFO: /OSP/V_RAUI_CHRD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_CMVD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_CPVD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_CSED created #20140823014055
    (DB) INFO: /OSP/V_RAUI_DCDB created #20140823014055
    (DB) INFO: /OSP/V_RAUI_GRPD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_MTD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_MVDB created #20140823014055
    (DB) INFO: /OSP/V_RAUI_PBDB created #20140823014055
    (DB) INFO: /OSP/V_RAUI_RDDB created #20140823014055
    (DB) INFO: /OSP/V_RAUI_RFCD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_RMTD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_RTDB created #20140823014055
    (DB) INFO: /OSP/V_RAUI_SCD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_SCHD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_SELD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_TMVD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_TPBD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_TPDB created #20140823014055
    (DB) INFO: /OSP/V_RAUI_TPRD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_TRGD created #20140823014055
    (DB) INFO: /OSP/V_RAUI_VARD created #20140823014055
    (DB) INFO: /SAPAPO/GEWICHT created #20140823014055
    (DB) INFO: /SAPAPO/TRENDAM created #20140823014055
    (DB) INFO: /SAPAPO/VWALPROF created #20140823014055
    (DB) INFO: /SAPPO/FULL_HINT created #20140823014055
    (DB) INFO: /SAPPO/V_PPOCMPL created #20140823014055
    (DB) INFO: /SAPPO/V_PPO_UPD created #20140823014055
    (DB) INFO: /SAPTRX/A_CONDF4 created #20140823014055
    (DB) INFO: /SAPTRX/EE_FLDS created #20140823014055
    (DB) INFO: /SAPTRX/MSG_PARA created #20140823014055
    (DB) INFO: /SAPTRX/MSG_PTAB created #20140823014055
    (DB) INFO: /SAPTRX/STR_FLDS created #20140823014055
    (DB) INFO: /SAPTRX/VDASFEV created #20140823014055
    (DB) INFO: /SAPTRX/VDASFPAR created #20140823014055
    (DB) INFO: /SAPTRX/VD_AOMIL created #20140823014055
    (DB) INFO: /SAPTRX/VD_AOPAC created #20140823014055
    (DB) INFO: /SAPTRX/VD_AOPAE created #20140823014055
    (DB) INFO: /SAPTRX/VD_AOPAI created #20140823014055
    (DB) INFO: /SAPTRX/VD_AOPAR created #20140823014055
    (DB) INFO: /SAPTRX/VD_AOTD1 created #20140823014055
    (DB) INFO: /SAPTRX/VD_AOTD2 created #20140823014055
    (DB) INFO: /SAPTRX/VD_AOTDD created #20140823014055
    (DB) INFO: /SAPTRX/VD_AOTYP created #20140823014055
    (DB) INFO: /SAPTRX/VD_ASPAR created #20140823014055
    (DB) INFO: /SAPTRX/VD_CONDL created #20140823014055
    (DB) INFO: /SAPTRX/VD_EVTD1 created #20140823014055
    (DB) INFO: /SAPTRX/VD_EVTD2 created #20140823014055
    (DB) INFO: /SAPTRX/VD_EVTD3 created #20140823014055
    (DB) INFO: /SAPTRX/VD_EVTD4 created #20140823014055
    (DB) INFO: /SAPTRX/V_AODD02 created #20140823014055
    (DB) INFO: /SAPTRX/V_DD03 created #20140823014055
    (DB) INFO: /SAPTRX/V_DD03X created #20140823014055
    (DB) INFO: /SDF/CMO_OBJ_TR created #20140823014055
    (DB) INFO: /SDF/CMO_SMDCMP created #20140823014056
    (DB) INFO: /SDF/CMO_SMDDVC created #20140823014056
    (DB) INFO: /SDF/CMO_UMDCMP created #20140823014056
    (DB) INFO: /SDF/SMODICOMP created #20140823014056
    (DB) INFO: /SDF/SMODIDEVC created #20140823014056
    (DB) INFO: /SDF/UMOD_COMP created #20140823014056
    (DB) INFO: AKB_TRHD_DETAIL created #20140823014056
    (DB) INFO: ALTEXTHIST created #20140823014056
    (DB) INFO: APPL_DEVC created #20140823014056
    (DB) INFO: APPL_DIAL created #20140823014056
    (DB) INFO: APPL_DOMA created #20140823014056
    (DB) INFO: APPL_DTEL created #20140823014056
    (DB) INFO: APPL_ENQU created #20140823014056
    (DB) INFO: APPL_FUGR created #20140823014056
    (DB) INFO: APPL_FUGRG created #20140823014056
    (DB) INFO: APPL_FUNC created #20140823014056
    (DB) INFO: APPL_INDX created #20140823014056
    (DB) INFO: APPL_MCOB created #20140823014056
    (DB) INFO: APPL_MENU created #20140823014056
    (DB) ERROR: DDL statement failed
    ( CREATE VIEW "APPL_MODS" ( "NAME", "TYP", "MEMBER", "DEVCLASS" ) AS SELECT T0001."NAME", T0001."TYP", T0001."MEMBER", T0002."DEVCLASS" FROM "MODSAP" T0001, "MODSAPA" T0002 WHERE T0001."NAME" = T0002."NAME" AND T0002."MIGRATED" <> 'X' )
    dsql_exec_immediate returned DS_DBOBJECTUNKNOWN
    (DB) INFO: disconnected from DB
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: job finished with 1 error(s)
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: END OF LOG: 20140823014056
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: START OF LOG: 20140823014312
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: sccsid @(#) $Id: //bas/721_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: version R7.20/V1.6 [UNICODE]
    Compiled Dec  4 2013 12:54:08
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load -i SAPVIEW.cmd -dbcodepage 4102 -l SAPVIEW.log -stop_on_error -loadprocedure fast LOAD:DEF_CRT
    (DB) INFO: connected to DB
    (SQL) INFO: Searching for SQL file SQLFiles.LST
    (SQL) INFO: SQLFiles.LST not found
    (SQL) INFO: Searching for SQL file /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/SQLFiles.LST
    (SQL) INFO: /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/SQLFiles.LST not found
    (SQL) INFO: Searching for SQL file .SQL
    (SQL) INFO: .SQL not found
    (SQL) INFO: Searching for SQL file /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/DB6/.SQL
    (SQL) INFO: /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/DB6/.SQL not found
    (DB) ERROR: DDL statement failed
    ( DROP VIEW "APPL_MODS" )
    dsql_exec_immediate returned DS_DBOBJECTUNKNOWN
    (IMP) INFO: a failed DROP attempt is not necessarily a problem
    (DB) ERROR: DDL statement failed
    ( CREATE VIEW "APPL_MODS" ( "NAME", "TYP", "MEMBER", "DEVCLASS" ) AS SELECT T0001."NAME", T0001."TYP", T0001."MEMBER", T0002."DEVCLASS" FROM "MODSAP" T0001, "MODSAPA" T0002 WHERE T0001."NAME" = T0002."NAME" AND T0002."MIGRATED" <> 'X' )
    dsql_exec_immediate returned DS_DBOBJECTUNKNOWN
    (DB) INFO: disconnected from DB
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: job finished with 1 error(s)
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: END OF LOG: 20140823014318
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: START OF LOG: 20140823015246
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: sccsid @(#) $Id: //bas/721_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: version R7.20/V1.6 [UNICODE]
    Compiled Dec  4 2013 12:54:08
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load -i SAPVIEW.cmd -dbcodepage 4102 -l SAPVIEW.log -stop_on_error -loadprocedure fast LOAD:DEF_CRT
    (DB) INFO: connected to DB
    (SQL) INFO: Searching for SQL file SQLFiles.LST
    (SQL) INFO: SQLFiles.LST not found
    (SQL) INFO: Searching for SQL file /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/SQLFiles.LST
    (SQL) INFO: /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/SQLFiles.LST not found
    (SQL) INFO: Searching for SQL file .SQL
    (SQL) INFO: .SQL not found
    (SQL) INFO: Searching for SQL file /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/DB6/.SQL
    (SQL) INFO: /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/DB6/.SQL not found
    (DB) ERROR: DDL statement failed
    ( DROP VIEW "APPL_MODS" )
    dsql_exec_immediate returned DS_DBOBJECTUNKNOWN
    (IMP) INFO: a failed DROP attempt is not necessarily a problem
    (DB) ERROR: DDL statement failed
    ( CREATE VIEW "APPL_MODS" ( "NAME", "TYP", "MEMBER", "DEVCLASS" ) AS SELECT T0001."NAME", T0001."TYP", T0001."MEMBER", T0002."DEVCLASS" FROM "MODSAP" T0001, "MODSAPA" T0002 WHERE T0001."NAME" = T0002."NAME" AND T0002."MIGRATED" <> 'X' )
    dsql_exec_immediate returned DS_DBOBJECTUNKNOWN
    (DB) INFO: disconnected from DB
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: job finished with 1 error(s)
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: END OF LOG: 20140823015250
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: START OF LOG: 20140825011924
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: sccsid @(#) $Id: //bas/721_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: version R7.20/V1.6 [UNICODE]
    Compiled Dec  4 2013 12:54:08
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load -i SAPVIEW.cmd -dbcodepage 4102 -l SAPVIEW.log -stop_on_error -loadprocedure fast LOAD:DEF_CRT
    (DB) INFO: connected to DB
    (SQL) INFO: Searching for SQL file SQLFiles.LST
    (SQL) INFO: SQLFiles.LST not found
    (SQL) INFO: Searching for SQL file /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/SQLFiles.LST
    (SQL) INFO: /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/SQLFiles.LST not found
    (SQL) INFO: Searching for SQL file .SQL
    (SQL) INFO: .SQL not found
    (SQL) INFO: Searching for SQL file /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/DB6/.SQL
    (SQL) INFO: /backup/NW7.3_EHP1/ABAP_Inst_EXP/51043228/DATA_UNITS/EXP3/DB/DB6/.SQL not found
    (DB) ERROR: DDL statement failed
    ( DROP VIEW "APPL_MODS" )
    dsql_exec_immediate returned DS_DBOBJECTUNKNOWN
    (IMP) INFO: a failed DROP attempt is not necessarily a problem
    (DB) ERROR: DDL statement failed
    ( CREATE VIEW "APPL_MODS" ( "NAME", "TYP", "MEMBER", "DEVCLASS" ) AS SELECT T0001."NAME", T0001."TYP", T0001."MEMBER", T0002."DEVCLASS" FROM "MODSAP" T0001, "MODSAPA" T0002 WHERE T0001."NAME" = T0002."NAME" AND T0002."MIGRATED" <> 'X' )
    dsql_exec_immediate returned DS_DBOBJECTUNKNOWN
    (DB) INFO: disconnected from DB
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: job finished with 1 error(s)
    /usr/sap/PID/SYS/exe/uc/rs6000_64/R3load: END OF LOG: 20140825011937
    Please look into this..
    Regards,
    Ayan

  • Difference B/w all DDL statements in Oracle 8i and 9i

    Where can i get the difference between all the DDL statements between oracle 8i and 9i.If anyone has this pls ..post it..

    What is your national character set? What is NLS_LENGTH_SEMANTICS set to?
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Executing multiple DDL statements with OracleCommand

    hi..
    im having trouble executing multiple ddl statements with the the oracle command object. i have tried to enclose them within Begin.. End; block but with no use.
    this problem seems to occur only with DDL statements,.. as my DML like update, delete and Inserts seem to work fine when enclosed within the PL /SQL block.
    single DDL statements also seem to work fine. so im guessing this has nothing to do with priviledges. any ideas?
    my code as follows
    OracleCommand command = new OracleCommand();
    command.CommandType = CommandType.Text;
    command.CommandText = string.Format(@"{0}",script);
    conn.Open();
    command.Connection = conn;
    command.ExecuteNonQuery();
    the script is read from a file, and looks like this. (note : i have removed any line breaks or any other characters)
    BEGIN ALTER TABLE SYSTEMUSER DISABLE CONSTRAINT FK_USER_CLIENT; ALTER TRIGGER SET_SUBSCRIPTION_SUB_I DISABLE; END;
    this is the error i get.
    Oracle.DataAccess.Client.OracleException: ORA-06550: line 1, column 7:
    PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:
    begin case declare exit for goto if loop mod null pragma
    raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe.

    If I'm not mistaken, we're not allowed to issue DDL inside anonymoue block (or stored procedure) since DDL has implicit commit in it. But you still can execute DDL using EXECUTE IMMEDIATE or using DBMS_SQL package. Try changing your CommandText like this,
    BEGIN
       EXECUTE IMMEDIATE 'ALTER TABLE SYSTEMUSER DISABLE CONSTRAINT FK_USER_CLIENT';
       EXECUTE IMMEDIATE 'ALTER TRIGGER SET_SUBSCRIPTION_SUB_I DISABLE';
    END;Hope this helps,
    [Nur Hidayat|http://nur-hidayat.net/]

  • DDL statements in Graphic builder 6i

    Hi.
    Is there possibility to perform DDL statements in Graphic builder 6i? Something like FORM_DDL in Forms and SRW.DO_SQL in Reports.
    I want to set role. Report has own statement SET_ROLE.
    Our application use classic security model: User has granted only LOGIN privilege by default. After login application sets roles for reading, writing, deleting to DB. Same Reports do. But in Graphic builder I can't.

    May I can use OG library and OG.Interpret command. :o)

  • Execution of ddl statement  in post-insert trigger

    hi,
    I'm working on headstart 6.5. I wants to execute a DDL statement in post-insert-trigger.The problem is this trigger is executed in between pre-commit and post-forms-commit.In pre-commit the transaction is opened with a insert statement that is inserting "open" in field status which is having a deffered check constraint QMS_NEED_TO_CLOSE_TRANSACTION.In post-forms-commit it will check whether the transaction is open if yes will check the business rule will delete the data that was inserted into qms_transaction in pre-commit trigger and will close the transaction .
         In between if i execute a DDl statement a commit will be performed on the insert statement written in pre-commit trigger.This will violate the check-constraint and we will get the error qms_need_to_close_transaction violated.
         My business logic wants this statement to be executed at the post-insert trigger on the block.Is this possible??
         Does anyone have face the same problem?Whts the workaround for the same?

    Hello,
    You could use the execute_query after the commit_form called, by exeample in a KEY-COMMIT trigger.
    KEY-COMMIT trigger
      Commit_Form ;
      Go_block( 'master_block' ) ;
      Execute_Query ;Francois

  • Executing a DDL statement from java code

    Hi all,
    this is code from jdev11.1.1.3 version. I am trying to execute a DDL statement in oracle db from java code, but "ORA-00900: invalid SQL statement" error is coming.
    I am trying to create a table in same schema in same db by using 'Copy' command.
    Same DDL command is executing from sql command prompt & table is being created. Plz help me , as how to do from java?
            public String cmb_action() {
            // Add event code here...
            try {
                //getting source db connection
                InitialContext initialContext = new InitialContext();
                DataSource ds = (DataSource) initialContext.lookup("java:comp/env/jdbc/SourceConnDS");
                Connection sourceconn = ds.getConnection();
                sourceconn.setAutoCommit(false);
                String sql = "Copy from myschema/mypass@DB insert t_dept using select * from dept;"                       
                Statement stat = sourceconn.createStatement();
                stat.executeUpdate(sql);
                sourceconn.commit();
                System.out.println("done");
              catch (Exception ne) {
                // TODO: Add catch code
                ne.printStackTrace();
            return null;
        }

    I have a requirement to transfer data from one db to another db from Java Application Layer.Maybe, maye not. We get all sorts of weird "requirements" - which are nothing but thoughts or proposed solutions.
    But,
    Did the "requirement" mention whether the table existed already or not in the target database? - If not, did it tell you to create it - drop/create it?
    Did the "requirement" deliver some explanation to why this copying was neeeded? - Are we talking replication? - Or a one time cloning?
    Etc, etc,
    Personally I would always argue against a "reuirement" like that. - It just isn't the way to do it. Period.
    Regards
    Peter
    P.S: If you are satisfied with what COPY does, then you could let Java make an OS call and do it from there?

  • How to Generate DDL Statement for PSAPROLL Tablespace on Oracle9i-HP_UX

    Hi,
    I am having SAP R3 46C installed with Oracle 9i on HP_UX 11i system.
    I want to generate required DDL statements for PSAPROLL Tablespace/Rollback Segments as Backup/recovery purpose, before converting it into PSAPUNDO.
    Its easy to find & store required DDL statements using OEM. But, I am not able to locate oemapp  (under $ORACLE_HOME/bin directory) application in the installation.
    The current patch level of installed oracle is
    I want to start OEM in HP_UX system, if it is possible.
    otherwise,
    I want to know the other alternatives to generate the required DDL statements.
    Thanks in advance.
    Regards,
    Bhavik G. Shroff

    Hi Stefan,
    On windows Platform it is very easy to get DDL info for any object of database.
    But, I was not able to start OEM in HP_UX system.
    I have done my job complete using this good package of Oracle9i, in this way.
    SQL> SET heading off
    SQL> SET long 10000
    SQL> SET pages 100
    SQL> SELECT dbms_metadata.get_ddl(u2019TABLESPACEu2019,'PSAPROLLu2019)
    FROM DBA_TABLESPACES;
    O/P:
    CREATE TABLESPACE "PSAPROLL" DATAFILE
    '/oracle/RQ1/sapdata1/roll_1/roll.data1' SIZE 681574400 REUSE ,
    '/oracle/RQ1/sapdata1/roll_2/roll.data2' SIZE 3145719808 REUSE
    LOGGING ONLINE PERMANENT BLOCKSIZE 8192
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576 SEGMENT SPACE MANAGEMENT MANUAL
    SQL> SELECT dbms_metadata.get_ddl(u2019ROLLBACK_SEGMENTu2019,'PRS_0u2019)
    FROM DBA_SEGMENTS;
    CREATE ROLLBACK SEGMENT "PRS_0" TABLESPACE "PSAPROLL"
    STORAGE(INITIAL 10485760 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 32765
    Also follow this useful links:
    [DDL Generation--Oracle's Answer to Save You Time and Money|http://www.dbasupport.com/oracle/ora9i/DDLgen2.shtml]
    [DDL Generation--Oracle's Answer to Save You Time and Money|http://www.dbasupport.com/oracle/ora9i/DDLgen3.shtml]
    Good.
    Thanks a lot.

  • "DDL statement failed" in Database load faze

    Hello,
    I have an problem when installing DB2 on Solaris platform.
    During the installation, in Database load Faze, i get the error:
    MSC-01015  Process finished with error(s), check log file /tmp/sapinst_instdir/R3E47X2/SYSTEM/ABAP/DB6/NUC/DB/SAPVIEW.log
    I check the log & it has a whole bunch on tables that are created & at the end of it i get this message:
    DB) ERROR: DDL statement failed
    (CREATE VIEW "D010TINF" ( "PROG", "R3STATE", "LANGUAGE", "UNAM", "UDAT", "UTIME", "DATALG" ) AS SELECT T0001."PROGNAME"
    , T0001."R3STATE", T0001."LANGUAGE", T0001."UNAM", T0001."UDAT",  T0001."UTIME", T0001."DATALG" FROM "REPOTEXT" T0001)
    DbSlExecute: rc = 103
      (SQL error -204)
      error message returned by DbSl:
    SQL0204N  "SAPS47.REPOTEXT"; is an undefined name.  SQLSTATE=42704
    (DB) INFO: disconnected from DB
    /sapmnt/S47/exe/R3load: job finished with 1 error(s)
    /sapmnt/S47/exe/R3load: END OF LOG: 20080810125355
    /sapmnt/S47/exe/R3load: START OF LOG: 20080810130455
    /sapmnt/S47/exe/R3load: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#4 $ SAP
    /sapmnt/S47/exe/R3load: version R6.40/V1.4
    /sapmnt/S47/exe/R3load -dbcodepage 1100 -i /tmp/sapinst_instdir/R3E47X2/SYSTEM/ABAP/DB6/NUC/DB/SAPVIEW.cmd -l /tmp/sapin
    st_instdir/R3E47X2/SYSTEM/ABAP/DB6/NUC/DB/SAPVIEW.log -c 300 -merge_bck -stop_on_error
    (DB) INFO: connected to DB
    (DB) ERROR: DDL statement failed
    (DROP VIEW "D010TINF")
    DbSlExecute: rc = 103
      (SQL error -204)
      error message returned by DbSl:
    SQL0204N  "SAPS47.D010TINF"; is an undefined name.  SQLSTATE=42704
    (IMP) INFO: a failed DROP attempt is not necessarily a problem
    (DB) ERROR: DDL statement failed
    (CREATE VIEW "D010TINF" ( "PROG", "R3STATE", "LANGUAGE", "UNAM", "UDAT", "UTIME", "DATALG" ) AS SELECT T0001."PROGNAME"
    , T0001."R3STATE", T0001."LANGUAGE", T0001."UNAM", T0001."UDAT",  T0001."UTIME", T0001."DATALG" FROM "REPOTEXT" T0001)
    DbSlExecute: rc = 103
      (SQL error -204)
      error message returned by DbSl:
    SQL0204N  "SAPS47.REPOTEXT"; is an undefined name.  SQLSTATE=42704
    (DB) INFO: disconnected from DB
    /sapmnt/S47/exe/R3load: job finished with 1 error(s)
    /sapmnt/S47/exe/R3load: END OF LOG: 20080810130457
    /sapmnt/S47/exe/R3load: START OF LOG: 20080810140953
    /sapmnt/S47/exe/R3load: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#4 $ SAP
    /sapmnt/S47/exe/R3load: version R6.40/V1.4
    /sapmnt/S47/exe/R3load -dbcodepage 1100 -i /tmp/sapinst_instdir/R3E47X2/SYSTEM/ABAP/DB6/NUC/DB/SAPVIEW.cmd -l /tmp/sapin
    st_instdir/R3E47X2/SYSTEM/ABAP/DB6/NUC/DB/SAPVIEW.log -c 300 -merge_bck -stop_on_error
    (DB) INFO: connected to DB
    (DB) ERROR: DDL statement failed
    (DROP VIEW "D010TINF")
    DbSlExecute: rc = 103
      (SQL error -204)
      error message returned by DbSl:
    SQL0204N  "SAPS47.D010TINF"; is an undefined name.  SQLSTATE=42704
    (IMP) INFO: a failed DROP attempt is not necessarily a problem
    (DB) ERROR: DDL statement failed
    (CREATE VIEW "D010TINF" ( "PROG", "R3STATE", "LANGUAGE", "UNAM", "UDAT", "UTIME", "DATALG" ) AS SELECT T0001."PROGNAME"
    , T0001."R3STATE", T0001."LANGUAGE", T0001."UNAM", T0001."UDAT",  T0001."UTIME", T0001."DATALG" FROM "REPOTEXT" T0001)
    DbSlExecute: rc = 103
      (SQL error -204)
      error message returned by DbSl:
    SQL0204N  "SAPS47.REPOTEXT"; is an undefined name.  SQLSTATE=42704
    (DB) INFO: disconnected from DB
    /sapmnt/S47/exe/R3load: job finished with 1 error(s)
    /sapmnt/S47/exe/R3load: END OF LOG: 20080810140954
    Please lend me some of your wisdom
    Regards,
    Yoav Zilberman

    Hi Yoav,
    your import failed already before the SAPVIEW package was processed. You should check the other packages too for errors or for packages which are not imported. But the errors show that at lease the tables REPOTEXT and D010TINF are missing. I'm not sure, but I think they are in SAPDDIC package. You should run the package again before running SAPVIEW. For a functioning system you need both, tables and views.
    Regards
    Ralph

  • ERROR exec_ddl_stmt: (DB) ERROR: DDL statement failed during migration.

    Hello Experts ,
    We are in process of migration and after 90% of migration we are getting the following error as mentioned in MIGRATE_DT_XXXXX_IMP.log.:
    ERROR exec_ddl_stmt: (DB) ERROR: DDL statement failed
    (  ALTER TABLE "EDID4" ADD PRIMARY KEY(       "MANDT"       , "DOCNUM"       , "COUNTER"       , "SEGNUM"       ))
    DbSlExecute: rc = 99
      (SQL error -10108)
      error message returned by DbSl:
    ERROR exec_ddl_stmt: (DB) ERROR: DDL statement failed
    (                                           ALTER TABLE "EDID4" enable persistent merge )
    DbSlExecute: rc = 99
      (SQL error 131)
      error message returned by DbSl:
    transaction rolled back by lock wait timeout: Lock timeout occurs while waiting TABLE_LOCK of mode EXCLUSIVE(TRANSACTION_ID=14, UPDATE_TRANSACTION_ID=1442668)
    (DB) INFO: disconnected from DB
    I ran r3tans -d too to check the connection but it shows "Disconnected from DB".
    Can someone please let me know what went wrong.
    Environment Details :
    SOurce : ECC 6 Ehp5 NW702 Oracle10
    Target : ECC 6 Ehp7 NW740 HANA 1.0 Rev85
    Tool : SUM 1.0 SP12 PL04
    Phase Name :
    MAIN_SWITCH/SUBMOD_MIG_SWITCH/SUBMOD_MIG_DOWNTIME_RUN/EU_CLONE_MIG_DT_RUN
    Thanks
    Dev

    Hi, Check the Blog - DMO: optimizing system downtime ...
    we already had a discussion about in another request.
    Best Regards Roland

  • DDL Statements in a Stored Procedure

    Is there some technique which can be used to execute DDL statements in a stored procedure? I want to drop and recreate a table and a number of indexes. Is there a way for me to do this within a stored procedure?
    Thanks in advance for your assistance!!!

    BEGIN
       EXECUTE IMMEDIATE 'CREATE TABLE bonus (id NUMBER, amt NUMBER)';
    END;http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/13_elems18.htm#33889

  • DDL statement/s in stored procedures (FUNCTION)

    Hello all,
    I was trying to create a small function that tests keywords on the basis of successful/failed table creation. If a table can be created with a keyword as identifier, it is a non-reserved keyword, if table creation fails, it is a reserved keyword:
    CREATE OR REPLACE FUNCTION createTableForKeyword (keyword VARCHAR) RETURN BOOLEAN IS
    BEGIN
    CREATE TABLE keyword (x NUMBER);
    -- if no exception occurred, table creation succeeded
    DROP TABLE keyword; drop it
    RETURN FALSE; -- FALSE means non-reserved
    EXCEPTION
    WHEN OTHERS THEN
    -- if exception occurred, table creation failed
    RETURN TRUE; -- TRUE means reserved
    END createTableForKeyword;
    This would have been my first PL/SQL program, but I get the following error:
    PLS-00103: Found symbol "CREATE" when expecting one of:
    begin case declare exit ................
    .............. merge pipe
    I had to translate the error message from German, but it should suffice. Obviously DDL statements in functions are not allowed. How do I solve my problem then, given a table that has one column containing the keyword?:
    CREATE TABLE Keywords (keyword VARCHAR(30));
    I was looking too call this function from a loop, but how would I do this without a function? How do I capture table creation fails without exceptions in functions?
    TIA
    Karsten

    To run DDL inside stored procedure you must use Dynamic SQL. Use EXECUTE IMMEDIATE
    To see if a word is a reserved word just query V$RESERVED_WORDS
    Thanks,
    Karthick.

Maybe you are looking for

  • CG output - 720p or 1080i

    I am working in computer graphics, so I am rendering a sequence of images to be edited in FCE HD. 30fps, going to digital tape for projection on theatre screens. I've determined that hd video will be fine. Now I need to determine which type, 720p or

  • Splitting File Size

    I have to transfer file from one server to another server using MQSeries. I can transfer file size of Maxm.1000kb But i have file size limit of upto 5000kb. Is there any way to split the file size and transfer the file. Can anybody help me. Thanks. A

  • Reflection error (Illegal constant pool index)

    Heya, I use reflection to invoke Java classes and I get Error: java.lang.ClassFormatError: AppendToElement (Illegal constant pool index)      at java.lang.ClassLoader.defineClass0(Native Method)      at java.lang.ClassLoader.defineClass(ClassLoader.j

  • Can you create folders and put similar apps in the folders?

    It would help me keep them in order.

  • Creating list from a matrix using pig

    I am new to Pig. Could somebody point me how this can be done ? I have a text file containing adjacency matrix: * x1 x2 x3 x4 x5 x1 0 1 0 1 1 x2 0 0 0 1 0 x3 0 0 0 0 1 x4 0 0 0 0 0 x5 0 1 0 0 0 I want to create adjacency list from this matrix which s