Adrci Purging Of Command?

Sep 27, 2011

I am using the following command within a shell scrript to purge files with adrci

adrci exec="show homes"|grep -v : | while read file_line
do
echo "adrci purging diagnostic destination " $file_line
echo "purging ALERT older than $Minutes ..."
adrci exec="set homepath $file_line;purge -age $Minutes -type ALERT"

[code]...

Is there a command I can use to see what will be purged or what has been purged?

View 2 Replies


ADVERTISEMENT

Does Every ORA-XX In Alert.log Generates Incident On Adrci

Jan 31, 2013

I'm looking for errors in alert.log, I thought that every "ORA-XX" would be a incident in adrci, but "i have missed" some ORAS-XX

I have a wrong job in my test environment which generates an ORA-12012 every 5 minutes. If we chech the alert.log trace we can see that there is a recor every five minutes (more of less)

oooo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo
adrci> show alert -tail 2
2013-01-31 12:59:01.901000 +01:00
SMCO started with pid=23, OS id=20719
2013-01-31 13:00:23.033000 +01:00
Errors in file /u01/app/oracle/diag/rdbms/xe/XE/trace/XE_j000_20765.trc:
ORA-12012: error on auto execute of job "TEST"."WRONG_JOB"
ORA-04063: package body ""TEST"."WRONG_JOB"" has errors
ORA-06508: PL/SQL: could not find program unit being called: ""TEST"."WRONG_JOB""

[code].....

But, if we look for for incidents

oooo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo--oo

adrci> show incidents

ADR Home = /opt/oracle/diag/rdbms/xe/XE:
*************************************************************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME
-------------------- ----------------------------------------------------------- ----------------------------------------
23393 ORA 600 [kzsviver:1] 2012-09-27 09:19:55.054000 +02:00
23394 ORA 600 [kzsviver:1] 2012-09-27 09:20:13.540000 +02:00
23409 ORA 600 [kzsviver:1] 2012-09-27 09:56:35.688000 +02:00

[code].....

This ORA-12012 doesn't appears.

View 8 Replies View Related

Implicit Commit While Purging

Oct 24, 2011

I have written a purge package that would delete records older than 10 years. Since the data is huge, the purging was taking 14 hours plus. To improve performance, I disabled constraints , deleted records and then reanabled them. This was quite quick but the only problem is rollback. Say for some reason if enabling constraints fails there is no way to rollback as enabling and disabling constraints does an implicit rollback.

View 1 Replies View Related

Purging Table Which Is Having 98 M Rows

Dec 3, 2012

I want to purge a table which is having more then 98M rows...here are the details...

Purge Process I followed
---------------------------------------------
Step 1. Created backup table from Main table with required data only
create table abc_98M_purge as
select * from abc_98M where trunc(tran_date)>='01-jul-2011'
-> table created with 5325411 rows

Step 2. truncate table abc_98M

Step 3. inserted all 5325411 rows back to abc_98M from abc_98M_purge using below procedure

DECLARE
TYPE ARRROWID IS TABLE OF ROWID INDEX BY BINARY_INTEGER;
tbrows ARRROWID;
row PLS_INTEGER;
cursor cur_insert is select rowid from abc_98M_purge order by rowid;
BEGIN
open cur_insert;
loop
[code]....

View 4 Replies View Related

Alert Log And Listener Log File Purging In 11g?

Mar 6, 2013

how to purge the alert log and listner log file in 11g.

OS:IBM/AIX RISC System/6000
DB version: 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

View 8 Replies View Related

Archiving And Purging Data From Huge Tables?

Apr 22, 2013

I'm currently working on a project which is to archive the old data and then purge the same data from the main table.

Here is a detail description:

There are around 50 odd tables from which I would need to archive the old data(matching certain filter conditions...not date based). Meaning I have to store the data in a temp table. Once stored in temp table then I would have to delete those rows from the main table. This temp table will be later exported and stored on ARchive database(a seperate database). These tables are very huge. One of the table is actually 250 GB in size. And all these tables have many indexes built - both normal and bitmap.The 250 GB size table has 40 million rows that need to be archived and purged. The total number of rows in the table are 540 million.On this table alone there are 50 bitmap indexes and 2 normal indexes. This table is partitioned based on date column.This date column is not used/useful in identifying the old data. There are around 20 tables which are quite similar in size to the above described table. Rest of them are little small when compared to the above table.

We have to execute this activity over a weekend which gives us about 48 hours time to complete the activity. Best possible ways to handle this activity. Most importantly should be able to complete the activity within the specified 48 hour window.

