Scheduling Automatic Exp / Imp Jobs With Crontab Using Utility

Feb 26, 2012

i have a production database server with 2 node rac. i now have a separate database server for my report db. Now i want to do an automatic export of the production database or a schema in the production database and then import it automatically to the report db immadiately after the export job finishes at a specific time, say 12 midnight everyday. how do i go about this using crontab or any other better solution. my database is 11gr2 and operating system is rhel 5.7.

View 1 Replies


ADVERTISEMENT

PL/SQL :: Scheduling Jobs - Without Commit Records Are Getting Inserted

Nov 12, 2013

Oracle DB Version - 11g XE I scheduled a job using dbms_scheduler which will insert a record into table T for each minute. I didnt mention COMMIT inside my procedure but records are being commited after each successful execution. How come it is possible. Here is my code.

SQL> create table t ( empno number, creation_date date);
Table created
SQL> create or replace procedure test_proc  2  is  3    4  begin  5    6    insert into t values (1,sysdate);  7    8  end;  9  /
Procedure created

[Code]....

PL/SQL procedure successfully completed

SQL> select * from t;
     EMPNO CREATION_DATE---------- -------------         1 11/12/2013 11         1 11/12/2013 11         1 11/12/2013 11         1 11/12/2013 11         1 11/12/2013 12         1 11/12/2013 12         1 11/12/2013 12         1 11/12/2013 12         1 11/12/2013 12

9 rows selected

View 21 Replies View Related

Scheduling Automatic Refresh In Materialized View?

Jul 28, 2013

we need to create a materialized view which should do complete refresh at pre determined interval like - 6am,12pm and 4pm every day.

Is it possible to have this option in materialized view?

As of now, I could understand we can do "start with" and "next" option which will schedule refresh with same interval but not with different time interval which I mentioned above.

View 1 Replies View Related

How To Schedule Script In Crontab Executed On 2nd Sunday Of Every Month

Jan 7, 2011

I need to schedule a script in crontab which needs to be execcuted on every 2nd Sunday of every month.

I used this logic

30 9 8-14 * 0 /$PATH/$FILE_NAME.sh but this is not working only on sunday but on all days of second week.

Any logic to schedule this?

View 1 Replies View Related

RMAN :: Give Output File Location In Crontab Using ( > )?

Aug 2, 2013

I need to take RMAN full backup by every Sunday night and Wednesday night . I have the netbackup script which will take the backup to media. 

Question is:1. We have 15 - backup scripts for 15 DB in that server , so if i configure crontab for backup do i need to give all 15 scripts one by one or (*) will work .    ie) 00 20 * * 3,7 /app/oracle/rman/scripts/hot_db_<sid>.sh    

instead of this if i give  :  00 20 * * 3,7 /app/oracle/rman/scripts/hot_db_*.sh then it will works fine or not ? 2.

Already my backup will create .output file in the same location , do i need to give output file location in crontab using ( > ) ? 3.

Is the above crontab timing is correct ? (3,7) for Wednesday and Sunday 8pm? so Sunday is 0(zero) or 7 ?

View 6 Replies View Related

SQL & PL/SQL :: Scheduling Same Job With Different Timing?

May 24, 2013

IS it possible TO schedule same JOB WITH different timings.

I need only one SCHEDULER which should run ON saturday AT 6 pm ,AND monday AT 9 pm.

CREATE TABLE dept1 AS SELECT * FROM dept;
CREATE OR REPLACE
procedure update_record is
BEGIN
insert into dept1 values(10,'xxx','xxx');
END;

[code].....

View 7 Replies View Related

Scheduling Job In Stored Procedure

Dec 21, 2011

PFB code i used to schedule a job as per my requirement. And the procedure is executing fine, but when im about to run it is getting hang.

create or replace procedure scheduler_alert(frq varchar2,intrvl number) is
begin
dbms_scheduler.create_job(
job_name=>'scheduler_alert',
job_type=>'stored_procedure',
job_action=>'alertlog_error',
start_date=>SYSTIMESTAMP,
repeat_interval=>'FREQ='||frq||';INTERVAL='||intrvl,
enabled=>true,
auto_drop=>false);
end;
/

