Archive

Archive for January, 2011

Change workload respository interval setting

January 25, 2011 Leave a comment

1. Check current setting

SQL> select
2        extract( day from snap_interval) *24*60+
3        extract( hour from snap_interval) *60+
4        extract( minute from snap_interval ) “Snapshot Interval”,
5        extract( day from retention) *24*60+
6        extract( hour from retention) *60+
7        extract( minute from retention ) “Retention Interval”
8  from dba_hist_wr_control;

2. Set to 15 mins

SQL> exec DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(interval => 15);

3. Verify the change

SQL> select
2        extract( day from snap_interval) *24*60+
3        extract( hour from snap_interval) *60+
4        extract( minute from snap_interval ) “Snapshot Interval”,
5        extract( day from retention) *24*60+
6        extract( hour from retention) *60+
7        extract( minute from retention ) “Retention Interval”
8  from dba_hist_wr_control;

Snapshot Interval Retention Interval
—————– ——————
15              11520

 

Advertisements
Categories: workload respository

ORA-19808: recovery destination parameter mismatch

January 24, 2011 Leave a comment

Today, I modify the recovery file destination size as the following

SQL> alter system set db_recovery_file_dest_size=20G scope=spfile sid=’*’;

System altered.

Then, I restart the instance one-by-one, we got the following error

SQL> startup
ORACLE instance started.

Total System Global Area  835354624 bytes
Fixed Size                  2107104 bytes
Variable Size             759175456 bytes
Database Buffers           71303168 bytes
Redo Buffers                2768896 bytes
ORA-01105: mount is incompatible with mounts by other instances
ORA-19808: recovery destination parameter mismatch

After that I checked with Oracle,  I find that there are two restrictions to this parameter.

The first restriction is that we can’t change the parameter by setting sid=<instance name>

SQL> alter system set db_recovery_file_dest_size=30G scope=spfile sid=’gsqsprd2′;
alter system set db_recovery_file_dest_size=30G scope=spfile sid=’gsqsprd2′
*
ERROR at line 1:
ORA-32020: SID=* clause needed to modify this parameter

The second restriction is that the value of parameters DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE must be same in all instances.

ORA-19808: recovery destination parameter mismatch
Cause: The value of parameters DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE must be same in all instances. instance. All databases must have same recovery destination parameters.
Action: Check DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE values in all instances.

Therefore, avoiding the restart instance error, please don’t change the DB_RECOVERY_FILE_DEST_SIZE as the following

SQL> alter system set db_recovery_file_dest_size=20G scope=spfile sid=’*’;

You should change it immediately and make it effectiveness.

SQL> alter system set db_recovery_file_dest_size=20G scope=both;

Categories: Administration

Check Oracle User Account Password Expired

January 17, 2011 Leave a comment

select username ,  expiry_date , account_status
from dba_users
where expiry_date < sysdate+120
and account_status IN ( ‘OPEN’,  ‘EXPIRED(GRACE)’)
order by account_status, expiry_date, username
/

Categories: Administration

Add DVD or CDROM into LDom Guest Domain for OS installation

January 13, 2011 Leave a comment

1. At Primary Domain, Check CDROM device path

# cdrw -l
Looking for CD devices…
Node                   Connected Device                Device type
———————-+——————————–+—————–
/dev/rdsk/c0t0d0s2   | TEAC     DV-W28SS-R       1.0C | CD Reader/Writer

2. Add CDROM service into primary virtual disk service

# ldm add-vdsdev /dev/rdsk/c0t0d0s2 cdrom@primary-vds0

# ldm list-services
VCC
NAME             LDOM             PORT-RANGE
primary-vcc0     primary          5000-5100

VSW
NAME             LDOM             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE
primary-vsw0     primary          00:14:4f:f8:83:d7 e1000g3   0    switch@0              1               1                         1500
primary-vsw1     primary          00:14:4f:f8:48:60 e1000g1   1    switch@1              1               1                         1500
primary-vsw2     primary          00:14:4f:fa:07:eb e1000g2   2    switch@2              1               1                         1500

VDS
NAME             LDOM             VOLUME         OPTIONS          MPGROUP        DEVICE
primary-vds0     primary          gsvmdb02                                       /dev/rdsk/c2t600000E00D00000000013A4400030000d0s2
iso_sys                                        /export/home/oracle/sol-10-u9-ga-sparc-dvd.iso
gsdbdata                                       /dev/rdsk/c2t600000E00D00000000013A4400060000d0s2
gsdbvoting                                     /dev/rdsk/c2t600000E00D00000000013A4400040000d0s2
gsdbcrs                                        /dev/rdsk/c2t600000E00D00000000013A4400050000d0s2
sgvmdb02-sysdisk                                 /dev/rdsk/c2t600000E00D00000000013A4400080000d0s2
sgdbcrs                                        /dev/rdsk/c2t600000E00D00000000013A4400090000d0s2
sgdbdata                                       /dev/rdsk/c2t600000E00D00000000013A44000B0000d0s2
sgdbvoting                                     /dev/rdsk/c2t600000E00D00000000013A44000A0000d0s2
gsqsvmdb-sysdisk                                 /dev/rdsk/c2t600000E00D00000000013A44000D0000d0s2
cdrom                                          /dev/rdsk/c0t0d0s2

3. Assign the virtual cdrom disk  to guest (gsqsvmdb)

# ldm add-vdisk cdrom cdrom@primary-vds0 gsqsvmdb
# ldm start gsqsvmdb
LDom gsqsvmdb started

4. Login the guest domain and boot from the cdrom

# telnet localhost 5002
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.

Connecting to console “gsqsvmdb” in group “gsqsvmdb” ….
Press ~? for control options ..

{0} ok devalias
cdrom                    /virtual-devices@100/channel-devices@200/disk@1
sysdisk                  /virtual-devices@100/channel-devices@200/disk@0
vnet1                    /virtual-devices@100/channel-devices@200/network@1
vnet0                    /virtual-devices@100/channel-devices@200/network@0
net                      /virtual-devices@100/channel-devices@200/network@0
disk                     /virtual-devices@100/channel-devices@200/disk@0
virtual-console          /virtual-devices/console@1
name                     aliases
{0} ok boot /virtual-devices@100/channel-devices@200/disk@1:f

SPARC Enterprise T5120, No Keyboard
Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
OpenBoot 4.30.7, 4096 MB memory available, Serial #83465417.
Ethernet address 0:14:4f:f9:94:c9, Host ID: 84f994c9.

Categories: LDom