Hot answers tagged

7

If you have access to My Oracle Support: Space Used By Tables Are Not Being Re-used With Repeat Delete/insert Operation (Doc ID 1601805.1) So, without just copy-pasting the contents from there, the above note states: the space management algorithm prefers allocating more space over reusing already allocated but free space this is not a bug, but a feature, ...


2

Attention to details is important. Go back to first principles (syntax) if stuck. Create Table Vendor ( Vend_ID VARCHAR2(3) NOT NULL primary key, Vendor_Name VARCHAR(50) NOT NULL, Vendor_ST VARCHAR(25) NOT NULL ); fiddle


2

Just because you can jump off a cliff, doesn't mean you should. Use REPLACE() with a token: select REPLACE('SOMESTRING_##DATE##_SOME LOTS MORE STRINGS OF A FILENAME PREFIX', '##DATE##', TO_CHAR(sysdate,'YYYYMMDD')) from DUAL; You could take this a step further to allow different format strings: with mytable as ( select '...


1

The syntax for impdp for Oracle 11 is here. The FILE parameter that you have used should be DUMPFILE. Log should be LOGFILE. Here is an example from the documentation impdp hr DIRECTORY=dpump_dir1 DUMPFILE=expfull.dmp LOGFILE=dpump_dir2:expfull.log


1

AWR captures only the top N sql for each category (Elapsed time, CPU time, I/O time, Gets, Reads, etc.). If you set this limit to MAXIMUM with DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS, even that does not guarantee capturing all SQLs as they may age out from the shared pool between taking AWR snapshots. If you want all SQLs to be logged, you can ...


1

SELECT Column_A, MAX(Column_B) Column_B FROM test GROUP BY Column_A; fiddle


1

select * from table(dbms_xplan.display_cursor('sql_id', child_number)); You can find sql_id and child_number in V$SESSION (sql_id and sql_child_number columns).


1

Try this: BEGIN DBMS_SCHEDULER.CREATE_JOB( job_name => 'delete_old_rows', job_type => 'PLSQL_BLOCK', job_action => 'delete_trips;', start_date => SYSTIMESTAMP, repeat_interval => 'FREQ=SECONDLY', end_date => add_months(sysdate,12), auto_drop =&...


1

In case you are writing the procedure yourself, you might want to consider to make it a function instead. While "procedure" and "function" are often treated as synonyms, in PL/SQL they are quite different and should be used accordingly. If you need functionality that changes something (delete content, create new structures and so on), you should create a ...


Only top voted, non community-wiki answers of a minimum length are eligible