When im trying to run the job it is getting hang.

exec dbms_scheduler.run_job('scheduler_alert');

View 3 Replies View Related

Forms :: Report Scheduling?

Jan 23, 2011

how to do report scheduling.? So that server can auto run those report at specified time. And send output to user.

View 2 Replies View Related

SQL & PL/SQL :: Exclusive Lock On Tables - Run Job By Scheduling

Sep 27, 2011

@ the end of the day means After date changes i need to populate the new row in Some of my tables with the previous date values with the new date.. In that time some other Transaction will Occur on those tables so we need to lock all the tables in that time..Even i tried by doing the Exclusive lock on the tables...

execute immediate 'LOCK TABLE CTR_SALES IN EXCLUSIVE MODE NOWAIT';
execute immediate 'LOCK TABLE CTR_STK_ASSIGN IN EXCLUSIVE MODE NOWAIT';

And how to run this function @ 12:00 in the midnight by scheduling.... And 1 more thing how to pick the recent (Transaction) row on that table. I tried from the rowid it's not working

View 1 Replies View Related

SQL & PL/SQL :: Scheduling A Stored Procedure / Package?

Mar 9, 2010

I need to schedule a stored procedure and a stored package every day @6:30 AM.

I have also a merge statement that I need to execute before stored procedure is executed.

View 3 Replies View Related

Enterprise Manager :: Scheduling A Shell Script As Job In OEM 12c

Sep 12, 2012

I have a shell script which triggers a batch in our application (an application which is not integrated with any other scheduler and is trying to integrate with OEM for the first time).

Is it possible to schedule a job to run this shell script in OEM ?

View 1 Replies View Related

Enterprise Manager :: Scheduling Export Database

Jul 25, 2012

I would like to export my whole database every evening. How can I do this using enterprise manager.

View 4 Replies View Related

Selecting Minutes From Timestamp And Scheduling Email

Nov 10, 2012

I have oracle 11g r2, I have a table emp, where i have three columns emp_no,status and creation_date, creation date is a time stamp like '02/09/2012 17:59:47'.

I have to trigger an email if the status is not updated for 30 minutes.

DECLARE
CUSROR C_GET_DATA IS
/*SELECTING RECORDS*/
SELECT * FROM EMP WHERE  creation_date BETWEEN CREATION_DATE AND CREATION_dATE+30 AND STATUS IS NULL;

[Code]....

in the above code "CREATION_DATE AND CREATION_dATE+30" will give 30 days, how can i select just 30 minutes and schedule it every 30 minutes, so that email is triggered for if status is not updated for more than 30 minutes.

View 2 Replies View Related

PL/SQL :: Scheduling - Create Oracle Job That Will Execute Shell Script?

Jul 2, 2012

I need to create an oracle job that will execute a shell script. i need to run it only when I call it(so not to be scheduled).

View 5 Replies View Related

PL/SQL :: Load Data From Flat File To Target Table With Scheduling In Loader

Sep 7, 2013

I have requirement as follows.  I need to load the data to the target table on every Saturday. My source file consists of data of several sates. For every week i have to load one particular state data to target table.  If first week I loaded AP data, then second week on Saturday karnatak, etc.

Provide code also how can i schedule the data load with every Saturday  with different state column values automatically.

View 2 Replies View Related

SQL & PL/SQL :: How To Call Dos2unix Utility

Aug 21, 2012

How can I call the dos2unix utility from Oracle ? I'm building an external table in a procedure where each time the latter is called the file name(s) are different.

View 7 Replies View Related

SQL & PL/SQL :: Pattern Matching Utility

Jul 2, 2013

I am using 11.2.0.3.0 version of oracle. I have not worked on regular expressions. During working on sql injection, I got set of below patterns which is feeded to some JAVA regx classes or utilityto restrict selective Request, based on patterns.below patterns and the characters which will be restricted by this pattern matching utility.

Given below are 3- patterns:

