Shut off sleep and hibernate on windows server

Shut off Sleep

>> System and security

>> Power Options

>> Change when the computer sleeps

>> Never

Shut off hibernate

  1. Click Start, and then type cmd in the Start Search box.
  2. In the search results list, right-click Command Prompt, and then click Run as Administrator.
  3. When you are prompted by User Account Control, click Continue.
  4. At the command prompt, type powercfg.exe /hibernate off, and then press ENTER.
  5. Type exit and then press ENTER to close the Command Prompt window.

Secure ssl for pci fusion middleware

The default out of the box configuration for ssl in fusion middleware will most likely not meet your pci standards you’ll want to disable weak ciphers and backward compatibility for version 2 of ssl.

Go to

fusion middleware enterprise manager

select your ohs

right click and choose virtual hosts

click you host name and select configure ssl configurations

uncheck as below

-- ssl_rsa_with_3des_ede_cbc_sha

-- ssl_rsa_with_des_cbc_sha

in protocols unselect

v3_v2hello

image

syncing files to network drive

Windows has a nice way to keep network drives online when your working offline.

Right click the folder and “Always Available Offline”

This may not work well for large folders but it works great for source and documentation folders.

chksum check or failure invalid entry size oracle installer

When downloading an oracle patch file, it is highly important that you run a checksum test to verify the download file.
It is a common error to have a problem in the download and the zip work correctly and even a large portion of the install work before a failure occurs with an error like “invalid entry size”.

It’s easy to check the checksum of the file before working with it to be sure you have a good copy.

In linux

cksum <filename>

md5sum <filename>

or

sha1sum <filename>

Works well for an oracle file since an md5 is usually available right from the download location.

ofm11g mbeam problems debugging Fusion Middleware Control

https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=HOWTO&id=1463919.1

