How To Use Perl DBI Script To Poll Logs From Oracle Databases

Jul 27, 2010

I have 2 separate servers each with oracle database installed.I am trying to pull oracle logs from these 2 databases to my main linux server using perl DBI. On this linux server I have 1 dbipoll.pl script and 2 wrapper scripts that pass in parameters to dbipoll.pl.

Here is the sample wrapper script that I've used to call dbipoll.pl(separate script with different parameters for each databases used):

CODE#!/bin/sh
#
export ORACLE_HOME=/ora-main/app/oracle/product/11.1.0.6/db
export ORACLE_SID=rmdev1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME
#

[code]....

As you can see,the script should retrieve logs and write to oracledb1.log and update the countfile1 with the latest timestamp.The wrapper scripts are scheduled to run at 5mins interval.

The first wrapper script,which I've named as call_dbipoll1.sh runs fine. I am able to retrieve events and both oracledb1.log and countfile1 are successfully updated.

However,the second wrapper script,call_dbipoll2.sh is successful only for the first run. For subsequent runs,I've noticed that countfile2 does not get updated with the latest timestamp(ie. the file returns to blank) and oracledb2.log returns to blank as well. Therefore,am unable to pull new events then. Unable to determine what went wrong here..

Here is sample of my second wrapper script that tries to retrieve events from the 2nd database:

CODE#!/bin/sh
#
export ORACLE_HOME=/ora-main/app/oracle/product/11.1.0.6/db
export ORACLE_SID=rmdev2
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME
#

[code]....

View 1 Replies


ADVERTISEMENT

Load Data Into Various Tables Through Perl Script Using Sql Loader?

Nov 3, 2006