(.*?[sd)'])(?:AND|OR)(?=[s-+(']|.?d)(s*[-+(]?s*(?:[^s!<>=]+?|'.*?')[s)]*(?:s*(?:(?:[-+/*(.]||s*|)s*)+(?:[^s!<>=]+?|'.*?')[s)]*)*s*)(?: <s*>|>s*=|<s*=|!s*=|=|>|<)(.*)
(.*?[sd)'])(?:AND|OR)(?=[s-+(']|.?d)(s*[-+(]?s*(?:[^s]+?|'.*?')[s)]*(?:s*(?:(?:[-+/*(.]||s*|)s*)+(?:[^s]+?|'.*?')[ s)]*)*s*)(? <=[s)']|d.?)(?:LIKE|IN|BETWEEN)([s-+('].*)
.*[sd)'](?:AND|OR)[(+-s]*(?:'.*?'|.?d[ds-+/*().]*)[)s]*(?:<s*>|>s*=|<s*=|!s*=|=|>|<|LIKE|IN|BETWEEN)[(+-s]*(?:(+s*SELECT)?[(+-s]*(?:'.*?'|.?d[ds-+/*().]*).*

View 1 Replies View Related

SQL & PL/SQL :: Executing SP Using Jobs

Sep 3, 2010

how to execute one stored procedure for every 10 minutes using oracle jobs

sp name: abc

using anonymous block with sample code.

View 10 Replies View Related

SQL & PL/SQL :: How To Schedule Jobs

Dec 19, 2011

I want to run a procedure every day at 9 AM ,so how can i schedule it.

View 3 Replies View Related

Enterprise Manager :: GUI Utility For Debugging?

Apr 14, 2010

I worked on SQL Server used a GUI,SQL Server Profiler, to debug queries. In ORACLE how to debug queries.Is there any GUI utility for debugging?.Can i see all the queries run by a specific user?.

View 1 Replies View Related

Executed Two Jobs Using Dbms_scheduler

Aug 20, 2011

I have executed two jobs using dbms_scheduler. The value of the job_queue_process is 10 in my database. It is RAC database with Oracle 10g.

My job gets executed. But the next run is not getting executed at the next run date. In the below example, the systimestamp is 12:27. The first job's next run date is 12:30 so that is fine. But the second job's run date is 12:21 which is 6 mintues less than current time. As a result, the second job does not get executed after this at all..

SQL> select job_name, next_run_date, last_start_date, last_run_duration from user_scheduler_jobs;
HISASAV_JOB
20-AUG-11 12.30.41.000000 PM ASIA/CALCUTTA
20-AUG-11 12.20.41.122959 PM ASIA/CALCUTTA
+000000000 00:00:01.307071
[code]....

View 4 Replies View Related

SQL & PL/SQL :: Monitor Jobs From Procedure?

Dec 31, 2010

We have a job table, and whenever jobs are added to this table the job processing procedure should be started.

In unix we have crontab facility where we can schedule to run for 24/7.

similarly do we have any option in oracle daatbase, to keep on running a prcedure in loop.

View 2 Replies View Related

SQL & PL/SQL :: How To Find Currently Running Jobs

Apr 3, 2013

I am trying to find a way to identify what are the user_jobs currently running. I have found 1 way which requires DBA User ID to execute (e.g. DBA_JOBS and DBA_JOBS_RUNNING) which I don't want.

I believe there is NO equivalent User table for DBA_JOBS_RUNNING table.

I have done my 20 mins search in this forum and unable to find.

View 8 Replies View Related

PL/SQL :: Oracle Jobs Incompatible

Nov 20, 2012

I have a procedure that needs to be scheduled as a job. This procedure takes an average of 20-25 minutes to complete. The constraint is that these jobs are submitted using dbms_job.submit with an interval of 5 minutes.

For Example:

Job1 Procedure_B 20-Nov-12 21:05:00
Job2 Procedure_B 20-Nov-12 21:10:00
Job3 Procedure_B 20-Nov-12 21:15:00
Job4 Procedure_B 20-Nov-12 21:20:00

So, will Job2 execute only after Job1 completes [even though Job1 takes 25 minutes to complete] or is there any other mechanism for setting incompatibility for a job with itself.

View 5 Replies View Related

PL/SQL :: Created Two Jobs In Sys Database

Mar 11, 2013

I have created two jobs in sys database as follows,

BEGIN
sys.dbms_scheduler.create_job(
job_name => 'JOB_FCDB_CHARGES',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN FCDBCHARGES; END;',
repeat_interval => 'FREQ=DAILY;BYHOUR=19',
job_class => 'DEFAULT_JOB_CLASS',
comments => 'Job to process Internet Banking Charges.',
auto_drop => FALSE,
enabled => FALSE);
[code]....

It has been successfully created.Even i get the entry in dba_objects table as follows,

select owner, object_name, object_type from dba_objects where owner = 'SYS' and object_name like '%JOB_FCDB_CHARGES%';

But, my problem is when i log in to PL/SQL developer i am not able to see anything under job.

View 9 Replies View Related

SQL & PL/SQL :: Scheduled Jobs - Not Working?

Jun 22, 2010

am facing an issue with scheduled jobs. The below script will create a scheduled job to insert a record for every 2 mins into the table "job_table".

--Table script
CREATE TABLE job_table (now DATE);
--Stored procedure run by scheduled job
CREATE OR REPLACE PROCEDURE test1 IS
BEGIN

[code]...

The scheduled job does not require any special grant privillege as the PUBLIC has access to run it. Anyhow the same set of instruction working for my friend on his machine but not on my environment.

View 12 Replies View Related

Utility To Load Data Into Database Table?

Aug 24, 2011

I wanted to know the best utility in oracle to load data in crores from excel sheets in the database temporary tables in a minimum time.

Is sqlldr the best utility to use in this scenario or to use the parallel and append hint in the insert statment.

how much time the sqlldr and above mentioned hints take to load 10 crore data in the database table.

View 2 Replies View Related

Backup Oracle Database Using RMAN Utility?

Feb 13, 2012

I'm going to backup this un-maintained Oracle 11g server in my office. I'm being told it's never been backed up and extremely critical to our success so tomorrow I'll be performing my 1st backup of the database using RMAN. My question is if I connect to the Oracle 11g database and run the:

[oracle@db1 ~]$ rman target=/
Recovery Manager: Release 11.2.0.1.0 - Production on Mon Feb 13 13:18:05 2012
connected to target database: CQDB (DBID=1854033249)

RMAN> shutdown immediate

using target database control file instead of recovery catalog
database closed
database dismounted
Oracle instance shut down

BACKUP DATABASET FORMAT �/oracle/u01/app/oracle/backup/%d-%T-%s-%P�;

My question is the above sufficient for a safe full backup? We only have the one single target database called 'cqdb' which houses several schemas. Can you tell me if this is correct? I've shut the database down so it's in a cold state so I don't think I need to configure the FRA (Flash / Fast Recovery Area) but I honestly don't know. This is my 2nd time on a Oracle DBMS.

What about the 'archivelog' files? Do I back those up? Do I need them in case a recovery? Also what about the 'controlfile'? Do I need to back those up as well as the mentioned above?

View 2 Replies View Related

Backup & Recovery :: How To Automate TDPOSYNC Utility Using PL/SQL

Apr 16, 2012

I have to automate TDPOSYNC utility, it is a IBM tool for oracle backup.I tried except utility of UNIX in shell script, but due to some reason same utility i could not get on production server.Not i asked to use PL/SQL to automate the same.I am facing some problem

1. How to call TDPOSYNC commands from pl/sql

2. How to pass run time input parameter to the TDPOSYNC like user/password, date rage etc.

View 1 Replies View Related

Server Utilities :: Run Exp Utility In Background Mode

Oct 29, 2013

I have executed the exp utility to take schema backup as below.

DB_NAME=name
DAY=`date +%a_%d-%m-%Y`
gzip < exp_test_pipe > exp_test_${DAY}.dmp.gz &
exp username@test.cis.cat.com file=exp_test_pipe log=exp_test_dumps.log parfile=export_options.par

more export_options.par
compress=n
statistics=none
CONSISTENT=n
indexes=Y
owner=test
direct=Y

my password is starts with $

example: $12300$ahhh and hence its not allowing me to execute when given like below..

exp username/$12300$ahhh@test.cis.cat.com file=exp_test_pipe log=exp_test_dumps.log parfile=export_options.par

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved