[root@suthakar asmdsk]# dd if=/dev/zero of=/asmdisk/disk1 bs=1024k count=1000 1000+0 records in 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 6.0365 s, 174 MB/s dd if=/dev/zero of=/asmdisk/disk2 bs=1024k count=1000 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 1.02826 s, 1.0 GB/s dd if=/dev/zero of=/asmdisk/disk3 bs=1024k count=1000 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 1.03051 s, 1.0 GB/s dd if=/dev/zero of=/asmdisk/disk4 bs=1024k count=1000 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 1.0228 s, 1.0 GB/s --- [root@suthakar asmdsk]# /sbin/losetup /dev/loop1 /asmdisk/disk1 [root@suthakar asmdsk]# /sbin/losetup /dev/loop2 /asmdisk/disk2 [root@suthakar asmdsk]# /sbin/losetup /dev/loop3 /asmdisk/disk3 [root@suthakar asmdsk]# /sbin/losetup /dev/loop4 /asmdisk/disk4 raw /dev/raw/raw1 /dev/loop1 /dev/raw/raw1: bound to major 7, minor 1 raw /dev/raw/raw2 /dev/loop2 /dev/raw/raw2: bound to major 7, minor 2 raw /dev/raw/raw3 /dev/loop3 /dev/raw/raw3: bound to major 7, minor 3 raw /dev/raw/raw4 /dev/loop4 /dev/raw/raw4: bound to major 7, minor 4 [root@suthakar raw]# ls -ltr total 0 crw-rw----. 1 root disk 162, 0 Nov 15 14:37 rawctl crw-rw----. 1 root disk 162, 1 Nov 15 15:03 raw1 crw-rw----. 1 root disk 162, 2 Nov 15 15:03 raw2 crw-rw----. 1 root disk 162, 3 Nov 15 15:04 raw3 crw-rw----. 1 root disk 162, 4 Nov 15 15:04 raw4 [root@suthakar raw]# chown -R oracle:oinstall * [root@suthakar raw]# pwd /dev/raw [root@suthakar raw]# ls -ltr total 0 crw-rw----. 1 oracle oinstall 162, 0 Nov 15 14:37 rawctl crw-rw----. 1 oracle oinstall 162, 1 Nov 15 15:03 raw1 crw-rw----. 1 oracle oinstall 162, 2 Nov 15 15:03 raw2 crw-rw----. 1 oracle oinstall 162, 3 Nov 15 15:04 raw3 crw-rw----. 1 oracle oinstall 162, 4 Nov 15 15:04 raw4 |
Friday, November 17, 2017
ASM raw disk creation
Wednesday, November 15, 2017
How to check physical and logical volume on your disk?
How to check you physical volume
$PVS
PV VG Fmt Attr PSize PFree
/dev/sda2 vg_suthakar lvm2 a--u 1.82t 0
How to check your logical volume
$lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
LogVol12 vg_suthakar -wi-ao---- 58.59g
lv_apps vg_suthakar -wi-ao---- 195.31g
lv_apps2 vg_suthakar -wi-ao---- 390.62g
lv_home vg_suthakar -wi-ao---- 19.53g
lv_local vg_suthakar -wi-ao---- 19.53g
lv_opt vg_suthakar -wi-ao---- 19.53g
lv_orafra vg_suthakar -wi-ao---- 341.80g
lv_ordata vg_suthakar -wi-ao---- 341.80g
lv_scratch vg_suthakar -wi-ao---- 427.80g
lv_swap vg_suthakar -wi-ao---- 15.74g
lv_swap1 vg_suthakar -wi-ao---- 9.77g
lv_tmp vg_suthakar -wi-ao---- 1.95g
lv_var vg_suthakar -wi-ao---- 19.53g
[root@suthakar asmdsk]#
$PVS
PV VG Fmt Attr PSize PFree
/dev/sda2 vg_suthakar lvm2 a--u 1.82t 0
How to check your logical volume
$lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
LogVol12 vg_suthakar -wi-ao---- 58.59g
lv_apps vg_suthakar -wi-ao---- 195.31g
lv_apps2 vg_suthakar -wi-ao---- 390.62g
lv_home vg_suthakar -wi-ao---- 19.53g
lv_local vg_suthakar -wi-ao---- 19.53g
lv_opt vg_suthakar -wi-ao---- 19.53g
lv_orafra vg_suthakar -wi-ao---- 341.80g
lv_ordata vg_suthakar -wi-ao---- 341.80g
lv_scratch vg_suthakar -wi-ao---- 427.80g
lv_swap vg_suthakar -wi-ao---- 15.74g
lv_swap1 vg_suthakar -wi-ao---- 9.77g
lv_tmp vg_suthakar -wi-ao---- 1.95g
lv_var vg_suthakar -wi-ao---- 19.53g
[root@suthakar asmdsk]#
Tuesday, November 14, 2017
Simple Rman Setup
make archive log mode
startup mount
alter database archivelog;
alter database open;
-----
RMAN
select open_mode from v$database;
archive log list
alter system set log_archive_dest_1='location=/apps/oracle/arch' scope=both;
show parameter db_recovery_file_dest
rman target /
configure controlfile autobackup on;
configure backup optimization on;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 DAYS;
select global_name from global_name;
setup catalog
create tablespace catalogtbs datafile '/oradata/oimdev/catalogtbs.dbf' size 100M autoextend on maxsize unlimited;
create user recoim identified by recoim;
alter user recoim default tablespace catalogtbs temporary tablespace temp;
grant recovery_catalog_owner to recoim;
grant connect,resource to recoim;
rman target / catalog recoim/recoim@oimdev
create catalog;
sqlplus "recoim/recoim@oimdev"
show user
select table_name from user_tables;
rman target /
RMAN> CONNECT CATALOG recoim/recoim@oimdev
register database;
recoim/recoim@oimdev
RMAN> report schema;
Report of database schema for database with db_unique_name OIMDEV
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 760 SYSTEM YES /oradata/oimdev/system01.dbf
2 540 SYSAUX NO /oradata/oimdev/sysaux01.dbf
3 105 UNDOTBS1 YES /oradata/oimdev/undotbs01.dbf
4 5 USERS NO /oradata/oimdev/users01.dbf
5 346 EXAMPLE NO /oradata/oimdev/example01.dbf
6 100 CATALOGTBS NO /oradata/oimdev/catalogtbs.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 29 TEMP 32767 /oradata/oimdev/temp01.dbf
RMAN backup database;
Starting backup at 14-NOV-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=547 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/oradata/oimdev/system01.dbf
input datafile file number=00002 name=/oradata/oimdev/sysaux01.dbf
input datafile file number=00005 name=/oradata/oimdev/example01.dbf
input datafile file number=00003 name=/oradata/oimdev/undotbs01.dbf
input datafile file number=00006 name=/oradata/oimdev/catalogtbs1.dbf
input datafile file number=00004 name=/oradata/oimdev/users01.dbf
channel ORA_DISK_1: starting piece 1 at 14-NOV-17
channel ORA_DISK_1: finished piece 1 at 14-NOV-17
piece handle=/orafra/OIMDEV/backupset/2017_11_14/o1_mf_nnndf_TAG20171114T222015_f0qdmhr2_.bkp tag=TAG20171114T222015 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 14-NOV-17
Starting Control File and SPFILE Autobackup at 14-NOV-17
piece handle=/orafra/OIMDEV/autobackup/2017_11_14/o1_mf_s_960070831_f0qdmzfp_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 14-NOV-17
RMAN
Share your knowledge, that will help someone.
startup mount
alter database archivelog;
alter database open;
-----
RMAN
select open_mode from v$database;
archive log list
alter system set log_archive_dest_1='location=/apps/oracle/arch' scope=both;
show parameter db_recovery_file_dest
rman target /
configure controlfile autobackup on;
configure backup optimization on;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 DAYS;
select global_name from global_name;
setup catalog
create tablespace catalogtbs datafile '/oradata/oimdev/catalogtbs.dbf' size 100M autoextend on maxsize unlimited;
create user recoim identified by recoim;
alter user recoim default tablespace catalogtbs temporary tablespace temp;
grant recovery_catalog_owner to recoim;
grant connect,resource to recoim;
rman target / catalog recoim/recoim@oimdev
create catalog;
sqlplus "recoim/recoim@oimdev"
show user
select table_name from user_tables;
rman target /
RMAN> CONNECT CATALOG recoim/recoim@oimdev
register database;
recoim/recoim@oimdev
RMAN> report schema;
Report of database schema for database with db_unique_name OIMDEV
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 760 SYSTEM YES /oradata/oimdev/system01.dbf
2 540 SYSAUX NO /oradata/oimdev/sysaux01.dbf
3 105 UNDOTBS1 YES /oradata/oimdev/undotbs01.dbf
4 5 USERS NO /oradata/oimdev/users01.dbf
5 346 EXAMPLE NO /oradata/oimdev/example01.dbf
6 100 CATALOGTBS NO /oradata/oimdev/catalogtbs.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 29 TEMP 32767 /oradata/oimdev/temp01.dbf
RMAN backup database;
Starting backup at 14-NOV-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=547 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/oradata/oimdev/system01.dbf
input datafile file number=00002 name=/oradata/oimdev/sysaux01.dbf
input datafile file number=00005 name=/oradata/oimdev/example01.dbf
input datafile file number=00003 name=/oradata/oimdev/undotbs01.dbf
input datafile file number=00006 name=/oradata/oimdev/catalogtbs1.dbf
input datafile file number=00004 name=/oradata/oimdev/users01.dbf
channel ORA_DISK_1: starting piece 1 at 14-NOV-17
channel ORA_DISK_1: finished piece 1 at 14-NOV-17
piece handle=/orafra/OIMDEV/backupset/2017_11_14/o1_mf_nnndf_TAG20171114T222015_f0qdmhr2_.bkp tag=TAG20171114T222015 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 14-NOV-17
Starting Control File and SPFILE Autobackup at 14-NOV-17
piece handle=/orafra/OIMDEV/autobackup/2017_11_14/o1_mf_s_960070831_f0qdmzfp_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 14-NOV-17
RMAN
Share your knowledge, that will help someone.
Monday, November 13, 2017
Database upgrade from 11.2..0.4 to 12C
Manual Upgrades
Backup the database before starting the upgrade
process. In the event of a failure, you will need this backup to allow you to
recreate your starting point.
To run the new Pre-Upgrade Information Tool,
copy the "preupgrd.sql" and "utluppkg.sql" scripts from the
12c home to a location accessible by the database that needs upgrading. In this
example I used a directory under "/tmp".$ mkdir -p /tmp/upgrade
$ cp /u01/app/oracle/product/12.1.0.1/db_1/rdbms/admin/preupgrd.sql /tmp/upgrade
$ cp /u01/app/oracle/product/12.1.0.1/db_1/rdbms/admin/utluppkg.sql /tmp/upgrade
Make sure the ORACLE_BASE is set and run the "preupgrd.sql" script from SQL*Plus.
$ export ORACLE_SID=orcl
$ ORAENV_ASK=NO
$ . oraenv
$ ORAENV_ASK=YES
$ cd /tmp/upgrade
$ sqlplus / as sysdba
SQL> @preupgrd.sql
Loading Pre-Upgrade Package...
Executing Pre-Upgrade Checks...
Pre-Upgrade Checks Complete.
************************************************************
Results of the checks are located at:
/u01/app/oracle/cfgtoollogs/orcl/preupgrade/preupgrade.log
Pre-Upgrade Fixup Script (run in source database environment):
/u01/app/oracle/cfgtoollogs/orcl/preupgrade/preupgrade_fixups.sql
Post-Upgrade Fixup Script (run shortly after upgrade):
/u01/app/oracle/cfgtoollogs/orcl/preupgrade/postupgrade_fixups.sql
************************************************************
Fixup scripts must be reviewed prior to being executed.
************************************************************
************************************************************
====>> USER ACTION REQUIRED <<====
************************************************************
The following are *** ERROR LEVEL CONDITIONS *** that must be addressed
prior to attempting your upgrade.
Failure to do so will result in a failed upgrade.
You MUST resolve the above errors prior to upgrade
************************************************************
SQL>
The Pre-Upgrade Information Tool produces 3 scripts.
· preupgrade.log : The results of all the checks performed. You need to check this to see if it is safe to continue with the upgrade.
· preupgrade_fixups.sql : A fixup script that should be run before the upgrade.
· postupgrade_fixups.sql : A fixup script that should be run after the upgrade.
Assuming there are no show-stoppers in the "preupgrade.log" file, run the "preupgrade_fixups.sql" script. Any changes it can't perform are flagged as "MANUAL ACTION SUGGESTED".
SQL> @/u01/app/oracle/cfgtoollogs/orcl/preupgrade/preupgrade_fixups.sql
Pre-Upgrade Fixup Script Generated on 2013-07-24 15:00:32 Version: 12.1.0.1 Build: 006
Beginning Pre-Upgrade Fixups...
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
**********************************************************************
Check Tag: DEFAULT_PROCESS_COUNT
Check Summary: Verify min process count is not too low
Fix Summary: Review and increase if needed, your PROCESSES value.
**********************************************************************
Fixup Returned Information:
WARNING: --> Process Count may be too low
Database has a maximum process count of 150 which is lower than the
default value of 300 for this release.
You should update your processes value prior to the upgrade
to a value of at least 300.
For example:
ALTER SYSTEM SET PROCESSES=300 SCOPE=SPFILE
or update your init.ora file.
**********************************************************************
PL/SQL procedure successfully completed.
**********************************************************************
Check Tag: EM_PRESENT
Check Summary: Check if Enterprise Manager is present
Fix Summary: Execute emremove.sql prior to upgrade.
**********************************************************************
Fixup Returned Information:
WARNING: --> Enterprise Manager Database Control repository found in the database
In Oracle Database 12c, Database Control is removed during
the upgrade. To save time during the Upgrade, this action
can be done prior to upgrading using the following steps after
copying rdbms/admin/emremove.sql from the new Oracle home
- Stop EM Database Control:
$> emctl stop dbconsole
- Connect to the Database using the SYS account AS SYSDBA:
SET ECHO ON;
SET SERVEROUTPUT ON;
@emremove.sql
Without the set echo and serveroutput commands you will not
be able to follow the progress of the script.
**********************************************************************
PL/SQL procedure successfully completed.
**********************************************************************
Check Tag: DBMS_LDAP_DEPENDENCIES_EXIST
Check Summary: Check for dependency on DBMS_LDAP package
Fix Summary: Network Objects must be reviewed manually.
**********************************************************************
Fixup Returned Information:
WARNING: --> Existing DBMS_LDAP dependent objects
Database contains schemas with objects dependent on DBMS_LDAP package.
Refer to the Upgrade Guide for instructions to configure Network ACLs.
USER APEX_030200 has dependent objects.
**********************************************************************
PL/SQL procedure successfully completed.
**********************************************************************
Check Tag: AMD_EXISTS
Check Summary: Check to see if AMD is present in the database
Fix Summary: Manually execute ORACLE_HOME/oraolap/admin/catnoamd.sql script to remove OLAP.
**********************************************************************
Fixup Returned Information:
INFORMATION: --> OLAP Catalog(AMD) exists in database
Starting with Oracle Database 12c, OLAP is desupported.
If you are not using the OLAP Catalog component and want
to remove it, then execute the
ORACLE_HOME/oraolap/admin/catnoamd.sql script before or
after the upgrade.
**********************************************************************
PL/SQL procedure successfully completed.
**********************************************************************
[Pre-Upgrade Recommendations]
**********************************************************************
PL/SQL procedure successfully completed.
*****************************************
********* Dictionary Statistics *********
*****************************************
Please gather dictionary statistics 24 hours prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
EXECUTE dbms_stats.gather_dictionary_stats;
^^^ MANUAL ACTION SUGGESTED ^^^
PL/SQL procedure successfully completed.
**************************************************
************* Fixup Summary ************
4 fixup routines generated INFORMATIONAL messages that should be reviewed.
PL/SQL procedure successfully completed.
**************** Pre-Upgrade Fixup Script Complete *********************
PL/SQL procedure successfully completed.
SQL>
As you can see, in this case, the suggested changes were as follows.
ALTER SYSTEM SET PROCESSES=300 SCOPE=SPFILE;
SET ECHO ON;
SET SERVEROUTPUT ON;
-- emremove.sql scrip located in the 12c home.
@/u01/app/oracle/product/12.1.0.1/db_1/rdbms/admin/emremove.sql
-- Removing this before the upgrade will result in the errors shown below.
-- These errors are not show-stoppers, but if you want a cleaner run through,
-- remove this feature after the upgrade.
@?/olap/admin/catnoamd.sql
EXECUTE dbms_stats.gather_dictionary_stats;
-- Shutdown the database.
SHUTDOWN IMMEDIATE;
Copy the parameter and password files from the old home to the 12c home.
$ cp /u01/app/oracle/product/11.2.0.3/db_1/dbs/spfileorcl.ora /u01/app/oracle/product/12.1.0.1/db_1/dbs
$ cp /u01/app/oracle/product/11.2.0.3/db_1/dbs/orapworcl /u01/app/oracle/product/12.1.0.1/db_1/dbs
If the "preupgrade.log" file contains references to deprecated initialization parameters, make the suggested changes to the parameters now before continuing.
Edit the "/etc/oratab" file, setting the new ORACLE_HOME value.
orcl:/u01/app/oracle/product/12.1.0.1/db_1:Y
Make sure the environment is set to the 12c home.
$ export ORACLE_SID=orcl
$ ORAENV_ASK=NO
$ . oraenv
$ ORAENV_ASK=YES
Start the database in upgrade mode.
$ sqlplus / as sysdba
SQL> STARTUP UPGRADE;
SQL> EXIT;
Run the new Parallel Upgrade Utility (catctl.pl).
$ cd $ORACLE_HOME/rdbms/admin
$ $ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql
You can alter the level of parallelism using the "-n" parameter. For example, the following command runs the upgrade with a parallel level of 8.
$ cd $ORACLE_HOME/rdbms/admin
$ $ORACLE_HOME/perl/bin/perl catctl.pl -n 8 catupgrd.sql
n $ORACLE_HOME/perl/bin/perl catctl.pl -n 4 -l /ias/scratch/fmwdrpls/12c_upgd/logs catupgrd.sql
You can see an example of the output from this utility here.
Startup the upgraded database and run the "utlu121s.sql" script to check the summary of the upgrade results.
$ sqlplus / as sysdba
SQL> STARTUP;
SQL> @utlu121s.sql
.
Oracle Database 12.1 Post-Upgrade Status Tool 07-24-2013 17:24:18
.
Component Current Version Elapsed Time
Name Status Number HH:MM:SS
.
Oracle Server
. UPGRADED 12.1.0.1.0 00:16:48
JServer JAVA Virtual Machine
. VALID 12.1.0.1.0 00:04:47
Oracle Workspace Manager
. VALID 12.1.0.1.0 00:01:17
OLAP Analytic Workspace
. VALID 12.1.0.1.0 00:00:53
Oracle OLAP API
. SP2-0310: unable to open file "xoqsys.sql"
. ORA-01917: user or role "OLAPSYS" does not exist
. ORA-00942: table or view does not exist
. ORA-00942: table or view does not exist
. ORA-00942: table or view does not exist
. ORA-00942: table or view does not exist
. ORA-00942: table or view does not exist
. VALID 12.1.0.1.0 00:00:46
Oracle XDK
. VALID 12.1.0.1.0 00:00:48
Oracle Text
. VALID 12.1.0.1.0 00:01:07
Oracle XML Database
. VALID 12.1.0.1.0 00:04:35
Oracle Database Java Packages
. VALID 12.1.0.1.0 00:00:22
Oracle Multimedia
. VALID 12.1.0.1.0 00:02:42
Spatial
. VALID 12.1.0.1.0 00:06:21
Oracle Application Express
. VALID 4.2.0.00.27 00:25:28
Final Actions
. 00:02:47
Total Upgrade Time: 01:09:24
PL/SQL procedure successfully completed.
SQL>
You can see the upgrade failed for the "Oracle OLAP API" section, which is a feature we removed before the upgrade, so it is OK to continue.
If we had no errors, the "catuppst.sql" script would have been run as part of the upgrade. Since we did have errors, we need to run it manually.
SQL> @catuppst.sql
If the "postupgrade_fixups.sql" file contained any recommendations, run it now.
SQL> @/u01/app/oracle/cfgtoollogs/orcl/preupgrade/postupgrade_fixups.sql
The following items are not essential, but the upgrade manual suggests it is a best practice to run them.
-- The following item is probably included in your postupgrade_fixups.sql script.
EXECUTE DBMS_STATS.gather_fixed_objects_stats;
-- Recompile invalid objects.
@utlrp.sql
-- Check for newly invalid objects.
@utluiobj.sql
-- Run again to check the final outcome of the upgrade.
@utlu121s.sql
The upgraded database is now available.
$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Wed Jul 24 18:17:03 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> SELECT name, open_mode FROM v$database;
NAME OPEN_MODE
--------- --------------------
ORCL READ WRITE
SQL>
Remember to alter any script or profile files that contain references to the ORACLE_HOME environment variable.
Emca schedule db backup
../emca -config dbcontrol db -backup
STARTED EMCA at Nov 11, 2017 10:19:51 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.
Enter the following information:
Database SID: oiddb
Database Control is already configured for the database oiddb
You have chosen to configure Database Control for managing the database oiddb
This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: Y
Listener ORACLE_HOME [ /apps/oracle/product/db11g/11.2.0.4/oiddb ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
Automatic backup schedule (HH:MM):
Automatic backup schedule (HH:MM): 10:30
Host username for automatic backup: oracle
Host user password for automatic backup:
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /apps/oracle/product/db11g/11.2.0.4/oiddb
Local hostname ................ suthakar.prince
Listener ORACLE_HOME ................ /apps/oracle/product/db11g/11.2.0.4/oiddb
Listener port number ................ 1521
Database SID ................ oiddb
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
Automatic backup schedule (HH:MM) ................ 10:30
Host username for automatic backup ................ oracle
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Nov 11, 2017 10:21:23 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /apps/oracle/cfgtoollogs/emca/oiddb/emca_2017_11_11_22_19_51.log.
Nov 11, 2017 10:21:23 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Nov 11, 2017 10:21:27 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Nov 11, 2017 10:22:15 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Nov 11, 2017 10:22:26 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Nov 11, 2017 10:22:34 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Nov 11, 2017 10:22:34 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Nov 11, 2017 10:22:52 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Nov 11, 2017 10:22:52 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://suthakar.prince:1158/em <<<<<<<<<<<
Nov 11, 2017 10:23:29 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************ WARNING ************************
Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted. The encryption key has been placed in the file: /apps/oracle/product/db11g/11.2.0.4/oiddb/suthakar.prince_oiddb/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.
***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Nov 11, 2017 10:23:29 PM
oracle@suthakar.prince$
emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
https://suthakar.prince:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /apps/oracle/product/db11g/11.2.0.4/oiddb/suthakar.prince_oiddb/sysman/log
oracle@suthakar.prince$
unable to connect secure and modified un secure which http://
--emctl unsecure dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
https://suthakar.prince:1158/em/console/aboutApplication
Configuring DBConsole for HTTP... Done.
DBCONSOLE successfully stopped... Done.
Agent is already stopped... Done.
Unsecuring dbconsole... Started.
DBConsole is now unsecured... Done.
Unsecuring dbconsole... Sucessful.
DBCONSOLE successfully restarted... Done.
oracle@suthakar.prince$

STARTED EMCA at Nov 11, 2017 10:19:51 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.
Enter the following information:
Database SID: oiddb
Database Control is already configured for the database oiddb
You have chosen to configure Database Control for managing the database oiddb
This will remove the existing configuration and the default settings and perform a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: Y
Listener ORACLE_HOME [ /apps/oracle/product/db11g/11.2.0.4/oiddb ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
Automatic backup schedule (HH:MM):
Automatic backup schedule (HH:MM): 10:30
Host username for automatic backup: oracle
Host user password for automatic backup:
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /apps/oracle/product/db11g/11.2.0.4/oiddb
Local hostname ................ suthakar.prince
Listener ORACLE_HOME ................ /apps/oracle/product/db11g/11.2.0.4/oiddb
Listener port number ................ 1521
Database SID ................ oiddb
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
Automatic backup schedule (HH:MM) ................ 10:30
Host username for automatic backup ................ oracle
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Nov 11, 2017 10:21:23 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /apps/oracle/cfgtoollogs/emca/oiddb/emca_2017_11_11_22_19_51.log.
Nov 11, 2017 10:21:23 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Nov 11, 2017 10:21:27 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Nov 11, 2017 10:22:15 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Nov 11, 2017 10:22:26 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Nov 11, 2017 10:22:34 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Nov 11, 2017 10:22:34 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Nov 11, 2017 10:22:52 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Nov 11, 2017 10:22:52 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://suthakar.prince:1158/em <<<<<<<<<<<
Nov 11, 2017 10:23:29 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************ WARNING ************************
Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted. The encryption key has been placed in the file: /apps/oracle/product/db11g/11.2.0.4/oiddb/suthakar.prince_oiddb/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.
***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Nov 11, 2017 10:23:29 PM
oracle@suthakar.prince$
emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
https://suthakar.prince:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /apps/oracle/product/db11g/11.2.0.4/oiddb/suthakar.prince_oiddb/sysman/log
oracle@suthakar.prince$
unable to connect secure and modified un secure which http://
--emctl unsecure dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
https://suthakar.prince:1158/em/console/aboutApplication
Configuring DBConsole for HTTP... Done.
DBCONSOLE successfully stopped... Done.
Agent is already stopped... Done.
Unsecuring dbconsole... Started.
DBConsole is now unsecured... Done.
Unsecuring dbconsole... Sucessful.
DBCONSOLE successfully restarted... Done.
oracle@suthakar.prince$

Thursday, November 9, 2017
ORA-00265: how to resolve
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1.3429E+10 bytes
Fixed Size 2265944 bytes
Variable Size 6945770664 bytes
Database Buffers 6476005376 bytes
Redo Buffers 4612096 bytes
Database mounted.
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup mount force;
ORACLE instance started.
Total System Global Area 1.3429E+10 bytes
Fixed Size 2265944 bytes
Variable Size 6945770664 bytes
Database Buffers 6476005376 bytes
Redo Buffers 4612096 bytes
Database mounted.
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL> alter database open;
Database altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1.3429E+10 bytes
Fixed Size 2265944 bytes
Variable Size 6945770664 bytes
Database Buffers 6476005376 bytes
Redo Buffers 4612096 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL>
ORACLE instance started.
Total System Global Area 1.3429E+10 bytes
Fixed Size 2265944 bytes
Variable Size 6945770664 bytes
Database Buffers 6476005376 bytes
Redo Buffers 4612096 bytes
Database mounted.
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup mount force;
ORACLE instance started.
Total System Global Area 1.3429E+10 bytes
Fixed Size 2265944 bytes
Variable Size 6945770664 bytes
Database Buffers 6476005376 bytes
Redo Buffers 4612096 bytes
Database mounted.
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL> alter database open;
Database altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1.3429E+10 bytes
Fixed Size 2265944 bytes
Variable Size 6945770664 bytes
Database Buffers 6476005376 bytes
Redo Buffers 4612096 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL>
Simple db creation script
1. copy dbf file in oradata from backup
STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "OIDDB" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 5
MAXDATAFILES 500
MAXINSTANCES 1
MAXLOGHISTORY 1815
LOGFILE
GROUP 1 (
'/oradata/oiddb/log10a.log',
'/oradata/oiddb/log10b.log'
) SIZE 10M,
GROUP 2 (
'/oradata/oiddb/log20a.log',
'/oradata/oiddb/log20b.log'
) SIZE 10M
-- STANDBY LOGFILE
DATAFILE
'/oradata/oiddb/system01.dbf',
'/oradata/oiddb/sysaux01.dbf',
'/oradata/oiddb/undotbs01.dbf',
'/oradata/oiddb/users01.dbf'
CHARACTER SET US7ASCII;
ALTER DATABASE OPEN RESETLOGS;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata/oiddb/temp02.dbf'
SIZE 2000M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata/oiddb/temp01.dbf'
SIZE 2000M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata/oiddb/temp03.dbf'
SIZE 2000M REUSE AUTOEXTEND OFF;
-- End of tempfile additions.
--
STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "OIDDB" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 5
MAXDATAFILES 500
MAXINSTANCES 1
MAXLOGHISTORY 1815
LOGFILE
GROUP 1 (
'/oradata/oiddb/log10a.log',
'/oradata/oiddb/log10b.log'
) SIZE 10M,
GROUP 2 (
'/oradata/oiddb/log20a.log',
'/oradata/oiddb/log20b.log'
) SIZE 10M
-- STANDBY LOGFILE
DATAFILE
'/oradata/oiddb/system01.dbf',
'/oradata/oiddb/sysaux01.dbf',
'/oradata/oiddb/undotbs01.dbf',
'/oradata/oiddb/users01.dbf'
CHARACTER SET US7ASCII;
ALTER DATABASE OPEN RESETLOGS;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata/oiddb/temp02.dbf'
SIZE 2000M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata/oiddb/temp01.dbf'
SIZE 2000M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata/oiddb/temp03.dbf'
SIZE 2000M REUSE AUTOEXTEND OFF;
-- End of tempfile additions.
--
Subscribe to:
Posts (Atom)





