Tag: check

RMAN – checksyntax

Starting RMAN with check syntax will check syntax of RMAN command, it will report errors if the syntax is incorrect. Example: -- Start RMAN with check syntax option $ $ORACLE_HOME/bin/rman checksyntax Recovery Manager: Release 10.2.0.1.0 - Production on Sat Jan 22 19:49:42 2011 Copyright (c) 1982, 2005, Oracle. All rights reserved. -- Valid RMAN command, … Continue reading RMAN – checksyntax

Check archiver is running on archivelog mode?

In 8i and 9i archiver process doesn't automatically startup when database is archive log mode so using the SQL below one can verify if archiver is running on database that has archive log mode turned on. SQL> SELECT DECODE(d.log_mode, 'ARCHIVELOG', DECODE(i.archiver, 'STOPPED', 'Issue archiver not running on archivelog database', 'NoIssue archiver running on archivelog database'), … Continue reading Check archiver is running on archivelog mode?

Sample JDBC program which connects to Oracle

Sample program that demonstrates using JDBC to connect to Oracle database. Source code $ cat TestConnection.java import java.sql.*; public class TestConnection { public static void main (String args []) throws SQLException, InterruptedException { DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver()); java.util.Properties props = new java.util.Properties(); // user/password@host:port:SID Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:" + args[0] + "/" + args[1] + … Continue reading Sample JDBC program which connects to Oracle

How to check physical and logical data corruption using RMAN?

If you are not using RMAN to backup data and use technologies like NetApp snapshot which doesn't check for physical and logical corruption, one can still use RMAN to check for physical and logical corruption in the datafiles and not back the data up. connect target / run { # set disk to be default … Continue reading How to check physical and logical data corruption using RMAN?

Check Oracle Password for Expiration

This simple script will check if a user password is expiring in the next 120 days. set pagesize 500 set linesize 200 set trimspool on column "EXPIRE DATE" format a20 select username as "USER NAME", expiry_date as "EXPIRE DATE", account_status from dba_users where expiry_date < sysdate+120 and account_status IN ( 'OPEN', 'EXPIRED(GRACE)' ) order by … Continue reading Check Oracle Password for Expiration