Posts

Showing posts with the label DBA

DBMS_SCHEDULER

Image
When you back in the day wanted to schedule or run something in the backgound you used DBMS_JOB. With  the beginning of release 10g of the database new functionality was introduced to accomplish this, the DBMS_SCHEDULER. DBMS_SCHEDULER is so much more flexible the DBMS_JOB and makes everything easier, some examples: To set up your intervals you just specify the parameter repeat_interval. MON-FRI 22.00: repeat_interval=> 'FREQ=DAILY; BYDAY=MON,TUE,WED,THU,FRI; BYHOUR=22;' Every hour, every day: repeat_interval => 'FREQ=HOURLY;INTERVAL=1' Every monday, 05:00: repeat_interval=> 'FREQ=DAILY; BYDAY=MON; BYHOUR=5;' You will not get the problem with shifting start times that you have with DBMS_JOB. Possible to create chains of jobs that are dependent of each other. Possible to schedule:   - Execution of host scripts.  - E-mail notifications.  - Execute host scripts on remote servers (requires an agent on the remote server).  - Execute jo...

Concurrent request output directory

In most cases the output files will be written to $COMMON_TOP/admin/out/ <ENV.NAME> . If you don't find anything there investgate the environment variables $APPLCSF (path), $APPLLOG (folder name) and $APPLOUT (folder name). I read somewhere that if $APPLCSF is not set the outputs will be written to $ <APPLICATION_SHORT_NAME> / <VALUE OF $APPLOUT> e.g $AR_TOP/admin/out.

DBMS_JOB

Submitted/scheduled job can be found in: dba_jobs Running jobs can be found in: dba_jobs_running Remove a job: dbms_job.remove( jobno ); DBMS_JOB have been deprecated and replaced by DBMS_SCHEDULER (available from 10.1). Read more about DBMS_SCHEDULER here .

Clear buffer cache

When you are working with performance issues you need to have an empty database cache to get a "real" result from your query. If you run a query which runs for 2 minutes the first time it would run very much faster the second time. To prevent the database to fetch the result from the cache you need to clear the buffer cache. Run the command below to flush the cache (you need a DB-user which has sufficient privileges, for example system) alter system flush buffer_cache; Note: this should not be done in any production enviroment.