Oracle 11GR2 + RMAN
Hi all,
I have a RAC database 11GR2 with 2 nodes.
I backup database via RMAN and catalog. My catalog is stored in this database.
Could you explain me how to create a second RMAN catalog on another database (on another host) ?
Thanks !
user12064507 wrote:
Hi all,
I have a RAC database 11GR2 with 2 nodes.
I backup database via RMAN and catalog. My catalog is stored in this database.
Could you explain me how to create a second RMAN catalog on another database (on another host) ?
Thanks !Why can have multiple catalog schemas in one database, No need to have multiple databases.
Similar Messages
-
Environment:
Oracle 11gR2 RAC (2 node) with ASM
HP-UX B.11.31 U ia64
We have configured two ASM disk group for Data & FRA, and we configured RMAN backup into FRA location. Now our Database, Log file, Archive logs and RMAN backup files all are in ASM on primary site.
Our network team is using Recover Point to mirror all the disks into DR site; we have no setup from Oracle side. What is the possible configuration that we need to have in DR site from Oracle side in order to bring-up the database in-case of primary site failure (disaster).
I am new to Oracle RAC can some one give me a suggestion.
- ManoWhat is the possible configuration that we need to have in DR site from Oracle side in order to bring-up the database in-case of primary site failure ORACLE DATAGUARD is what you need; not RAC
-
How to create an asm instance manaually? oracle 11gr2.
env: oracle 11gr2 os: hpux or aix single machine , not rac.
question:how to create an asm instance manaually?? diskgroup,listener,db ,they can be resigistered to crs??
can anyone give me document about it?Hi,
This is a simple answer:
Automatic Storage Management (ASM)
ASM was a new storage option introduced with Oracle Database 10gR1 that provides the services of a filesystem, logical volume manager, and software RAID in a platform-independent manner. ASM can stripe and mirror your disks, allow disks to be added or removed while the database is under load, and automatically balance I/O to remove "hot spots." It also supports direct and asynchronous I/O and implements the Oracle Data Manager API (simplified I/O system call interface) introduced in Oracle9i.
ASM is not a general-purpose filesystem and can be used only for Oracle data files, redo logs, and control files. Files in ASM can be created and named automatically by the database (by use of the Oracle Managed Files feature) or manually by the DBA. Because the files stored in ASM are not accessible to the operating system, the only way to perform backup and recovery operations on databases that use ASM files is through Recovery Manager (RMAN).
ASM is implemented as a separate Oracle instance that must be up if other databases are to be able to access it. Memory requirements for ASM are light: only 64 MB for most systems.
Installing ASM
On Linux platforms, ASM can use raw devices or devices managed via the ASMLib interface. Oracle recommends ASMLib over raw devices for ease-of-use and performance reasons. ASMLib 2.0 is available for free download from OTN. This section walks through the process of configuring a simple ASM instance by using ASMLib 2.0 and building a database that uses ASM for disk storage.
Determine Which Version of ASMLib You Need
ASMLib 2.0 is delivered as a set of three Linux packages:
* oracleasmlib-2.0 - the ASM libraries
* oracleasm-support-2.0 - utilities needed to administer ASMLib
* oracleasm - a kernel module for the ASM library
Each Linux distribution has its own set of ASMLib 2.0 packages, and within each distribution, each kernel version has a corresponding oracleasm package. The following paragraphs describe how to determine which set of packages you need.
First, determine which kernel you are using by logging in as root and running the following command:
uname -rm
Ex:
# uname -rm
2.6.9-22.ELsmp i686
The example shows that this is a 2.6.9-22 kernel for an SMP (multiprocessor) box using Intel i686 CPUs.
Use this information to find the correct ASMLib packages on OTN:
1. Point your Web browser to http://www.oracle.com/technology/tech/linux/asmlib/index.html
2. Select the link for your version of Linux.
3. Download the oracleasmlib and oracleasm-support packages for your version of Linux
4. Download the oracleasm package corresponding to your kernel. In the example above, the oracleasm-2.6.9-22.ELsmp-2.0.0-1.i686.rpm package was used.
Next, install the packages by executing the following command as root:
rpm -Uvh oracleasm-kernel_version-asmlib_version.cpu_type.rpm \
oracleasmlib-asmlib_version.cpu_type.rpm \
oracleasm-support-asmlib_version.cpu_type.rpm
Ex:
# rpm -Uvh \
> oracleasm-2.6.9-22.ELsmp-2.0.0-1.i686.rpm \
> oracleasmlib-2.0.1-1.i386.rpm \
> oracleasm-support-2.0.1-1.i386.rpm
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 33%]
2:oracleasm-2.6.9-22.ELsm########################################### [ 67%]
3:oracleasmlib ########################################### [100%]
Configuring ASMLib
Before using ASMLib, you must run a configuration script to prepare the driver. Run the following command as root, and answer the prompts as shown in the example below.
# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Creating /dev/oracleasm mount point: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
Next you tell the ASM driver which disks you want it to use. Oracle recommends that each disk contain a single partition for the entire disk. See Partitioning the Disks at the beginning of this section for an example of creating disk partitions.
You mark disks for use by ASMLib by running the following command as root:
/etc/init.d/oracleasm createdisk DISK_NAME device_name
Tip: Enter the DISK_NAME in UPPERCASE letters.
Ex:
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "/dev/sdb1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
Marking disk "/dev/sdc1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdd1
Marking disk "/dev/sdd1" as an ASM disk: [ OK ]
Verify that ASMLib has marked the disks:
# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
Create the ASM Instance
ASM runs as a separate Oracle instance which can be created and configured using the Oracle Universal Installer. Now that ASMLib is installed and the disks are marked for use, you can create an ASM instance.
Log in as oracle and start runInstaller:
$ ./runInstaller
1. Select Installation Method
* Select Advanced Installation
* Click on Next
2. Specify Inventory Directory and Credentials
* Inventory Directory: /u01/app/oracle/oraInventory
* Operating System group name: oinstall
* Click on Next
3. Select Installation Type
* Select Enterprise Edition
* Click on Next
4. Specify Home Details
* Name: OraDB10gASM
* Path: /u01/app/oracle/product/10.2.0/asm
Note:Oracle recommends using a different ORACLE_HOME for ASM than the ORACLE_HOME used for the database for ease of administration.
* Click on Next
5. Product-specific Prerequisite Checks
* If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
* Click on Next
6. Select Configuration Option
* Select Configure Automatic Storage Management (ASM)
* Enter the ASM SYS password and confirm
* Click on Next
7. Configure Automatic Storage Management
* Disk Group Name: DATA
* Redundancy
- High mirrors data twice.
- Normal mirrors data once. This is the default.
- External does not mirror data within ASM. This is typically used if an external RAID array is providing redundancy.
* Add Disks
The disks you configured for use with ASMLib are listed as Candidate Disks. Select each disk you wish to include in the disk group.
* Click on Next
8. Summary
* A summary of the products being installed is presented.
* Click on Install.
9. Execute Configuration Scripts
* At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the indicated scripts.
* Click on OK when finished.
10. Configuration Assistants
* The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically
11. End of Installation
* Make note of the URLs presented in the summary, and click on Exit when ready.
12. Congratulations! Your new Oracle ASM Instance is up and ready for use.
Kind regards
Mohamed -
Oracle 11gR2 RAC Backup & Recovery
I am new to Oracle RAC, I have installed Oracle 11gR2 RAC (2 node) on HP-UX with ASM, configured FRA location on ASM.
Now I would like to configure RMAN backup, Can someone give some idea or document to setup RMAN backup for Oracle 11gR2 RAC.
- ManoManoRangasamy wrote:
I am new to Oracle RAC, I have installed Oracle 11gR2 RAC (2 node) on HP-UX with ASM, configured FRA location on ASM.
Now I would like to configure RMAN backup, Can someone give some idea or document to setup RMAN backup for Oracle 11gR2 RAC. There won't be any different settings for RMAN for RAC except for where and how you would be configuring the Archive logs and place your backups. Both, ideally speaking, should be on the shared storage like ASM but there are other combinations also possible. Review the above given links for the same. That should provide a good starting point.
Aman.... -
Installation of Oracle 11gR2 in suse 12.1
Hi,
I recently installed the the linux Open suse 12.1, I have only one os in my pc. Now i want to install Oracle, can any one help me how to install and what are the packages to install before installation of oracle and where can i get those package.
One more point is I am newly to the linux, I dont know anything about this linux, Just 2 days before i installed the os. Can any one help me for this query
Thanks and regards,
G.ManikantaHow many PC's and OS's do you have ;-) Installation of oracle 11gR2 in fedora 16
Supported OS versions are listed in the Install Doc - http://docs.oracle.com/cd/E11882_01/install.112/e24321/pre_install.htm#CIHFICFD
If you insist on using an unsupported OS, you are on your own.
HTH
Srini -
Oracle 11gR2 installation problem on Windows Server 2008 R2 datacenter
Hi
I am trying to install Oracle 11Gr2 64 bit on Windows server 2008 R2.The system configuration is "Intel Xeon, RAM 8.00 GB.
i
The installation is getting paused at the 8th step of Oracle installation.Neither i am getting any error message nor an entry is recorded in the Oracle inventory log.
It is showing a blank screen after the prerequiste checks are complete.
Request you to help me out in resolving the issue.
Thanks in advance for your cooperation.Hi Helios
Thanks for the response. The database is still not created to check in the Alert log .It is still in the phase of pre-requisite checks. I did not go with Silent installation.It is a plain single instance installation.
The installation screen is greyed out with out any message or error.
Please could you share if you have any thoughts on this. -
Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto
h1. Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto
Author: Dude
Version: D
Last modified: 14-Jan-2012
You are welcome to add comments, but please do not discuss your installation issues in this thread. If you have a question about the instructions, please add a simple note to the link of your own thread. The instructions are the result of my own research and development. If you would like to use any of the information for your own blog or website, please include a link to this reference to include future changes.
Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto
h2. Purpose
This document outlines instructions how to install Oracle XE under Ubuntu 11.10.
Ubuntu or Debian based Linux is not on the list of supported operation systems according to the Oracle documentation at http://download.oracle.com/docs/cd/E17781_01/install.112/e18802/toc.htm. You may want to consider virtualization software like Oracle Virtualbox and install Oracle Enterprise Linux as a free and professional alternative to installing XE under Ubuntu. You can also download pre-build virtual machines that include Oracle XE. You can browse http://otn.oracle.com/community/developer-vm for more information.
h2. Topics
h4. 1) Install Linux Ubuntu
h4. 2) Remote Terminal
h4. 3) Install Additional Software
h4. 4) Managing Swap Space
h4. 5) Modify Kernel Parameters
h4. 6) Oracle Home Directory
...a) Resize the Root Partition
...b) Setup External Storage
h4. 7) ORA-00845: MEMORY_TARGET
h4. 8) Installing Oracle 11gR2 Express Edition
h4. 9) Post-Installation
h4. 10) Tips and Troubleshooting
...a) Port 1521 appears to be in use by another application
...b) cannot touch `/var/lock/subsys/listener': No such file or directory
...c) ORA-00845: MEMORY_TARGET
...d) Apex ADMIN password
...e) SYS and SYSTEM password
...f) Uninstall Oracle 11g XE
...g) Reconfigure Oracle 11g XE
...h) Gnome Classic desktop
...i) Unix vi cursor keys
...j) Backup Database
h4. 11) History
h4. 12) References
h2. 1) Install Linux Ubuntu
The following assumes you have installed Ubuntu 11.10 Desktop Edition for AMD 64-bit, or upgraded from a previous version. Keep in mind that Oracle 11gR2 Express Edition is only available for 64-bit architecture. It is not necessarily a requirement, but I would not bother to install Oracle 11gR2 XE on a system with less than 2 GB of RAM installed. You can download Ubuntu for free at: http://www.ubuntu.com/download/ubuntu and install it using the default settings provided.
You can apply the latest OS patch-sets by clicking the power button icon in the upper right hand corner of the screen and selecting "Updates available..."
h2. 2) Remote Terminal
You will need command line access to perform the installation tasks. Select the top "Dash Home" button of the Unity toolbar and enter the word "terminal", or use CTRL-ALT-t. If you prefer to open a remote terminal session use SSH. Ubuntu does not come with a secure shell login by default. To install it, use the following command:
sudo apt-get install openssh-serverYou cannot login as root unless you set a root password using the "sudo passwd root" command. However, you can get root user access using the "sudo" command, which requires only to re-enter the password of your personal account. Access to "sudo" is controlled by the /etc/sudoers file.
The best way to establish a remote command line session as root is to login with your personal account, e.g.: ssh [email protected], and then type "sudo su -" to become root, or use "sudo <command>" to execute individual commands. If your account does not have "sudo" access you can login as root using "su - root", but will need to know the root password.
h2. 3) Install Additional Software
Oracle 11g Express Edition requires additional software that is not installed by default:
sudo apt-get install alien libaio1 unixodbch2. 4) Managing Swap Space
Oracle demands that the minimum swap space for Oracle Database XE is 2 GB (2095100 KB) or twice the size of RAM, whichever is lesser. Enter the following shell command to verify your swap space:
cat /proc/meminfo | grep -i swap
SwapCached: 0 kB
SwapTotal: 2095100 kB
SwapFree: 2095100 kBYou can increase available swap space by using a swap file as long as disk space permits. The advantage of a swap file versus a swap partition is flexible space management because you can add or delete swap space on demand as necessary. The following will create and enable an additional 1 GB swap file at system startup, located in the /home directory:
Login as root:
sudo su -Enter the following commands:
dd if=/dev/zero of=/home/swapfile bs=1024 count=1048576
mkswap /home/swapfile
swapon /home/swapfile
swapon -aCreate a backup of the original "fstab" file and add the new swap file:
cp /etc/fstab /etc/fstab.backup_`date +%N`
echo '/home/swapfile swap swap defaults 0 0' >> /etc/fstabExit from root and verify the new swap space:
exit
swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 2095100 0 -1
/home/swapfile file 1048572 0 -2Swap space is not a substitute for installed RAM. Swap space is a safeguard that allows the system to move idle processes to disk before the OOM killer will begin to terminate processes in order to free up enough real memory to keep the system operational. The general rule for sizing the swap space depends on the size of installed RAM. If your system has less then 4 GB of RAM the swap space should usually be at least twice this size. If you have more than 8 GB of RAM installed you may consider to use an equal size as swap space. The more RAM you have installed, the less likely you are going to run into memory starvation, and the less likely you are going to need swap space, unless you have a bad process.
h2. 5) Modify Kernel Parameters
Oracle 11gR2 Express Edition requires the following Kernel parameters. Enter the commands exactly as shown:
Login as root:
sudo su -Cut & paste the following directly into a command shell (not a text editor):
cat > /etc/sysctl.d/60-oracle.conf <<-EOF
# Oracle 11g XE kernel parameters
fs.file-max=6815744
net.ipv4.ip_local_port_range=9000 65500
kernel.sem=250 32000 100 128
# kernel.shmmax=429496729
kernel.shmmax=107374183
EOFLoad and verify the new kernel parameters:
service procps start
sudo sysctl -q fs.file-max
sudo sysctl -q kernel.shmmax
sudo sysctl -q net.ipv4.ip_local_port_range
sudo sysctl -q kernel.sem The SHMMAX kernel parameter defines the upper memory limit of a process. It is a safeguard to stop a bad process from using all memory and causing RAM starvation. The Linux default is 32 MB. The official Oracle XE installation documentation suggests a value of 4 GB -1 bytes (429496729). Since Oracle 11g XE has a 1 GB memory limit, a smaller footprint will be a better safeguard for the complete system. Setting the SHMMAX parameter to 107374183 will be sufficient.
h2. 6) Oracle Home Directory
At the time of this writing, Enterprise Linux 6 is not supported for Oracle database yet. It is therefore not possible to confirm Oracle ext4 filesystem compatibility, which is default in Ubuntu 11. According to various information, ext4 may cause a performance problem for Oracle 11g database. The following will show you how to add a ext3 partition to your existing setup.
h3. 6.a) Resize the Root Partition
Provided you have sufficient free disk space, you should be able to resize the root partition to create an extra ext3 filesystem. Considering the 11 GB user datafile limit of the Express Edition, 18 GB should be more than enough.
You can use the free Gparted Live CD to shrink your startup volume. Gparted downloads are available at http://sourceforge.net/projects/gparted/files/gparted-live-stable. When burning the CD, pay attention to burn the raw .iso image and not the possibly "mounted" image. If you are using a virtual machine like Oracle Virtualbox, you can mount the .iso image directly. There are going to be a few prompts when the system starts from the CD, but you can press Return to accept the defaults.
When the Gparted window appears:
- Select your ext4 root partition, usually /dev/sda1
- Select the "Resize/Move" button from the toolbar.
- Enter 18000 into the "Free space following" field and press the Return key.
Be careful not not change the start of the partition!
- Click the "Resize/Move" of the dialog and then then the "Apply" toolbar button.
The process may take several minutes - do not abandon it!
- Select the new unallocated free space of ~ 18 GB and push the "New" button.
- Set the file system to "ext3" and label it "oraclexe" and click the "Add" button.
Be sure to label it oraclexe, otherwise the follow-up instructions will fail.
- Finally select "Apply from the toolbar to apply the changes.
- Quit "Gparted", select "Exit" from the desktop and choose "Reboot" to restart the system.
{code}
After the system has restarted, open a terminal command shell.
Login as root:
{code}
sudo su -
{code}
Backup "fstab" and add the UUID of the partition. The "tr" command remove the quotes:
{code}
cp /etc/fstab /etc/fstab_`date +%N`
uuid=`blkid | grep oraclexe | awk '{print $3}'`
uuid=`echo $uuid | tr -d '\042'`
echo $uuid
echo "$uuid /u01 ext3 errors=remount-ro 0 1" >> /etc/fstab
{code}
The UUID is a unique number and should look similar to:
{code}
UUID=d1db753e-b5dd-4a4c-a61e-259c69867b58
{code}
Restart the system:
{code}
reboot
{code}
Verify the success:
{code}
df -h /u01
{code}
h3. 6.b) Setup External Storage
If you prefer to setup an external drive to install Oracle XE, beware that it can be a fatal mistake to make an entry in /etc/fstab to automount your external storage device. An unavailable device in /etc/fstab will prevent a system startup and prompt for appropriate actions at the console.
The following is an example of how to prepare an external storage device to be used for Oracle 11g, including a script to automatically mount an external drive at system startup without the disadvantages of /etc/fstab. The script will also take into consideration that a device name might shift if you attach additional devices.
To find out which USB devices are connected:
{code}
sudo parted -l
{code}
Look for the device that matches your USB storage. For example: /dev/sdb1
{code}
Model: USB 2.0 Flash Disk (scsi)
Disk /dev/sdb: 2064MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 20.5kB 1929MB 1929MB hfs+ mystick
{code}
Initialize the device using ext3 filesystem - this will erase all data. The "-c" option will check for bad blocks (read-only), "-L" is the volume label:
{code}
sudo umount /dev/sdb1
sudo mkfs.ext3 -c -L oraclexe /dev/sdb1
{code}
Install the pmount distribution package:
{code}
sudo apt-get install pmount
{code}
Login as root:
{code}
sudo su -
{code}
Cut & paste the following into the command prompt (not a text editor):
{code}
cat > /etc/init.d/oracle-mount <<-EOF
#! /bin/sh
# /etc/init.d/oracle-mount
VOL_UUID=alphanumeric
VOL_LABEL=oraclexe
VOL_SYMLINK=/u01
mount=/usr/bin/pmount
uuid2dev() {
VOL_DEVICE="\`blkid | grep \$VOL_UUID | awk '{print \$1}'\`"
VOL_DEVICE="\`echo \$VOL_DEVICE | tr -d ':'\`"
echo \$VOL_DEVICE
case "\$1" in
start)
echo "Starting script /etc/init.d/oracle-mount"
uuid2dev
\$mount \$VOL_DEVICE \$VOL_LABEL
if [ -d /media/\$VOL_LABEL ]; then
echo "Mount \$VOL_DEVICE success"
ln -sf /media/\$VOL_LABEL \$VOL_SYMLINK
else
echo "Error mouting \$VOL_DEVICE"
fi
stop)
echo "Stopping script /etc/init.d/oracle-mount"
uuid2dev
/bin/umount \$VOL_DEVICE 2>/dev/null
if [ "\`/usr/bin/pmount | /bin/grep \$VOL_DEVICE\`" ]; then
echo "Error unmounting \$VOL_DEVICE"
else
rm -f \$VOL_SYMLINK
fi
echo "Usage: /etc/init.d/oracle-u01 {start|stop}"
exit 1
esac
### BEGIN INIT INFO
# Provides: oracle-mount
# Required-Start: \$remote_fs \$syslog
# Required-Stop: \$remote_fs \$syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Mount hotplug-usb drive and create symlink
### END INIT INFO
EOF
{code}
Install the oracle-mount init script:
{code}
chmod 755 /etc/init.d/oracle-mount
update-rc.d oracle-mount defaults 01 99
{code}
Get the UUID of the volume "oraclexe" and update the VOL_UUID in the init script accordingly:
{code}
uuid=`blkid | grep oraclexe | awk '{print $3}'`
echo $uuid
sed -i "s/^VOL_UUID=.*/VOL_$uuid/g" /etc/init.d/oracle-mount
{code}
The UUID of your device will be a unique number, but should be similar to:
{code}
UUID="3f5e9963-b328-49f3-b3e8-a3561ae34106"
{code}
Logout of root and test the init script:
{code}
exit
sudo /etc/init.d/oracle-mount stop
ls /u01
sudo /etc/init.d/oracle-mount start
ls /u01
{code}
Your output should look like:
{code}
Stopping script /etc/init.d/oracle-mount
/dev/sdb1
ls: cannot access /u01: No such file or directory
Starting script /etc/init.d/oracle-mount
/dev/sdb1
Mount /dev/sdb1 success
lost+found
{code}
h2. 7) ORA-00845: MEMORY_TARGET
Oracle 11gR2 XE under Ubuntu 11.10 will result in "ORA-00845: MEMORY_TARGET not support on this system" either at Oracle database startup or during the initial installation. Ubuntu 11.10 uses a new version of the "systemd" system and session manager and has migrated away from /dev/shm and other common directories in favor of /run.
There are several ways how to address the problem. You can either enable /dev/shm shared memory, or change the default memory management of Oracle 11g from AMM (Automatic Memory Management) to ASMM (Automatic Shared Memory Management) as it was in used the previous 10g version. Since AMM is one of the new features of 11g, the following will show you how to make to make AMM work.
Login as root:
{code}
sudo su -
{code}
Cut & paste the following into the command prompt (not a text editor):
{code}
cat > /etc/init.d/oracle-shm <<-EOF
#! /bin/sh
# /etc/init.d/oracle-shm
case "\$1" in
start)
echo "Starting script /etc/init.d/oracle-shm"
# Run only once at system startup
if [ -e /dev/shm/.oracle-shm ]; then
echo "/dev/shm is already mounted, nothing to do"
else
rm -f /dev/shm
mkdir /dev/shm
mount -B /run/shm /dev/shm
touch /dev/shm/.oracle-shm
fi
stop)
echo "Stopping script /etc/init.d/oracle-shm"
echo "Nothing to do"
echo "Usage: /etc/init.d/oracle-shm {start|stop}"
exit 1
esac
### BEGIN INIT INFO
# Provides: oracle-shm
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Bind /run/shm to /dev/shm at system startup.
# Description: Fix to allow Oracle 11g use AMM.
### END INIT INFO
EOF
{code}
Install the oracle-shm init script:
{code}
chmod 755 /etc/init.d/oracle-shm
update-rc.d oracle-shm defaults 01 99
{code}
Restart the system:
{code}
reboot
{code}
Verify the success:
{code}
sudo cat /etc/mtab | grep shm
{code}
{code}
none /run/shm tmpfs rw,nosuid,nodev 0 0
/run/shm /dev/shm none rw,bind 0 0
{code}
The upper limit of shared memory under Linux is set to 50 % of the installed RAM by default. If your system has less than 2 GB of RAM installed, there is still a chance to run into ORA-00845 error if your shared memory is used by other software.
The verify available shared memory, type the following commands:
{code}
sudo df -h /run/shm
{code}
h2. 8) Installing Oracle 11gR2 Express Edition
The final release version of Oracle 11gR2 Express Edition can be downloaded for free at http://otn.oracle.com/database/express-edition/downloads. The software should automatically downloaded into the "Downloads" folder of your home directory.
Enter the following commands to unpack the installer:
{code}
cd ~/Downloads
unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
rm oracle-xe-11.2.0-1.0.x86_64.rpm.zip
{code}
The Debian Linux based package management of Ubuntu is not compatible with the Red Hat package manager. The Oracle installer needs to be converted using the following commands:
{code}
cd ~/Downloads/Disk1
sudo alien --to-deb --scripts oracle-xe-11.2.0-1.0.x86_64.rpm
(This may take a few minutes)
rm oracle-xe-11.2.0-1.0.x86_64.rpm
{code}
The following needs to be set for compatibility:
{code}
sudo ln -s /usr/bin/awk /bin/awk
sudo mkdir /var/lock/subsys
{code}
Ubuntu uses different tools to manage services and system startup scripts. The "chkconfig" tool required by the Oracle installer is not available in Ubuntu. The following will create a file to simulate the "chkconfig" tool.
Login as root:
{code}
sudo su -
{code}
Copy & paste the following *directly* into the command prompt to create a file:
{code}
cat > /sbin/chkconfig <<-EOF
#!/bin/bash
# Oracle 11gR2 XE installer chkconfig hack for Debian based Linux (by dude)
# Only run once.
echo "Simulating /sbin/chkconfig..."
if [[ ! \`tail -n1 /etc/init.d/oracle-xe | grep INIT\` ]]; then
cat >> /etc/init.d/oracle-xe <<-EOM
### BEGIN INIT INFO
# Provides: OracleXE
# Required-Start: \\\$remote_fs \\\$syslog
# Required-Stop: \\\$remote_fs \\\$syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Oracle 11g Express Edition
### END INIT INFO
EOM
fi
update-rc.d oracle-xe defaults 80 01
EOF
{code}
Exit root:
{code}
exit
{code}
Set execute privileges:
{code}
sudo chmod 755 /sbin/chkconfig
{code}
Install Oracle 11gR2 Express Edition entering the following commands:
{code}
cd ~/Downloads/Disk1
sudo dpkg --install ./oracle-xe_11.2.0-2_amd64.deb
(This may take a couple of minutes)
{code}
Run the configuration script to create (clone) the database and follow the screen. Accept the default answers, including "y" to startup the database automatically, or modify as required.
{code}
sudo /etc/init.d/oracle-xe configure
(This can take a few minutes - the installation completed successfully.)
{code}
To verify success, the procedure should end showing:
{code}
Starting Oracle Net Listener...Done
Configuring database...Done
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.
{code}
Set a password for the Oracle account:
{code}
sudo passwd oracle
{code}
h2. 9) Post-Installation
In order to use sqlplus and other tools, the Oracle account requires specific environment variables. The following will set these variables automatically at every Oracle login:
Login as the Oracle user:
{code}
su - oracle
{code}
Copy the default account skeleton files and add the Oracle env script to .profile:
{code}
cp /etc/skel/.bash_logout ./
cp /etc/skel/.bashrc ./
cp /etc/skel/.profile ./
echo "" >>./.profile
echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >>./.profile
{code}
By default, the Oracle Database XE graphical user interface is only available at the local server, but not remotely. The following will enable remote logins:
Login as the Oracle user:
{code}
su - oracle
{code}
Login as SYSDBA and execute the following:
{code}
sqlplus / as sysdba
SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
exit
{code}
See http://download.oracle.com/docs/cd/E17781_01/admin.112/e18585/toc.htm for more information.
h3. a) Unity desktop configurations
The Oracle XE menu under the previous Gnome Classic desktop shows several useful scripts to backup the database, start and stop the database, etc. Under the Unity based desktop this menu is not available. You can either switch to the Gnome Classic desktop as outlined in chapter 2, or perform the following steps to modify and copy the scripts as outlined below. The start and stop database scripts will also be modified to perform a progress feedback.
Login as user root:
{code}
sudo su -
{code}
Convert desktop files:
{code}
cd /usr/share/applications
sed -i 's/Categories.*/Categories=Database;Office;Development;/g' oraclexe*
sed -i 's/MultipleArgs/X-MultipleArgs/g' oraclexe*
sed -i 's/MimeType.*/MimeType=application\/x-database/g' oraclexe*
sed -i 's/.png//g' oraclexe*
sed -i 's/Terminal=false/Terminal=true/g' oraclexe-startdb.desktop
sed -i 's/Terminal=false/Terminal=true/g' oraclexe-stopdb.desktop
{code}
Exit root:
{code}
exit
{code}
Login as user Oracle:
{code}
su - oracle
{code}
Modify database start and stop scripts:
{code}
cd /u01/app/oracle/product/11.2.0/xe/config/scripts
cp startdb.sh start.sh_orig
cp stopdb.sh stopdb.sh_orig
sed -i 's/>.*//g' startdb.sh
sed -i 's/>.*//g' stopdb.sh
{code}
You will need SYSDBA privileges and set Oracle environment variables in order to use your regular user account.
Login to your regular user account:
{code}
su - dude
{code}
Enter the folowing command:
{code}
sudo usermod -a -G dba dude
{code}
Then update your profile to automatically set the necessary Oracle environment variables:
{code}
echo "" >>./.profile
echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >>./.profile
{code}
Update your Desktop folder to contain useful Oracle XE scripts:
{code}
cp /usr/share/applications/oraclexe* ~/Desktop
chmod 750 ~/Desktop/oraclexe*
{code}
To verify success re-login and try "sqlplus":
{code}
su - oracle
sqlplus / as sysdba
{code}
h2. 10) Tips and Troubleshooting
h3. 10. a) Port 1521 appears to be in use by another application
Error: Port 1521 appears to be in use by another application. Specify a different port.This error happens after a previously unsuccessful configuration attempt using /etc/init.d/oracle-xe configure script. The script was able to start the Listener process, but most likely failed to continue to clone the database, e.g. ORA-00845. The following should correct the problem:
Determine the oracle listener process that is already running:
{code}
$ ps -ef | grep oracle
{code}
Your output should be similar to:
{code}
oracle 19789 1 0 19:46 ? 00:00:00 /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr
{code}
Then kill the process, using the appropriate process id, for instance:
{code}
$ sudo kill -9 19789
{code}
h3. 10.b) cannot touch `/var/lock/subsys/listener': No such file or directory
Starting Oracle Net Listener...touch: cannot touch `/var/lock/subsys/listener': No such file or directoryThis error occurs when you run /etc/init.d/oracle-xe configure, but failed the preinstallation step to create the /var//lock/subsys directory as outlined in chapter 8.
h3. 10.c) ORA-00845: MEMORY_TARGET
ORA-00845: MEMORY_TARGET not supported on this system See chapter 7 to enable /dev/shm and verify free space available in /run/shm
h3. 10.d) Apex ADMIN password
According to the Oracle documentation, the password for the INTERNAL and ADMIN Oracle Application Express user accounts is initially the same as the SYS and SYSTEM administrative user accounts. Well, I tried several times without success. To reset the Apex Admin password:
Login as user oracle:
{code}
su - oracle
{code}
Login as SYSDBA and type the following:
{code}
sqlplus / as sysdba
{code}
At the SQL prompt, type the following to be prompted to change the password:
{code}
SQL> @?/apex/apxxepwd.sql
exit
{code}
When done, open your browser and go to http://127.0.0.1:8080/apex
Workspace: Internal
Username: ADMIN
Password: password you set with apxxepwd.sql
I will prompt you to reset the password:
old password: password you set with apxxepwd.sql
new password: final_password
You can also login as the Apex Admin using http://127.0.0.1:8080/apex/apex_admin
h3. 10.e) SYS and SYSTEM password
Use the following commands to reset the SYS and SYSTEM passwords if necessary:
Login as the Oracle user:
{code}
su - oracle
{code}
Login as SYSDBA and type the following at the SQL prompt:
{code}
sqlplus / as sysdba
SQL> alter user sys identified by "password" account unlock;
SQL> alter user system identified by "password" account unlock;
SQL> exit
{code}
h3. 10.f) Uninstall Oracle 11g XE
The following will completely uninstall and remove Oracle 11g XE:
Open a terminal seesion and login as user root:
{code}
sudo su -
{code}
Enter the following:
{code}
/etc/init.d/oracle-xe stop
dpkg --purge oracle-xe
rm -r /u01/app
rm /etc/default/oracle-xe
update-rc.d -f oracle-xe remove
update-rc.d -f oracle-mount remove
update-rc.d -f oracle-shm remove
{code}
h3. 10.g) Reconfigure Oracle 11g XE
Type the following commands in a terminal window:
{code}
sudo /etc/init.d/oracle-xe stop
sudo rm /etc/default/oracle-xe
sudo /etc/init.d/oracle-xe configure
{code}
h3. 10.h) Gnome Classic desktop
Ubuntu 11 moved from the Gnome Classic desktop to Unity and removed the "Ubuntu Classic" login option. Unity was designed to make more efficient use of space given a limited screen size and touch screens. If you prefer to use the Gnome Classic desktop, enter the following into a terminal window:
{code}
sudo apt-get install gnome-panel
{code}
To log into the Gnome Classic desktop, select the "Gearwheel" at the login screen and select "Gnome Classic".
h3. 10.i) Unix vi cursor keys
The instructions in this tutorial do not require the use of any text editor. However, if you would like use the backspace and cursor keys in the "vi-editor", the following needs to be installed:
{code}
sudo apt-get install vim
{code}
h3. 10.j) Backup Database
In order to perform an online database backup using the supplied "Backup Database" script, the database needs to run in Archive-Log mode. This can be setup using the following commands:
Login as the Oracle user:
{code}
su - oracle
{code}
Login as SYSDBA and type the following:
{code}
sqlplus / as sysdba
SQL> shutdown immediate
SQL> startup mount
SQL> alter database archivelog;
SQL> alter database open;
SQL> exit
{code}
h2. 11) History
Version: A, 24-Oct-2011
- first release
Version: B, 25-Oct-2011
- reduced instructions.
- corrected errors in 6a and 8.
- new strategy addressing ORA-00845 error.
- rework of chapter 10.
Version: C, 30-Nov-2011
- corrected typo in 6a
- new procedures in 9a.
- added progress feedback to database scripts.
Version D, 14-Jan-2012
- corrected presentation errors.
- reorganized instructions.
h3. 12) References
http://download.oracle.com/docs/cd/E17781_01/install.112/e18802/toc.htm
http://askubuntu.com/questions/57297/why-has-var-run-been-migrated-to-run
http://lwn.net/Articles/436012/
https://forums.oracle.com/forums/thread.jspa?threadID=2300750&tstart=0
Kind regards and best of luck!
Dude.Excellent Blog. Thank You
Small clarification on Step **6) Oracle Home Directory, ...a) Resize the Root Partition**
Ubuntu 11.10 has Gparted available as a Ubuntu software download, DONT use that while trying the above step, instead download the ISO file from http://sourceforge.net/projects/gparted/files/gparted-live-stable/ gparted-live-0.12.0-5.iso (124.6 MB)
Burn that ISO file on a Blank DVD, reboot the Ubuntu , during startup select Boot from DVD Option if not already selected. this will take to Boot Menu Options of Gparted Live then select the first menu option, and this allows to do further action such as Re-sizing .
and once you have chosen and executed step a) . do NOT run step b) also that is "Setup External Storage"
I hope this minor clarification can avoid some confusion
Regards
Madhusudhan Rao
Edited by: MadhusudhanRao on Mar 24, 2012 11:30 PM -
Install Oracle 11gR2 Express Edition on Ubuntu Linux 11.04 (64-bit) Howto
h2. Install Oracle 11gR2 Express Edition on Ubuntu Linux 11.04 (64-bit) Howto
Version: B
Author: Dude, 24. May 2011
The following are step by step instructions how to install Oracle 11gR2 Express Edition (Beta) under Linux Ubuntu 11.04, 64-bit.
Access to the Internet is required.
The instructions cover the following additional topics:
- Converting Red Hat based Oracle XE installer to Ubuntu.
- Work-around for missing /sbin/chkconfig tool.
- Install Oracle XE into a different directory or disk volume.
- Relocate and configure the Oracle user and default login directory.
- Uninstall, reconfigure and perform first database backup.
- Notes and web links.
- Troubleshooting
h3. A) System Setup and Prerequisites
h4. A.1. System Access
You will need terminal command line, root and system console access to perform the setup tasks.
To open a Terminal at the system console:
Menu Applications > Accessories > TerminalThe following commands will enable remote ssh login with root access:
sudo apt-get install openssh-server
sudo passwd root
Verify:
ssh root@xe_server_host_nameh4. A.2. Software Prerequisites
The following is required in order to install Oracle 11gR2 XE:
sudo apt-get install alien libaio1 unixodbcThe following is not required, but it will fix backspace and arrow keys in case you prefer using the vi-editor:
sudo apt-get install vimh4. A.3. System Swap space
Minimum swap space required is 2 GB. You can increase swap space if necessary using a swap file:
To analyze current swap space and memory configuration:
sudo cat /proc/meminfo
To install a 1 GB swapfile named swapfile in /, for example:
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
(this may take a while)
sudo mkswap /swapfile
sudo swapon /swapfile
sudo cp /etc/fstab /etc/fstab.orig
sudo echo '/swapfile swap swap defaults 0 0' >> /etc/fstab
Verify:
sudo swapon -a
sudo swapon -sh4. A.4. Kernel Parameters
Oracle 11g XE requires the following additional kernel parameters:
sudo nano /etc/sysctl.d/60-oracle.conf
(Enter the following)
# Oracle 11g XE kernel parameters
fs.file-max=6815744
net.ipv4.ip_local_port_range=9000 65000
kernel.sem=250 32000 100 128
kernel.shmmax=536870912
(Save the file)
Note: kernel.shmmax = max possible value, e.g. size of physical RAM.
Verify: sudo cat /etc/sysctl.d/60-oracle.conf
Load new kernel parameters:
sudo service procps start
Verify:
sudo sysctl -q fs.file-max
-> fs.file-max = 6815744h4. A.5. Oracle Installation Directory
The current Oracle Installation Guide uses the same directory like in previous versions: /usr/lib/oracle/xe/app/oracle/product/11.2.0/server. However, the current Beta installation uses Oracle Flexible Architecture (OFA) and installs into /u01/app/oracle/product/11.2.0/xe. Due to size limitations of Oracle XE it may not be necessary to store the installation to a specific directory or separate volume, but it is possible:
Install Oracle XE to separate disk volume:
From the system console menu: System > Administration > Disk Utility
Select "ext3" filesystem for Oracle compatibility and specify a Volume label, e.g. Oracle.
Notice the device name e.g. /dev/sdb
Get the drive UUID:
sudo blkid
e.g. /dev/sdb: UUID="d19a2d8f-da43-4802-8bdb-0703c855e23a"
Modify /etc/fstab to automatically mount the volume at system startup:
sudo cp /etc/fstab /etc/fstab.original
sudo nano /etc/fstab
(Add the following, using determined UUID, for exmple)
UUID=d19a2d8f-da43-4802-8bdb-0703c855e23a /u01 ext3 defaults,errors=remount-ro 0 1
(Save the file)
Create the mount-point, mount the new volume and set ownership and privileges:
sudo mkdir /u01
sudo mount -a
sudo chown root:root /u01
sudo chmod 755 /u01
Verify:
df -h
or restart the systemYou can also install Oracle XE into a specific directory:
Create a symbolic link to store the installation into an existing directory, for instance:
sudo mkdir /home/oracle-xe
sudo ln -s /home/oracle-xe /u01h3. C) Oracle 11g XE Download and Installation
h4. C.1. Download and convert the Installer from Red Hat to Ubuntu
Please see section E.3. to download the Oracle 11gR2 XE installer.
Select the version listed for Linux x64.
sudo unzip linux.x64_11gR2_OracleXE.zip
sudo alien --to-deb --scripts oracle-xe-11.2.0-0.5.x86_64.rpm
(This may take a while)h4. C.2. Create a special chkconfig script
The Red Hat based installer of Oracle XE 11gR2 beta relies on +/sbin/chkconfig+, which is not used in Ubuntu. The chkconfig package available for the current version of Ubuntu produces errors and my not be safe to use. Below is a simple trick to get around the problem and install Oracle XE successfully:
Create /sbin/chconfig:
sudo nano /sbin/chkconfig
(Cut and paste the following)
#!/bin/bash
# Oracle 11gR2 XE installer chkconfig hack for Debian by Dude
file=/etc/init.d/oracle-xe
if [[ ! `tail -n1 $file | grep INIT` ]]; then
echo >> $file
echo '### BEGIN INIT INFO' >> $file
echo '# Provides: OracleXE' >> $file
echo '# Required-Start: $remote_fs $syslog' >> $file
echo '# Required-Stop: $remote_fs $syslog' >> $file
echo '# Default-Start: 2 3 4 5' >> $file
echo '# Default-Stop: 0 1 6' >> $file
echo '# Short-Description: Oracle 11g Express Edition' >> $file
echo '### END INIT INFO' >> $file
fi
update-rc.d oracle-xe defaults 80 01
(Save the file)
Set appropriate execute privileges:
chmod 755 /sbin/chkconfig
Note: You should remove the /sbin/chkconfig file after successful installation of Oracle XE.
h4. C.3. Install and configure Oracle XE
sudo dpkg --install ./oracle-xe_11.2.0-1.5_amd64.deb
/etc/init.d/oracle-xe configure
(This will take a while)
Remove the /sbin/chkconfig script, which is no longer needed.
sudo rm /sbin/chkconfigh4. C.4. Relocate and Configure the Oracle user login
The Oracle XE installer specifies /u01/app/oracle as the login directory for the Oracle user. Although not really necessary, the following will relocate the Oracle user $HOME to a standard location and create standard /etc/skel login files:
Exit all Oracle user sessions:
sudo /etc/init.d/oracle-xe stop
sudo kill -9 `ps -ef | grep oracle | grep -v grep | awk '{print $2}'`
sudo userdel oracle
sudo useradd -s /bin/bash -G dba -g dba -m oracle
sudo passwd oracle
Verify:
sudo id oracle
-> uid=1001(oracle) gid=1001(dba) groups=1001(dba)h4. C.5. Setup Oracle environment variables
In order to use sqlplus and other tools, the Oracle account requires certain environment variables. The following will set these variables automatically at every interactive Oracle login:
sudo echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >> /home/oracle/.bashrch4. C.6. Oracle sudo root access
It is not essential to allow the Oracle user to use sudo, but it is convenient:
usermod -G admin oracle
Verify:
id oracle
-> uid=1001(oracle) gid=1001(dba) groups=1001(dba),120(admin)
sudo su -
-> Enter Oracle account passwordh4. C.7. Oracle 11g XE Post-installation
After you install Oracle Database XE, its graphical user interface is only available from the local server, but not remotely.
The following will correct the problem if necessary:
Login as user Oracle or use:
su - oracle
sqlplus / as sysdba
At the SQL prompt, enter the following command:
EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
exith3. D) Unintstall, Reconfigure and Troubleshooting
h4. D.1. Uninstall Oracle 11g XE
The following will completely uninstall and remove Oracle 11g XE:
Login as user root:
sudo su -
/etc/init.d/oracle-xe stop
dpkg --purge oracle-xe
rm -r /u01/app
rm /etc/default/oracle-xe
update-rc.d -f oracle-xe removeh4. D.2. Reconfigure Oracle 11g XE
Type the following in a terminal window:
/etc/init.d/oracle-xe stop
sudo rm /etc/default/oracle-xe
/etc/init.d/oracle-xe configureh4. D.3. Enable Archivelog mode and perform a database backup
Login as user Oracle:
su - oracle
sqlplus / as sysdba
At the SQL prompt, enter the following commands:
shutdown immediate
startup mount
alter database archivelog;
alter database open;
exit
Login to system console of the Oracle user account:
Select Applications > Oracle Database 11g Express Edition > Backup Databaseh3. E) Notes
h4. E.1. Oracle 11g XE limitiations overview
- It will consume, at most, processing resources equivalent to one CPU.
- Only one installation of Oracle Database XE can be performed on a single computer.
- The maximum amount of user data in an Oracle Database XE database cannot exceed 11 GB.
- The maximum amount of RAM that Oracle XE uses cannot exceed 1 GB, even if more is available.
- HTTPS is not supported natively with the HTTP listener built into Oracle Database XE.
h4. E.2. Documentation and Links
Official documentation for Oracle 11gR2 XE can be found at:
http://www.oracle.com/pls/xe112/homepage
h4. E.3. Oracle 11g XE downloads
The Installer is available from the Oracle Technology Network at:
http://www.oracle.com/technology/products/database/xe
http://www.oracle.com/technetwork/database/express-edition/downloads/index.html
h4. E.4 APEX links and archives
The APEX archives can be found at:
http://www.oracle.com/technetwork/developer-tools/apex/application-express/all-archives-099381.html
The APEX download site is:
http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html
h3. F) Troubleshooting
... in progress
Regards and best of luck!
Edited by: Dude on May 25, Version B: various corrections. chkconfig package (A.2.) not required.even though I am admin user.Admin user is a MS Windows term, that does not apply to Linux or Unix in the same fashion.
The configuration script tells you "You must be root user to run the configure script. Login as root user and
then run the configure script."
This is most likely correct because your account is not root and does not have UID 0. What you can do is to login as root e.g. sudo su -, as the message suggest, or use "sudo /etc/init.d/oracle-xe configure", provided your account is defined in the /etc/sudoers file to perform root/admin actions.
Btw, do not modify /etc/passwd and /etc/group to give you admin privileges or try to create a another root account under a different name. That's not the way it works and usually leads to nasty problems. -
Hidden parameters appears after Oracle 11gR2 upgrade
Platform: HP-UX B.11.31 U ia64
Upgrading from: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
Upgrading to : Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
Issue : There are around 130 hidden parameter appear after Oracle 11gR2 upgrade.
Before upgrade I have commented the hidden parameters on the PFILE. PFILE only to start the database for the Oracle 11gR2 upgrade.
Before upgrade, checking the hidden parameter:
SQL> SELECT name,description from SYS.V$PARAMETER WHERE name LIKE '\_%' ESCAPE '\';
optimizerextended_cursor_sharing_rel
optimizer extended cursor sharing for relational operators
allowlevel_without_connect_by
allow level without connect by
I am using client parameter file ( PFILE ) commented the hidden parameters highlighted above.
However after successful upgrade to 11gR2, creating SPFILE from the PFILE ( commented the hidden parameters) now i am getting 132 hidden parameters.
SQL> select count(1) from sys.V$PARAMETER where name like '\_%' escape '\';
COUNT(1)
132
SQL> select name from sys.V$PARAMETER where name like '\_%' escape '\';
name
aggregationoptimization_settings
alwaysanti_join
alwayssemi_join
andpruning_enabled
btree_bitmap_plans
bloomfilter_enabled
bloomfolding_enabled
bloompruning_enabled
complexview_merging
compressioncompatibility
connectby_use_union_all
convertset_to_join
costequality_semi_join
cputo_io
dimensionskip_null
eliminatecommon_subexpr
enabletype_dep_selectivity
fastfull_scan_enabled
firstk_rows_dynamic_proration
gbyhash_aggregation_enabled
generalizedpruning_enabled
globalindexpnum_filter_enabled
gsanti_semi_join_allowed
improvedouterjoin_card
improvedrow_length_enabled
indexjoin_enabled
ksbrestart_policy_times
leftnested_loops_random
localcommunication_costing_enabled
minimalstats_aggregation
mmvquery_rewrite_enabled
newinitial_join_orders
newsort_cost_estimate
nljbatching_enabled
optimadjust_for_part_skews
optimenhance_nnull_detection
optimnew_default_join_sel
optimpeek_user_binds
optimizeradaptive_cursor_sharing
optimizerbetter_inlist_costing
optimizercbqt_no_size_restriction
optimizercoalesce_subqueries
optimizercomplex_pred_selectivity
optimizercompute_index_stats
optimizerconnect_by_combine_sw
optimizerconnect_by_cost_based
optimizerconnect_by_elim_dups
optimizercorrect_sq_selectivity
optimizercost_based_transformation
optimizercost_hjsmj_multimatch
optimizercost_model
optimizerdim_subq_join_sel
optimizerdistinct_agg_transform
optimizerdistinct_elimination
optimizerdistinct_placement
optimizereliminate_filtering_join
optimizerenable_density_improvements
optimizerenable_extended_stats
optimizerenable_table_lookup_by_nl
optimizerenhanced_filter_push
optimizerextend_jppd_view_types
optimizerextended_cursor_sharing
optimizerextended_cursor_sharing_rel
optimizerextended_stats_usage_control
optimizerfalse_filter_pred_pullup
optimizerfast_access_pred_analysis
optimizerfast_pred_transitivity
optimizerfilter_pred_pullup
optimizerfkr_index_cost_bias
optimizerfull_outer_join_to_outer
optimizergroup_by_placement
optimizerimprove_selectivity
optimizerinterleave_jppd
optimizerjoin_elimination_enabled
optimizerjoin_factorization
optimizerjoin_order_control
optimizerjoin_sel_sanity_check
optimizermax_permutations
optimizermode_force
optimizermulti_level_push_pred
optimizernative_full_outer_join
optimizernew_join_card_computation
optimizernull_aware_antijoin
optimizeror_expansion
optimizerorder_by_elimination_enabled
optimizerouter_join_to_inner
optimizerouter_to_anti_enabled
optimizerpush_down_distinct
optimizerpush_pred_cost_based
optimizerrownum_bind_default
optimizerrownum_pred_based_fkr
optimizerskip_scan_enabled
optimizersortmerge_join_inequality
optimizersqu_bottomup
optimizerstar_tran_in_with_clause
optimizersystem_stats_usage
optimizertable_expansion
optimizertransitivity_retain
optimizertry_st_before_jppd
optimizerundo_cost_change
optimizerunnest_corr_set_subq
optimizerunnest_disjunctive_subq
optimizeruse_cbqt_star_transformation
optimizeruse_feedback
orexpand_nvl_predicate
orderednested_loop
parallelbroadcast_enabled
partitionview_enabled
pivotimplementation_method
prerewrite_push_pred
predmove_around
pushjoin_predicate
pushjoin_union_view
pushjoin_union_view2
pxminus_intersect
pxpartition_scan_enabled
pxpwg_enabled
pxual_serial_input
queryrewrite_setopgrw_enable
removeaggr_subquery
replacevirtual_columns
resourcemanager_plan
rightouter_hash_enable
selfjoinmv_duplicates
sqlmodel_unfold_forloops
sqltunecategory_parsed
subquerypruning_enabled
subquerypruning_mv_enabled
tablescan_cost_plus_one
unionrewrite_for_gs
unnestsubquery
usecolumn_stats_for_functionI just came across a similar case: 1 (just one) of our (RAC-) databases has 130-something underscore-parameters set to non-default values.
version is still 11.1.0.7 (e.g. not 11gR2).
All of those hidden parameters seem to be CBO related (list on request).
Weird is: Only one of our (very similar, supposedly same-config) databases have these hidden parameters set.
Colleagues justly wonder: Who, When, What has caused these parameters to be expliclty set for this one system?
Note: we do not have the complete history of this system documented (systems have been managed by 3 different parties already).
It is quite possible they came in with some patch or upgrade (catupgr?) somewhere between 11.1.0.1 and 11.1.0.7, but a confirmation would be nice.
Information welcome.
System info:
Linux hostname 2.6.18-164.9.1.el5 #1 SMP Wed Dec 9 03:27:37 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
Versions
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
5 rows selected. -
Hi ,
We are migrating from oracle 10gR2 on AIX 5.3 to oracle 11gR2 on AIX 6.1 (64bit Kernal) . As pat of this , we need to migrate all the pro*c codes and for that we are trying to complie those files on the new server . But while compiling , we are getting error as :
*1586-119 (U) The 32-bit file "/lib/crt0_64.o" is being linked in 64-bit mode, or vice versa.*
We have only one library in $ORACLE_HOME which is lib..Lib32 is not present .
Could you please help me in resolving this error ?
The details , that I feel will be helpful ,is provided below :
COMP_PROC ]>echo $ORACLE_HOME
*/data/oracle/product/11.2.0.2*
*/COMP_PROC ]>echo $LD_LIBRARY_PATH*
*/data/oracle/product/11.2.0.2/lib*
COMP_PROC ]>echo $LIBPATH
*/data/oracle/product/11.2.0.2/lib*
COMP_PROC ]>echo $PATH
*/data/oracle/product/11.2.0.2:/data/oracle/product/11.2.0.2/bin:/applications/tf3/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/bin:.::/dbjobs/utils/adsm:.:/applications/tf3/bin:/applications/tf3/bin/ctm/source:/usr/vac/bin:/applications/tf3/bin:/usr/lib:/tshome/tfapp:/tshome/tfapp/app/genio::/tshome/tfapp/app/genio/odbc:/tshome/tfapp/app/genio/odbc/lib:/data/oracle/product/11.2.0.2/lib:/data/oracle/product/11.2.0.2/bin:/tshome/tf01/:/usr/bin:/etc:/usr/sbin:/usr/ucb:/tshome/tfapp/bin:/usr/bin/X11:/sbin*
Compiler version :
COMP_PROC ]>cc -v
exec: /usr/bin/pg(/usr/bin/pg,/usr/vac/exe/default_msg/vac.help,NULL)
C for AIX Compiler, Version 6
os version :
COMP_PROC ]>uname -a
AIX 1 6 00F6249E4C00
Make file :
# File : makeheader.h #
# Description : #
# The target 'build' puts together an executable $(EXE) from the .o files
# in $(OBJS) and the libraries in $(PROLDLIBS). It is used to build the
# c sample programs. The rules to make .o files from .c and .pc files are
# later in this file.
# ($(PROLDLIBS) includes the client shared library, and $(STATICPROLDLIBS) does
# not.)
# Here are some rules for converting .pc -> .c -> .o and for .typ -> .h.
# If proc needs to find .h files, it should find the same .h files that the
# c compiler finds. We use a macro named INCLUDE to hadle that. The general
# format of the INCLUDE macro is
# INCLUDE= $(I_SYM)dir1 $(I_SYM)dir2 ...
# Normally, I_SYM=-I, for the c compiler. However, we have a special target,
# pc1, which calls $(PROC) with various arguments, include $(INCLUDE). It
# is used like this:
# $(MAKE) -f $(MAKEFILE) <more args to make> I_SYM=include= pc1
# This is used for some of $(SAMPLES) and for $(OBJECT_SAMPLE).
USERID=xxxxx/yyyyy@zzzzzzz
SHELL=/bin/ksh
MQMLIBS=/usr/lpp/mqm/lib/libmqm.a
MQMCLIENTLIBS=/usr/lpp/mqm/lib/libmqic.a
#MQMLIBS=/pvcs/compile/proc/libmqm.a
CONVLIBS=/usr/lib/libiconv.a
NETWORKHOME=$(ORACLE_HOME)/network/
PLSQLHOME=$(ORACLE_HOME)/plsql/
#INCLUDE=$(I_SYM). $(I_SYM)$(PRECOMPHOME)public $(I_SYM)$(RDBMSHOME)public $(I_SYM)$(RDBMSHOME)demo $(I_SYM)$(PLSQLHOME)public $(I_SYM)$(NETWORKHOME)public
I_SYM=-I
AS_EXT=s
LIB_EXT=a
OBJ_EXT=o
PLB_EXT=plb
SO_EXT=so
LOCK_EXT=lk
SQL_EXT=sql
SYM_EXT=sym
LIB_PREFIX=lib
LDLIBFLAG=-l
LDPATHFLAG=-L
AS=as
AWK=awk
CAT=cat
CC=/usr/vac/bin/cc
CD=cd
CHMOD=chmod
CP=cp
CPP=cpp
DATE=date
ECHO=echo
ECHON=echo -n
EXEC=exec
FIND=find
FOLLOW=-follow
NOLEAF=-noleaf
GREP=grep
KILL=kill
SLEEP=sleep
LD=ld
LMAKE=make
LN=ln
LNS=ln -s
MKDIR=mkdir
MKDIRP=mkdir -p
MV=mv
NM=nm
PERL=perl
RM=rm
RMF=rm -f
RMRF=rm -rf
SED=sed
SORT=sort
TOUCH=touch
XARGS=xargs
LS=ls
SPFLAGS=
MATHLIB=-lm
LOCALLIBS=
OPTIMIZE=-O5
OTHERLIBS = `cat $(ORACLE_HOME)/lib/sysliblist`
CCFLAGS= -g
SO=a
LLIBTHREAD=-lpthreads
EXOSLIBS=
LIBBSD=
SECLIBS=
M6LIBS=
LIBHOME=$(ORACLE_HOME)/lib
VER =11
BASENAME =n
NETWORKHOME = $(ORACLE_HOME)/network/
NETWORKLIB = $(NETWORKHOME)lib/
RONAME=${BASENAME}ro${VER}
PFLAGS=
PFLAGS= $(INCLUDE) $(SPFLAGS) $(LPFLAGS)
RDBMS_VERSION = 11
LIBSERVERNAME=server$(RDBMS_VERSION)
LIBSERVER=$(LIBHOME)$(LIB_PREFIX)$(LIBSERVERNAME).$(LIB_EXT)
LLIBSERVER=$(LDLIBFLAG)$(LIBSERVERNAME)$(LIB_SUFFIX)
LIBCLIENTNAME=client$(RDBMS_VERSION)
LIBCLIENT=$(LIBHOME)$(LIB_PREFIX)$(LIBCLIENTNAME).$(LIB_EXT)
LLIBCLIENT=$(LDLIBFLAG)$(LIBCLIENTNAME)
LIBGENERICNAME=generic$(RDBMS_VERSION)
LIBGENERIC=$(LIBHOME)$(LIB_PREFIX)$(LIBGENERICNAME).$(LIB_EXT)
LLIBGENERIC=$(LDLIBFLAG)$(LIBGENERICNAME)
LIBDSBTSHNAME=dsbtsh$(RDBMS_VERSION)
LIBDSBTSH=$(RDBMSLIB)$(LIB_PREFIX)$(LIBDSBTSHNAME).$(SO_EXT)
LIBSKGXPNAME=skgxp$(RDBMS_VERSION)
LIBSKGXP=$(LIBHOME)$(LIB_PREFIX)$(LIBSKGXPNAME).$(SKGXP_EXT)
LLIBSKGXP=$(LDLIBFLAG)$(LIBSKGXPNAME)
LIBCOMMONNAME=common$(RDBMS_VERSION)
LIBCOMMON=$(LIBHOME)$(LIB_PREFIX)$(LIBCOMMONNAME).$(LIB_EXT)
LLIBCOMMON=$(LDLIBFLAG)$(LIBCOMMONNAME)
LIBVSNNAME=vsn$(RDBMS_VERSION)
LIBVSN=$(LIBHOME)$(LIB_PREFIX)$(LIBVSNNAME).$(LIB_EXT)
LLIBVSN=$(LDLIBFLAG)$(LIBVSNNAME)
LIBAGENTNAME=agent$(RDBMS_VERSION)
LIBAGENT=$(LIBHOME)$(LIB_PREFIX)$(LIBAGENTNAME).$(LIB_EXT)
LLIBAGENT=$(LDLIBFLAG)$(LIBAGENTNAME)
LIBDBTOOLSNAME=dbtools$(RDBMS_VERSION)
LIBDBTOOLS=$(RDBMSLIB)$(LIB_PREFIX)$(LIBDBTOOLSNAME).$(LIB_EXT)
#DEF_ON= $(RDBMSLIB)kpudfo.$(OBJ_EXT)
#DEF_OFF= $(RDBMSLIB)kpundf.$(OBJ_EXT)
#DEF_OPT= $(RDBMSLIB)defopt.$(OBJ_EXT)
LIBSLAXNAME=slax8
LIBSLAX=$(LIBHOME)$(LIB_PREFIX)$(LIBSLAXNAME).$(LIB_EXT)
LLIBSLAX=$(LDLIBFLAG)$(LIBSLAXNAME)
LIBSQLNAME=sql11
LIBSQL=$(LIBHOME)/$(LIB_PREFIX)$(LIBSQLNAME).$(LIB_EXT)
LLIBSQL=$(LDLIBFLAG)$(LIBSQLNAME)
#SCOREPT = $(LIBHOME)/scorept.$(OBJ_EXT)
#SSCOREED = $(LIBHOME)/sscoreed.$(OBJ_EXT)
LIBORA=$(LIBCLIENT) $(LIBCOMMON) $(LIBGENERIC)
LLIBORA=$(LLIBCLIENT) $(LLIBCOMMON) $(LLIBGENERIC)
LIBSQLNET = $(LDFLAGSLIST) $(ANOLIBD) $(PROTOCOLLIBD) $(NATIVELIBD) $(NATIVESYSLIBD) $(LIBNETWORK) $(LIBNL)
LLIBSQLNET = $(LDFLAGSLIST) $(ANOLIBS) $(PROTOCOLLIBS) $(NATIVELIBS) $(NATIVESYSLIBS) $(LLIBNETWORK) $(LLIBNL)
LIBRPC = $(LIBHOME)$(LIB_PREFIX)$(RONAME).$(LIB_EXT)
LLIBRPC = $(LDLIBFLAG)$(RONAME)
NETLIBS = $(LLIBSQLNET) $(LLIBRPC) $(LLIBSQLNET)
NETLIBD = $(LIBSQLNET) $(LIBRPC)
LDFLAGSFILE=$(NETWORKLIB)ldflags
LDFLAGSLIST=`$(CAT) $(LDFLAGSFILE)`
LDFLAGSLIST=
LIBNLSRTLNAME = nls11
LIBNLSRTL= $(LIBHOME)$(LIB_PREFIX)$(LIBNLSRTLNAME).$(LIB_EXT)
LLIBNLSRTL= $(LDLIBFLAG)$(LIBNLSRTLNAME)$(LIB_SUFFIX)
CORE_LIB_VER = 11
CORE_LIB_NAME = core
LIBCORE = $(LIBHOME)$(LIB_PREFIX)$(CORE_LIB_NAME)$(CORE_LIB_VER).$(LIB_EXT)
LLIBCORE = $(LDLIBFLAG)$(CORE_LIB_NAME)$(CORE_LIB_VER)
RDBMSHOME=$(ORACLE_HOME)/rdbms/
RDBMSLIB=$(RDBMSHOME)lib/
RDBMSADMIN=$(RDBMSHOME)admin/
LIBCLNTSHNAME=clntsh
LIBCLNTSH=$(LIBHOME)$(LIB_PREFIX)$(LIBCLNTSHNAME).$(SO_EXT)
LLIBCLNTSH=$(LDLIBFLAG)$(LIBCLNTSHNAME)
LIBAGTSHNAME=agtsh
LIBAGTSH=$(LIBHOME)$(LIB_PREFIX)$(LIBAGTSHNAME).$(SO_EXT)
LLIBAGTSH=$(LDLIBFLAG)$(LIBAGTSHNAME)
LIBKNLOPTNAME=knlopt
LIBKNLOPT=$(RDBMSLIB)$(LIB_PREFIX)$(LIBKNLOPTNAME).$(LIB_EXT)
LLIBKNLOPT=$(LDLIBFLAG)$(LIBKNLOPTNAME)
#LIBTRACENAME=trace9
#LIBTRACE=$(LIBHOME)$(LIB_PREFIX)$(LIBTRACENAME).$(LIB_EXT)
#LLIBTRACE=$(LDLIBFLAG)$(LIBTRACENAME)$(LIB_SUFFIX)
#LIBEPC=$(LIBHOME)$(LIB_PREFIX)$(LIBTRACENAME).$(LIB_EXT)
#LLIBEPC=$(LDLIBFLAG)$(LIBTRACENAME)$(LIB_SUFFIX)
CORELIBS = $(LLIBNLSRTL) $(LLIBCV6) $(LLIBCORE) $(LLIBNLSRTL) $(LLIBCORE) \
$(LLIBNLSRTL)
OTHERLIBS=`cat $(ORACLE_HOME)/lib/sysliblist`
DEVTTLIBS=$(NETLIBS) $(LLIBORA) $(NETLIBS) $(LLIBORA) $(LIBPLSHACK) \
$(LLIBEPC) $(CORELIBS) $(SPLIBS) $(LOCALLIBS) $(EXOSLIBS) $(LIBBSD) `cat $(ORACLE_HOME)/lib/sysliblist` $(MATHLIB)
CC=/usr/vac/bin/cc
PCC=proc
PROC=proc CODE=ANSI_C define=_64BIT_ define=_IBM_C define=_LONG_LONG sqlcheck=full userid=$(USERID) oraca=yes mode=oracle unsafe_null=yes dbms=v8
PCCINCLUDE=include=$(ORACLE_HOME)/precomp/lib
PCCFLAGS=$(PCCINCLUDE) sqlcheck=full ltype=none parse=full userid=$(USERID) lines=yes unsafe_null=yes dbms=v8
CFLAGS= $(GFLAG) -qmaxmem=8192 $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(QACCFLAGS) $(PFLAGS) $(SHARED_CFLAG) $(ENV_FLAGS) -L$(LIBHOME)
ECHO=
STATICPROLDLIBS=$(LLIBCLIENT) $(LIBSQL) $(SCOREPT) $(SSCOREED) $(DEF_ON) $(DEVTTLIBS) $(LLIBTHREAD)
PROLDLIBS=$(LLIBCLNTSH) $(STATICPROLDLIBS)
Tail of make.log :
[applications/tf3/bin/COMP_PROC ]>echo $ORACLE_HOME
/data/oracle/product/11.2.0.2
[applications/tf3/bin/COMP_PROC ]>cd $ORACLE_HOME
[data/oracle/product/11.2.0.2 ]>cd install
[data/oracle/product/11.2.0.2/install ]>tail -15 make.log
mv: cannot rename /data/oracle/product/11.2.0.2/bin/nmo to /data/oracle/product/11.2.0.2/bin/nmo0:
No such file or directory
mv /data/oracle/product/11.2.0.2/sysman/lib/nmo /data/oracle/product/11.2.0.2/bin/
make: The error code from the last command is 1.
make: Ignored error code 1 from last command.
/bin/make -f /data/oracle/product/11.2.0.2/sysman/lib/ins_emagent.mk relink_exe EXENAME=nmhs
ld -b64 -o /data/oracle/product/11.2.0.2/sysman/lib/nmhs -L/data/oracle/product/11.2.0.2/lib/ -L/data/oracle/product/11.2.0.2/sysman/lib/ -lld -lm `cat /data/oracle/product/11.2.0.2/lib/sysliblist` -lm /data/oracle/product/11.2.0.2/sysman/lib/s0nmhs.o -lnmhs -lcore11 -lld -lm `cat /data/oracle/product/11.2.0.2/lib/sysliblist` -lm
rm -f /data/oracle/product/11.2.0.2/bin/nmhs.0
cp /data/oracle/product/11.2.0.2/sysman/lib/nmhs /data/oracle/product/11.2.0.2/bin/nmhs.0
mv -f /data/oracle/product/11.2.0.2/bin/nmhs /data/oracle/product/11.2.0.2/bin/nmhs0
mv: cannot rename /data/oracle/product/11.2.0.2/bin/nmhs to /data/oracle/product/11.2.0.2/bin/nmhs0:
No such file or directory
make: The error code from the last command is 1.
make: Ignored error code 1 from last command.
mv /data/oracle/product/11.2.0.2/sysman/lib/nmhs /data/oracle/product/11.2.0.2/bin/
Edited by: Minu on Dec 3, 2011 12:36 AMApparently you are trying to mix 32-bit code and 64-bit code. You must ensure that the 32-bit or 64-bit option is used consistently on every command, compiling and linking. The form of the option can depend on the version of the C compiler you are using, and whether you are on an x86 or sparc system. Consult the Pro*C and C compiler documentation.
-
Oracle 10g RMAN is not working in RHEL 4 after fresh installation
I downloaded Oracle 10g R2 from OTN at home for self study.
I have problem with the RMAN after fresh installation Oracle 10g in RedHat Enterprise Linux AS 4. (x86)
Everything seems works fine, database mounted including EM, SQLPlus, iSQLPlus etc.
But when I attempt to execute RMAN command on the terminal, nothing is happening. No RMAN prompt, No error message!
I ran the "relink all" command but no helps.
Please advice.
Edited by: Surf888 on Nov 16, 2008 9:51 AMI guess you are a common Linux 'victim', you don't invoke Oracle's rman, but a Linux executable:
http://linux.about.com/cs/linux101/g/rman.htm
Check your PATH variable, you may move $ORACLE_HOME/bin to the top.
Werner -
Create a database link to access SqlServer 2005 view from oracle 11gr2
Hi All,
Greetings for the day.
Though I have seen quite a few posts but just wanted to cross-verfiy and double check hence posting.
Oracle Database : 11gr2
OS :SOLARIS SPARC 64 Bit
SQL Server Database : Sql Server 2005
OS : Windows 2003 32 Bit
The requirement is to access a view residing in the SQL Server 2005 Database using the Oracle Database. This involves creation of a Database link in the Oracle Database to access the SQL Server.
Can you suggest which approach should i follow ( I am able to understand that both do the same job ):
How to Configure DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX) post install [ID 562509.1]or
How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install [ID 561033.1]Will they do the same job ? And can they be used on any OS and version of the SQL Server Database as version information for SQL Server is not specified anywhere?
Please let me know so that I can it forward with Business for approvals and budgetting.
Regards
KKYour question is similar to the post: Oracle 11gr2 connection to Sql Server using dg4msql problem
Please visit: http://stackoverflow.com/questions/4658942/oracle-11gr2-connection-to-sql-server-using-dg4msql-problem
Answer on the website:
You seem to be using the Gateway for MySQL set-up rather than the Heterogeneous Gateway (for ODBC connections). Here is an overview of the process
On SQL Server create a database user and give it read access to the database/tables you want to read via the Oracle database link.
In the gateway home each SQL Server database you want to access should have an init.ora located in $OH/dg4msql/admin in the form initsid.ora where sid is the name of the database to be used in the link (e.g. initbob.ora), so create one
HS_FDS_CONNECT_INFO=msserver1:1234//Example_Database
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
HS_TRANSACTION_MODEL=READ_ONLY
You must now add the new sid to the listener.ora in the gateway home using an additional SID_DESC section inside the existing SID_LIST, for example
(SID_DESC =
(SID_NAME=bob)
(ORACLE_HOME=/oracle/gateway/product/11.2.0)
(ENVS=LD_LIBRARY_PATH=/oracle/gateway/product/11.2.0/dg4msql/driver/lib;/oracle/gateway/product/11.2.0/lib)
(PROGRAM=dg4msql)
You should now stop and restart the gateway listener so that the new sid becomes active. NB a reload is not enough.
You must now add the new sid in the tnsnames.ora file for the listener of each database in which you will create a link. You don't need to do this in the gateway home unless it is also a database home in which you will create a database link.
bob =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = severname.example.com)(PORT = 1690))
(CONNECT_DATA = (SID = bob))
(HS = OK)
NB: The host and port are for the gateway not for the SQL Server database
In each database that requires a link to the MS-SQL database you should create a database link to your new gateway sid.
CREATE PUBLIC DATABASE LINK bob
CONNECT TO "ms_user" IDENTIFIED BY "ms-passwd" USING 'bob';
where ms-user and ms-password are the SQL Server user you created right at the start.
Now you can test the new database link
SELECT COUNT(*) FROM "Table_Name"@bob;
Once you have this working you can alter the initsid.ora file to add parameters to suit your connection. If you do it this way you can easily add and manage many different databases via the gateway.
Hip
Edited by: 1000595 on 04:58 17-04-2013 -
Install Oracle 11gr2 on Windows 2008 R2 with ASM step by step Guide needed
Hi,
I am looking for a step by step guide on installing Oracle 11gr2 on Windows 2008 R2 with ASM etc. This is not a RAC environment since ASM architecture is a bit different in 11gR2, I would appreciate if anyone can point me to a guide to follow or provide a one.
Thanks in advance.
SujithHi Sujith;
I am looking for a step by step guide on installing Oracle 11gr2 on Windows 2008 R2 with ASM etc. This is not a RAC environment since ASM architecture is a bit different in 11gR2, I would appreciate if anyone can point me to a guide to follow or provide a one.You need to install grid first(Software only) its neccessary for ASM, Than you need to use asmca to create asm disks than you need to install 11gr2
All doc avaliable at:
http://www.oracle.com/pls/db112/homepage
Regard
Helios -
Connecting Excel 2010 64 bit on Windows 7 64 bit to Oracle 11gR2 on Linux
Using:
Excel 2010 64 bit
Windows 7 64 bit
Oracle instant client 11.2.0.1 64 bit
connecting to Oracle 11gR2 64 bit on Linux 5.8 64 bit
I have created a User DSN in Windows called "NITRO Oracle 11gR2 DB" using the Oracle 64 bit instant client driver 11.2.0.1. Configured as so
http://i.imgur.com/2a3MZ.png
Connection test is successful.
In Excel 2010, I go to Data ribbon, From Data Connection Wizard
http://i.imgur.com/han3u.png
I then choose Other/Advanced, and then Oracle Provider for OLE DB.
http://i.imgur.com/w3P1c.png
I click next and then put in the data source, user name and password and click test, and it fails with Micosoft Data Link Error. http://i.imgur.com/zuv41.png
Do you know what I'm doing wrong?12154 means the client couldn't resolve what you filled in for Data Source. What did you fill in for Data Source when configuring the OLEDB connection? It looks like "nitro" should be the correct thing to fill in, based on your statement that the ODBC DSN you configured works with it.
Greg -
Problem creating Network ACL for a ROLE in Oracle 11gR2
According to Oracle Documentation when you create a new Network ACL you can add privileges to a user or role. I need to create a new ACL for the UTL_SMTP package for a specific role, but when I granted it the users who have that role are still getting the "ORA-24247: network access denied by access control list (ACL)" error when they try to send an email. If I grant the ACL privilege to the same users directly it works fine. Is there any step I'm missing? This is the test I have made on my Solaris 10 - Oracle 11gR2 (11.2.0.3) Standard Edition server:
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 21 09:31:52 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> CONNECT system/******@testdb
Connected.
SQL> SET LINES 1000
SQL> SELECT * FROM v$version;
BANNER
Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Solaris: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> COLUMN host FORMAT A20
SQL> COLUMN lower_port FORMAT 99999
SQL> COLUMN upper_port FORMAT 99999
SQL> COLUMN acl FORMAT A40
SQL> COLUMN acl FORMAT A40
SQL> COLUMN principal FORMAT A15
SQL> COLUMN privilege FORMAT A10
SQL> COLUMN is_grant FORMAT A8
SQL> COLUMN status FORMAT A10
SQL> SELECT host, lower_port, upper_port, acl FROM dba_network_acls;
no rows selected
SQL> SELECT acl,principal,privilege,is_grant FROM dba_network_acl_privileges;
no rows selected
SQL> CREATE USER testacl IDENTIFIED BY testacl;
User created.
SQL> GRANT CONNECT TO testacl;
Grant succeeded.
SQL>
SQL> BEGIN
2 dbms_network_acl_admin.create_acl('test_smtp.xml','TEST SMTP ACL','TESTACL',true,'connect');
3 dbms_network_acl_admin.assign_acl('test_smtp.xml','localhost',25);
4 commit;
5 END;
6 /
PL/SQL procedure successfully completed.
SQL> SELECT host, lower_port, upper_port, acl FROM dba_network_acls;
HOST LOWER_PORT UPPER_PORT ACL
localhost 25 25 /sys/acls/test_smtp.xml
SQL> SELECT acl,principal,privilege,is_grant FROM dba_network_acl_privileges;
ACL PRINCIPAL PRIVILEGE IS_GRANT
/sys/acls/test_smtp.xml TESTACL connect true
After creating this ACL I test it like this:
SQL> CONNECT testacl/testacl@testdb
Connected.
SQL> SELECT host, lower_port, upper_port, privilege, status FROM user_network_acl_privileges;
HOST LOWER_PORT UPPER_PORT PRIVILEGE STATUS
localhost 25 25 connect GRANTED
SQL> DECLARE
2 c utl_smtp.connection;
3 BEGIN
4 c := utl_smtp.open_connection('localhost', 25); -- SMTP on port 25
5 utl_smtp.helo(c, 'localhost');
6 utl_smtp.mail(c, 'Oracle11.2');
7 utl_smtp.rcpt(c, '[email protected]');
8 utl_smtp.data(c,'From: Oracle'||utl_tcp.crlf||'To: [email protected]'||utl_tcp.crlf||'Subject: UTL_SMTP TEST'||utl_tcp.crlf||'');
9 utl_smtp.quit(c);
10 END;
11 /
PL/SQL procedure successfully completed.
SQL>
This works fine and I receive the email correctly. Now if I try to do the same thing for a role:
SQL> CONNECT system/******@testdb
Connected.
SQL> BEGIN
2 dbms_network_acl_admin.drop_acl('test_smtp.xml');
3 commit;
4 END;
5 /
PL/SQL procedure successfully completed.
SQL> SELECT host, lower_port, upper_port, acl FROM dba_network_acls;
no rows selected
SQL> CREATE ROLE testacl_role;
Role created.
SQL> GRANT testacl_role TO testacl;
Grant succeeded.
SQL> ALTER USER testacl DEFAULT ROLE ALL;
User altered.
SQL>
SQL> BEGIN
2 dbms_network_acl_admin.create_acl('test_smtp.xml','TEST SMTP ACL','TESTACL_ROLE',true,'connect');
3 dbms_network_acl_admin.assign_acl('test_smtp.xml','localhost',25);
4 commit;
5 END;
6 /
PL/SQL procedure successfully completed.
SQL> SELECT host, lower_port, upper_port, acl FROM dba_network_acls;
HOST LOWER_PORT UPPER_PORT ACL
localhost 25 25 /sys/acls/test_smtp.xml
SQL> SELECT acl,principal,privilege,is_grant FROM dba_network_acl_privileges;
ACL PRINCIPAL PRIVILEGE IS_GRANT
/sys/acls/test_smtp.xml TESTACL_ROLE connect true
SQL>
And now I test it again with the same user:
SQL> CONNECT testacl/testacl@testdb
Connected.
SQL>
SQL> SELECT host, lower_port, upper_port, privilege, status FROM user_network_acl_privileges;
no rows selected
SQL> DECLARE
2 c utl_smtp.connection;
3 BEGIN
4 c := utl_smtp.open_connection('localhost', 25); -- SMTP on port 25
5 utl_smtp.helo(c, 'localhost');
6 utl_smtp.mail(c, 'Oracle11.2');
7 utl_smtp.rcpt(c, '[email protected]');
8 utl_smtp.data(c,'From: Oracle'||utl_tcp.crlf||'To: [email protected]'||utl_tcp.crlf||'Subject: UTL_SMTP TEST'||utl_tcp.crlf||'');
9 utl_smtp.quit(c);
10 END;
11 /
DECLARE
ERROR at line 1:
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.UTL_TCP", line 17
ORA-06512: at "SYS.UTL_TCP", line 267
ORA-06512: at "SYS.UTL_SMTP", line 161
ORA-06512: at "SYS.UTL_SMTP", line 197
ORA-06512: at line 4
SQL>
I'm aware that role privileges doesn't apply inside procedures, functions or packages by default, but this is an anonymous block so it should use the active roles for the user. I also tried adding a "dbms_session.set_role('TESTACL_ROLE');" at the beggining of the anonymous PL/SQL block but I got the same access error.
Thanks in advance for any help you can give to me on this question, it would be very hard to grant the ACL to all the individual users as they are more than 1000, and we create more regularly.Thanks for your quick reply... I don't have a problem creating the basic ACL with the privileges granted for a user. The problem appears when I try to create an ACL with privileges for a ROLE. You can see here http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_networkacl_adm.htm#BABIGEGG than the official Oracle documentation states that you can assign the ACL principal to be a user or role:
Parameter
Description
acl
Name of the ACL. Relative path will be relative to "/sys/acls".
description
Description attribute in the ACL
principal
Principal (database user or role) to whom the privilege is granted or denied. Case sensitive.
My issue is that when I try to create the ACL for a role it doesn't work.
Have you ever created an ACL for a role? if so please send me an example or let me know which step I might be missing. Cheers.
Maybe you are looking for
-
Amending navigation in template
Hi I have created a template with a navigation bar imported through fireworks. I works fine, but I then dicide to alter the nave bar re-export it to dreamweaver and upload the site. All the nav links then point to..Templates/index.htm for example not
-
Why is the printed photo much darked than what is displayed on the monitor? How do I balance the two?
-
Direct certification in SAP CRM
Hi Forum, This query is regarding direct certification in SAP CRM. I have read other threads but could not figure out one detail. I qualify most of the condition laid for direct certification, I have done a few implementations on CRM 5.0 and most of
-
Java Sub-Classing Error. Please Help!
I am trying to understanding some classing sub-classing and the convertion exercise. The errors appear with the code at the bottom at compilation. HelloWorld.java:7: cannot resolve symbol symbol : method uniqueInSubSayHello() location: class SayHello
-
Hi, I wonder if any one of u experts can share a OO tree report. can u paste the code here r pls mail it to [email protected] cheers, santhosh Message was edited by: Kaluvala Santhosh