I am trying to load data into various tables through a perl script using sql loader. Log files are created which say rows successfully loaded, but there is no data in the database. is there any way of explicitly saying commit with sql loader command (except for the rows options, Ihave tried using that also, with rows=1, but it doesn't work)?

View 1 Replies View Related

Backup & Recovery :: Migrating Databases / Task To Migrate Total Databases

Mar 27, 2012

I have the task to migrate the total databases(Exact copy to be moved to another server).The current server is going for format.After I did the following steps I am getting the tablespaces(databases)-4 sizes same ,but I am facing issue like some default tablespaces i.e temp,system are not matching.

temp tablespace
***************
current server - 4.0(approximately)
Migrating server - 160 MB

System tablespace
*****************
current server - 580 MB
Migrating server - 220 MB

Also I checked the tables are also matching for the 4 databases.Also Provide the solution or method which is correct.

steps done for migrating(By me)
********************************
EXPORTING DATA USING DATAPUMP
*********************************

1 From command prompt MKDIR 'c:oraclexeapp mp';

2 From SQL prompt conn system/kotak;

3 create or replace directory dmpdir as 'c:oraclexeapp mp';

4 grant read,write on directory dmpdir to kotak;

5 From command prompt

expdp system/kotak@xe full=Y directory=dmpdir dumpfile=xe.dmp logfile=expdpxe.log;
IMPORTING DATA USING DATAPUMP
*****************************
in another server machine

1 From SQL prompt conn system/kotak;

2 create or replace directory dmpdir as 'c:oraclexeapp mp';

3 grant read,write on directory dmpdir to kotak;

4 From command prompt set ORACLE_SID=xe;

5 impdp system/kotak@xe full=Y directory=dmpdir dumpfile=xe.dmp logfile=impdpxe.log;

IN OUR PROCESS we created the below tablespaces and user before IMPORTING created 4 tablespaces

1. kotak
2. kotakdb
3. wired_data
4. ferrari

Created Users which are there in 219 server
1. KOTAK
2. KOTAKDB
3. FC_80
4. DEMOINTERNETBANK
5. DEMOINTERNETBANKDB
6. CREDITCARD

View 1 Replies View Related

SQL & PL/SQL :: Oracle Table - Finding Transaction Logs?

Dec 9, 2010

How can we see the history of transactions on a table.

For eg, If I have a table called TEST123, I would like to know whatever SQLs fired on that table on today.

View 4 Replies View Related

Oracle Example Databases And Tables

Oct 3, 2011

I'm just wondering because i didn't find any example / test databases for Oracle. Thus MS has its "northwind", mysql its "world" or "sakila".

Additionally, the tables view is quiet confusing, referring to all those generated tables (

[URL]........

I tried right-click + apply filter *remove generated* but it didn't work.

View 3 Replies View Related

SQL & PL/SQL :: How To Synch Two Oracle Databases

Aug 2, 2010

I have cloned the database into another using DBMS_METADTA API (export the metadata in xml form and recreate it on destination). I need to synch these two periodically. I need to update the XML to synchronize the databases.

I don't have 11g to use DBMS_METADATA_DIFF API.

View 7 Replies View Related

ShadowProtect To Backup Oracle Databases?

Mar 22, 2013

if you are using ShadowProtect to backup your Oracle databases. What are your experiences and the pros and cons in using ShadowProtect as the one and only backup/recovery tools for Oracle databases? Can the potential of ShadowProtect replaces the commonly use Oracle backup/recovery tools?

The reason why I raise this question is because my boss has the idea that ShadowProtect is THE best backup/recovery tools. Personally I don't think so, because there can be cases where we only need to recover the database and not the whole OS.

View 6 Replies View Related

Migrate MySQL And Access Databases Over To Oracle 9i

Oct 2, 2008

I need to migrate MySQL and Access databases over to Oracle 9i. Is there a tool that will do this and also migrate sql scripts?

I heard of Oracle Workbench as one tool I could use?

View 4 Replies View Related

Server Administration :: Migrate Two Different Databases To Oracle?

Jul 11, 2012

I have to migrate two different databases to oracle.i have made two Migration Repository for each to do the migration, migration is done.but i would like to know can it be done with one migration repository.if yes then with one is best way to do it.data of two databases is different but table and sp are 99% same.

View 3 Replies View Related

Bring Down The Databases In Oracle Fail Safe Environment?

Jun 28, 2013

How can we bring down the databases in oracle fail safe environment?

We have one database X in two server�s windows A & B with oracle fail safe environment.
What procedure should we fallow to bring down the database X.

Today I was strangling to bring down the database because database was automatically coming up once brought down the database. what procedure should we follow to bring down the database in OFS environment.

View 1 Replies View Related

SQL & PL/SQL :: Give Grant To Schema Of Different Versions Of Oracle Databases?

Aug 8, 2012

I have a task assigned to "grant select on sys.link$" to a user which exists on 500 different databases.

This needs to be done in Oracle database.

View 6 Replies View Related

List Exiting Databases In Oracle Server Using SQL Plus Command?

Feb 14, 2013

I am using Oracle database server and I want to show existing databases on that server. Are there any SQL plus command to list all databases there in the server?

View 1 Replies View Related

Server Administration :: Change Character Set For Oracle 8i Databases?

Aug 15, 2013

How to change Character set for oracle 8i database. Is there anyway to change the Character set without affecting the current database.

View 11 Replies View Related

Server Administration :: Create Two Databases With Different Sides On One Oracle Home?

Jun 8, 2010

i want to create two databases with different sids on one oracle home.

how can ı handle it?

View 2 Replies View Related

Replication :: To Upgrade All Oracle 10g Master Sites / Databases To 11g Release

May 28, 2009

I want to upgrade all the Oracle 10g Release (10.2.0)master sites (bi-directional) databases to Oracle 11g Release (latest). In fact, we are using bi-directional oracle streams and snapshot replication, it means capture,propagate and apply process is running.

View 1 Replies View Related

Calculate Total Disk Space Used By Oracle Databases Across Whole Company?

Oct 18, 2013

If we want to know the number of instances, number of RAC databases  and whole total disk space used by oracle (not file system size),1. Any script can be ran from OEM grid control against all instances/databases? or2. we have a repository unix server which has all tnsnames of whole databases, any script we can run from there?

View 5 Replies View Related

Storage Systems Used For Saving Archive And Backup Files Especially For Oracle Databases

Mar 5, 2013

what type of storage systems used for saving archive files and backup files "especially for oracle databases"

View 5 Replies View Related

Install Multiple Versions Of Oracle Databases 10GR2 And 11GR2 In A Single Node?

Oct 28, 2010

ORACLE DBA
EXPERTS

�I can install multiple versions of Oracle databases 10GR2 and 11GR2 in a single node using a unique Oracle ASM single instance?

View 6 Replies View Related

Server Administration :: How To Install Oracle 8i And 9i Databases On Same Server

Feb 20, 2011

How to install oracle 8i and 9i databases on same server for example i want that both type of databases run on same server.

View 7 Replies View Related

Resizing Redo Logs

Aug 8, 2012

I'm using Oracle 10gR2 (10.2.0.4.0) 64 bits.

I got many times oracle ORA-00494 error and the database went down but since 29th of july the database have not been killed.
The error message is below :

ORA-00494: mise en file d'attente [CF] d�tenue pendant trop longtemps ( (more than 900 seconds)) par inst 1, osid 176484
ORA-00028: votre session a �t� ferm�e

My database is used for datawarehouse of many terabytes.

Initially the redo log size was 500Mbytes and I've set it to 3Gbytes. The maximum log switch is after 5 minutes. I want log to be switched every 20 minutes or every 30 minutes.

To obtain the size of redo logs I've executed this query :

SQL> select OPTIMAL_LOGFILE_SIZE from v$instance_recovery;

OPTIMAL_LOGFILE_SIZE
--------------------
54763

53,5 Gbytes is it not very big as redo log size? What's the maximum size of redo log? To set very big redo log size what are the requirements? Which precautions should I take before? What are the risks? Are any other ways to change the log switch frequency?

View 1 Replies View Related

SQL & PL/SQL :: Archive Logs Filtering

Mar 3, 2011

I am using Oracle 11.2.1.0 version.I want to restrict archiving for some tables. I think NOLOGGING will solve this problem. Is there any option for restricting archiving.

For example, I have three tables called A, B and C. I want to archive only 2 tables A and B but not C.

View 6 Replies View Related

SQL & PL/SQL :: Archive Logs Restriction

May 2, 2010

I have one requirement saying that " Can we restrict archive logs for some tables".

View 7 Replies View Related

Redo Logs Size

May 28, 2013

is it Any way I can put the size of my redo log (During Install Oracle DB 11.1.0.7 )

I mean during installtion .??? becouse its by default 50 MB I need to be 200MB

View 10 Replies View Related

Intermittent Exceptions In The Logs?

Jul 14, 2010

java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMERR start() failed on resource 'weblogic.jdbc.jta.DataSource': XAER_RMERR : A resource manager error has occured in the transaction branch
javax.transaction.xa.XAException: Unexpected error during start for XAResource 'EOD': null
at weblogic.jdbc.wrapper.XA.createException(XA.java:103)
at weblogic.jdbc.jta.DataSource.start(DataSource.java:765)
at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1182)
at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1115)