The solution what we are now thinking of is:

1. Create the temp table ---Create tmp_tbl as select * from main_table where <<conidtions identifying old data>>

2. Once the temp table is created. Make copy of indexes that exist on the main table and eventually drop them.

3. Execute a PL/SQL script to perform the bulk delete from main table and commit for every 100000 rows.

4. Once the bulk delete is finished then recreate the indexes on the main table using the copy made at earlier step.

Our main worry is about the step#4. Considering the size of these tables and the number of indexes to be built,we are not sure how long the index re-creation will run for each table.

depending on the possibilities we may have to split the activity in to 2-3 phases spreading across 2-3 weekends. Even then we are not sure whether we will be able to pull off this activity.

The database we are using is Oracle 10g.

View 1 Replies View Related

Brtools Command Versus Oracle Command For Shutdown And Startup (statistics)

Sep 13, 2013

we are running SAP application against oracle database. say, if I use brspace or brtools (from SAP side) to shutdown or startup database or collect stats, does this mean it not recommend to use oracle command to shutdown/start & collect stats?

View 3 Replies View Related

RMAN - Set Command ID

Dec 27, 2011

I can successfully SET COMMAND ID inside an RMAN run block

CODErman <<EOF
connect target
connect catalog ....
CROSSCHECK BACKUP DEVICE TYPE DISK;
CROSSCHECK ARCHIVELOG ALL;
RUN {
[code]...

Can this be setup without a RUN block? I am running on 11.1.07 and 11.2.0.2

View 2 Replies View Related

SQL & PL/SQL :: Command Example In Oracle 9?

Aug 5, 2010

I want to use oracle 9 select * from tab .And use the output to issue "desc XXX " for every row of output in select statement.. .How can I do it automatically ???

View 9 Replies View Related

SQL & PL/SQL :: How To Use DEFINE Command

Jun 5, 2012

set serveroutput on
set verify off
declare
define t1='111';
begin
dbms_output.put_line(t1);
end;
/
define t1='111';
*
ERROR at line 2:
ORA-06550: line 2, column 10:
PLS-00103: Encountered the symbol "=" when expecting one of the following:

:= . ( @ % ; not null range default character

The symbol ":= was inserted before "=" to continue.

View 5 Replies View Related

SQL & PL/SQL :: Use Of RAISE Command?

Aug 31, 2011

explain to me what the "RAISE" command does in PL/SQL for the following code.

EXCEPTION
WHEN OTHERS THEN
INSERT INTO TMP_ERRCHECK(
PP_CD,
IHS_CD,

[code]...

Tried searching for some explanations but I still do not have a clue as to what the RAISE actually does. Do I even need to put it in the code?

View 3 Replies View Related

SQL & PL/SQL :: Pivot Right Command To Use?

Aug 28, 2011

I have the following table structure:

PK1,PK2,PK3,A1,B1,C1,A2,B2,C2

Which I want represent as follows:

PK1,PK2,PK3,A1,A2
PK1,PK2,PK3,B1,B2
PK1,PK2,PK3,C1,C2

Is pivot the right command to use? If so, how do I do this? Most pivot examples I've looked at use an aggregate like SUM, which is not really want I am trying to accomplish here.

View 4 Replies View Related

SQL & PL/SQL :: Update Command

Jun 7, 2011

here is my table...

id name bits

A 1 011011101 00
B 2 011011111 01
C 3 100100010 11

Here, I need to write a query to change 0 to 1 and 1 to 0 for every record value in table of bits column.

for ex: 011011101 00 of id - A must be changed to 100100010 11

similarly, 100100010 11 of id - C must be changed to 011011101 00

Now I need to write a query to update values of bits column in one shot.

View 4 Replies View Related

PL/SQL :: Use Of MOD Command In Query

Jun 7, 2012

what is the use of MOD command in query.Does it have performance benefit.

View 11 Replies View Related

Sqlplus Copy Command

Feb 15, 2013

i am trying to copy the data from a remote database which has Oracle 8i thru Sqlplus copy command to the local database which has Oracle 11gR2.

copy from abc/abc@remote
insert emp_new
using
select *
from emp_old
where rownum < 1001;

is it possible to copy the remote database thru sqlplus copy command ?

View 6 Replies View Related

SQL & PL/SQL :: Execute Immediate Command Error

Oct 14, 2011

I am facing a problem regarding the execute immediate command. I have created a procedure as given below

SQL> set echo on ;
SQL> set serveroutput on;
SQL> declare
2 l_var varchar2(50);
3 sqlstring varchar2(3000);
4 begin
[code].......

In this procedure the execute immediate command shows error ( if i avoid exception).I have tried other syntax too of this command
but it is showing error only.

View 13 Replies View Related

SQL & PL/SQL :: Run Command And Connection In One Line

Dec 5, 2011

I want run sql connection and command in one line , something like this ...

sqlplus "/as sysdba" 'select * from dual'

is it possible to do it in one command ?

View 3 Replies View Related

SQL & PL/SQL :: Copy Command In A Procedure

Feb 22, 2010

I got to pull 30M data into local DB from a remote DB. As of now we have procedure to perform this task using an

Insert /*+append*/ table1
select *
from rdb_view;

I observed using the copy command in sql plus has taken very less time than the procedure.Can we use the Copy command inside the PL/SQL block? I tried with dynamic SQL but It is not allowed I guess.

View 16 Replies View Related

SQL & PL/SQL :: Use FROM Clause In Update Command?

Jul 13, 2011

Can we use FROM clause in update command?

View 2 Replies View Related

Forms :: Command To Run SQL File?

Mar 8, 2011

i want to run sql file by forms...is there command do that

View 3 Replies View Related

Forms :: How To Use Group By Command In 6i

Oct 28, 2011

How to use group by command in forms 6i

View 4 Replies View Related

SQL & PL/SQL :: Replace Command Is Not Working?

Jun 18, 2013

database 10GR2, Character_set WE8ISO8859P1

The following command not working.

update consumerappliedform
set name =replace (name,'¿','‡');

What is the problem.

View 3 Replies View Related

Timestamp Of A Command Executed

Sep 17, 2012

OS:Linux 5

how to find out the timestamps of a OS command executed previously. "history" command doesn't show the timestamps. I checked "man history" but i couldn't able to find the proper option.

1222 db
1223 oh
1224 cd dbs
1224 cd $TNS_ADMIN

View 5 Replies View Related

SQL & PL/SQL :: Self Join Command Execution?

May 18, 2011

when we want to execute self join command for displaying employee names and their managers name we use the following query.

Select e1.ename"Employees",e2.ename"Managers" from emp e1,emp e2 where e1.Manager_ID=e2.Employee_ID

how it displays the above information or how it works?

View 5 Replies View Related

SQL Command Not Properly Ended?

Jan 13, 2013

am learning the Oracle PL/SQL language using CBT Nuggets tutorials and practicing what I learn. I seem to be getting confused with the ROUND function...For example, what am I doing wrong in this statement:

select avg(salary) from employees,
ROUND (avg(salary) , 2;

Basically I am trying to round the result to two decimal places but get the error ORA - 00933 - SQL command not properly ended?

View 6 Replies View Related

SQL & PL/SQL :: Command In Oracle For Listing

Sep 4, 2012

I have an agent, actor, movie and producer table, I want to list the details of all agents who represented actors casting in movies produced by "X" (X is the name of producer). I want to know the command for doing this.I have the following tables:

table agent(
agentID(pk),
fname,
sname,
city,
sex
[code]...

I have a producer fname as Xavion in the table.

View 3 Replies View Related

PL/SQL :: Failed To Process SQL Command

Apr 29, 2013

There is a stored procedure to which i am trying to schedule, but getting error as below:" Failed to process SQL command

-ORA-27486: insufficient privileges
ORA-06512: at "SYS.DBMS_ISCHED", line 124
ORA-06512: at "SYS.DBMS_SCHEDULER", line 271
ORA-06512: at line 2 "

I am not getting where issue is, as i am new to ORCL SQL Dev.

View 5 Replies View Related

What DML / DDL Command A User Is Executing

Sep 9, 2012

is there anyway to know that what dml/ddl command a user is executing and on which table the impact is taking place?

View 2 Replies View Related

Windows :: Rename Command In Dos

Mar 13, 2011

I want to rename

cf(1)
cf(2)
cf(3)

to

cf1
cf2
cf3

in DOS.

View -1 Replies View Related

RMAN :: What Does (change) Command Do

Sep 12, 2013

What the "change" RMAN command does? For example, what is the effect of following command: 

change archivelog until time 'SYSDATE-7' delete 

And what is the difference between following commands: 

change archivelog all validate;change archivelog all crosscheck;change archivelog all; 

I checked the following doc but could not find anything:[URL]I am using Oracle 10gR2 on RHEL 64-bit.

View 3 Replies View Related







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