Monday, April 30, 2007

My manager's new blog in wordpress.com

Dear Friends,

I would like to share one thing that my boss, Mr. Massoud Al - Shareef (MD of KnowledgeWare Technologies, Saudi Arabia), maintains his own blog http://massoudalshareef.wordpress.com/ , Where he talks about libraries management system ( UNICORN, sirsidynix ), and other related topics on the same.

Well, this blog is designed in Arabic so far. Sorry for english readers !

Happy reading !!!

Best Regards,
Sabdar Syed.

Tuesday, April 24, 2007

Completed Oracle 10g OCP Certification Today !!!

Dear Friends,

Today, I have completed "1Z0-040 - Oracle Database 10g: New Features for Administrators" exam, and become an Oracle 10g Certified DBA.

As I have already certified in 9i OCP, it took me about 2 years to upgrade to 10g OCP due to work. So, please do not
procrastinate to write 10g OCP, if you are already an OCP 9i.

Best Regards,
Sabdar Syed.

Friday, April 20, 2007

My first technical article in Oracle Metalink !!

Dear Friends,

My first technical article has been published in Oracle Metalink. Below are details.

Web URL : www.metalink.oracle.com
Metalink Note ID: 427974.1
Subject: "How We Identified and Corrected a Cloning Mistake"

Happy reading !!

Best Regards,
Sabdar Syed

Monday, April 16, 2007

Installing Oracle 10g Software and Building the Database on UNIX and Linux Environment.

Dear folks,

There is a good link in Oracle for installing Oracle 10g Software, this contains, the basic and advanced installation steps, creating a database using DBCA, and all screenshots of each step.

http://www.oracle.com/technology/obe/10gr2_2day_dba/install/install.htm


Best Regards,
Sabdar Syed.

ORA-12170: TNS: Connect timeout occurred !!

We have installed Oracle 10g on Windows-XP machine. But when a client (another pc – windows 2003) is trying to connect to the database, then the following error is being generated “ORA-12170: TNS: Connect timeout occurred”

We ensure that the tnsnames.ora file has the correct information i.e. hostname, port, and sid. When we tnsping the sid, it gives “TNS-12535: TNS: operation timed out” error.

So, we had to resolve this problem by turning OFF the Firewall on Server Side (Windows –XP). After that we could successfully connect to the database, and able to tnsping sid as well.

Conclusion: If you are facing these problems due to other reasons, I would request you to take a look at oracle metalink notes for the same.

Best Regards,
Sabdar Syed.

Sunday, April 15, 2007

How to Inovke SQLPLUS in scripts in Oracle 10g !!!

In Oracle 9i we use "sqlplus -s @start_mydb.sql" to start the database. But, where as in Oracle 10g this command simply hangs and will not do anything.

To invoke SQLPLUS in shell/bat scripts in Oracle 10g, We need to give below command.

sqlplus /NOLOG @start_mydb.sql

Regards,
Sabdar Syed.

Wednesday, April 4, 2007

ORA-16005: database requires recovery

Due to some reason, I had to bring one of our test databases in read only mode, but the follwoing error generated while doing the same. "ORA-16005: database requires recovery".

I'm sure that we have't done any changes with the database recently. Well, the problem was resolved by shutting down the database in normal mode. Please take a look at the below steps for the same.

SQL> startup force open read only;
ORA-16005: database requires recovery

SQL> shutdown immediate;
SQL> startup restrict;
SQL> shutdown;
SQL> startup mount;
SQL> alter database open read only;

SQL> select open_mode from v$database;
OPEN_MODE
----------
READ ONLY
Conclusion: If you have got the error "ORA-16005: database requires recovery" due to other reasons, I request you to take a look at the metalink note ID: 316154.1
Regards,
Sabdar Syed.

Installing Oracle Applications 11i 11.5.10.2 on SUSE Linux Enterprise Server 9 SP1

Dear Friends,

Today I have come accross a good link for "Installing Oracle Apps 11i on SLES 9". Below is an URL.

http://www.novell.com/coolsolutions/feature/16009.html

I hope that this link may help you in installing Oracle Application on Linux.

Happy reading !!!!

Regards,
Sabdar Syed

Sunday, April 1, 2007

Creating a Recovery Catalog – RMAN in Oracle 10g

As we all know, RMAN maintains metadata about the target database and its backup and
recovery operations in the RMAN repository. The RMAN repository data is always in the control file of the target database. The CONTROL_FILE_RECORD_KEEP_TIME initialization parameter controls how long backup records are kept in the control file before those records are re-used to hold information about more recent backups. By default this parameter set to 7 days.

Another copy of the RMAN repository data can also be saved in the recovery catalog.

Using a recovery catalog preserves RMAN repository information if the control file is lost, making it much easier to restore and recover following the loss of the control file. (A backup control file may not contain complete information about recent available backups.) The recovery catalog can also store a much more extensive history of your backups than the control file, due to limits on the number of control file records.

In addition to RMAN repository records, the recovery catalog can also hold RMAN stored scripts, sequences of RMAN commands for common backup tasks. Centralized storage of scripts in recovery catalog can be more convenient than working with command files.

Create a new database for RMAN – Recovery catalog database

Note: You can create a small database with minimal sizes of tablespaces and others, and you can name the database as CATDB for naming convention and to avoid the confusion between your production and rman databases.

Create a new tablespace in the new database (CATDB)

$ sqlplus /nolog

CONNECT SYS/passwd@catdb AS SYSDBA;

CREATE TABLESPACE rman
DATAFILE '/u02/app/oradata/rman/rman01.dbf' size 100m;

Create the Recovery Catalog Owner in the new database (CATDB)

CREATE USER rman IDENTIFIED BY rman
DEFAULT TABLESPACE rman
QUOTA UNLIMITED ON rman;

Grant the necessary privileges to the schema owner

SQL> GRANT connect, resource, recovery_catalog_owner TO rman;

Here the role "RECOVERY_CATALOG_OWNER" provides the user with all privileges required to maintain and query the recovery catalog

Creating the Recovery Catalog

Connect to the database which will contain the catalog as the catalog owner. For example:

$ rman catalog rman/passwd@catdb

Recovery Manager: Release 10.2.0.3.0 - Production on Sun Apr 1 14:22:13 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to recovery catalog database
RMAN>

Run the CREATE CATALOG command to create the catalog

RMAN> CREATE CATALOG;

recovery catalog created

Registering a Database in the Recovery Catalog

Connect to the target database and recovery catalog database.

$ ORACLE_SID=prod; export ORACLE_SID

$ rman target / catalog rman/passwd@catdb

Recovery Manager: Release 10.2.0.3.0 - Production on Sun Apr 1 14:25:30 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: PROD (DBID=3677528376)
connected to recovery catalog database

RMAN> REGISTER DATABASE;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

Make sure that the registration was successful by running REPORT SCHEMA:

RMAN> REPORT SCHEMA;

Report of database schema

List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 500 SYSTEM YES /u02/app/oradata/prod/system01.dbf
2 200 UNDOTBS1 YES /u02/app/oradata/prod/undotbs01.dbf
3 325 SYSAUX NO /u02/app/oradata/prod/sysaux01.dbf
4 100 EXAMPLE NO /u02/app/oradata/prod/example01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 200 TEMP 200 /u02/app/oradata/prod/temp01.dbf

Reference: Please go through the Oracle Documents for RMAN concepts.
http://download-uk.oracle.com/docs/cd/B19306_01/backup.102/b14191/toc.htm

Regards,
Sabdar Ssyed.