2010年11月25日 星期四
Create HPUX boot CD/DVE
On a system with a CD/DVD writer and the same version of Ignite-UX as on your tape, execute
the following command (iso_directory is the target directory for the .iso media file and
the -r option specifies the release, such as B.11.23 or B.11.31):
# make_media_install -r B.11.31 -m iso_directory
Avamar Oracle Can not view on the Backup console
2. make sure the oratab locate in the /vat/opt/oracle
3. Add the environment parameters
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/lib: /opt/AVMRclnt/lib
4. run the /opt/AVMRclnt/bin/avoacle --browse
RMAN Archivelog crosscheck
$ rman target /
Recovery Manager: Release 9.2.0.4.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: AVATAR2 (DBID=2480694409)
當archive有刪除的時候要使用,RMAN 的備份才會可以備archive log,之後要設定incarnation numner , list incarnation ,set incarnation
RMAN> crosscheck archivelog all;
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=25 devtype=DISK
validation failed for archived log
archive log filename=/opt/oracle/oradata/avatar2/archive/1_2714.dbf recid=2702 stamp=545107659
validation failed for archived log
archive log filename=/opt/oracle/oradata/avatar2/archive/1_2715.dbf recid=2703 stamp=545108268
...........
validation failed for archived log
archive log filename=/opt/oracle/oradata/avatar2/archive/1_2985.dbf recid=2973 stamp=545399327
validation succeeded for archived log
Crosschecked 278 objects
2.使用delete expired archivelog all 命令删除所有過期日誌檔
RMAN> delete expired archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=12 devtype=DISK
List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - --------- ----
376 1 2714 X 23-NOV-04 =/opt/oracle/oradata/avatar2/archive/1_2714.dbf
.....
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 125 01-NOV-04
Backup Piece 125 01-NOV-04 /data1/oracle/orabak/full_1_541045804
Backup Set 131 04-NOV-04
Backup Piece 131 04-NOV-04 /data1/oracle/orabak/full_AVATAR2_20041104_131
....
Backup Set 173 06-DEC-04
Backup Piece 173 06-DEC-04 /data1/oracle/orabak/full_AVATAR2_20041206_173
Backup Set 179 11-DEC-04
Backup Piece 179 11-DEC-04 /data1/oracle/orabak/arch544588206.arc
.....
Backup Piece 189 17-DEC-04 /data1/oracle/orabak/arch545106606.arc
Backup Set 190 17-DEC-04
Backup Piece 190 17-DEC-04 /data1/oracle/orabak/arch545106665.arc
Backup Set 191 20-DEC-04
Backup Piece 191 20-DEC-04 /data1/oracle/orabak/arch_AVATAR2_20041220_194
Archive Log 2973 20-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2985.dbf
Archive Log 2971 20-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2984.dbf
.....
Archive Log 2705 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2717.dbf
Archive Log 2704 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2716.dbf
Archive Log 2703 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2715.dbf
Archive Log 2702 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2714.dbf
使用delete obsolete命令删除過期備份檔:
RMAN> delete obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 125 01-NOV-04
Backup Piece 125 01-NOV-04 /data1/oracle/orabak/full_1_541045804
....
Archive Log 2704 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2716.dbf
Archive Log 2703 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2715.dbf
Archive Log 2702 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2714.dbf
Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/data1/oracle/orabak/full_AVATAR2_20041206_173 recid=173 stamp=544156241
.....
deleted archive log
archive log filename=/opt/oracle/oradata/avatar2/archive/1_2715.dbf recid=2703 stamp=545108268
deleted archive log
archive log filename=/opt/oracle/oradata/avatar2/archive/1_2714.dbf recid=2702 stamp=545107659
Deleted 286 objects
RMAN> crosscheck archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=19 devtype=DISK
specification does not match any archive log in the recovery catalog
2010年8月25日 星期三
Oracle 11gR2 new feature
1.5.1.1 Flashback Data Archive Support for DDLs
Oracle Database 11g Release 2 (11.2) users can now use most DDL commands on tables that are being tracked with Flashback Data Archive. This includes:
-
Add, Drop, Rename, Modify Column
-
Drop, Truncate Partition
-
Rename, Truncate Table
-
Add, Drop, Rename, Modify Constraint
For more complex DDL (for example, upgrades and split table), the Disassociate and Associate PL/SQL procedures can be used to temporarily disable Total Recall on specified tables. The Associate procedure enforces schema integrity after association; the base table and history table schemas must be the same.
This feature makes it much easier to use the Total Recall option with complex applications that require the ability to modify the schema.
1.5.1.2 Instance Caging
Instance Caging allows the DBA to limit the CPU usage of an Oracle instance by setting the CPU_COUNT
initialization parameter and enabling CPU resource management.
With Instance Caging, users can partition CPU resources among multiple instances running on a server to ensure predictable performance.
Oracle Enterprise Manager hostname change re-create
emctl start dbconsole
2010年8月16日 星期一
Oracle Explain plan
Creating a PLAN_TABLE
CONNECT HR/your_password
@$ORACLE_HOME/rdbms/admin/utlxplan.sql
Table created.
EXPLAIN PLAN FOR
SELECT last_name FROM employees;
UTLXPLS
.SQL
This script displays the plan table output for serial processing. Example 13-2, "EXPLAIN PLAN Output" is an example of the plan table output when using the
UTLXPLS
.SQL
script.-
This script displays the plan table output including parallel execution columns.
-
This procedure accepts options for displaying the plan table output. You can specify:
-
A plan table name if you are using a table different than
PLAN_TABLE
-
A statement Id if you have set a statement Id with the
EXPLAIN
PLAN
-
A format option that determines the level of detail:
BASIC
,SERIAL
, andTYPICAL
,ALL
,
Some examples of the use of
DBMS_XPLAN
to displayPLAN_TABLE
output are:SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());
SELECT PLAN_TABLE_OUTPUT
FROM TABLE(DBMS_XPLAN.DISPLAY('MY_PLAN_TABLE', 'st1','TYPICAL')); -
2010年8月15日 星期日
Solaris queue depth
# mdb -k
> sd_max_throttle/D
> ssd_max_throttle/D