Showing posts with label 10g. Show all posts
Showing posts with label 10g. Show all posts

Saturday, June 18, 2011

How to clean listener log on oracle 9i and 10g

Let, our database name is LIST_MYDB and listener for this database is LIST_MYDB.

If needed doe below:
open "listener.ora" and put ADMIN_RESTRICTIONS_l[istener_name]=off and RELOAD [listnere_name]"
then proceed as below:

1. stop logging
$ lsnrctl
LSNRCTL> set CURRENT_LISTENER LIST_MYDB
Current Listener is LIST_MYDB

LSNRCTL> set Log_status off

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MYHOST)(PORT=1533)))
LIST_MYDB parameter "log_status" set to OFF
The command completed successfully

2. move the current log
$ mv list_mydb.log mv list_mydb.log_old

3. start logging
$ lsnrctl
LSNRCTL> set CURRENT_LISTENER LIST_MYDB

LSNRCTL> set Log_status on

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MYHOST)(PORT=1533)))
LIST_MYDB parameter "log_status" set to ON
The command completed successfully

LSNRCTL> exit

If forgot to stop logging [step 1] then logging may stop automatically.
In this case after completing step 2, do as step 1 and then step 3.

Now do below if needed:
open "listener.ora" and put ADMIN_RESTRICTIONS_l[istener_name]=on and RELOAD [listnere_name]"

Wednesday, April 13, 2011

Oracle Central Inventory is corrupted [10.2]

We had a linux machine having oracle client 10.2.0.1 installed on it and we were preparing to install a patch for "sqlplus".
To check "opatch" we executed "opatch lsinventory" and found below output:

$ opatch lsinventory

LsInventory Session failed: OPatch failed to locate Central Inventory.
Possible causes are:
The Central Inventory is corrupted
The oraInst.loc file specified is not valid.

OPatch failed with error code 72

According to the output "Oracle Inventory" is corrupted.
Then we check the inventory location form file "/oracle/product/10.2.0/client_1/oraInst.loc" which was "/oracle/base/oraInventory".
Then we executed below set of commands [under oracle user] to repaier "Oracle Inventory":

$ mv /oracle/base/oraInventory /oracle/base/oraInventory_old
$ cd /oracle/product/10.2.0/client_1/oui/bin #location of OUI
$ ./runInstaller -silent -invPtrLoc "/oracle/product/10.2.0/client_1/oraInst.loc" -attachHome ORACLE_HOME="/oracle/product/10.2.0/client_1" ORACLE_HOME_NAME="Ora10gHome"

Starting Oracle Universal Installer...


No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
'AttachHome' was successful.

Check with opatch:
$ opatch lsinventory

Now we had "OPatch succeeded."
Thanks to http://www.oraclemasters.in/?p=412

sqlplus hangs [10.2.0.1]

On a Redhat Linux 4.3 32bit machine, we just installed oracle client 10.2.0.1.
While we were trying to use sqlplus as below, it hanged:

$ sqlplus /nolog


Not only this command all the commands with "sqlplus" were also hanged.
But tnsping was working fine.

Solution:
This is a bug [MOS Note ID 338461.1].
When the machine uptime hits 248 days, this bug hits.
In our case up time was 406 days.

And there are two solution restart the machine or apply patch 4612267.
In our case we applied the patch and just after patch installation, "sqlplus" started working fine.