View 3 Replies View Related

Creating MV Logs In Logical Standby DB?

Dec 10, 2010

I am trying to create materialized views based on a few tables in a logical standby database.

The target database (11g R2) where the MVs will be created is a stand-alone database.

The DB where the base tables reside is a logical standby database (11g R2).

The requirement is to do a "FAST REFRESH" of the Materialized Views.

My questions are :

1. Can I create MV logs in the logical standby DB?

2. If the answer to question no. 1 is "Yes", do I need to do anything different or configure the logical standby DB in a specific manner in order to create MV logs. From what I understand, the objects in the logical standby database are in a locked state.

View 2 Replies View Related

RMAN Backup Without Archived Logs?

Jul 28, 2013

Assuming you have a 9i database . where you have it enabled in archive mode , yet constantly deleting the archived redo logs , due to space constraints .

Will you be able to perform a full level 0 backup , and the following incremental backups , in the absence of the archived redo logs ? And are these incremental backups enough to recover the database or particular data files , to the point of the backup itself at least ?

View 5 Replies View Related

Cleanup Of Applied Archived Logs?

Jan 8, 2013

Is there a way to automate deletion of applied archived logs after rollforward?

I'm thinking of crontab, and a script referring to the alert log to get the archived log filename.

Setup:

OS: HP-UX B.11.31 you ia64
DB: Oracle 10g 10.2.0.4.0 (mounted)

View 2 Replies View Related

Server Administration :: Access Logs Via SQL

Jul 14, 2011

I'm currently working on a project in which I do not have permissions to access the Server where the database is installed and configure.Because of company policies, I do not have Admin Rights over Oracle, but I do have an account that can make Selects to DBA_USER_PRIVS for instance.

I would like to know if there is any way to access the database logs to know if there was any kind of problem within the database, because one of my Schemas misteriously went clean (all tables, sequences, triggers, ... vanished)

View 4 Replies View Related

Tools That Erases The Logs Automatically?

Nov 19, 2006

I have Sap r/3 system which runs on Oracle 9 database. The problem is that the sql queries produces an awful lot of logs thus my disk is full after very short time.

I do not need the logs since its development environment. Are there any tools that erases the logs automatically?

View 2 Replies View Related

PL/SQL :: Logs Of Modified Database Objects

Jul 25, 2012

i have a sequence for one of my table that this sequence's current value was 3000 yesterday but today when i checked current value of it, i surprised because the value changed to 50, can i check who changed my sequence? is exists any data dictionary that shows logs of modified database objects.

View 3 Replies View Related







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