Thursday, 31 March 2011
TNS-12541,12560,00511, LINUX ERROR: 111: Connection refused
Wednesday, 30 March 2011
Oracle Validated Configuration RPM for OEL5
repo id repo name status
el5_addons Enterprise Linux 5 – i386 – addons disabled
el5_ga_base Enterprise Linux 5 GA – i386 – base disabled
el5_oracle_addons Enterprise Linux 5 – i386 – oracle_addon disabled
el5_u1_base Enterprise Linux 5 U1 – i386 – base disabled
el5_u2_base Enterprise Linux 5 U2 – i386 – base disabled
el5_u3_base Enterprise Linux 5 U3 – i386 – base disabled
el5_u4_base Enterprise Linux 5 U4 – i386 – base disabled
repolist: 0
[root@OEL5 yum.repos.d]#
[
el5_ga_base]
=0
to enabled=1 in
el5_ga_base and the status changed from disabled to enabled.Loaded plugins: security
repo id repo name status
el5_addons Enterprise Linux 5 – i386 – addons disabled
el5_ga_base Enterprise Linux 5 GA – i386 – base enabled: 3,204
el5_oracle_addons Enterprise Linux 5 – i386 – oracle_addon disabled
el5_u1_base Enterprise Linux 5 U1 – i386 – base disabled
el5_u2_base Enterprise Linux 5 U2 – i386 – base disabled
el5_u3_base Enterprise Linux 5 U3 – i386 – base disabled
el5_u4_base Enterprise Linux 5 U4 – i386 – base disabled
repolist: 3,204
[root@OEL5 yum.repos.d]#
Tuesday, 29 March 2011
Install Oracle Database 10.2.0.4 on Windows 7
Windows=5.0,5.1,5.2,6.0,6.1
I added the 6.1
Next is
[Windows-6.1-optional]
I added that below
[Windows-6.0-optional]
Setup will now run. During the install you will get a warning about the OS version but you can "OK" your way through it. Here is the entire contents of the file after changes
[Oracle]
DISTRIBUTION=TRUE
SOURCE=../stage/products.xml
LICENSE_LOCATION=
JRE_LOCATION=../stage/Components/oracle.swd.jre/1.5.0.11.0/1/DataFiles
JRE_MEMORY_OPTIONS=" -mx192m"
DEFAULT_HOME_LOCATION=oracle\product\10.2.0\db
DEFAULT_HOME_NAME=OraDb10g_home
NO_BROWSE=/net
NLS_ENABLED=TRUE
BOOTSTRAP=TRUE
OUI_VERSION=10.2.0.4.0
ADDITIONAL_COMPONENTS={"oracle.sysman.ccr:ALWAYS","oracle.rdbms.rat:ALWAYS","oracle.jdk:UPGRADE","oracle.swd.jre:UPGRADE"}
## JRE_VERSION is only for Windows. This is to copy accessbridge dlls
JRE_VERSION=1.5.0
#SHOW_HOSTNAME=ALWAYS_SHOW shows the hostname panel always
#SHOW_HOSTNAME=NEVER_SHOW does not the hostname panel
#SHOW_HOSTNAME=CONDITION_SHOW shows the hostname panel on condition
SHOW_HOSTNAME=NEVER_SHOW
#THIN_JDBC_FILENAME is optional and defaults to classes12.jar
#The value specified for this should be packaged with OUI, and should
#be relative to
THIN_JDBC_FILENAME=classes12.jar
#RUN_OUICA specifies the batch script name that needs to be run
#The script is ouica.bat for win32, and ouica.sh for solaris.
#If the value is not specified, then the OUICA script is not run
RUN_OUICA=ouica.bat
CLUSTERWARE={"oracle.crs","10.1.0.2.0"}
SILENT_VARIABLE_VALIDATION=TRUE
[Certified Versions]
#You can customise error message shown for failure, provide value for CERTIFIED_VERSION_FAILURE_MESSAGE
Windows=5.0,5.1,5.2,6.0,6.1
#Windows 2000 use winver.exe to find version
[Windows-5.0-required]
#Minimum display colours for OUI to run
MIN_DISPLAY_COLORS=256
#Minimum CPU speed required for OUI
#CPU=300
[Windows-5.0-optional]
#Windows XP use winver.exe to find version
[Windows-5.1-required]
#Minimum display colours for OUI to run
MIN_DISPLAY_COLORS=256
#Minimum CPU speed required for OUI
#CPU=300
[Windows-5.1-optional]
#Windows .net use winver.exe to find version
[Windows-5.2-required]
#Minimum display colours for OUI to run
MIN_DISPLAY_COLORS=256
#Minimum CPU speed required for OUI
#CPU=300
[Windows-5.2-optional]
[Windows-6.0-required]
#Minimum display colours for OUI to run
MIN_DISPLAY_COLORS=256
#Minimum CPU speed required for OUI
#CPU=300
[Windows-6.0-optional]
[Windows-6.1-optional]
[IMAGES]
FILE1=images/rdbms_1.gif
FILE2=images/rdbms_2.gif
FILE3=images/rdbms_3.gif
FILE4=images/rdbms_4.gif
FILE5=images/rdbms_5.gif
FILE6=images/rdbms_6.gif
FILE7=images/rdbms_7.gif
FILE8=images/rdbms_8.gif
LICENSE_LOCATION=license.txt
Edited by: 835955 on Feb 11, 2011 6:51 AM
Monday, 28 March 2011
RMAN Backup Time remaining
To see what RMAN is doing now, and see what SID is doing what sort of work, and how much it has got left to do, use the following SQL. This script is good when you are trying to see how much work an RMAN Channels have got left to do. It is good to watch with the RMAN backup script log (tail -f) as the backup is hapenning. For both scripts you have to lonig as SYSDBA on the instance where the BACKUP
is or RESTORE hapenning.
select
sid,
start_time,
totalwork,
sofar,
(sofar/totalwork) * 100 pct_done
from
v$session_longops
where totalwork > sofar
AND opname NOT LIKE '%aggregate%'
AND opname like 'RMAN%'
/
SID START_TIM TOTALWORK SOFAR PCT_DONE
---------- --------- ---------- ---------- ----------
100 27-OCT-08 1554952 1364978 87.7826454
To watch the success or failure of an RMAN job in the past, or even when it is hapenning, you can use the dynamic v$ view v$rman_status. The following query will show you a history of your BACKUP and RESTORE operations. By changing the where start_time > sysdate -1 clause you control how much in the past you want to look at. I am using this on Oracle 10g, I don't know if it is available on Oracle 9i and before.
select to_char(start_time, 'dd-mon-yyyy@hh24:mi:ss') "Date",
status,
operation,
mbytes_processed
from v$rman_status vs
where start_time > sysdate -1
order by start_time
/
Date STATUS OPERATION MBYTES_PROCESSED
-------------------- ----------------------- --------------------------------- ----------------
27-oct-2008@11:40:11 FAILED RMAN 0
27-oct-2008@11:40:29 COMPLETED BACKUP 11812
27-oct-2008@12:06:30 COMPLETED BACKUP 23112
27-oct-2008@12:41:45 COMPLETED BACKUP 160
27-oct-2008@12:42:28 FAILED CONTROL FILE AUTOBACKUP 0
27-oct-2008@17:24:28 RUNNING RMAN 0
27-oct-2008@17:24:43 COMPLETED DELETE 0
27-oct-2008@17:24:51 COMPLETED CATALOG 0
27-oct-2008@17:25:16 RUNNING RESTORE 22082.875
Tuesday, 22 March 2011
OTN Discussion Forums : Restore Oracle VM Manager with no ...
Backup and Restoring Oracle VM Manager on a different server
In today’s topic, I’d like to discuss the process of backing up and restoring your Oracle VM Manager. Since the Oracle VM Manager is used to manage all your virtual machines and virtual machine resources, I thought it would be a good exercise to discuss the step-by-step process on backing up and restoring the OVM Manager environment. It is crucial to make backups of your Oracle VM Manager to ensure that you don’t lose any data from the Oracle VM Manager repository database that could cause you a headache in having to actively restore each virtual machine to a new Oracle VM Manager, one by one (not a fun exercise). The good news is Oracle has made the backup-restore process quite easy. In the example below, I will be backing up my original Oracle VM Manager, and restoring the content from my old server it into a new server all that has a fresh install of Oracle VM Manager.
Prerequisites:
1) Ensure all your Oracle VM Servers are actively running.
2) Install a fresh copy Oracle VM Manager on your new server
Steps to backup your Oracle VM Manager environment:
1) Login to the Oracle VM Manager as a user with root privileges i.e. root.
2) As root user, backup the existing Oracle VM Manager using the command:
# sh /opt/ovs-manager-2.2/bin/backup.sh
3) The script will prompt you with two options: backup the OVM Manager or restore the OVM Manager. Please ensure to select backup.
4) Once you have selected to backup your Oracle VM Manager, you will be promoted few more questions to save your dump and log files to a destination of your choice. The screen will look as follows:
Back up data now ...
Please enter the password for database account 'OVS':
Please specify the path for dump file?
Please specify the path for log file?
5) Congratulations! Oracle VM Manager was successfully backed up.
Restoring Oracle VM Manager to the existing host:
The process of restoring your Oracle VM Manager is as simple as backing up your Oracle VM Manager. In this example, I’ll show how to restore your backup copy from your old Oracle VM Manager to your new Oracle VM Manager.
1) Copy the dump files and log files from your existing Oracle VM Manager to your new Oracle VM Manager. This can be easily done using the scp command. Example:
scp ovs.dmp host_ip_of_new_OVM_Manager:/tmp/
2) Stop the oc4j service on the old Oracle VM Manager using the command:
service oc4j stop
3) Shutdown the old Oracle VM Manager repository database as oracle user. (NOTE: While this step is not necessary, however I felt it was a good precautionary measure to take and decided shutdown my database).
export ORACLE_HOME='/usr/lib/oracle/xe/app/oracle/product/10.2.0/server'
export ORACLE_SID=XE
$ORACLE_HOME/bin/sqlplus / as sysdba;
SQL> shutdown immediate;
SQL> quit
4) On the new freshly installed Oracle VM Manager server, stop the oc4j service via command:
service oc4j stop
5) Now we will restore the data from our existing Oracle VM Manager to our new Oracle VM Manager using the same backup.sh script. As the root user, type the following command:
# sh /opt/ovs-manager-2.2/bin/backup.sh
6) The script will prompt you with two options: backup the OVM Manager or restore the OVM Manager. Please ensure to select restore.
7) Once you have selected to restore your Oracle VM Manager, you will be promoted few more questions to restore your data using the dump and log files you copied from your existing Oracle VM Manager. The screen will look as follows:
Restore data now ...
Please enter the password for database account 'SYS':
Please enter the path and filename for the dump file (eg /tmp/ovs.dmp):
Please enter the path and filename for the log file (eg /tmp/ovs.log):
Import: Release 10.2.0.1.0 - Production on Fri Jul 2 16:31:03 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 – Production
Export file created by EXPORT:V10.02.01 via conventional path
Warning: the objects were exported by OVS, not by you
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
. . importing table “OVS_AGENT” 22 rows imported
. . importing table “OVS_ALERT” 0 rows imported
. . importing table “OVS_CATEGORY” 1 rows imported
. . importing table “OVS_CDROM” 5 rows imported
. . importing table “OVS_CDROM_RESOURCE” 0 rows imported
. . importing table “OVS_GROUP” 4 rows imported
. . importing table “OVS_IMG_OS” 0 rows imported
. . importing table “OVS_LOCK” 166 rows imported
. . importing table “OVS_LOG” 6582 rows imported
. . importing table “OVS_MAP” 35 rows imported
. . importing table “OVS_OS_RESOURCE” 18 rows imported
. . importing table “OVS_PARTNER” 0 rows imported
. . importing table “OVS_PREFERRED_SERVER” 0 rows imported
. . importing table “OVS_PRIVILEGE” 4 rows imported
. . importing table “OVS_PRIVILEGE_ROLE” 5 rows imported
. . importing table “OVS_RESOURCE” 0 rows imported
. . importing table “OVS_ROLE” 3 rows imported
. . importing table “OVS_SERVER” 22 rows imported
. . importing table “OVS_SITE” 7 rows imported
. . importing table “OVS_STATISTIC” 22465 rows imported
. . importing table “OVS_SYS_VALUE” 8 rows imported
. . importing table “OVS_TASK” 19 rows imported
. . importing table “OVS_USER” 14 rows imported
. . importing table “OVS_USER_GROUP” 39 rows imported
. . importing table “OVS_USER_ROLE” 14 rows imported
. . importing table “OVS_USER_SITE” 93 rows imported
. . importing table “OVS_VD_IMG” 256 rows imported
. . importing table “OVS_VIRTUAL_DISK” 428 rows imported
. . importing table “OVS_VM_GEN_INFO” 124 rows imported
. . importing table “OVS_VM_IMG” 124 rows imported
. . importing table “OVS_VM_NETWORK” 125 rows imported
. . importing table “OVS_VM_SNAPSHOT” 0 rows imported
Import terminated successfully without warnings.
Done
8 ) Once the import has completed successfully, start the oc4j service on your new Oracle VM Manager using the command:
service oc4j start
9) Congratulations! Oracle VM Manager has been successfully restored on your new Oracle VM Manager.
NOTE: User passwords (including admin) will have the same passwords from your existing Oracle VM Manager. If you installed your fresh Oracle VM Manager and used a different password, once you do the restore it will override your existing password and use the passwords found within the existing Oracle VM manager repository you imported.
Friday, 18 March 2011
Thursday, 17 March 2011
Block Developers from Different TOOLS
CONNECT / AS SYSDBA;
CREATE OR REPLACE TRIGGER block_tools_from_prod
AFTER LOGON ON DATABASE
DECLARE
v_prog sys.v_$session.program%TYPE;
BEGIN
SELECT program INTO v_prog
FROM sys.v_$session
WHERE audsid = USERENV('SESSIONID')
AND audsid != 0 -- Don't Check SYS Connections
AND ROWNUM = 1; -- Parallel processes will have the same AUDSID's
IF UPPER(v_prog) LIKE '%TOAD%' OR UPPER(v_prog) LIKE '%T.O.A.D%' OR -- Toad
UPPER(v_prog) LIKE '%SQLNAV%' OR -- SQL Navigator
UPPER(v_prog) LIKE '%PLSQLDEV%' OR -- PLSQL Developer
UPPER(v_prog) LIKE '%BUSOBJ%' OR -- Business Objects
UPPER(v_prog) LIKE '%EXCEL%' -- MS-Excel plug-in
THEN
RAISE_APPLICATION_ERROR(-20000, 'Development tools are not allowed here.');
END IF;
END;
/
SHOW ERRORS
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
Monday, 14 March 2011
RMAN Error Tracing
1.Please upload the alert.log of target database and the trace file associated to the ORA-600 ksfdabrtcre1 error.
2. Reproduce the issue with rman traces activated as follows:
2.1. Start RMAN in debug mode:
rman target
2.2 Activate sql traces
rman> set echo on;
rman> sql "alter system set max_dump_file_size=UNLIMITED";
rman> sql "alter session set events ''10046 trace name context forever, level 12''";
2.3 Run your RMAN script.
RMAN> backup backupset completed between 'sysdate-3' and 'sysdate-2' format '/mnt/OracleBackup/XXXXX_20110218_%U.frabak';
2.4. Please upload:
* The trace file in the
* The files rman.trc and rman.log