[root@oraappman Desktop]# cd /app/oracle/product/ofm11g/user_projects/domains/web_dev/servers/AdminServer/upload/NonJ2EEManagement/11.1.1/app/
[root@oraappman app]# ls -l
total 4300
-rw-r----- 1 oracle oinstall 4401039 Jul 12 09:26 NonJ2EEManagement.ear
[root@oraappman app]# cp NonJ2EEManagement.ear NonJ2EEManagement.ear.orig
[root@oraappman app]# cp ~/Downloads/NonJ2EEManagement.ear .
cp: overwrite `./NonJ2EEManagement.ear'? y
[root@oraappman app]# ls -l
total 8600
-rw-r----- 1 oracle oinstall 4400595 Jul 12 09:44 NonJ2EEManagement.ear
-rw-r----- 1 root   root     4401039 Jul 12 09:44 NonJ2EEManagement.ear.orig
[root@oraappman app]#

image

weblogic

<password>

image

image

image

image

image

 

Fusion Middeware Update

image

image

image

image

Restart the Adminserver

stop_webdev <- Use a created alias for ease of shortcuts (see my shortcut guide)
start_webdev

Restart the instance: opmnctl stopall/startall

Stop_web <- use and alias

start_web

 

Reproduce error

Using a standard port with oracle ofm11g ohs server

$INSTANCE_HOME/bin/opmnctl stopproc ias-component=ohs1

export ORACLE_HOME=/app/oracle/product/ofm11g/WebTier1

cd $ORACLE_HOME/ohs/bin
chown root .apachectl
chmod 6750 .apachectl

cp /app/oracle/product/ofm11g/WebTier1/instances/instance1/config/OHS/ohs1/httpd.conf /app/oracle/product/ofm11g/WebTier1/instances/instance1/config/OHS/ohs1/httpd.conf.20120712

vi  /app/oracle/product/ofm11g/WebTier1/instances/instance1/config/OHS/ohs1/httpd.conf

verify User and Group = oracle oinstall

$INSTANCE_HOME/bin/opmnctl startproc ias-component=ohs1

Deinstall webtier

[oracle ~]$ cd /app/oracle/product/ofm11g/WebTier1/oui/bin/
[oracle bin]$ ./runInstaller –deinstall

image

image

image

image

image

 

[oracle bin]$ cd /app/oracle/product/ofm11g/WebTier1/oui/bin/

./runInstaller -deinstall

image


image


image


image


image


[oracle oacle_common]$ cd /app/oracle/product/ofm11g/oracle_common/oui/bin/


 


./runInstaller -deinstall -jreLoc /usr/java/jdk1.6.0_33/jre


image


image


image


image

ofm11g webcache manager login

Webcache manager standard is to run on port 7786

Username is ias_admin

Password is installed password

Configure ssl webcache on ohs ofm11g

Create your wallet

>> webcache
>> Security
  >> Wallets

Change port to run on standard ports requires port 80,443 root privileges See section 5.9.2

http://docs.oracle.com/cd/E23943_01/web.1111/e10143/security.htm#i1013669

https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1233972.1#aref_section39

 

cd /app/oracle/product/ofm11g/WebTier1/webcache/bin

[root bin]# ./webcache_setuser.sh setroot oracle

setroot task completed successfully.

 

Create a listening port


image

image

Oracle Session Memory use ora 4030

select
                sum(value)/1024/1024 Mb
             from
                 v$sesstat s, v$statname n
              where
                  n.STATISTIC# = s.STATISTIC# and
                  name = 'session pga memory';

select
   sid,name,trunc(value/1024/1024)
from
   v$statname n,v$sesstat s
where
   n.STATISTIC# = s.STATISTIC# and
   name like 'session%memory%'
order by 3 desc;

Find high water mark to shrink tablespace

set linesize 200 pagesize 2000

col file_name for a75

select file_name,smallest,currsize,savings

   from ( select

               a.file_name,

               ceil( (nvl(hwm,1)*c.value)/1024/1024 ) smallest,

               ceil( blocks*c.value/1024/1024) currsize,

               ceil( blocks*c.value/1024/1024) -

               ceil( (nvl(hwm,1)*c.value)/1024/1024 ) savings

            from dba_data_files a,

              ( select file_id, max(block_id+blocks-1) hwm

                from dba_extents

                group by file_id ) b,

              v$parameter c

            where c.name = 'db_block_size'

                  and

                  a.file_id = b.file_id(+)

                              -- and tablespace_name='USERS'

           ) where savings >= 1024;

 

alter database datafile '<>' resize <smallest>m;

recreate undo to reclaim undo space

create undo tablespace undotbs datafile size 1024m autoextend on next 100m maxsize 6000m;

--the next statement unassigns the current undo tablespace

ALTER SYSTEM SET UNDO_TABLESPACE ='';

--the next statement assigns the new undo tablespace

ALTER SYSTEM SET UNDO_TABLESPACE =undotbs;

alter system set undo_retention=43200;

drop tablespace undotbs1 including contents and datafiles.

 

select sum(bytes)/1024/1024,tablespace_name from dba_undo_extents group by tablespace_name;

SUM(BYTES)/1024/1024 TABLESPACE_NAME

-------------------- ------------------------------

               266.5 UNDOTBS1

                1.25 UNDOTBS

SQL> show parameter undo

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

undo_management                      string      AUTO

undo_retention                       integer     43200

undo_tablespace                      string      UNDOTBS

SQL> alter system set undo_retention=900;

System altered.

SQL> select sum(bytes)/1024/1024,tablespace_name from dba_undo_extents group by tablespace_name;

SUM(BYTES)/1024/1024 TABLESPACE_NAME

-------------------- ------------------------------

               266.5 UNDOTBS1

                1.25 UNDOTBS

SQL> alter system set undo_retention=600;

System altered.

SQL> select sum(bytes)/1024/1024,tablespace_name from dba_undo_extents group by tablespace_name;

SUM(BYTES)/1024/1024 TABLESPACE_NAME

-------------------- ------------------------------

               266.5 UNDOTBS1

                1.25 UNDOTBS

SQL> alter system set undo_retention=43200;

System altered.

SQL> ALTER TABLESPACE UNDOTBS1 OFFLINE

SQL> select sum(bytes)/1024/1024,tablespace_name from dba_undo_extents group by tablespace_name;

SUM(BYTES)/1024/1024 TABLESPACE_NAME

-------------------- ------------------------------

               266.5 UNDOTBS1

              1.3125 UNDOTBS

SQL> desc dba_tablespaces

Name                                                                                                              Null?    Type

----------------------------------------------------------------------------------------------------------------- -------- ----------------------------------------------------------------------------

TABLESPACE_NAME                                                                                                   NOT NULL VARCHAR2(30)

BLOCK_SIZE                                                                                                        NOT NULL NUMBER

INITIAL_EXTENT                                                                                                             NUMBER

NEXT_EXTENT                                                                                                                NUMBER

MIN_EXTENTS                                                                                                       NOT NULL NUMBER

MAX_EXTENTS                                                                                                                NUMBER

PCT_INCREASE                                                                                                               NUMBER

MIN_EXTLEN                                                                                                                 NUMBER

STATUS                                                                                                                     VARCHAR2(9)

CONTENTS                                                                                                                   VARCHAR2(9)

LOGGING                                                                                                                    VARCHAR2(9)

FORCE_LOGGING                                                                                                              VARCHAR2(3)

EXTENT_MANAGEMENT                                                                                                          VARCHAR2(10)

ALLOCATION_TYPE                                                                                                            VARCHAR2(9)

PLUGGED_IN                                                                                                                 VARCHAR2(3)

SEGMENT_SPACE_MANAGEMENT                                                                                                   VARCHAR2(6)

DEF_TAB_COMPRESSION                                                                                                        VARCHAR2(8)

RETENTION                                                                                                                  VARCHAR2(11)

BIGFILE                                                                                                                    VARCHAR2(3)

SQL> select tablespace_name,status from dba_tablespaces where tablespace_name like 'UNDO%';

TABLESPACE_NAME                STATUS

------------------------------ ---------

UNDOTBS                        ONLINE

UNDOTBS1                       ONLINE

SQL> alter tablespace undotbs1 offline;

alter tablespace undotbs1 offline

*

ERROR at line 1:

ORA-30042: Cannot offline the undo tablespace

SQL> show parameter undo

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

undo_management                      string      AUTO

undo_retention                       integer     43200

undo_tablespace                      string      UNDOTBS

SQL> desc v$undostat

Name                                                                                                              Null?    Type

----------------------------------------------------------------------------------------------------------------- -------- ----------------------------------------------------------------------------

BEGIN_TIME                                                                                                                 DATE

END_TIME                                                                                                                   DATE

UNDOTSN                                                                                                                    NUMBER

UNDOBLKS                                                                                                                   NUMBER

TXNCOUNT                                                                                                                   NUMBER

MAXQUERYLEN                                                                                                                NUMBER

MAXQUERYID                                                                                                                 VARCHAR2(13)

MAXCONCURRENCY                                                                                                             NUMBER

UNXPSTEALCNT                                                                                                               NUMBER

UNXPBLKRELCNT                                                                                                              NUMBER

UNXPBLKREUCNT                                                                                                              NUMBER

EXPSTEALCNT                                                                                                                NUMBER

EXPBLKRELCNT                                                                                                               NUMBER

EXPBLKREUCNT                                                                                                               NUMBER

SSOLDERRCNT                                                                                                                NUMBER

NOSPACEERRCNT                                                                                                              NUMBER

ACTIVEBLKS                                                                                                                 NUMBER

UNEXPIREDBLKS                                                                                                              NUMBER

EXPIREDBLKS                                                                                                                NUMBER

TUNED_UNDORETENTION                                                                                                        NUMBER

SQL> desc v$rollstat

Name                                                                                                              Null?    Type

----------------------------------------------------------------------------------------------------------------- -------- ----------------------------------------------------------------------------

USN                                                                                                                        NUMBER

LATCH                                                                                                                      NUMBER

EXTENTS                                                                                                                    NUMBER

RSSIZE                                                                                                                     NUMBER

WRITES                                                                                                                     NUMBER

XACTS                                                                                                                      NUMBER

GETS                                                                                                                       NUMBER

WAITS                                                                                                                      NUMBER

OPTSIZE                                                                                                                    NUMBER

HWMSIZE                                                                                                                    NUMBER

SHRINKS                                                                                                                    NUMBER

WRAPS                                                                                                                      NUMBER

EXTENDS                                                                                                                    NUMBER

AVESHRINK                                                                                                                  NUMBER

AVEACTIVE                                                                                                                  NUMBER

STATUS                                                                                                                     VARCHAR2(15)

CUREXT                                                                                                                     NUMBER

CURBLK                                                                                                                     NUMBER

SQL> select count(*) from v$rollstat;

  COUNT(*)

----------

        12

SQL> select USN,RSSIZE,HWMSIZE,STATUS from v$rollstat;

       USN     RSSIZE    HWMSIZE STATUS

---------- ---------- ---------- ---------------

         0     385024     385024 ONLINE

         1   75620352 1543495680 PENDING OFFLINE

        14     253952     253952 ONLINE

        15     188416     188416 ONLINE

        16     188416     188416 ONLINE

        17     188416     188416 ONLINE

        18     188416     188416 ONLINE

        19     188416     188416 ONLINE

        20     188416     188416 ONLINE

        21     188416     188416 ONLINE

        22     188416     188416 ONLINE

        23     188416     188416 ONLINE

12 rows selected.

SQL> select USN,RSSIZE,HWMSIZE,STATUS from v$rollstat;

       USN     RSSIZE    HWMSIZE STATUS

---------- ---------- ---------- ---------------

         0     385024     385024 ONLINE

        14     253952     253952 ONLINE

        15     188416     188416 ONLINE

        16     188416     188416 ONLINE

        17     253952     253952 ONLINE

        18     253952     253952 ONLINE

        19     253952     253952 ONLINE

        20     188416     188416 ONLINE

        21     253952     253952 ONLINE

        22     188416     188416 ONLINE

        23     188416     188416 ONLINE

11 rows selected.

SQL> alter tablespace undotbs1 offline;

Tablespace altered.

SQL> select sum(bytes)/1024/1024 from dba_data_files;

SUM(BYTES)/1024/1024

--------------------

               53830

SQL> drop tablespace undotbs1 including contents and datafiles;

Tablespace dropped.

SQL> select sum(bytes)/1024/1024 from dba_data_files;

SUM(BYTES)/1024/1024

--------------------

               53830

SQL> show parameter undo

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

undo_management                      string      AUTO

undo_retention                       integer     43200

undo_tablespace                      string      UNDOTBS

SQL> SELECT TO_CHAR(BEGIN_TIME, 'MM/DD/YYYY HH24:MI:SS') BEGIN_TIME,

         TO_CHAR(END_TIME, 'MM/DD/YYYY HH24:MI:SS') END_TIME,

         UNDOTSN, UNDOBLKS, TXNCOUNT, MAXCONCURRENCY AS "MAXCON"

         FROM v$UNDOSTAT WHERE rownum <=  2    3    4  10;

BEGIN_TIME          END_TIME               UNDOTSN   UNDOBLKS   TXNCOUNT     MAXCON

------------------- ------------------- ---------- ---------- ---------- ----------

07/03/2012 10:23:38 07/03/2012 10:31:58         92         51        738          3

07/03/2012 10:13:38 07/03/2012 10:23:38         92         65        837          5

07/03/2012 10:03:38 07/03/2012 10:13:38         92        100       1402          4

07/03/2012 09:53:38 07/03/2012 10:03:38         92        160       1360          4

07/03/2012 09:43:38 07/03/2012 09:53:38          1        130       1840          5

07/03/2012 09:33:38 07/03/2012 09:43:38          1         50        811          4

07/03/2012 09:23:38 07/03/2012 09:33:38          1         55        942          4

07/03/2012 09:13:38 07/03/2012 09:23:38          1         66        949          4

07/03/2012 09:03:38 07/03/2012 09:13:38          1         86       1471          5

07/03/2012 08:53:38 07/03/2012 09:03:38          1        109        641          4

nologging is condition based

“nologging” does not seem to work but it is truly just that there are limits.

 

Table Mode    Insert Mode     ArchiveLog mode      result
-----------   -------------   -----------------    ----------
LOGGING       APPEND          ARCHIVE LOG          redo generated
NOLOGGING     APPEND          ARCHIVE LOG          no redo
LOGGING       no append       ""                   redo generated
NOLOGGING     no append       ""                   redo generated
LOGGING       APPEND          noarchive log mode   no redo
NOLOGGING     APPEND          noarchive log mode   no redo
LOGGING       no append       noarchive log mode   redo generated
NOLOGGING     no append       noarchive log mode   redo generated

Undo Retention

undo retention is in seconds. 43200 would be 12 hours x/3600 

 

This will just reduce how long to retain undo not fix the problem.

select tablespace_name, (bytes/1024/1024) from DBA_DATA_FILES;

SELECT DISTINCT STATUS, SUM(BYTES), COUNT(*)
FROM DBA_UNDO_EXTENTS GROUP BY STATUS;
select * from v$parameter where rownum < 100 and name like '%undo%';

ALTER SYSTEM SET UNDO_RETENTION = 21600 scope=both;
ALTER TABLESPACE undotbs_01 ADD DATAFILE '/u01/oracle/rbdb1/undo0102.dbf' AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED;

 

ALTER DATABASE DATAFILE '+<ASM>/<diskgroup>/datafile/undotbs1.292.696122207'
RESIZE 6G;
ALTER DATABASE DATAFILE '+<ASM>/<diskgroup>/datafile/undotbs1.292.696122207'
AUTOEXTEND ON NEXT 102400K
MAXSIZE 6G

Limited Exceeded for archive log

(2) ORA-19809: limit exceeded for recovery files(2) 
ORA-16038: log 3 sequence# 6479 cannot be archived(2) 
ORA-16014: log 3 sequence# 6479 not archived, no available destinations
 
select * from v$parameter where rownum < 100 and name like '%archive%';
log_archive_dest_1    2    LOCATION=USE_DB_RECOVERY_FILE_DEST

select * from v$parameter where rownum < 100 and name like '%recovery%';


db_recovery_file_dest    2    <myrecoveryarea>


db_recovery_file_dest_size    6    250G


Increase size, move location, take backup


alter system set db_recovery_file_dest_size = 300G;