Archive

Archive for the ‘Oracle 10g R2’ Category

Cleaning up a failed installation or reinstalling Oracle 10g or 11g

August 20th, 2009 Mark Wagner No comments

su – root

# For 10g
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

# For 11g
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

. $ORACLE_HOME/bin/localconfig delete
# stops the Oracle CSS daemon and deletes configuration
rm -rf /u01/app/oracle/*

rm -rf /u01/app/oraInventory
rm -f /etc/oraInst.loc /etc/oratab
rm -rf /etc/oracle
rm -f /etc/inittab.cssd
rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenv

ASMCMD-08103: failed to connect to ASM; ASMCMD running in non-connected mode

August 15th, 2009 Mark Wagner No comments

The warning is provided in 2 cases. If the ORACLE_SID is not set properly or when the ASM instance is not running.

Before Oracle 11g the user received an error which was indicated that the environment was wrong. In Oracle 11g a must beter message is provide, and there are situations where you can use ASMCMD even when the ASM instance is not started or the ORACLE_SID is not set properly.

So depending on the situation the message can be correct. If this is not wanted, validate if the ASM instance is running and/or ORACLE_SID is set correctly.

When using ASMCMD, if ASM instance is running, v$ views are used to retrieve the information requested. If the ASM instance is down, the diskheader is read to provide the requested information when using ASMCMD.

Oracle ASM Errors

August 13th, 2009 Mark Wagner No comments

 

# /etc/init.d/oracleasm createdisk VOL1 /dev/xvdb1
Marking disk "/dev/xvdb1" as an ASM disk: asmtool: Device "/dev/xvdb1" is not
a partition
                                                           [FAILED]

Workaround: Run the asmtool command with the -a force=yes parameter to ignore the partition check, for example

# asmtool -C -l /dev/oracleasm -n VOL1 -s /dev/xvdb1 -a force=yes
/etc/init.d/oracleasm scandisks

The oracleasm scandisks command fixes permissions once the disk is created.

Oracle Universal Installer

July 26th, 2009 Mark Wagner No comments

 

One of the beauties of the Oracle database is that nearly everything associated with it can be automated. Oracle installation is one of the easiest tasks to handle with little or no human intervention. Sadly, Oracle Corporation has historically provided little documentation on exactly how to accomplish this.

This chapter will discuss the main steps in automating an Oracle installation. Some platforms may require specific preparation before the installer can run. This preparation is usually straightforward and simple, but consult the installation guide for your specific platform before proceeding.

Automated Installation

When performing an automated install, you must provide the installer with a text file containing all the necessary instructions. Oracle calls these Oracle Universal Installer (OUI) response files. A response file is a plain text file, which must follow Oracle’s syntax exactly.

To use a response file during an installation on Windows or UNIX, use the following commands (where "custom.rsp" is the name you’ve given your response file):

Windows

setup.exe [-silent] -responseFile C:\OraInst\custom.rsp

UNIX

./runInstaller [-silent] -responseFile /u01/OraInst/custom.rsp

The -silent qualifier is optional. When a silent install is indicated, the installer will not open any graphical user interface (GUI) windows under any circumstances. All needed information must be provided in the response file for a silent install. If any information is missing, the installer will exit, returning an error and the name of the log file to examine for details.

If the -silent qualifier is omitted, the installer will open normally and wait for the user to move through the install steps manually. Each page will be filled in with answers from the response file, but the installation will not proceed automatically. This is very useful if you want an installation "template" rather than a fully automated install.

In addition to the Oracle-provided sample response files, the installer can record a session to create a response file for use in later installations. To record a session, use the -record and -destinationFile qualifiers. For Windows and UNIX, for example:

Windows

setup.exe -record -destinationFile C:\OraInst\rec.rsp

UNIX

./runInstaller -record -destinationFile /u01/OraInst/rec.rsp

The installer will start and run normally. Choices made during the installation session will be recorded to the designated response file. After all selections have been made, a summary page will be presented. At this point, you can continue with the install or click the Cancel button to end it. Even if the installation is cancelled, the recorded response file is created.

How to see the files stored in ASM – Oracle Automatic Storage Management

July 7th, 2009 Mark Wagner No comments

#asmcmd -p

Asmcmd lets you view directory structuture and files stored inside Oracle ASM usitlizing a CLI and unix like commands.

Command Description
cd Changes the current directory to the specified directory.
du Displays the total disk space occupied by ASM files in the specified ASM directory and all its subdirectories, recursively.
exit Exits ASMCMD.
find Lists the paths of all occurrences of the specified name (with wildcards) under the specified directory.
help Displays the syntax and description of ASMCMD commands.
ls Lists the contents of an ASM directory, the attributes of the specified file, or the names and attributes of all disk groups.
lsct Lists information about current ASM clients.
lsdg Lists all disk groups and their attributes.
mkalias Creates an alias for a system-generated filename.
mkdir Creates ASM directories.
pwd Displays the path of the current ASM directory.
rm Deletes the specified ASM files or directories.
rmalias Deletes the specified alias, retaining the file that the alias points to.

Wildcard

The wildcard characters “*” and “%” match zero or more characters anywhere within an absolute or relative path. The two characters behave identically. The ASMCMD commands that accept wildcards are ls, du, rm, and find. The following examples illustrate the use of wildcards.