replace comma with new line in editor
How to replace a bulk comman with new line in an Editor?
We can easily do it in Winword. Use the replace tool to search for “,” and replace with “^l”
How to replace a bulk comman with new line in an Editor?
We can easily do it in Winword. Use the replace tool to search for “,” and replace with “^l”
rman backup at different directory structure .then how can recover and restore datafile and logfile
1. which dbms package we can use in mount mode..
2. how to exculde table during stats gather with dbms package
Simple example/sample tnsnames.ora
TEST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = UNIX01)(PORT = 1521)) ) (CONNECT_DATA = (SID = TEST)) )
Problem : Add a Component to an Oracle 11g rel2 Home get the following error INFO: *** Error Dialog: OUI-10150:Error: A runtime exception occurred while setting s_dlgCfgNamingLabelSIDnull in component Oracle Database 11g 11.2.0.1.0 Solution: With 11gR2, you are no longer allowed to run OUI from $ORACLE_HOME/oui/bin. If you do, you will receive this error: INFO: *** Error Dialog: OUI-10150:Error: A runtime exception occurred while setting s_dlgCfgNamingLabelSIDnull in component Oracle Database 11g 11.2.0.1.0 . Clearly, the error message is not descriptive at all. Oracle has created unpublished Bug 8330280 to give a warning message instead of this error. To avoid this error, always run OUI from the installation media and not from $ORACLE_HOME/oui/bin.
The SHOW command is used to display the values of current RMAN configuration settings.
RMAN> show all;
Shows all parameters.
RMAN> show archivelog backup copies;
Shows the number of archivelog backup copies.
RMAN> show archivelog deletion policy;
Shows the archivelog deletion policy.
RMAN> show auxname;
Shows the auxiliary database information.
RMAN> show backup optimization;
Shows whether optimization is on or off.
RMAN> show auxiliary channel;
Shows how the normal channel and auxiliary hannel are configured.
RMAN> show controlfile autobackup;
Shows whether autobackup is on or off.
RMAN> show controlfile autobackup format;
Shows the format of the autobackup control file.
RMAN> show datafile backup copies;
Shows the number of datafile backup copies being ept.
RMAN> show default device type;
Shows the default type disk or tape.
RMAN> show encryption algorithm;
Shows the encryption algorithm currently in use.
RMAN> show encryption for database;
Shows the encryption for the database.
RMAN> show encryption for tablespace;
Shows the encryption for the tablespace.
RMAN> show exclude;
Shows the tablespaces excluded from the backup.
RMAN> show maxsetsize;
Shows the maximum size for backup sets. The default value is unlimited.
RMAN> show retention policy;
Shows the policy for datafile and control file backups and copies that RMAN marks as obsolete.
RMAN> show snapshot controlfile name;
Shows the snapshot control filename.
Note: You can see any nondefault RMAN configured settings in the V$RMAN_CONFIGURATION database view.
Problem description:
In AWR report in 11g have found the following warning message in the Top and All Statistics Informations are missing
"WARNING: Since the DB Time is less than one second, there was minimal foreground activity in the snapshot period. Some of the percentage values will be invalid."
Root Cause:
Historical Data and Statistics are not colleted and available in Statistical Tables.
Proposed Solution:
[oracle@ORA01 ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/db_1
[oracle@ORA01 ~]$ echo $ORACLE_SID
ORCL
[oracle@ORA01 ~]$ cd $ORACLE_HOME
[oracle@ORA01 db_1]$ cd rdbms
[oracle@ORA01 rdbms]$ cd admin
[oracle@ORA01 admin]$ pwd
/u01/app/oracle/product/11.2.0/db_1/rdbms/admin
[oracle@ORA01 admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 29 20:51:52 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Release 11.2.0.1.0 - Production
SQL> show parameter control_management_pack_access
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_management_pack_access string NONE
SQL> alter system set control_management_pack_access="DIAGNOSTIC+TUNING" scope=both;
System altered.
SQL> show parameter control_management_pack_access
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_management_pack_access string DIAGNOSTIC+TUNING
SQL>
Once the above propsed solution is applied wait for an hour because default time to generate next Data Collection is after 1 hour. If you have any specific data collection interval please check after next data collection. It will be fine.
Proposed Another Solution:
I think this is a known problem, several mentions on metalink. You could try to drop your AWR with the catnoawr.sql script, then re-create it with catawr.sql but of course you would lose all the histotical data. Or possibly, following the hints in the metalink articles
To run multiple SQLPlus queries as part of a DOS batch file place all the queries in a separate SQL file.
For Example
@C:\Queries\Query_1.sql
@C:\Queries\Query_2.sql
@C:\Queries\Query_3.sql
@C:\Queries\Query_4.sql
Save the file as runall.sql.
Then use this file in your batch file
@Echo Off
sqlplus [login details] @C:\queries\runall.sql
EXIT
Installing Oracle 11g RAC on virtual servers using VMware.
This post describes the installation of Oracle 11g RAC on virtual servers.Hardware
The following hardware was used for the installation:
| Operating system | Processor | Memory | HDD’s |
| Windows XP SP2 (32 bit) | Intel P4 3Ghz | 3Gb | 1 x 160Gb 7200rpm & 1x 250Gb 7200rpm. Both on Ultra ATA Controllers |
You’ll need at least 3Gb of RAM for this installation as the virtual machines will be configured with 1Gb of RAM each, leaving 1Gb for the host operating system. The virtual machines further requires a total of 40Gb of storage.
Software
General
For obvious reason this installation should never be used for Production or Development purposes. This type of environment is however extremely helpful if you want to learn and understand Oracle RAC and you do not have access to traditional hardware resources.
Virtual Machines
I used VMware Server (1.0.3) to facilitate my virtual machines. If you have not done so already download the software here. You’ll need to register to get an activation code, but it is a free product.
Configure your first virtual machine:




| Virtual Machine 1 | E:\Virtual Machines\RAC\rac11g\rac1 |
| Virtual Machine 2 | E:\Virtual Machines\RAC\rac11g\rac2 |
| Shared Storage | E:\Virtual Machines\RAC\rac11g\share |















| Purpose | Size | Virtual device node |
| Database files | 3Gb | SCSI 1:0 |
| Database files | 3Gb | SCSI 1:1 |
| Database files | 3Gb | SCSI 1:2 |
| Oracle Cluster Registry | 300Mb | SCSI 1:3 |
| Voting Disk | 300Mb | SCSI 1:4 |







You have now successfully configured your first virtual machine. We’ll clone this at a later stage to provide for the second virtual machine.
Install Oracle Enterprise Linux
You are now ready to install Linux on the virtual machine. If you have not done so already, download the Oracle Enterprise Linux 4 (Update 5) files from hereand unzip. Once unzipped you should have the following cd image files:
Enterprise-R4-U5-i386-disc1.iso
Enterprise-R4-U5-i386-disc2.iso
Enterprise-R4-U5-i386-disc3.iso
Enterprise-R4-U5-i386-disc4.iso
Install Linux:







| Mount point | Size |
| /swap | 2048Mb |
| /tmp | 1024Mb |
| / | 4096Mb |
| /u01 | 13312Mb |
To partition the local disk select the free space on /dev/sda and select ‘Edit’ to add partitions. Add all partitions as in the table above to /dev/sda. Do not configure the other disks at this stage. Select ‘Next’ to continue once done.


| Hostname | Network device | Network type | IP address |
| rac1.startoracle.com | eth0 | Public | 192.168.1.50 |
| eth1 | Private | 10.10.10.50 |
Please note: Configure the public IP address for your virtual machines so that they are on the same network (192.168.1.1 in my case) as your host machine. You can also change the domain name (startoracle.com in my case) to your own. Remember to make these changes throughout the rest of the installation.
Tick both network devices to be ‘Active on boot’:

Select each device and select ‘Edit’ to edit advanced settings:
Deselect ‘Configure using DHCP’
Enter the IP address as per the table above.
Enter the Netmask: 255.255.255.0

Repeat for interface eth1:

Set the hostname: rac1.startoracle.com
Set the Gateway: 192.168.1.1
Set the Primary DNS: 192.168.1.1
‘Next’ to continue when done.







During the installation you’ll be prompted to insert the installation cd’s. When this happens simply right-click on the CD-ROM icon in the bottom right corner and select the appropriate ISO image file. Select ‘Ok’ to continue the installation.
















| Purpose | Size | Virtual device node | Disk |
| Database files | 3Gb | SCSI 1:0 | /dev/sdb |
| Database files | 3Gb | SCSI 1:1 | /dev/sdc |
| Database files | 3Gb | SCSI 1:2 | /dev/sdd |
| Oracle Cluster Registry | 300Mb | SCSI 1:3 | /dev/sde |
| Voting Disk | 300Mb | SCSI 1:4 | /dev/sdf |
Use the following command to list all disks & partitions: fdisk –l
This will list all disks (including /dev/sda which we’ve already configured).
Repeat the following steps for all disks in the table above:
Open a terminal window as the root user and enter the following command (replacing <disk> with the correct disk name): fdisk <disk>
[root@rac1 ~]# fdisk /dev/sdb
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-391, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-391, default 391):
Using default value 391
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
The key sequence after entering the fdisk <disk> command is:
n [return] p [return] 1 [return] [return] [return] w [return]


You can issue the following command for these settings to take immediate effect: /sbin/sysctl –p
| Public | 192.168.1.50 | rac1.startoracle.com | rac1 |
| 192.168.1.60 | rac2.startoracle.com | rac2 | |
| VIP | 192.168.1.51 | rac1-vip.startoracle.com | rac1-vip |
| 192.168.1.61 | rac2-vip.startoracle.com | rac2-vip | |
| Inter-connect | 10.10.10.50 | rac1-priv.startoracle.com | rac1-priv |
| 10.10.10.60 | rac2-priv.startoracle.com | rac2-priv |
The /etc/hosts file should now contain the following entries:

Restart the network services to pick up the new settings with the following command: # service network restart
Append the following to the /etc/profile file:
if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi












As the oracle user on node rac2:
$ mkdir ~/.ssh
$ chmod 700 ~/.ssh
$ /usr/bin/ssh-keygen -t rsa
As the oracle user on node rac1:
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ scp ~/.ssh/authorized_keys rac2:/home/oracle/.ssh/
Perform the following as the oracle user on node rac1 and then node rac2:
ssh rac1 date
ssh rac2 date
ssh rac1.startoracle.com date
ssh rac2.startoracle.com date
ssh rac1-priv date
ssh rac2-priv date
ssh rac1-priv.startoracle.com date
ssh rac2-priv.startoracle.com date
Ouput:
[root@rac1 etc]# service 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 ]
Loading module “oracleasm”: [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
Stamp the ASM disks
As the root user on node rac1 (or rac2, but not both) run the following:
# service oracleasm createdisk DATA1 /dev/sdb1
# service oracleasm createdisk DATA2 /dev/sdc1
# service oracleasm createdisk RECO1 /dev/sdd1
Output:
[root@rac1 etc]# service oracleasm createdisk DATA1 /dev/sdb1
Marking disk “/dev/sdb1″ as an ASM disk: [ OK ]
[root@rac1 etc]# service oracleasm createdisk DATA2 /dev/sdc1
Marking disk “/dev/sdc1″ as an ASM disk: [ OK ]
[root@rac1 etc]# service oracleasm createdisk RECO1 /dev/sdd1
Marking disk “/dev/sdd1″ as an ASM disk: [ OK ]
Verify the newly configured ASM disks
As the root user on both nodes run the following:
# service oracleasm scandisks
# service oracleasm listdisks
Output:
[root@rac1 etc]# service oracleasm scandisks
Scanning system for ASM disks: [ OK ]
[root@rac1 etc]# service oracleasm listdisks
DATA1
DATA2
RECO1
You are now ready to install Oracle Clusterware.
Install Oracle Clusterware

$ ./runcluvfy.sh stage -pre crsinst -n rac1,rac2
Performing pre-checks for cluster services setup
Checking node reachability…
Node reachability check passed from node “rac1″.
Checking user equivalence…
User equivalence check passed for user “oracle”.
Checking administrative privileges…
User existence check passed for “oracle”.
Group existence check passed for “oinstall”.
Membership check for user “oracle” in group “oinstall” [as Primary] passed.
Administrative privileges check passed.
Checking node connectivity…
Node connectivity check passed for subnet “192.168.1.0″ with node(s) rac2,rac1.
Node connectivity check passed for subnet “10.10.10.0″ with node(s) rac2,rac1.
Interfaces found on subnet “10.10.10.0″ that are likely candidates for VIP:
rac2 eth1:10.10.10.60
rac1 eth1:10.10.10.50
Interfaces found on subnet “192.168.1.0″ that are likely candidates for a private interconnect:rac2 eth0:192.168.1.60
rac1 eth0:192.168.1.50
Node connectivity check passed.
Checking system requirements for ‘crs’…
Total memory check failed.
Check failed on nodes:
rac2,rac1
Free disk space check passed.
Swap space check passed.
System architecture check passed.
Kernel version check passed.
Package existence check passed for “make-3.80″.
Package existence check passed for “binutils-2.15.92.0.2″.
Package existence check passed for “gcc-3.4.5″.
Package existence check passed for “libaio-0.3.105″.
Package existence check passed for “libaio-devel-0.3.105″.
Package existence check passed for “libstdc++-3.4.5″.
Package existence check passed for “elfutils-libelf-devel-0.97″.
Package existence check passed for “sysstat-5.0.5″.
Package existence check passed for “libgcc-3.4.5″.
Package existence check passed for “libstdc++-devel-3.4.5″.
Package existence check passed for “unixODBC-2.2.11″.
Package existence check passed for “unixODBC-devel-2.2.11″.
Package existence check passed for “glibc-2.3.4-2.19″.
Group existence check passed for “dba”.
Group existence check passed for “oinstall”.
User existence check passed for “nobody”.
System requirement failed for ‘crs’
Pre-check for cluster services setup was unsuccessful on all the nodes.
The Clufvy pre-check will fail, because the ‘Total memory check’ failed, even though we have the recommended 1Gb RAM allocated to each instance. Make sure all other checks passed.
This will launch the OUI (Oracle Universal Installer) for Oracle Clusterware 11g.

















Install Oracle Database and ASM Software











Create Oracle ASM instances






Enter ‘DATA’ as the first disk group name. Keep the default redundancy settings (Normal) and select the 2 data disks (DATA1 and DATA2). ‘Ok’ to continue.




Create Oracle RAC Database




















Oracle 11g RAC on virtual servers. Done.
ORA-01455: converting column overflows integer datatype
Error:
Export of 11g Rel2 using 10g Client will have the above error message at exporting triggers.
The export failed with the following detailed error :…..
exporting referential integrity constraints.
exporting triggers
EXP-00056: ORACLE error
1455 encounteredORA-01455: converting column overflows integer datatype
EXP-00000: Export terminated unsuccessfully
Cause:
This is an Oracle Bug. The root cause is that the converted form of the specified expression was too large for the specified datatype.
Solution:
Solution 1 : Try with an Oracle 11g Release 2 EXP client against the Oracle 11g Release 2.
Solution 2 : Use the triggers=n option, that allows an export of a schema made by an Oracle 10.2 client against an Oracle 11g release 2 to complete successfully.
Alibi3col theme by
Themocracy